ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/freezethaw.C
(Generate patch)

Comparing deliantra/server/server/freezethaw.C (file contents):
Revision 1.14 by pippijn, Fri Mar 2 10:15:40 2007 UTC vs.
Revision 1.16 by root, Mon Apr 16 10:14:26 2007 UTC

172 172
173 SV **svp = av_fetch ((AV *)av, oid, 0); 173 SV **svp = av_fetch ((AV *)av, oid, 0);
174 174
175 if (!svp || !SvROK (*svp)) 175 if (!svp || !SvROK (*svp))
176 { 176 {
177 printf ("trying to thaw duplicate or never-issued oid %d, ignoring.\n", oid); 177 LOG (llevError, "trying to thaw duplicate or never-issued oid %d, ignoring.\n", oid);
178 return; 178 return;
179 } 179 }
180 180
181 if (!SvROK (*svp)) 181 if (!SvROK (*svp))
182 { 182 {
183 LOG (llevError, "deserialised perl object is not an RV"); 183 LOG (llevError, "deserialised perl object is not an RV\n");
184 return; 184 return;
185 } 185 }
186 186
187 HV *hv = (HV *)SvRV (*svp); 187 HV *hv = (HV *)SvRV (*svp);
188 188
189 if (SvTYPE (hv) != SVt_PVHV) 189 if (SvTYPE (hv) != SVt_PVHV)
190 { 190 {
191 LOG (llevError, "deserialised perl object is not a PVHV"); 191 LOG (llevError, "deserialised perl object is not a PVHV\n");
192 return; 192 return;
193 } 193 }
194 194
195 if (obj->self) 195 if (obj->self)
196 { 196 {
297 297
298 for (;;) 298 for (;;)
299 { 299 {
300 char *p = line; 300 char *p = line;
301 301
302 if (*p <= ' ')
303 {
304 // skip whitespace (only some files need this)
305 while (*p == ' ' || *p == '\t')
306 p++;
307
308 line = p;
309 }
310
302 if (!*p) 311 if (!*p)
303 { 312 {
304 kw = KW_EOF; 313 kw = KW_EOF;
305 break; 314 break;
306 } 315 }
309 while (*p > ' ') 318 while (*p > ' ')
310 p++; 319 p++;
311 320
312 int klen = p - line; 321 int klen = p - line;
313 322
323 value = 0;
324
314 if (*p++ != '\n') 325 if (*p++ != '\n')
315 { 326 {
316 // parse value 327 // parse value
317 while (*(unsigned char *)p <= ' ' && *p != '\n') // skip 0x01 .. 0x20 328 while (*(unsigned char *)p <= ' ' && *p != '\n')
318 ++p; 329 ++p;
319 330
320 value = p; 331 value = p;
321 332
322 while (*p != '\n') 333 while (*p != '\n')
323 p++; 334 p++;
324 335
325 *p++ = 0; 336 *p++ = 0;
326 } 337 }
327 else
328 value = 0;
329 338
330 ++linenum; 339 ++linenum;
331 line [klen] = 0; 340 line [klen] = 0;
332 keyword_idx *kw_idx = kw_lex::match (line, klen); 341 keyword_idx *kw_idx = kw_lex::match (line, klen);
333 342

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines