From: Gustaf N. <ne...@wu...> - 2012-10-16 09:33:57
|
Dear Maurizio, First of all, many thanks for your efforts! These are very welcome! I am as well somewhat surprised, that there are still pieces of K&R style around. There is really no need to keep these. i'll commit an updated version of tclxkeylist.c to mercurial. As for the other changes, i am not really convinced that changing all variables named "new" to "mm_new" helps to improve the code... for the other changes, your archive file is the full kitchen sink, going though the changes will take a while. We should move the discussion to the naviserver-devel list Best regards -gustaf neumann On 16.10.12 00:36, Maurizio Martignano wrote: > > To facilitate the discussion, I put in here some examples > of the changes I made: > > *2.a.* > > From > > mapPtr = ns_malloc(sizeof(Map)); > > To > > mapPtr = (Map*) ns_malloc(sizeof(Map)); > > *2.b.* > > From > > int > > TclX_WrongArgs (interp, commandNameObj, string) > > Tcl_Interp* interp; > > Tcl_Obj* commandNameObj; > > char * string; > > { > > To > > int > > TclX_WrongArgs (Tcl_Interp* interp, Tcl_Obj* > commandNameObj, char* string) > > { > > *2.c* > > From > > if(new) { > > To > > if(mm_new) { > > All these changes have been applied everywhere. > > ======== > > Dear all, > > While the tests seem to go rather well but > are not finished yet (and it will take quite some time), I > have decided to make available anyhow the result of my > activity. > > The sources (and Visual Studio 2012 project files) are > available at: > > http://www.spazioit.com/software/naviserver-4.99.4-Win64.zip > > There are two categories of changes: > > 1.The ones required to have the system compiled by Visual > Studio 2012 using as target Windows 64. They are > identified by the #ifdef _WIN64 clause. > > 2.A set of necessary cosmetics/make up changes to the > overall code base to make it more compliant with nowadays > C STDs, and therefore more "acceptable" to nowadays C > compilers, they are: > > a.I have made explicit all type conversions (with explicit > casts) > > b.I have modified all functions defined in K&R C STD, > changing them into ANSI C STD > > c.I have removed from the code base all reserved words, > e.g.: new, delete, bool ... > > These changes make the entire codebase less "old-style" > and more maintainable in the future. > > Hope it helps, > > Maurizio > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > _______________________________________________ > aolserver-talk mailing list > aol...@li... > https://lists.sourceforge.net/lists/listinfo/aolserver-talk |