From 7fcda399cd9a3282168bd5e1c482bacdfb6ff9b4 Mon Sep 17 00:00:00 2001 From: Frank Kotler Date: Sun, 26 Aug 2007 05:48:54 +0000 Subject: add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work --- output/outmacho.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'output/outmacho.c') diff --git a/output/outmacho.c b/output/outmacho.c index 6f18cf0..7efdc71 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -537,7 +537,7 @@ static int32_t macho_section(char *name, int pass, int *bits) sectionAttributes = NULL; } else { sectionAttributes = name; - name = strtok((char*)§ionAttributes, " \t"); + name = nasm_strsep(§ionAttributes, " \t"); } for (sm = sectmap; sm->nasmsect != NULL; ++sm) { @@ -572,7 +572,7 @@ static int32_t macho_section(char *name, int pass, int *bits) } while ((NULL != sectionAttributes) - && (currentAttribute = strtok((char*)§ionAttributes, " \t"))) { + && (currentAttribute = nasm_strsep(§ionAttributes, " \t"))) { if (0 != *currentAttribute) { if (!nasm_strnicmp("align=", currentAttribute, 6)) { char *end; @@ -1037,7 +1037,7 @@ static void macho_write_symtab (void) struct symbol *sym; struct section *s; int32_t fi; - int32_t i; + uint32_t i; /* we don't need to pad here since MACHO_RELINFO_SIZE == 8 */ @@ -1102,7 +1102,7 @@ static void macho_write_symtab (void) static void macho_fixup_relocs (struct reloc *r) { struct symbol *sym; - int i; + uint32_t i; while (r != NULL) { if (r->ext) { -- cgit v1.2.3