From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86fd56abf3579c34 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-19 14:06:32 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!zib-berlin.de!news.mathworks.com!zombie.ncsc.mil!paladin.american.edu!howland.reston.ans.net!gatech!swrinde!news.uh.edu!uuneo.neosoft.com!Starbase.NeoSoft.COM!not-for-mail From: dweller@Starbase.NeoSoft.COM (David Weller) Newsgroups: comp.lang.ada Subject: Re: Should internet support software be written in Ada? Date: 19 Mar 1995 16:06:32 -0600 Organization: NeoSoft Internet Services +1 713 968 5800 Distribution: usa Message-ID: <3ki9t8$c8l@Starbase.NeoSoft.COM> References: <3kaksj$iur@isnews.calpoly.edu> NNTP-Posting-Host: starbase.neosoft.com Date: 1995-03-19T16:06:32-06:00 List-Id: In article <3kaksj$iur@isnews.calpoly.edu>, Bill Brooks wrote: > */ > if (strchr(mapname,'/')) { > strcpy(conf,getenv("PATH_TRANSLATED")); > goto openconf; > } > > if ((fp = fopen(CONF_FILE, "r")) == NULL) > servererr(strcat("Couldn't open configuration file:", CONF_FILE)); > > while(!(getline(input,MAXLINE,fp))) { > char confname[MAXLINE]; > if((input[0] == '#') || (!input[0])) > continue; > for(i=0;isname(input[i]) && (input[i] != ':');i++) > confname[i] = input[i]; > confname[i] = '\0'; > if(!strcmp(confname,mapname)) > goto found; > } >----------------------- end paste --------------------------- >In the rich tradition of discussing good software engineering practices in >c.l.a(regardless of language) I'll ask: is this good coding style? >Keep in mind that this code was written under the auspices of one of >the top 5 schools in CS in the United States. > At the risk of exposing myself as some sort of heretic, the above code example looks perfectly "normal" to me. That's one of the nasty little problems about C, it makes "dense" code "normal". Some may claim that the above style isn't "industrial quality" C code, but that's not been my observation -- I've seen MUCH worse. -- Frustrated with C, C++, Pascal, Fortran? Ada95 _might_ be for you! For all sorts of interesting Ada95 tidbits, run the command: "finger dweller@starbase.neosoft.com | more" (or e-mail with "finger" as subj.) if u cn rd ths, u r gd enuf to chg to Ada :-)