Date: Sun, 28 Jan 2001 20:30:12 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: JT Williams Message-Id: <7458-Sun28Jan2001203011+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: <20010128092849.B27091@kendall.sfbr.org> (message from JT Williams on Sun, 28 Jan 2001 09:28:49 -0600) Subject: Re: djasm patch #4 (enums) References: <20010128092849 DOT B27091 AT kendall DOT sfbr DOT org> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sun, 28 Jan 2001 09:28:49 -0600 > From: JT Williams > > +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.