From: Arch Librarian Date: Thu, 14 Jul 2005 13:04:21 +0000 (+0000) Subject: no getc_unlocked X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41f8b289dbe172d533289bbffecbee1b9e1937a9;p=pkg-config no getc_unlocked Author: hp Date: 2001-07-10 23:16:26 GMT no getc_unlocked --- diff --git a/ChangeLog b/ChangeLog index 8174d7c..0ad9d47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ (parse_line): allow spelling Cflags as CFlags, pointed out by Tim (get_compat_package): support legacy script gnome-vfs-config for package name "libgnomevfs" + (read_one_line): just blow away all the stupid getc_unlocked crap 2001-06-18 Havoc Pennington diff --git a/parse.c b/parse.c index c769359..b9a70cc 100644 --- a/parse.c +++ b/parse.c @@ -12,13 +12,6 @@ #include #include -/* 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; }