summaryrefslogtreecommitdiff
path: root/vchat-ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'vchat-ui.c')
-rwxr-xr-xvchat-ui.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vchat-ui.c b/vchat-ui.c
index 4eb625e..75d614d 100755
--- a/vchat-ui.c
+++ b/vchat-ui.c
@@ -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 );