* src/pine.c
authorChristoph Hohmann <reboot@gmx.ch>
Wed, 18 Sep 2002 13:42:52 +0000 (13:42 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Wed, 18 Sep 2002 13:42:52 +0000 (13:42 +0000)
        fix handling of fgetc return value

ChangeLog.claws
configure.in
src/pine.c

index 4d4c9af9b4e126249d0adc2a3cbd2a5b4a217919..a394b4a617dcec97cde91d552ea01622be28098b 100644 (file)
@@ -1,3 +1,8 @@
+2002-09-18 [christoph] 0.8.2claws57
+
+       * src/pine.c
+               fix handling of fgetc return value
+
 2002-09-17 [alfons]    0.8.2claws56
        
        * src/summaryview.c
index 1d04d40fa444c95320d7877f10d641fb98dbba3a..5e2b849c5c7ad1161986e87549eb9b60f70c9f74 100644 (file)
@@ -1,5 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
+AC_PREREQ(2.50)
 AC_INIT(src/main.c)
+
 PACKAGE=sylpheed
 
 dnl version number
@@ -8,7 +10,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws56
+EXTRA_VERSION=claws57
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 3ec581a3ffad2dff132d1a972c43a1505779d807..c2096ac55913adc2245e07af7ec6166b35631d1b 100644 (file)
@@ -165,6 +165,7 @@ static void pine_close_file( PineFile *pineFile ) {
  */
 static gchar *pine_read_line( PineFile *pineFile ) {
        gchar buf[ PINEBUFSIZE ];
+       int c;
        gchar ch;
        gchar *ptr;
 
@@ -173,8 +174,13 @@ static gchar *pine_read_line( PineFile *pineFile ) {
        ptr = buf;
        while( TRUE ) {
                *ptr = '\0';
-               ch = fgetc( pineFile->file );
-               if( ch == '\0' || ch == EOF ) {
+               c = fgetc( pineFile->file );
+               if( c == EOF ) {
+                       if( *buf == '\0' ) return NULL;
+                       break;
+               }
+               ch = (gchar) c;
+               if( ch == '\0' ) {
                        if( *buf == '\0' ) return NULL;
                        break;
                }