+2001-01-04 Bernhard Held <bernhard@bernhardheld.de>
+
+ * src/SDCCmain.c (processFile): fix processing of ../../src.c
+
2001-01-04 Bernhard Held <bernhard@bernhardheld.de>
* src/SDCCglue.h: printIvalCharPtr(), not printIvalChar()
/* copy the file name into the buffer */
strcpy (buffer, s);
- /* get rid of the "." */
- strtok (buffer, ".");
+ /* get rid of the "."-extension */
+
+ /* is there a dot at all? */
+ if (strchr (buffer, '.') &&
+ /* is the dot in the filename, not in the path? */
+ (strrchr (buffer, '/' ) < strrchr (buffer, '.') ||
+ strrchr (buffer, '\\') < strrchr (buffer, '.')))
+ *strrchr (buffer, '.') = '\0';
+
srcFileName = Safe_alloc ( strlen (buffer) + 1);
strcpy (srcFileName, buffer);