httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <>
Subject [Silence on the list?] Coding Style Questions
Date Wed, 17 Sep 1997 15:34:10 GMT
[Wow! Not a single message today? What's going on? Hyperreal down? Or my

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.

| 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

View raw message