Mail Archives: djgpp-workers/2001/01/28/13:30:15
> Date: Sun, 28 Jan 2001 09:28:49 -0600
> From: JT Williams <jeffw AT darwin DOT sfbr DOT org>
>
> +void add_enum_element(Symbol *s)
> +{
> + if (islocal(s->name) || istemp(s->name,0)) {
> + djerror("Cannot have local or temporary labels within an enum");
> + } else {
> + char *id=alloca(strlen(s->name)+strlen(struct_sym)+2);
> + strcpy(id,struct_sym);
> + strcat(id,"."); /* should this be "_" to disambiguate enums from structs? */
> + strcat(id,s->name);
> + if (!s->defined && !s->patches) {
> + /* only delete fresh symbols */
> + destroy_symbol(s,0);
> + }
Please try to preserve the style of the original code (which is also
used throughout in the library). In that style, the opening braces
are always at the beginning of a new line, like this:
if (islocal(s->name) || istemp(s->name,0))
{
djerror("Cannot have local or temporary labels within an enum");
}
else
{
char *id=alloca(strlen(s->name)+strlen(struct_sym)+2);
strcpy(id,struct_sym);
strcat(id,"."); /* should this be "_" to disambiguate enums from structs? */
strcat(id,s->name);
if (!s->defined && !s->patches)
{
/* only delete fresh symbols */
destroy_symbol(s,0);
}
Also, the closing brace is always on a line by itself.
- Raw text -