nasm: rename nasm_zap_spaces() to nasm_zap_spaces_fwd()
authorH. Peter Anvin <hpa@zytor.com>
Tue, 13 Oct 2009 19:03:37 +0000 (12:03 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 13 Oct 2009 19:03:37 +0000 (12:03 -0700)
By analogy with nasm_zap_spaces_rev() have nasm_zap_spaces_fwd().  The
forward version isn't a super-common operation, and it might be
possible to think the reverse one is the "normal" version... therefore
we might as well be explicit.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
nasm.c
nasmlib.c
nasmlib.h

diff --git a/nasm.c b/nasm.c
index ed0a2cb75c326441b01c06df7dd5920121fce8b5..d955660fb1448f43df79c40c4cf289c155e9f431 100644 (file)
--- a/nasm.c
+++ b/nasm.c
@@ -1331,7 +1331,7 @@ static void assemble_file(char *fname, StrList **depend_ptr)
                        break;
                    }
                    if (*p) {
-                        p = nasm_zap_spaces(p);
+                        p = nasm_zap_spaces_fwd(p);
                        q = p;
                        while (*q && *q != ':')
                            q++;
index 79935adafb7ed7d3ce24a63d7925ed73018f9684..0dea39ec96a2b152f9c1eee78be0d7d36d122df6 100644 (file)
--- a/nasmlib.c
+++ b/nasmlib.c
@@ -673,7 +673,7 @@ char *nasm_skip_word(const char *p)
 }
 
 /* zap leading spaces with zero */
-char *nasm_zap_spaces(char *p)
+char *nasm_zap_spaces_fwd(char *p)
 {
     if (p)
         while (*p && nasm_isspace(*p))
index f3128b5c6ecfc2f124babbce6b6a76bc95d7c23f..2b30ef411c317943fa20875609b84f59f88dabba 100644 (file)
--- a/nasmlib.h
+++ b/nasmlib.h
@@ -379,7 +379,7 @@ char *nasm_strcat(const char *one, const char *two);
 
 char *nasm_skip_spaces(const char *p);
 char *nasm_skip_word(const char *p);
-char *nasm_zap_spaces(char *p);
+char *nasm_zap_spaces_fwd(char *p);
 char *nasm_zap_spaces_rev(char *p);
 
 const char *prefix_name(int);