-/*
- *fgisInit.c -
- *initialization procedure for Fgis package
- * Copyright (C) by SoftWeyr, 1997
+/******************************************************************************
+ * $Id: fgisInit.c,v 1.2 2003-01-02 18:02:52 dron Exp $
+ *
+ * Project: fGIS core engine
+ * Purpose: initialization procedure for Fgis package
+ *
+ ******************************************************************************
+ *
+ * Copyright (C) 1997, Victor Wagner <vitus@ice.ru>
+ * Copyright (C) 2003, Andrey Kiselev <dron@remotesensing.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ * USA.
+ *****************************************************************************
*/
+
#include <string.h>
#include <math.h>
#include <stdlib.h>
* defines default (1:1) reclass table
* defines fGIS_HOME variable to directory, containing fgis.rc
* Directories are searched in following order
- * FGIS_HOME as defined in Makefile
+ * FGIS_CONFIG as defined in Makefile
* ~/lib/fgis
* executes fgis.rc
*/
if ((fGIS_HOME=Tcl_GetVar(interp,"fGIS_HOME",TCL_GLOBAL_ONLY))==NULL) {
fGIS_HOME=buffer;
/* Check if compilied in default is valid */
- if (!check_for_rc(interp,fGIS_HOME,FGIS_HOME)&&
+ if (!check_for_rc(interp,fGIS_HOME,FGIS_CONFIG)&&
#ifdef __unix__
!check_for_rc(interp,fGIS_HOME,"/usr/local/lib/fgis")&&
!check_for_rc(interp,fGIS_HOME,"/usr/lib/fgis")&&
Tcl_SetVar(interp,"fGIS_HOME",fGIS_HOME,TCL_GLOBAL_ONLY);
}
- if (Tcl_EvalFile(interp,FGIS_HOME "/fgis.rc")!=TCL_OK) {
+ if (Tcl_EvalFile(interp,FGIS_CONFIG "/fgis.rc")!=TCL_OK) {
Tcl_SetResult(interp,"Error in initialization file",TCL_STATIC);
return TCL_ERROR;
}