>>>>> Glynn Clements <[EMAIL PROTECTED]> writes:

[...]

 > More generally, anything matching:

 > grep '\[[0-9][0-9][0-9]*\]'

 > deserves at least a cursory glance. Many of those should really be
 > using a #define'd constant, even if it's local to a single source
 > file.

        Could you review the attached patch?

        Things I didn't change with this patch:

        * buffers related to SQL commands, because I know no appropriate
          Cpp macro for these;

        * buffers related to command lines to be passed to system (),
          since I believe that using a specific library to construct the
          arguments lists to be passed to an `exec' family function
          directly would be a better solution; (check the `man-db'
          source [1] for a suitable facility);

        * misused G_warning (), etc.; like:

   char BUF[...];
   sprintf (BUF, FORMAT, ...);
   G_warning (BUF);

          instead of:

   G_warning (FORMAT, ...);

          (the documentation should emphasize the first argument being
          the printf ()-style format string, and /not/ the message);
          there're just too many of these and I hope to handle them with
          a script;

        * use of gets ()-like functions to discard everything on stdin
          until the next newline; a separate function is needed there;

        * all the other things I've missed or had no time to look at
          (nviz/ and most of ps.map/ in particular.)

[1] http://www.chiark.greenend.org.uk/%7Ecjwatson/bzr/man-db/trunk/

Attachment: buffers.patch.gz
Description: Binary data

_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to