X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=dll%2FfgisInit.c;h=299b6d849fb6a4f8c32ad2bc80b3a5e5971c7c2b;hb=HEAD;hp=59f2fd5d9a5bfba8a7b027ed3c35d9bb15847791;hpb=7fc95240daaa1c2d6e4ff61a559a4feedef4fcbd;p=oss%2Ffgis.git diff --git a/dll/fgisInit.c b/dll/fgisInit.c index 59f2fd5..299b6d8 100644 --- a/dll/fgisInit.c +++ b/dll/fgisInit.c @@ -1,8 +1,31 @@ -/* - *fgisInit.c - - *initialization procedure for Fgis package - * Copyright (C) by SoftWeyr, 1997 +/****************************************************************************** + * $Id: fgisInit.c,v 1.3 2003-01-08 09:50:05 dron Exp $ + * + * Project: fGIS core engine + * Purpose: initialization procedure for Fgis package + * + ****************************************************************************** + * + * Copyright (C) 1997, Victor Wagner + * Copyright (C) 2003, Andrey Kiselev + * + * 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 #include #include @@ -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_CONFDIR 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_CONFDIR)&& #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_CONFDIR "/fgis.rc")!=TCL_OK) { Tcl_SetResult(interp,"Error in initialization file",TCL_STATIC); return TCL_ERROR; }