no getc_unlocked

Author: hp
Date: 2001-07-10 23:16:26 GMT
no getc_unlocked
This commit is contained in:
Arch Librarian 2005-07-14 13:04:21 +00:00
parent e7323695df
commit 41f8b289db
2 changed files with 4 additions and 14 deletions

View file

@ -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 <hp@pobox.com>

17
parse.c
View file

@ -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;
}