[GRASS-SVN] r34446 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Nov 22 21:25:37 EST 2008
Author: glynn
Date: 2008-11-22 21:25:37 -0500 (Sat, 22 Nov 2008)
New Revision: 34446
Modified:
grass/trunk/lib/gis/null_val.c
Log:
Fix "null values not initialized" bug in previous commit
Modified: grass/trunk/lib/gis/null_val.c
===================================================================
--- grass/trunk/lib/gis/null_val.c 2008-11-23 01:41:03 UTC (rev 34445)
+++ grass/trunk/lib/gis/null_val.c 2008-11-23 02:25:37 UTC (rev 34446)
@@ -24,11 +24,7 @@
#include <grass/gis.h>
#include <grass/glocale.h>
-/* Flag to indicate null patterns are initialized */
-static int initialized = FALSE;
-
static int EmbedGivenNulls(void *, char *, RASTER_MAP_TYPE, int);
-static void InitError(void);
/****************************************************************************
* int EmbedGivenNulls (void *cell, char *nulls, RASTER_MAP_TYPE map_type,
@@ -77,27 +73,6 @@
return 1;
}
-/****************************************************************************
-* void InitError (void)
-*
-* PURPOSE: To print an error message and exit the program. This function
-* is called if something tries to access a null pattern before
-* it is initialized.
-* INPUT VARS: none
-* RETURN VAL: none
-*****************************************************************************/
-static void InitError(void)
-{
- char errMsg[512]; /* array to hold error message */
-
- strcpy(errMsg, _("Null values have not been initialized. "));
- strcat(errMsg, _("G_gisinit() must be called first. "));
- strcat(errMsg, _("Please advise GRASS developers of this error.\n"));
- G_fatal_error(errMsg);
-
- return;
-}
-
/*========================== Library Functions =============================*/
/****************************************************************************
@@ -273,11 +248,6 @@
{
int i; /* counter */
- /* Check if the null patterns have been initialized */
- if (!initialized) {
- InitError();
- }
-
/* Check if the CELL value matches the null pattern */
for (i = 0; i < sizeof(CELL); i++)
if (cellVal[i] != (CELL) 0x80000000)
More information about the grass-commit
mailing list