]> www.wagner.pp.ru Git - oss/fgis.git/blobdiff - dll/fgisInit.c
The first attempt to automate building process
[oss/fgis.git] / dll / fgisInit.c
index 59f2fd5d9a5bfba8a7b027ed3c35d9bb15847791..23e4a8e68925f933c32d7309048a7a49ca98456f 100644 (file)
@@ -1,8 +1,31 @@
-/* 
- *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>
@@ -24,7 +47,7 @@ int check_for_rc(Tcl_Interp *interp,char *home,char *path);
  * 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
  */
@@ -84,7 +107,7 @@ EXPORT(int, Fgis_Init)(Tcl_Interp *interp)
     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")&&
@@ -102,7 +125,7 @@ EXPORT(int, Fgis_Init)(Tcl_Interp *interp)
         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;
     }