whitespace style in a generated file
This commit is contained in:
@@ -971,7 +971,7 @@ static void output_types(FILE *fp1)
|
||||
|
||||
for (k = 0; k < SIZE(readtagstypes); ++k) {
|
||||
if (readtagstypes[k].dtclass == NHTYPE_SIMPLE) {
|
||||
Fprintf(fp1,"\t{NHTYPE_SIMPLE, (char *) \"%s\", sizeof(%s)},\n",
|
||||
Fprintf(fp1," {NHTYPE_SIMPLE, (char *) \"%s\", sizeof(%s)},\n",
|
||||
readtagstypes[k].dtype,
|
||||
(strncmpi(readtagstypes[k].dtype, "Bitfield", 8) == 0) ?
|
||||
"uint8_t" :
|
||||
@@ -981,10 +981,10 @@ static void output_types(FILE *fp1)
|
||||
"anything" : readtagstypes[k].dtype);
|
||||
/* dtmacro(readtagstypes[k].dtype,0)); */
|
||||
#if 0
|
||||
Fprintf(fp2, "#define %s\t%s%d\n", dtmacro(readtagstypes[k].dtype,1),
|
||||
Fprintf(fp2, "#define %s %s%d\n", dtmacro(readtagstypes[k].dtype,1),
|
||||
(strlen(readtagstypes[k].dtype) > 12) ? "" :
|
||||
(strlen(readtagstypes[k].dtype) < 5) ? "\t\t" :
|
||||
"\t", hcnt++);
|
||||
(strlen(readtagstypes[k].dtype) < 5) ? " " :
|
||||
" ", hcnt++);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -997,7 +997,7 @@ static void output_types(FILE *fp1)
|
||||
}
|
||||
if (cnt > 0)
|
||||
Fprintf(fp1, "%s", ",\n");
|
||||
Fprintf(fp1, "\t{NHTYPE_COMPLEX, (char *) \"%s\", sizeof(%s %s)}",
|
||||
Fprintf(fp1, " {NHTYPE_COMPLEX, (char *) \"%s\", sizeof(%s %s)}",
|
||||
t->tag,
|
||||
(t->tagtype == 's') ? "struct" : "union", t->tag);
|
||||
cnt += 1;
|
||||
@@ -1005,7 +1005,7 @@ static void output_types(FILE *fp1)
|
||||
t = t->next;
|
||||
}
|
||||
Fprintf(fp1, "%s", "\n};\n\n");
|
||||
Fprintf(fp1, "int nhdatatypes_size(void)\n{\n\treturn SIZE(nhdatatypes);\n}\n\n");
|
||||
Fprintf(fp1, "int nhdatatypes_size(void)\n{\n return SIZE(nhdatatypes);\n}\n\n");
|
||||
}
|
||||
|
||||
static void generate_c_files(void)
|
||||
@@ -1357,7 +1357,7 @@ static void generate_c_files(void)
|
||||
"d_%s->%s = bitfield;\n\n",
|
||||
readtagstypes[k].dtype, t->tag);
|
||||
Fprintf(SFDATATMP,
|
||||
"\t\"%s:%s:%s\",\n",
|
||||
" \"%s:%s:%s\",\n",
|
||||
sfparent, t->tag, ft);
|
||||
} else {
|
||||
/**************** not a bitfield ****************/
|
||||
@@ -1571,7 +1571,7 @@ static void generate_c_files(void)
|
||||
strcmp(altbuf, "char") != 0 ? "" : arrbuf);
|
||||
Fprintf(SFI_DATA, "%s", lbuf);
|
||||
Fprintf(SFDATATMP,
|
||||
"\t\"%s:%s:%s\",\n",
|
||||
" \"%s:%s:%s\",\n",
|
||||
sfparent, t->tag,fieldfix(ft,ssdef));
|
||||
kludge_sbrooms = FALSE;
|
||||
array_of_ptrs = FALSE;
|
||||
@@ -1604,7 +1604,7 @@ static void generate_c_files(void)
|
||||
}
|
||||
|
||||
Fprintf(SFDATATMP,"};\n\n");
|
||||
Fprintf(SFDATATMP, "int critical_members_count(void)\n{\n\treturn SIZE(critical_members);\n}\n\n");
|
||||
Fprintf(SFDATATMP, "int critical_members_count(void)\n{\n return SIZE(critical_members);\n}\n\n");
|
||||
|
||||
fclose(SFO_DATA);
|
||||
fclose(SFI_DATA);
|
||||
@@ -1724,7 +1724,7 @@ dtmacro(const char *str,
|
||||
} else if (strncmpi(c, "const ", 6) == 0) {
|
||||
c = buf + 6;
|
||||
} else if ((strncmpi(c, "struct ", 7) == 0) ||
|
||||
(strncmpi(c, "struct\t", 7) == 0)) {
|
||||
(strncmpi(c, "struct ", 7) == 0)) {
|
||||
c = buf + 7;
|
||||
} else if (strncmpi(c, "union ", 6) == 0) {
|
||||
c = buf + 6;
|
||||
@@ -1785,7 +1785,7 @@ dtfn(const char *str,
|
||||
} else if (strncmpi(c, "const ", 6) == 0) {
|
||||
c = buf + 6;
|
||||
} else if ((strncmpi(c, "struct ", 7) == 0) ||
|
||||
(strncmpi(c, "struct\t", 7) == 0)) {
|
||||
(strncmpi(c, "struct ", 7) == 0)) {
|
||||
c = buf + 7;
|
||||
} else if (strncmpi(c, "union ", 6) == 0) {
|
||||
c = buf + 6;
|
||||
|
||||
Reference in New Issue
Block a user