commit f37faf6eeaf000fb678c27317798429ee65353df
parent 817575c96465deae85f3eca3730293972276b46c
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Thu, 18 Jan 2024 17:31:49 +0100
make: Rename getln() and getcmd()
These names were a bit confusing and using the verb `read' makes
them better because it relfects the fact of reading something from
the input with the proper format.
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/cmd/make/parser.c b/src/cmd/make/parser.c
@@ -640,7 +640,7 @@ repeat:
}
static char *
-getln(void)
+readmacrodef(void)
{
int n, c;
char *line;
@@ -671,7 +671,7 @@ getln(void)
}
static char *
-getcmd(void)
+readcmd(void)
{
int n, c;
char *line;
@@ -719,13 +719,13 @@ rule(char *targets[], int ntargets)
if (tok == ';') {
nactions++;
actions = erealloc(actions, nactions * sizeof(char *));
- actions[nactions-1] = getcmd();
+ actions[nactions-1] = readcmd();
}
while ((c = nextc()) == '\t') {
nactions++;
actions = erealloc(actions, nactions * sizeof(char *));
- actions[nactions-1] = getcmd();
+ actions[nactions-1] = readcmd();
}
back(c);
@@ -756,7 +756,7 @@ assign(char *macros[], int n)
error("invalid macro definition");
skipspaces();
- defs = getln();
+ defs = readmacrodef();
setmacro(*macros, defs, NOEXPORT);
free(defs);
}