aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acidtypes/type.c
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/acidtypes/type.c
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/acidtypes/type.c')
-rw-r--r--src/cmd/acidtypes/type.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
index 00897e34..0f1c2f30 100644
--- a/src/cmd/acidtypes/type.c
+++ b/src/cmd/acidtypes/type.c
@@ -95,7 +95,7 @@ typebynum(uint n1, uint n2)
t->n2 = n2;
addhash(t);
return t;
-}
+}
Type*
newtype(void)
@@ -251,10 +251,10 @@ cleanstl(char *name)
{
char *b, *p;
static char buf[65536]; /* These can be huge. */
-
+
if(strchr(name, '<') == nil)
return nonempty(name);
-
+
b = buf;
for(p = name; *p != 0; p++){
switch(*p){
@@ -443,7 +443,7 @@ char*
mkname(char *prefix, char *name)
{
static char buf[65536];
-
+
snprint(buf, sizeof buf, "%s%s", prefix, name);
return buf;
}
@@ -630,7 +630,7 @@ ttt=ttt->sub;
if(nprint == 0)
Bprint(b, "\t'X' 0 __dummy;\n");
Bprint(b, "};\n\n");
-
+
name = nameof(t, 1); /* might have smashed it */
Bprint(b, "defn %B(addr) { %B(addr, \"\"); }\n", name, mkname("indent_", name));
Bprint(b, "defn %B(addr, indent) {\n", mkname("indent_", name));
@@ -675,13 +675,13 @@ ttt=ttt->sub;
}
Bprint(b, "};\n\n");
break;
-
+
case Enum:
name = nameof(t, 1);
Bprint(b, "// enum %s\n", name);
for(j=0; j<t->n; j++)
Bprint(b, "%B = %ld;\n", fixname(t->tname[j]), t->val[j]);
-
+
Bprint(b, "%B = {\n", mkname("vals_", name));
for(j=0; j<t->n; j++)
Bprint(b, "\t%lud,\n", t->val[j]);
@@ -738,7 +738,7 @@ printtypes(Biobuf *b)
* only take one type of a given name; acid is going to do this anyway,
* and this will reduce the amount of code we output considerably.
* we could run a DFA equivalence relaxation sort of algorithm
- * to find the actual equivalence classes, and then rename types
+ * to find the actual equivalence classes, and then rename types
* appropriately, but this will do for now.
*/
all = emalloc(n*sizeof(all[0]));