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.2 by root, Fri Nov 6 13:03:34 2009 UTC vs.
Revision 1.3 by root, Fri Nov 6 13:07:28 2009 UTC

365 src++; 365 src++;
366 } 366 }
367 *dest = '\0'; 367 *dest = '\0';
368} 368}
369 369
370const char *
371strrstr (const char *haystack, const char *needle)
372{
373 const char *lastneedle;
374
375 lastneedle = NULL;
376 while ((haystack = strstr (haystack, needle)) != NULL)
377 {
378 lastneedle = haystack;
379 haystack++;
380 }
381 return lastneedle;
382
383}
384
385#define EOL_SIZE (sizeof("\n")-1) 370#define EOL_SIZE (sizeof("\n")-1)
386void 371void
387strip_endline (char *buf) 372strip_endline (char *buf)
388{ 373{
389 if (strlen (buf) < sizeof ("\n")) 374 if (strlen (buf) < sizeof ("\n"))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines