Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id IAA24612; Wed, 17 Sep 1997 08:34:32 -0700 (PDT) Received: from thoth.mch.sni.de (thoth.mch.sni.de [192.35.17.2]) by hyperreal.org (8.8.5/8.8.5) with ESMTP id IAA24576 for ; Wed, 17 Sep 1997 08:34:23 -0700 (PDT) Received: from deejai.mch.sni.de (deejai.mch.sni.de [139.25.113.10]) by thoth.mch.sni.de (8.8.7/8.8.7) with ESMTP id RAA17909 for ; Wed, 17 Sep 1997 17:34:10 +0200 (MDT) Received: (from martin@localhost) by deejai.mch.sni.de (8.8.7/8.8.7) id RAA08690; Wed, 17 Sep 1997 17:34:13 +0200 (MET DST) Message-ID: <19970917173410.23096@deejai.mch.sni.de> Date: Wed, 17 Sep 1997 17:34:10 +0200 From: Martin Kraemer To: new-httpd@apache.org Subject: [Silence on the list?] Coding Style Questions Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.69 Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org [Wow! Not a single message today? What's going on? Hyperreal down? Or my company?] As the code is revamped and unified, I'd like to know which style is preferred for "new style" code. Is there a consensus, or a paper about it, or do developers do it either way? Which alternative is the preferred style, in your opinion? Either: Or: ======= ===== port = 80; port = DEFAULT_PORT; return DOCUMENT_FOLLOWS; return HTTP_OK; return REDIRECT; return HTTP_MOVED_TEMPORARILY; etc. etc. #define HTTP_PROTO(major,minor) (1000*(major)+(minor)) if (r->proto_num >= 1001) ... if (r->proto_num >= HTTP_PROTO(1,1)) ... With the exception of the last example, it appears to me that newer code prefers the second column, but I might be mistaken. Anyone? Martin -- | S I E M E N S | | Siemens Nixdorf | ------------- | Voice: +49-89-636-46021 | Informationssysteme AG | N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany ~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request