diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2005-09-10 18:46:03 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2005-09-10 18:46:03 +0000 |
commit | 67b92bc6ff31e8ffe4146be2a8e8911fbd98d18c (patch) | |
tree | 4a1089482e07d3af4fa00bed4bad977c7e9fb20f /epan/dtd_preparse.l | |
parent | 78a5252c83377f7d9dccefc01a0bc1a57bdf01e6 (diff) | |
download | wireshark-67b92bc6ff31e8ffe4146be2a8e8911fbd98d18c.tar.gz wireshark-67b92bc6ff31e8ffe4146be2a8e8911fbd98d18c.tar.bz2 wireshark-67b92bc6ff31e8ffe4146be2a8e8911fbd98d18c.zip |
don't use fgets() as MSVC does not implement it. use fgetc instead.
svn path=/trunk/; revision=15750
Diffstat (limited to 'epan/dtd_preparse.l')
-rw-r--r-- | epan/dtd_preparse.l | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/epan/dtd_preparse.l b/epan/dtd_preparse.l index 101a9161a4..7b6fa6792e 100644 --- a/epan/dtd_preparse.l +++ b/epan/dtd_preparse.l @@ -139,8 +139,7 @@ static gchar* load_entity_file(gchar* fname) { FILE* fp = fopen(fullname,"r"); GString* filetext; gchar* retstr; - gchar* line; - size_t linelen; + gchar c; g_free(fullname); @@ -154,10 +153,12 @@ static gchar* load_entity_file(gchar* fname) { filetext = g_string_new(location()); - while(( line = fgetln(fp,&linelen) )) { - g_string_append(filetext,location()); - g_string_append_len(filetext,line,linelen); - linenum++; + while(( c = fgetc(fp) )) { + g_string_append_c(filetext,c); + if(c == '\n') { + g_string_append(filetext,location()); + linenum++; + } } retstr = filetext->str; |