diff options
author | erdgeist <> | 2003-05-25 16:37:19 +0000 |
---|---|---|
committer | erdgeist <> | 2003-05-25 16:37:19 +0000 |
commit | 13db7c6d4082be1eab59fe1222f222b25d954fbb (patch) | |
tree | 592d6d6090032030041b96c93620f5b26dcadad3 | |
parent | aa7d1f87e273f3b413a2671ced95493e1da30c88 (diff) |
Linux compatibility issues
-rwxr-xr-x | vchat-ui.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1196,17 +1196,17 @@ initui (void) | |||
1196 | char date[16]; | 1196 | char date[16]; |
1197 | time_t now; struct tm now_tm; | 1197 | time_t now; struct tm now_tm; |
1198 | int dst, lenstr; | 1198 | int dst, lenstr; |
1199 | char *str; | ||
1200 | while( !feof( vchat_logfile)) { | 1199 | while( !feof( vchat_logfile)) { |
1201 | if( (fread( date, 14, 1, vchat_logfile) == 1) && | 1200 | if( (fread( date, 14, 1, vchat_logfile) == 1) && |
1202 | (strptime( date, "%Y%m%d%H%M%S", &now_tm)) && | 1201 | (strptime( date, "%Y%m%d%H%M%S", &now_tm)) && |
1203 | (((dst = fgetc( vchat_logfile )) == '0') || (dst == '1')) && | 1202 | (((dst = fgetc( vchat_logfile )) == '0') || (dst == '1'))) |
1204 | (str = fgetln(vchat_logfile, &lenstr))&& | ||
1205 | (str[lenstr-1] == '\n')) | ||
1206 | { | 1203 | { |
1207 | str[lenstr-1] = 0; | 1204 | if(fgets(tmpstr, TMPSTRSIZE, vchat_logfile)) { |
1208 | now = mktime( &now_tm ); | 1205 | lenstr = strlen( tmpstr ); |
1209 | sb_add( dst == '0' ? sb_pub : sb_priv, str, now); | 1206 | tmpstr[lenstr-1] = '\0'; |
1207 | now = mktime( &now_tm ); | ||
1208 | sb_add( dst == '0' ? sb_pub : sb_priv, tmpstr, now); | ||
1209 | } | ||
1210 | } else { | 1210 | } else { |
1211 | fseek( vchat_logfile, 0, SEEK_END); | 1211 | fseek( vchat_logfile, 0, SEEK_END); |
1212 | fgetc( vchat_logfile ); | 1212 | fgetc( vchat_logfile ); |