diff options
author | Arch Librarian <arch@canonical.com> | 2005-07-14 13:04:21 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2005-07-14 13:04:21 +0000 |
commit | 41f8b289dbe172d533289bbffecbee1b9e1937a9 (patch) | |
tree | c99e7b7eeaeebba66e7b9beb35d67e119ec8f07a /parse.c | |
parent | e7323695df2b28ee745fafd0e75d8a5daf1dc1cf (diff) | |
download | pkg-config-41f8b289dbe172d533289bbffecbee1b9e1937a9.tar.gz |
no getc_unlocked
Author: hp
Date: 2001-07-10 23:16:26 GMT
no getc_unlocked
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 17 |
1 files changed, 3 insertions, 14 deletions
@@ -12,13 +12,6 @@ #include <sys/wait.h> #include <sys/types.h> -/* since we never use getc_unlocked now we should really - * do something to speed up read_one_line - */ -# define flockfile(f) (void)1 -# define funlockfile(f) (void)1 -# define getc_unlocked(f) getc(f) - #ifdef NATIVE_WIN32 #define STRICT @@ -43,8 +36,6 @@ read_one_line (FILE *stream, GString *str) gboolean quoted = FALSE; gboolean comment = FALSE; int n_read = 0; - - flockfile (stream); g_string_truncate (str, 0); @@ -52,7 +43,7 @@ read_one_line (FILE *stream, GString *str) { int c; - c = getc_unlocked (stream); + c = getc (stream); if (c == EOF) { @@ -76,7 +67,7 @@ read_one_line (FILE *stream, GString *str) case '\r': case '\n': { - int next_c = getc_unlocked (stream); + int next_c = getc (stream); if (!(c == EOF || (c == '\r' && next_c == '\n') || @@ -103,7 +94,7 @@ read_one_line (FILE *stream, GString *str) break; case '\n': { - int next_c = getc_unlocked (stream); + int next_c = getc (stream); if (!(c == EOF || (c == '\r' && next_c == '\n') || @@ -121,8 +112,6 @@ read_one_line (FILE *stream, GString *str) done: - funlockfile (stream); - return n_read > 0; } |