summaryrefslogtreecommitdiff
path: root/preproc.c
diff options
context:
space:
mode:
authorFrank Kotler <fbkotler@users.sourceforge.net>2003-08-06 07:10:16 +0000
committerFrank Kotler <fbkotler@users.sourceforge.net>2003-08-06 07:10:16 +0000
commit7fd4f0093001316ef8558183df3994b0d75ac6b8 (patch)
treee486e9f599bdbf5e97b714c7271001fbcaa1f69b /preproc.c
parent3f7cddc770785f98bb6c8b1958c5991cf8f5e665 (diff)
downloadnasm-7fd4f0093001316ef8558183df3994b0d75ac6b8.tar.gz
Remove "backslash()"
Diffstat (limited to 'preproc.c')
-rw-r--r--preproc.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/preproc.c b/preproc.c
index abe92d0f..2492df68 100644
--- a/preproc.c
+++ b/preproc.c
@@ -1256,20 +1256,6 @@ get_ctx(char *name, int all_contexts)
return NULL;
}
-/* Add a slash to the end of a path if it is missing. We use the
- * forward slash to make it compatible with Unix systems.
- */
-static void
-backslash(char *s)
-{
- int pos = strlen(s);
- if (s[pos - 1] != '\\' && s[pos - 1] != '/')
- {
- s[pos] = '/';
- s[pos + 1] = '\0';
- }
-}
-
/*
* Open an include file. This routine must always return a valid
* file pointer if it returns - it's responsible for throwing an
@@ -1288,10 +1274,8 @@ inc_fopen(char *file)
while (1)
{
- combine = nasm_malloc(strlen(prefix) + 1 + len + 1);
+ combine = nasm_malloc(strlen(prefix) + len + 1);
strcpy(combine, prefix);
- if (prefix[0] != 0)
- backslash(combine);
strcat(combine, file);
fp = fopen(combine, "r");
if (pass == 0 && fp)