ref: 08abb553ff8277ca156923043c82fc81377ac084
parent: f345f2e2ab0b7320e2dd831069db3320c133d810
author: Ori Bernstein <[email protected]>
date: Sat Oct 4 07:33:01 EDT 2014
Consistent constant naming: symprefix -> Symprefix. Rename so that we have Initialcase constants.
--- a/6/isel.c
+++ b/6/isel.c
@@ -997,7 +997,7 @@
{
size_t i, j;
- if (fn->isexport || !strcmp(fn->name, symprefix "main"))
+ if (fn->isexport || !strcmp(fn->name, Symprefix "main"))
fprintf(fd, ".globl %s\n", fn->name);
fprintf(fd, "%s:\n", fn->name);
for (j = 0; j < s->cfg->nbb; j++) {
--- a/6/simp.c
+++ b/6/simp.c
@@ -296,7 +296,7 @@
char *s;
int len;
- len = strlen(symprefix);
+ len = strlen(Symprefix);
if (n->name.ns)
len += strlen(n->name.ns) + 1; /* +1 for separator */
len += strlen(n->name.name) + 1;
@@ -304,11 +304,11 @@
s = xalloc(len + 1);
s[0] = '\0';
if (n->name.ns)
- snprintf(s, len, "%s%s$%s", symprefix, n->name.ns, n->name.name);
+ snprintf(s, len, "%s%s$%s", Symprefix, n->name.ns, n->name.name);
else if (n->name.name[0] == '.')
snprintf(s, len, "%s", n->name.name);
else
- snprintf(s, len, "%s%s", symprefix, n->name.name);
+ snprintf(s, len, "%s%s", Symprefix, n->name.name);
return s;
}
--- a/configure
+++ b/configure
@@ -37,17 +37,17 @@
case $OS in
*Linux*)
echo '#define Asmcmd {"as", "-g", "-o", NULL}' >> config.h
- echo '#define symprefix ""' >> config.h
+ echo '#define Symprefix ""' >> config.h
echo 'export SYS=linux' >> config.mk
;;
*Darwin*)
echo '#define Asmcmd {"as", "-g", "-o", NULL}' >> config.h
- echo '#define symprefix "_"' >> config.h
+ echo '#define Symprefix "_"' >> config.h
echo 'export SYS=osx' >> config.mk
;;
*FreeBSD*)
echo '#define Asmcmd {"as", "-g", "-o", NULL}' >> config.h
- echo '#define symprefix ""' >> config.h
+ echo '#define Symprefix ""' >> config.h
echo 'export SYS=freebsd' >> config.mk
;;
*)