On Fri, Jul 14, 2006 at 05:40:41PM +0200, Philippe Valembois - Phil wrote: > Le Friday 14 July 2006 17:27, Youness Alaoui a ?crit?: > > : > > > > about the launcher, great job!!! so much better than > > > > 'system("bin/wish.exe scripts/amsn")' > > > > btw, now, can't we change the 'scripts' into 'amsn' so it will be > > > > easier for the user who wants to update from svn, and because scripts/ > > > > is not only scripts, it contains a lot of binaries too... ? anyways, > > > > it's a minor issue. > > > > also, the code looks great, but I still have two comments : > > > > 1 - the amsn.ascii.exe is wrongly named, it should be ANSI, not ASCII.. > > > > two totally different things (AFAIK) > > > > > > Well I hesitated and as it uses the range 0-255 for the characters I > > > called it ASCII (ANSI only uses 0-127 chars) > > > > Humm.. I don't know exactly, you might be right, but for me, ASCII means > > 'printable characters' and ANSI means "not unicode" maybe wikipedia will > > enlighten us a little about those nominations... but I still think it > > should be called ansi (standard is to name ansi vs. unicode, not ascii vs. > > unicode) > > > Well it will be simpler : amsn.A.exe and amsn.W.exe ....
great idea! > > > > also, you created a _T() define, no need, the T"blabla" already exists > > > > (T is for generic, which is unicode/ansi, depending)... > > > > > > Didn't manage to make it work... It seems you must include the tchar.h > > > file but as I don't want to compile against libc I only defined this > > > thing I had to use... I checked in assembly to see if all is good with > > > char comparisions and it's perfect (comparing two shorts instead of two > > > chars). > > > > you're sure ? shouldn't it work natively like the L"" ? maybe you're just > > doing a #define UNICODE while in fact you should set unicode in the project > > settings window in VS... > Where do you see #define UNICODE ? It's define in compiler options in the > settings window... nah, didn't see it, just said "maybe you used" as in you added it to compile unicode version and removed it after.. anyways, as always, you did the right thing! :) > > > > > > and finally, you have a #if UNICODE for _T define, but you use wsprintf > > > > and you use lstrlen, etc... it should have been #if UNICODE > > > > sprintf/wsprintf strlen/lstrlen... the functions you called are only > > > > unicode... > > > > > > FALSE ! (The biggest mistake I heard from you ;) ) wsprintf and lstrlen > > > are called like that because they are defined in kernel32.dll and not in > > > the libc... so there is a lstrlenA a wsprintfA a lstrlenW and a wsprintfW > > > And don't worry as the code is done it can't suffer a such error... It > > > would have hang... (I controlled under debugger that I didn't overflow > > > the buffer I allocate) > > > > oups, sorry, I thought the 'wsprintf' meant 'wide-char version of > > sprintf'... anyways.. oh and btw, isn't it supposed to be %S for unicode > > and %s for ansi characters ? > >From msdn online : > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/strings/stringreference/stringfunctions/wsprintf.asp > [quote] > type s String. This value is interpreted as type LPWSTR when the > calling > application defines Unicode and as type LPSTR otherwise. > [/quote] > so %s is LPTSTR : TCHAR array > humm.. ok ok, I shut up.. I was probably using ANSI version when I had this %s %S problem myself at work. > > > > > > but that's IF you want to keep support for ANSI, which I > > > > think is not necessary... > > > > > > It is necessary and I think we should provide the two versions and > > > install the best one when we will use NSIS... > > > > well, we could but it's not necessary, I mean it will only be used by > > people with the installer, since it depends on ./bin/wish.exe and if we hav > > eonly one installer, it's useless.. but anyways, it makes no harm to keep > > it there... > Not sure to well understand... I mean that with NSIS we do a script that > check > if it's Win9x/Me or WinNTlike if it's 9x then we install the A version and if > it's NT we install the W version > ok, I didn't think about it, it's really a great idea! :) KKRT ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel