httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <>
Subject [PATCH] Suggestion for HTTP_PROTO(maj,min) macro
Date Thu, 16 Oct 1997 21:13:51 GMT
I sometimes wondered if there was a better (or more intuitive) way to say...
    if (r->proto_num >= 1001) ...
I would prefer, like,
    if (r->proto_num >= HTTP_PROTO(1,1)) ...

Here's a patch against the former beta-1 candidate (with just a 2-line
offset when applied against the current to-be-1.3b2-source:
    patching file `src/main/http_request.c'
    Hunk #1 succeeded at 982 (offset 2 lines).
) which introduces the HTTP_PROTO() macro for encapsulation (and eventually
modification) of the internal representation of the proto_num field.
I've done a recuresive grep for proto_num and the modified places were
all I could find. With this encapsulation, it would be a one-line-change to
change the internal representation to, say, ((major<<16)+minor)
if one should ever want to.     ;-)

Enjoy, (and vote -- for 1.3b3 perhaps?)

| 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