Complete.Org: Mailing Lists: Archives: freeciv-dev: October 1999:
[Freeciv-Dev] Re: Macro renaming
Home

[Freeciv-Dev] Re: Macro renaming

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: corin@xxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Macro renaming
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Tue, 26 Oct 1999 15:45:26 +1000 (EST)

Corin Anderson <corin@xxxxxxxxxx> wrote:

> Why did MAX_LENGTH_NAME and MAX_LENGTH_ADDRESS change to MAX_LEN_NAME and
> MAX_LEN_ADDR?  Cosmetic?  A wish or requirement that preprocessor macros
> be shorter?

The ChangeLog is your friend;

    Tue Jul 20 11:50:02 1999  David Pfitzner <dwp@xxxxxxxxxxxxxx>:

    Made some identifiers more uniformly named:
        MAX_PLAYERS        -> MAX_NUM_PLAYERS
        MAX_CONNECTIONS    -> MAX_NUM_CONNECTIONS
        MAX_LENGTH_NAME    -> MAX_LEN_NAME
        MAX_LENGTH_ADDRESS -> MAX_LEN_ADDR
        ADDR_LENGTH        -> "
        MAX_PACKET_SIZE    -> MAX_LEN_PACKET
        NAME_SIZE          -> MAX_LEN_USERNAME
        MSG_SIZE           -> MAX_LEN_MSG
        MAX_CAPSTR_LEN     -> MAX_LEN_CAPSTR
        MAX_CMD_LEN        -> MAX_LEN_CMD

So, the main consideration was consistency/uniformity, with a 
mild preference for shorter names where it was considered fairly
unambiguous (and especially for newly-uniform prefix "MAX_LEN_").

-- David

[Prev in Thread] Current Thread [Next in Thread]