comparison mcabber/src/histolog.c @ 394:4617d0f029ea

Update "large file" size value to 3MB
author Mikael Berthe <mikael@lilotux.net>
date Thu, 04 Aug 2005 23:11:14 +0100
parents 2e6c7b1440d1
children 3e4f2f98c0bf
comparison
equal deleted inserted replaced
393:f8f3c7493457 394:4617d0f029ea
142 142
143 fp = fopen(filename, "r"); 143 fp = fopen(filename, "r");
144 g_free(filename); 144 g_free(filename);
145 if (!fp) { g_free(data); return; } 145 if (!fp) { g_free(data); return; }
146 146
147 // If file is large (> 512 here), display a message to inform the user 147 // If file is large (> 3MB here), display a message to inform the user
148 // (it can take a while...) 148 // (it can take a while...)
149 if (!fstat(fileno(fp), &bufstat)) { 149 if (!fstat(fileno(fp), &bufstat)) {
150 if (bufstat.st_size > 524288) 150 if (bufstat.st_size > 3145728)
151 scr_LogPrint(LPRINT_NORMAL, "Reading <%s> history file...", jid); 151 scr_LogPrint(LPRINT_LOGNORM, "Reading <%s> history file...", jid);
152 } 152 }
153 153
154 /* See write_histo_line() for line format... */ 154 /* See write_histo_line() for line format... */
155 while (!feof(fp)) { 155 while (!feof(fp)) {
156 if (fgets(data, HBB_BLOCKSIZE+27, fp) == NULL) break; 156 if (fgets(data, HBB_BLOCKSIZE+27, fp) == NULL) break;