00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "fixlib.h"
00023
00024 #define _ENV_(v,m,n,t) tCC* v = NULL;
00025 ENV_TABLE
00026 #undef _ENV_
00027
00028 void
00029 initialize_opts ()
00030 {
00031 static const char var_not_found[] =
00032 #ifndef __STDC__
00033 "fixincl ERROR: %s environment variable not defined\n"
00034 #else
00035 "fixincl ERROR: %s environment variable not defined\n"
00036 "each of these must be defined:\n"
00037 # define _ENV_(vv,mm,nn,tt) "\t" nn " - " tt "\n"
00038 ENV_TABLE
00039 # undef _ENV_
00040 #endif
00041 ;
00042
00043 #define _ENV_(v,m,n,t) { tSCC var[] = n; \
00044 v = getenv (var); if (m && (v == NULL)) { \
00045 fprintf (stderr, var_not_found, var); \
00046 exit (EXIT_FAILURE); } }
00047
00048 ENV_TABLE
00049
00050 #undef _ENV_
00051 }