X-Git-Url: http://www.wagner.pp.ru/gitweb/?p=oss%2Ffgis.git;a=blobdiff_plain;f=dll%2FfgisInit.c;fp=dll%2FfgisInit.c;h=23e4a8e68925f933c32d7309048a7a49ca98456f;hp=59f2fd5d9a5bfba8a7b027ed3c35d9bb15847791;hb=c5a9bf19ca03b1c193bc8413b1332e2ed499e280;hpb=c5103c48dce10c8f197c080a953e8958da53fe28 diff --git a/dll/fgisInit.c b/dll/fgisInit.c index 59f2fd5..23e4a8e 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.2 2003-01-02 18:02:52 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_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; }