diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2009-10-30 09:24:05 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2009-10-31 20:03:29 +0300 |
commit | a353955a8ded9d3e3401df159fe2c1fa65467f55 (patch) | |
tree | 75e53c8fbc00e90c09d1fbfcd0c5eec7bd26d2e7 /output/outelf64.c | |
parent | 54e94a56e27f73fc2831637ad9039a00eb5e6347 (diff) | |
download | nasm-a353955a8ded9d3e3401df159fe2c1fa65467f55.tar.gz |
output/outelf32-64: use string helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Diffstat (limited to 'output/outelf64.c')
-rw-r--r-- | output/outelf64.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index 3c424845..5713f096 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -363,23 +363,18 @@ static int32_t elf_section_names(char *name, int pass, int *bits) return def_seg; } - p = name; - while (*p && !nasm_isspace(*p)) - p++; + p = nasm_skip_word(name); if (*p) *p++ = '\0'; flags_and = flags_or = type = align = 0; - while (*p && nasm_isspace(*p)) - p++; + p = nasm_skip_spaces(p); while (*p) { char *q = p; - while (*p && !nasm_isspace(*p)) - p++; + p = nasm_skip_word(p); if (*p) *p++ = '\0'; - while (*p && nasm_isspace(*p)) - p++; + p = nasm_skip_spaces(p); if (!nasm_strnicmp(q, "align=", 6)) { align = atoi(q + 6); @@ -492,12 +487,8 @@ static void elf_deflabel(char *name, int32_t segment, int64_t offset, if (!strcmp((*s)->name, name)) { struct tokenval tokval; expr *e; - char *p = special; + char *p = nasm_skip_spaces(nasm_skip_word(special)); - while (*p && !nasm_isspace(*p)) - p++; - while (*p && nasm_isspace(*p)) - p++; stdscan_reset(); stdscan_set(p); tokval.t_type = TOKEN_INVALID; @@ -614,8 +605,7 @@ static void elf_deflabel(char *name, int32_t segment, int64_t offset, n, special); special += n; - while (nasm_isspace(*special)) - ++special; + special = nasm_skip_spaces(special); if (*special) { n = strcspn(special, " \t"); if (!nasm_strnicmp(special, "default", n)) |