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

Comparing deliantra/server/common/compat.C (file contents):
Revision 1.1 by root, Wed Nov 4 00:02:47 2009 UTC vs.
Revision 1.2 by root, Fri Nov 6 13:03:34 2009 UTC

233 } 233 }
234 234
235 return path; 235 return path;
236} 236}
237 237
238void 238static void
239path_normalize (char *path) 239path_normalize (char *path)
240{ 240{
241 char *p; /* points to the beginning of the path not yet processed; this is 241 char *p; /* points to the beginning of the path not yet processed; this is
242 either a path component or a path separator character */ 242 either a path component or a path separator character */
243 char *q; /* points to the end of the path component p points to */ 243 char *q; /* points to the end of the path component p points to */
314 path = path_combine (src, dst); 314 path = path_combine (src, dst);
315 path_normalize (path); 315 path_normalize (path);
316 return (path); 316 return (path);
317} 317}
318 318
319char *
320strcasestr_local (const char *s, const char *find)
321{
322 char c, sc;
323 size_t len;
324
325 if ((c = *find++) != 0)
326 {
327 c = tolower (c);
328 len = strlen (find);
329 do
330 {
331 do
332 {
333 if ((sc = *s++) == 0)
334 return NULL;
335 }
336 while (tolower (sc) != c);
337 }
338 while (strncasecmp (s, find, len) != 0);
339 s--;
340 }
341 return (char *) s;
342}
343
344/** 319/**
345 * open_and_uncompress() first searches for the original filename. If it exist, 320 * open_and_uncompress() first searches for the original filename. If it exist,
346 * then it opens it and returns the file-pointer. 321 * then it opens it and returns the file-pointer.
347 */ 322 */
348FILE * 323FILE *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines