ARA ROOT v3.4 Software

AraWebPlotter/configLib/configFileSpec.cxx

00001 /* configFileSpec.c - Functions for expanding config file spec */
00002 
00003 /* G.J.Crone, University College London */
00004 
00005 /*
00006  * Current CVS Tag:
00007  * $Header: /work1/anitaCVS/flightSoft/common/configLib/configFileSpec.c,v 1.3 2005/06/15 16:22:00 rjn Exp $
00008  */
00009  
00010 /*
00011 DESCRIPTION
00012 <Insert a description of the file/module here>
00013 INCLUDE FILES: <place list of any relevant header files here>
00014 */
00015 
00016 /* includes */
00017 #include <stdio.h>
00018 #include <stdlib.h>
00019 #include <sys/types.h>
00020 #include <string.h>
00021 #include <sys/stat.h>
00022 #include <unistd.h>
00023 #include <fcntl.h>
00024 #include <errno.h>
00025 
00026 #include "configLib.h"
00027 
00028 /* defines */
00029 
00030 /* typedefs */
00031 
00032 /* globals */   
00033 
00034 /* locals */
00035 
00036 
00037 char* configFileSpec (
00038                       char* fileName
00039                       )
00040 {
00041    static char fileSpec[FILENAME_MAX] ;
00042    char* configPath = 0 ;
00043    //   char *tempPath=0;
00044    configPath = getenv ("ARA_WEBPLOTTER_CONFIG_DIR") ;
00045    if(configPath == NULL) {
00046 //       configPath = "." ;
00047      strcpy(fileSpec,"/home/anita/flightSoft/config");
00048    }
00049    else {
00050      strcpy (fileSpec, configPath) ;
00051    }
00052    strcat (fileSpec, "/") ;
00053    strcat (fileSpec, fileName) ;
00054 
00055    return (fileSpec) ;
00056 }
00057 

Generated on Mon Mar 18 16:00:44 2013 for ARA ROOT v3.4 Software by doxygen 1.4.7