Update of /cvsroot/agd/server/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8366
Modified Files:
sys.c
Log Message:
Changed to use .lpc extensions.
Index: sys.c
===================================================================
RCS file: /cvsroot/agd/server/src/sys.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- sys.c 14 Jun 2004 20:48:08 -0000 1.16
+++ sys.c 21 Jul 2004 11:55:06 -0000 1.17
@@ -131,18 +131,18 @@
return p;
}
-/* This makes a copy of str, and adds ".c" to the end. */
+/* This makes a copy of str, and adds ".lpc" to the end. */
char *add_extension(char *str)
{
- char *buf;
+ char *buf, *p;
int len = strlen(str);
- if(str[len-2] != '.' && str[len-1] != 'c') {
- buf = xmalloc(len + 3);
- sprintf(buf, "%s.c", str);
- } else {
- buf = stringdup(str);
- }
+ p = str + len - 5;
+ if(strcmp(p, ".lpc") == 0)
+ return stringdup(buf);
+
+ buf = xmalloc(len + 5);
+ sprintf(buf, "%s.lpc", str);
return buf;
}
|