Fixed bug for generating structs with more than 3 categories in msg metadata.

This commit is contained in:
mark 2000-01-12 19:56:10 +00:00
parent 9c3206d536
commit ceacda97b1
2 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@ $(OBJ_DIR)/%.o : %.c
# Compiler Options
ifndef CFLAGS
CFLAGS = -O2 -Wall -Wstrict-prototypes -Winline -pipe
CFLAGS = -g -O2 -Wall -Wstrict-prototypes -Winline -pipe
endif
# Preprocessor Options

View file

@ -40,7 +40,7 @@
int main(int argc, char **argv)
{
int c, g, i, totgrps, totitems, type;
char name[4][82];
char name[82];
/* traverse the message metadata to build the structures and typedefs */
for ( c = 1; c < msg_catlist_size; c++ )
@ -48,9 +48,9 @@ int main(int argc, char **argv)
totgrps = GETMETASIZE(msg_catlist[c].grplist);
for ( g = 1; g < totgrps; g++ )
{
strcpy(name[c], "p80211msg");
strcpy(name, "p80211msg");
printf("__WLAN_PRAGMA_PACK1__\n");
printf("typedef struct %s_%s_%s\n{\n", name[c],
printf("typedef struct %s_%s_%s\n{\n", name,
msg_catlist[c].name,
msg_catlist[c].grplist[g].name);
printf("\tUINT32\t\tmsgcode\t__WLAN_ATTRIB_PACK__;\n");
@ -85,7 +85,7 @@ int main(int argc, char **argv)
}
}
printf("} %s_%s_%s_t;\n__WLAN_PRAGMA_PACKDFLT__\n\n\n",
name[c],
name,
msg_catlist[c].name,
msg_catlist[c].grplist[g].name);
}