فهرست منبع

More G{NAME,MAPSET}_MAX fixes

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@32394 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 سال پیش
والد
کامیت
53f96578de
3فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 1 1
      lib/g3d/g3dcats.c
  2. 2 2
      lib/g3d/g3dcolor.c
  3. 2 2
      lib/g3d/g3dopen.c

+ 1 - 1
lib/g3d/g3dcats.c

@@ -91,7 +91,7 @@ read_cats  (const char *name, const char *mapset, struct Categories *pcats)
 
 {
   FILE *fd;
-  char buff[1024], buf2[200], xname[512], xmapset[512];
+  char buff[1024], buf2[200], xname[GNAME_MAX], xmapset[GMAPSET_MAX];
   CELL cat;
   DCELL val1, val2;
   int old;

+ 2 - 2
lib/g3d/g3dcolor.c

@@ -23,7 +23,7 @@ G3d_removeColor  (const char *name)
 
 
 {
-  char buf[200], secondary[500], buf2[200], xname[512], xmapset[512];
+  char buf[200], secondary[500], buf2[200], xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
   if (G__name_is_fully_qualified (name, xname, xmapset)) {
     sprintf (buf, "%s/%s", G3D_DIRECTORY, xname);
@@ -365,7 +365,7 @@ G3d_writeColors  (const char *name, const char *mapset, struct Colors *colors)
 
 {
   char element[512], buf[512], buf2[200];
-  char xname[512], xmapset[512];
+  char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
   FILE *fd;
   int stat;
 

+ 2 - 2
lib/g3d/g3dopen.c

@@ -14,7 +14,7 @@ G3d_openCellOldNoHeader  (const char *name, const char *mapset)
 
 {
   G3D_Map *map;
-  char buf[200], buf2[200], xname[512], xmapset[512];
+  char buf[200], buf2[200], xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
   G3d_initDefaults ();
 
@@ -220,7 +220,7 @@ G3d_openCellNew  (const char *name, int typeIntern, int cache, G3D_Region *regio
   G3D_Map *map;
   int nofHeaderBytes, dummy = 0, compression, precision;
   long ldummy = 0;
-  char xname[512], xmapset[512];
+  char xname[GNAME_MAX], xmapset[GMAPSET_MAX];
 
   G3d_initDefaults ();
   if (! G3d_maskOpenOld ()) {