Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/histolog.c @ 395:3e4f2f98c0bf
Whitespace cleanup (histolog.c)
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 04 Aug 2005 23:14:26 +0100 |
parents | 4617d0f029ea |
children | 8b3db0b555a1 |
comparison
equal
deleted
inserted
replaced
394:4617d0f029ea | 395:3e4f2f98c0bf |
---|---|
1 /* | 1 /* |
2 * histolog.c -- File history handling | 2 * histolog.c -- File history handling |
3 * | 3 * |
4 * Copyright (C) 2005 Mikael Berthe <bmikael@lists.lilotux.net> | 4 * Copyright (C) 2005 Mikael Berthe <bmikael@lists.lilotux.net> |
5 * | 5 * |
6 * This program is free software; you can redistribute it and/or modify | 6 * This program is free software; you can redistribute it and/or modify |
7 * it under the terms of the GNU General Public License as published by | 7 * it under the terms of the GNU General Public License as published by |
8 * the Free Software Foundation; either version 2 of the License, or (at | 8 * the Free Software Foundation; either version 2 of the License, or (at |
159 for (tail = data; *tail; tail++) ; | 159 for (tail = data; *tail; tail++) ; |
160 | 160 |
161 type = data[0]; | 161 type = data[0]; |
162 info = data[1]; | 162 info = data[1]; |
163 | 163 |
164 if ((type != 'M' && type != 'S') || | 164 if ((type != 'M' && type != 'S') || |
165 ((data[11] != 'T') || (data[20] != 'Z') || | 165 ((data[11] != 'T') || (data[20] != 'Z') || |
166 (data[21] != ' ') || (data[25] != ' '))) { | 166 (data[21] != ' ') || (data[25] != ' '))) { |
167 if (!err) { | 167 if (!err) { |
168 scr_LogPrint(LPRINT_LOGNORM, "Error in history file format (%s), l.%u", | 168 scr_LogPrint(LPRINT_LOGNORM, "Error in history file format (%s), l.%u", |
169 jid, ln); | 169 jid, ln); |
173 continue; | 173 continue; |
174 } | 174 } |
175 data[21] = data[25] = 0; | 175 data[21] = data[25] = 0; |
176 timestamp = from_iso8601(&data[3], 1); | 176 timestamp = from_iso8601(&data[3], 1); |
177 len = (guint) atoi(&data[22]); | 177 len = (guint) atoi(&data[22]); |
178 | 178 |
179 // Some checks | 179 // Some checks |
180 if (((type == 'M') && (info != 'S' && info != 'R')) || | 180 if (((type == 'M') && (info != 'S' && info != 'R')) || |
181 ((type == 'I') && (!strchr("OAIFDN", info)))) { | 181 ((type == 'I') && (!strchr("OAIFDN", info)))) { |
182 if (!err) { | 182 if (!err) { |
183 scr_LogPrint(LPRINT_LOGNORM, "Error in history file format (%s), l.%u", | 183 scr_LogPrint(LPRINT_LOGNORM, "Error in history file format (%s), l.%u", |