Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2004:
[Freeciv-Dev] Re: (PR#2102) default user name "name"
Home

[Freeciv-Dev] Re: (PR#2102) default user name "name"

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: nswint@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2102) default user name "name"
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Mar 2004 18:34:34 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=2102 >

James Canete wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=2102 >
> 
> I'm not sure, so here's a version with code to make it sane.

The concept is good.  However:

- Don't use the WIN32_NATIVE macro.  Instead add windows.h to 
AC_CHECK_HEADERS and GetUserName to AC_CHECCK_FUNCS in configure.ac and 
configure.in, and use these macros instead.

- Don't duplicate the code from is_sane_name.  This code will have to be 
changed soon to fix the charset problems.  Instead we should have a 
common function.  Probably you should just call is_sane_name, and if 
that fails then use the fallback naming methods.  This should be a 
fairly rare problem.  is_sane_char() is a possibility, but remember than 
some charsets may have multiple-byte characters.

- Read over the style guide (doc/CodingStyle).  Your spacing is "wrong" 
in some places.

jason




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