Index: head/editors/yui/files/patch-tyui_main.cc =================================================================== --- head/editors/yui/files/patch-tyui_main.cc (nonexistent) +++ head/editors/yui/files/patch-tyui_main.cc (revision 432986) @@ -0,0 +1,74 @@ +--- tyui/main.cc.orig 2011-09-29 06:55:56 UTC ++++ tyui/main.cc +@@ -1150,7 +1150,7 @@ void Appl::findCtag( char *ctag ) + int line=0; + Edit *e = NULL; + +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + buf1024[1023] = 0; + if ( buf1024[0] == 0x1b || !(s=strtok( buf1024, "\t" )) || strcmp( ctag, s ) ) + continue; +@@ -1765,7 +1765,7 @@ void Appl::readOptions() + char *s = NULL; + OPT_info *cinfo = NULL; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + buf1024[1023] = 0; + s=strtok( buf1024, " \t\r\n" ); + for( int first=1; s; s=strtok( 0, " \t\r\n" ) ) { +@@ -1862,7 +1862,7 @@ void Appl::readColormap() + for( int i=0; i < len_color_info; i++ ) + color_info[i].inited = 0; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + buf1024[1023] = 0; + s=strtok( buf1024, " \t\r\n" ); + for( int first=1; s; s=strtok( 0, " \t\r\n" ) ) { +@@ -1945,7 +1945,7 @@ void Appl::readColortrans() + char *fg=NULL, *bg=NULL, *s=NULL; + int found_term=0, c_fg=0, c_bg=0; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + if ( fg && bg ) + break; + buf1024[1023] = 0; +@@ -2027,7 +2027,7 @@ void Appl::readKeymap() + for( int i=0; i < len_com_info; i++ ) + com_info[i].inited = 0; + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + COM_info *cinfo = NULL; + buf1024[1023] = 0; + s=strtok( buf1024, " \t\r\n" ); +@@ -2144,7 +2144,7 @@ void Appl::readMacro() + } + if ( f ) { + next: +- while( fgets( buf1024, 1023, f ) > 0 ) { ++ while( fgets( buf1024, 1023, f ) ) { + + + } +@@ -2480,7 +2480,7 @@ void parse_highlight( const char *home ) + int punctuate = 1; + tinfo.name = buf2; + for( int cycle=1; cycle; ) { +- if ( fgets( buf1024, 1023, f ) <= 0 ) ++ if ( fgets( buf1024, 1023, f ) == NULL ) + { + cycle=0; + if ( ext ) +@@ -2615,7 +2615,7 @@ void parse_highlight_html( const char *h + unsigned param=0, hend=0, ret=0; + tinfo.name = buf2; + int ext_flag = 1; +- while( fgets( buf, 1023, f ) > 0 ) ++ while( fgets( buf, 1023, f ) ) + { + buf[1023] = 0; + if ( sscanf( buf, "%[^# \t]%u%u", buf2, ¶m, &hend ) != 3 ) Property changes on: head/editors/yui/files/patch-tyui_main.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/editors/yui/files/patch-tyui_yui1.cc =================================================================== --- head/editors/yui/files/patch-tyui_yui1.cc (nonexistent) +++ head/editors/yui/files/patch-tyui_yui1.cc (revision 432986) @@ -0,0 +1,29 @@ +--- tyui/yui1.cc.orig 2011-09-29 11:50:50 UTC ++++ tyui/yui1.cc +@@ -2665,7 +2665,7 @@ int Edit::saveText( char *Name ) + Screen::sync(); + if ( strlen(name) > 0 && BAK_FILE(eOpt.options) ) { + FILE *forig = fopen( name, "r" ); +- if ( forig <= 0 ) { ++ if ( forig == NULL ) { + modal *m = new modal( ALIGN_CENTER, + lang( "Can't open original file,\ncreation of backup file skipped", + "Ошибка открытия исходного файла,\nсоздание '.bak'-файла пропущено" ), Warning.get() ); +@@ -2675,7 +2675,7 @@ int Edit::saveText( char *Name ) + char *nameBack = strdup( Buf1 ); + fd = open( nameBack, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR ); + FILE *fbak = (fd >= 0 ? fdopen( fd, "w+" ) : 0); +- if ( fbak <= 0 ) { ++ if ( fbak == NULL ) { + sprintf( Buf1, openError.get(), nameBack ); + modal *m = new modal( ALIGN_CENTER, (char*)Buf1, Warning.get() ); + execUp( m ); +@@ -2784,7 +2784,7 @@ write_char: + unlink( realName ); + fd = open( realName, O_RDWR | O_CREAT | O_TRUNC, fInfo->s.st_mode ); + FILE *forig = (fd >= 0 ? fdopen( fd, "w+" ) : 0); +- if ( forig <= 0 ) { ++ if ( forig == NULL ) { + fclose( f ); + sprintf( Buf1, lang("Can't open file\n%s\n\nCheck permissions, your file saved in\n%s", + "Ошибка открытия файла\n%s\n\nПроверьте права доступа, файл сохранен в\n%s"), name, tmp ); Property changes on: head/editors/yui/files/patch-tyui_yui1.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property