Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.243
 
1.244
 
MAIN:plunky:20120825111613
 
cc.c
_>12101210 char *
 12111211 setsuf(char *s, char ch)
 12121212 {
<>1213 -        char *p, *rp;
  1213+        char *e, *p, *rp;
12141214 
<>1215 -        if ((p = strrchr(s, '/')))
 1216 -                s = ++p;
  1215+        e = NULL;
  1216+        for (p = s; *p; p++) {
  1217+                if (*p == '/')
  1218+                        s = p + 1;
  1219+                if (*p == '.')
  1220+                        e = p;
  1221+        }
  1222+        if (s > e)
  1223+                e = p;
12171224 
<>1218 -        rp = p = xmalloc(strlen(s)+3);
 1219 -        for (; (*p = *s) && *p != '.'; p++, s++)
 1220 -                ;
  1225+        rp = p = xmalloc(e - s + 3);
  1226+        while (s < e)
  1227+                *p++ = *s++;
  1228+
12211229         *p++ = '.';
 12221230         *p++ = ch;
<>1223 -        *p = 0;
  1231+        *p = '\0';
<_12241232         return rp;
 12251233 }
 12261234 
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-30 18:12 +0200