summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-05-14 22:38:55 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-05-14 22:38:55 +0000
commit310b3e165f86d6655bf68bd89ff9309aa63663f2 (patch)
treed06af9a44d1e2f0d165caf33be7a3718995f5838 /output
parent86e94b1b3396a1611dcb545baed5f9760cf903c3 (diff)
downloadnasm-310b3e165f86d6655bf68bd89ff9309aa63663f2.tar.gz
nasm-310b3e165f86d6655bf68bd89ff9309aa63663f2.tar.bz2
nasm-310b3e165f86d6655bf68bd89ff9309aa63663f2.zip
Code cleanup fixes from Ed Beroset
Diffstat (limited to 'output')
-rw-r--r--output/outaout.c2
-rw-r--r--output/outbin.c4
-rw-r--r--output/outcoff.c2
-rw-r--r--output/outelf.c2
-rw-r--r--output/outobj.c8
5 files changed, 9 insertions, 9 deletions
diff --git a/output/outaout.c b/output/outaout.c
index b8e74be..75420f7 100644
--- a/output/outaout.c
+++ b/output/outaout.c
@@ -875,7 +875,7 @@ static void aout_filename (char *inname, char *outname, efunc error)
standard_extension (inname, outname, ".o", error);
}
-static char *aout_stdmac[] = {
+const static char *aout_stdmac[] = {
"%define __SECT__ [section .text]",
"%macro __NASM_CDecl__ 1",
"%endmacro",
diff --git a/output/outbin.c b/output/outbin.c
index 95ac5da..058aa0e 100644
--- a/output/outbin.c
+++ b/output/outbin.c
@@ -66,7 +66,7 @@ static void add_reloc (struct Section *s, long bytes, long secref,
r->target = s;
}
-static struct Section *find_section_by_name(char *name)
+static struct Section *find_section_by_name(const char *name)
{
struct Section *s;
@@ -555,7 +555,7 @@ static void bin_filename (char *inname, char *outname, efunc error)
standard_extension (inname, outname, "", error);
}
-static char *bin_stdmac[] = {
+const static char *bin_stdmac[] = {
"%define __SECT__ [section .text]",
"%imacro org 1+.nolist",
"[org %1]",
diff --git a/output/outcoff.c b/output/outcoff.c
index 973d9fe..f7160d5 100644
--- a/output/outcoff.c
+++ b/output/outcoff.c
@@ -721,7 +721,7 @@ static void coff_win32_filename (char *inname, char *outname, efunc error)
standard_extension (inname, outname, ".obj", error);
}
-static char *coff_stdmac[] = {
+const static char *coff_stdmac[] = {
"%define __SECT__ [section .text]",
"%macro __NASM_CDecl__ 1",
"%endmacro",
diff --git a/output/outelf.c b/output/outelf.c
index ddd87fe..2013dd4 100644
--- a/output/outelf.c
+++ b/output/outelf.c
@@ -1112,7 +1112,7 @@ static void elf_filename (char *inname, char *outname, efunc error)
standard_extension (inname, outname, ".o", error);
}
-static char *elf_stdmac[] = {
+const static char *elf_stdmac[] = {
"%define __SECT__ [section .text]",
"%macro __NASM_CDecl__ 1",
"%define $_%1 $%1",
diff --git a/output/outobj.c b/output/outobj.c
index 0af3f4f..c15f23f 100644
--- a/output/outobj.c
+++ b/output/outobj.c
@@ -1281,7 +1281,7 @@ fprintf(stderr," obj_segment: < %s >, pass=%d, *bits=%d\n",
attrs = 0;
while (*name == '.')
name++; /* hack, but a documented one */
- p = name;
+ p = name;
while (*p && !isspace(*p))
p++;
if (*p) {
@@ -1787,10 +1787,10 @@ static long obj_segbase (long segment)
return segment; /* no special treatment */
}
-static void obj_filename (char *inname, char *outname, efunc error)
+static void obj_filename (char *inname, char *outname, efunc lerror)
{
strcpy(obj_infile, inname);
- standard_extension (inname, outname, ".obj", error);
+ standard_extension (inname, outname, ".obj", lerror);
}
static void obj_write_file (int debuginfo)
@@ -2282,7 +2282,7 @@ void obj_fwrite(ObjRecord *orp)
fputc ( (-cksum) & 0xFF, ofp);
}
-static char *obj_stdmac[] = {
+static const char *obj_stdmac[] = {
"%define __SECT__ [section .text]",
"%imacro group 1+.nolist",
"[group %1]",