summaryrefslogtreecommitdiff
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
parent3f7cddc770785f98bb6c8b1958c5991cf8f5e665 (diff)
downloadnasm-7fd4f0093001316ef8558183df3994b0d75ac6b8.tar.gz
Remove "backslash()"
-rw-r--r--CHANGES1
-rw-r--r--preproc.c18
2 files changed, 2 insertions, 17 deletions
diff --git a/CHANGES b/CHANGES
index 9c00874d..39a79c60 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@
* Fix output/outbin.c to allow origin > 80000000h
* Make -U switch work
* Fix the use of relative offsets with explicit prefixes, e.g. "a32 loop foo".
+* Remove "backslash()".
0.98.36
-------
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)