diff options
-rw-r--r-- | src/ChangeLog | 27 | ||||
-rw-r--r-- | src/clef/edible.c | 2 | ||||
-rw-r--r-- | src/etc/asq.c.pamphlet | 2 | ||||
-rw-r--r-- | src/graph/Gdraws/Gfun.c | 4 | ||||
-rw-r--r-- | src/graph/view2D/main2d.c | 10 | ||||
-rw-r--r-- | src/graph/view3D/main3d.c | 10 | ||||
-rw-r--r-- | src/graph/view3D/testcol.c | 2 | ||||
-rw-r--r-- | src/graph/viewAlone/spoon2D.c | 2 | ||||
-rw-r--r-- | src/graph/viewAlone/spoonComp.c | 2 | ||||
-rw-r--r-- | src/graph/viewman/fun2D.c | 2 | ||||
-rw-r--r-- | src/graph/viewman/fun3D.c | 2 | ||||
-rw-r--r-- | src/hyper/addfile.c | 8 | ||||
-rw-r--r-- | src/hyper/extent2.c | 2 | ||||
-rw-r--r-- | src/hyper/htadd.c | 2 | ||||
-rw-r--r-- | src/hyper/htinp.c | 2 | ||||
-rw-r--r-- | src/hyper/initx.c | 8 | ||||
-rw-r--r-- | src/hyper/lex.c | 4 | ||||
-rw-r--r-- | src/hyper/parse-types.c | 2 | ||||
-rw-r--r-- | src/hyper/spadint.c | 4 | ||||
-rw-r--r-- | src/hyper/titlebar.c | 2 | ||||
-rw-r--r-- | src/lib/cfuns-c.c | 4 | ||||
-rw-r--r-- | src/lib/cursor.c | 2 | ||||
-rw-r--r-- | src/lib/fnct_key.c | 2 | ||||
-rw-r--r-- | src/lib/sockio-c.c | 6 | ||||
-rw-r--r-- | src/sman/sman.c | 2 |
25 files changed, 71 insertions, 44 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7c3a506a..1564b0ef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2008-10-24 Alfredo Portes <doyenatccny@gmail.com> + + * hyper/addfile.c: Use oa_getenv function. + * hyper/titlebar.c: Likewise. + * src/hyper/parse-types.c: Likewise. + * src/hyper/htinp.c: Likewise. + * src/hyper/extent2.c: Likewise. + * src/hyper/spadint.c: Likewise. + * src/hyper/htadd.c: Likewise. + * src/hyper/lex.c: Likewise. + * src/hyper/initx.c: Likewise. + * src/sman/sman.c: Likewise. + * src/graph/view2D/main2d.c: Likewise. + * src/graph/view3D/testcol.c: Likewise. + * src/graph/view3D/main3d.c: Likewise. + * src/graph/viewman/fun2D.c: Likewise. + * src/graph/viewman/fun3D.c: Likewise. + * src/graph/Gdraws/Gfun.c: Likewise. + * src/graph/viewAlone/spoon2D.c: Likewise. + * src/graph/viewAlone/spoonComp.c: Likewise. + * src/lib/cfuns-c.c: Likewise. + * src/lib/fnct_key.c: Likewise. + * src/lib/sockio-c.c: Likewise. + * src/lib/cursor.c: Likewise. + * src/clef/edible.c: Likewise. + * src/etc/asq.c.pamphlet: Likewise. + 2008-10-24 Gabriel Dos Reis <gdr@cs.tamu.edu> Add basic support for stream client socket. diff --git a/src/clef/edible.c b/src/clef/edible.c index fb5494e6..0a65cd4f 100644 --- a/src/clef/edible.c +++ b/src/clef/edible.c @@ -215,7 +215,7 @@ main(int argc, char *argv[]) fprintf(stderr, "Process --> %s\n", pargs[0]); } else{ - program = getenv("SHELL"); + program = oa_getenv("SHELL"); if (!program) program = strdup("/bin/sh"); else diff --git a/src/etc/asq.c.pamphlet b/src/etc/asq.c.pamphlet index f47acf6c..19277b5c 100644 --- a/src/etc/asq.c.pamphlet +++ b/src/etc/asq.c.pamphlet @@ -1463,7 +1463,7 @@ int isspace(int c); int i; /* a temporary */ char proparg[256]; /* a temporary */ /* echoargs(argc, argv);*/ - AXIOM=(char *)getenv("AXIOM"); + AXIOM=oa_getenv("AXIOM"); if (AXIOM == NULL) printf("AXIOM shell variable has no value. using current directory\n"); diff --git a/src/graph/Gdraws/Gfun.c b/src/graph/Gdraws/Gfun.c index db2f4f7f..117ebbda 100644 --- a/src/graph/Gdraws/Gfun.c +++ b/src/graph/Gdraws/Gfun.c @@ -692,7 +692,7 @@ PSGlobalInit(void) /* path specific file names */ - if ((envAXIOM = getenv("DEVE")) != NULL) { /* get env var AXIOM */ + if ((envAXIOM = oa_getenv("DEVE")) != NULL) { /* get env var AXIOM */ psData[headerps].flag = yes; sprintf(psData[headerps].filename, "%s%s", envAXIOM, "/Gdraws/PS/header.ps"); @@ -728,7 +728,7 @@ PSGlobalInit(void) sprintf(psData[setupps].filename, "%s%s", envAXIOM, "/Gdraws/PS/setup.ps"); sprintf(psData[endps].filename, "%s%s", envAXIOM, "/Gdraws/PS/end.ps"); } - else if ((envAXIOM = getenv("AXIOM")) != NULL) { + else if ((envAXIOM = oa_getenv("AXIOM")) != NULL) { psData[headerps].flag = yes; sprintf(psData[headerps].filename, "%s%s", envAXIOM, "/lib/graph/header.ps"); diff --git a/src/graph/view2D/main2d.c b/src/graph/view2D/main2d.c index 94cd1015..beb6e602 100644 --- a/src/graph/view2D/main2d.c +++ b/src/graph/view2D/main2d.c @@ -163,7 +163,7 @@ main(void) /**** Set up display ****/ - if ((dsply = XOpenDisplay(getenv("DISPLAY"))) == NULL) + if ((dsply = XOpenDisplay(oa_getenv("DISPLAY"))) == NULL) fprintf(stderr,"Could not open the display.\n"); scrn = DefaultScreen(dsply); rtWindow = RootWindow(dsply,scrn); @@ -473,20 +473,20 @@ mergeDatabases(void) if (XResourceManagerString(dsply) != NULL) serverDB = XrmGetStringDatabase(XResourceManagerString(dsply)); else { - (void) strcpy(filename,getenv("HOME")); + (void) strcpy(filename,oa_getenv("HOME")); (void) strcat(filename,"/.Xdefaults"); serverDB = XrmGetFileDatabase(filename); } XrmMergeDatabases(serverDB,&rDB); - if ( getenv ("XENVIRONMENT") == NULL) { + if ( oa_getenv ("XENVIRONMENT") == NULL) { int len; - (void) strcpy(filename,getenv("HOME")); + (void) strcpy(filename,oa_getenv("HOME")); (void) strcat(filename,"/.Xdefaults-"); len = strlen(filename); (void) gethostname(filename+len,1024-len); } else - (void) strcpy (filename,getenv ("XENVIRONMENT")); + (void) strcpy (filename,oa_getenv ("XENVIRONMENT")); homeDB = XrmGetFileDatabase(filename); XrmMergeDatabases(homeDB,&rDB); diff --git a/src/graph/view3D/main3d.c b/src/graph/view3D/main3d.c index 8421e35f..4197daf6 100644 --- a/src/graph/view3D/main3d.c +++ b/src/graph/view3D/main3d.c @@ -263,7 +263,7 @@ main(void) splitPoints = NIL(viewTriple); /**** Set up display ****/ - if ((dsply = XOpenDisplay(getenv("DISPLAY"))) == NULL) + if ((dsply = XOpenDisplay(oa_getenv("DISPLAY"))) == NULL) {fprintf(stderr,"Could not open display.\n");exit (-1);} scrn = DefaultScreen(dsply); rtWindow = RootWindow(dsply,scrn); @@ -612,14 +612,14 @@ mergeDatabases(void) serverDB = XrmGetStringDatabase(XResourceManagerString(dsply)); } else { - (void) strcpy(filename,getenv("HOME")); + (void) strcpy(filename,oa_getenv("HOME")); (void) strcat(filename,"/.Xdefaults"); serverDB = XrmGetFileDatabase(filename); } XrmMergeDatabases(serverDB,&rDB); - if ( getenv ("XENVIRONMENT") == NULL) { + if ( oa_getenv ("XENVIRONMENT") == NULL) { int len; - (void) strcpy(filename,getenv("HOME")); + (void) strcpy(filename,oa_getenv("HOME")); (void) strcat(filename,"/.Xdefaults-"); len = strlen(filename); @@ -627,7 +627,7 @@ mergeDatabases(void) } else { - (void) strcpy (filename,getenv ("XENVIRONMENT")); + (void) strcpy (filename,oa_getenv ("XENVIRONMENT")); } homeDB = XrmGetFileDatabase(filename); XrmMergeDatabases(homeDB,&rDB); diff --git a/src/graph/view3D/testcol.c b/src/graph/view3D/testcol.c index 9638ad69..b73337e0 100644 --- a/src/graph/view3D/testcol.c +++ b/src/graph/view3D/testcol.c @@ -268,7 +268,7 @@ main(void) splitPoints = NIL(viewTriple); /**** Set up display ****/ - if ((dsply = XOpenDisplay(getenv("DISPLAY"))) == NULL) + if ((dsply = XOpenDisplay(oa_getenv("DISPLAY"))) == NULL) {fprintf(stderr,"Could not open display.\n");exit (-1);} scrn = DefaultScreen(dsply); rtWindow = RootWindow(dsply,scrn); diff --git a/src/graph/viewAlone/spoon2D.c b/src/graph/viewAlone/spoon2D.c index c50e4ba3..9ad458d8 100644 --- a/src/graph/viewAlone/spoon2D.c +++ b/src/graph/viewAlone/spoon2D.c @@ -81,7 +81,7 @@ spoonView2D(void) close(pipe1[1]); printf("(spoon2D child) start the TwoDimensionalViewport process\n"); sprintf(errorStr,"%s","(viewAlone) execution of the TwoDimensionalViewport process"); - sprintf(envAXIOM,"%s",getenv("AXIOM")); + sprintf(envAXIOM,"%s",oa_getenv("AXIOM")); sprintf(runView,"%s%s",envAXIOM,"/lib/view2D"); check(execl(runView,runView,NULL)); fprintf(stderr,"Could not execute view2D! Check that view2D is on your path variable.\n"); diff --git a/src/graph/viewAlone/spoonComp.c b/src/graph/viewAlone/spoonComp.c index 92902443..3c828a44 100644 --- a/src/graph/viewAlone/spoonComp.c +++ b/src/graph/viewAlone/spoonComp.c @@ -83,7 +83,7 @@ spoonView3D(int type) sprintf(errorStr,"%s", "(viewAlone) execution of the ThreeDimensionalViewport process"); - sprintf(envAXIOM,"%s",getenv("AXIOM")); + sprintf(envAXIOM,"%s",oa_getenv("AXIOM")); sprintf(runView,"%s%s",envAXIOM,"/lib/view3D"); check(execl(runView,runView,NULL)); fprintf(stderr,"Could not execute view3D!\n"); diff --git a/src/graph/viewman/fun2D.c b/src/graph/viewman/fun2D.c index dd98f836..ed49772f 100644 --- a/src/graph/viewman/fun2D.c +++ b/src/graph/viewman/fun2D.c @@ -219,7 +219,7 @@ forkView2D(void) #ifdef DEBUG fprintf(stderr,"Executing TwoDimensionalViewport process\n"); #endif - sprintf(envAXIOM,"%s",getenv("AXIOM")); + sprintf(envAXIOM,"%s",oa_getenv("AXIOM")); sprintf(runView,"%s%s",envAXIOM,"/lib/view2D"); check(execl(runView,runView,NULL)); fprintf(stderr,"The viewport manager could not execute view2D.\nCheck that view2D is on your PATH.\n"); diff --git a/src/graph/viewman/fun3D.c b/src/graph/viewman/fun3D.c index f6f4cd23..638641e9 100644 --- a/src/graph/viewman/fun3D.c +++ b/src/graph/viewman/fun3D.c @@ -271,7 +271,7 @@ forkView3D(int typeOfViewport) #ifdef DEBUG fprintf(stderr,"Executing ThreeDimensionalViewport process\n"); #endif - sprintf(envAXIOM,"%s",getenv("AXIOM")); + sprintf(envAXIOM,"%s",oa_getenv("AXIOM")); sprintf(runView,"%s%s",envAXIOM,"/lib/view3D"); check(execl(runView,runView,NULL)); fprintf(stderr,"The viewport manager could not execute view3D.\nCheck that view3D is on your PATH.\n"); diff --git a/src/hyper/addfile.c b/src/hyper/addfile.c index 7b6121b5..7fcbeae3 100644 --- a/src/hyper/addfile.c +++ b/src/hyper/addfile.c @@ -149,11 +149,11 @@ build_ht_filename(char *fname, char *aname, char *name) return oa_access_file_for_read(fname); } else {/** If not I am going to have to append path names to it **/ - HTPATH = (char *) getenv("HTPATH"); + HTPATH = oa_getenv("HTPATH"); if (HTPATH == NULL) { /** The user does not have a HTPATH, so I will use the the directory $AXIOM/share/hypertex/pages/ as the default path ***/ - char *spad = (char *) getenv("AXIOM"); + char *spad = oa_getenv("AXIOM"); if (spad == NULL) { fprintf(stderr, "ht_file_open:Cannot find ht data base: setenv HTPATH or AXIOM\n"); @@ -257,9 +257,9 @@ db_file_open(char *db_file) */ /* fprintf(stderr,"addfile:db_file_open: entered db_file=%s\n",db_file);*/ if (gDatabasePath == NULL) { - gDatabasePath = (char *) getenv("HTPATH"); + gDatabasePath = oa_getenv("HTPATH"); if (gDatabasePath == NULL) { - spad = (char *) getenv("AXIOM"); + spad = oa_getenv("AXIOM"); if (spad == NULL) { /* fprintf(stderr, "addfile:db_file_open: Cannot find ht data base path:\n");*/ diff --git a/src/hyper/extent2.c b/src/hyper/extent2.c index ced4156b..a315fd11 100644 --- a/src/hyper/extent2.c +++ b/src/hyper/extent2.c @@ -840,7 +840,7 @@ insert_bitmap_file(TextNode * node) if (node->image.pm == 0) { if ( ((image = (ImageStruct *) hash_find(&gImageHashTable, filename)) == NULL) - || (getenv("HTCACHE"))) { + || (oa_getenv("HTCACHE"))) { /* * read the bitmap if not already in memory or if the environment diff --git a/src/hyper/htadd.c b/src/hyper/htadd.c index 4e122e45..62f7cd7c 100644 --- a/src/hyper/htadd.c +++ b/src/hyper/htadd.c @@ -185,7 +185,7 @@ build_db_filename(short flag, char *db_dir, char *dbfilename) if (flag & System) { - SPAD = (char *) getenv("AXIOM"); + SPAD = oa_getenv("AXIOM"); if (SPAD == NULL) { fprintf(stderr, "build_db_filename: cannot find system root directory\n"); diff --git a/src/hyper/htinp.c b/src/hyper/htinp.c index 49520641..c1970572 100644 --- a/src/hyper/htinp.c +++ b/src/hyper/htinp.c @@ -434,7 +434,7 @@ send_command(char *command,int com_type) FILE *f; char name[512], str[512]/*, *c*/; - sprintf(name, "/tmp/hyper%s.input", getenv("SPADNUM")); + sprintf(name, "/tmp/hyper%s.input", oa_getenv("SPADNUM")); f = fopen(name, "w"); if (f == NULL) { fprintf(stderr, "Can't open temporary input file %s\n", name); diff --git a/src/hyper/initx.c b/src/hyper/initx.c index d2464652..2a4eef9a 100644 --- a/src/hyper/initx.c +++ b/src/hyper/initx.c @@ -964,23 +964,23 @@ mergeDatabases(void) serverDB = XrmGetStringDatabase(XResourceManagerString(gXDisplay)); } else { - (void) strcpy(filename, getenv("HOME")); + (void) strcpy(filename, oa_getenv("HOME")); (void) strcat(filename, "/.Xdefaults"); /* fprintf(stderr,"initx:mergeDatabases:XrmGetFileDatase\n");*/ serverDB = XrmGetFileDatabase(filename); } /* fprintf(stderr,"initx:mergeDatabases:XrmMergeDatabases 2\n");*/ XrmMergeDatabases(serverDB, &rDB); - if (getenv("XENVIRONMENT") == NULL) { + if (oa_getenv("XENVIRONMENT") == NULL) { int len; - (void) strcpy(filename, getenv("HOME")); + (void) strcpy(filename, oa_getenv("HOME")); (void) strcat(filename, "/.Xdefaults-"); len = strlen(filename); (void) gethostname(filename + len, 1024 - len); } else { - (void) strcpy(filename, getenv("XENVIRONMENT")); + (void) strcpy(filename, oa_getenv("XENVIRONMENT")); } /* fprintf(stderr,"initx:mergeDatabases:filename=%s\n",filename);*/ homeDB = XrmGetFileDatabase(filename); diff --git a/src/hyper/lex.c b/src/hyper/lex.c index 0db4a7ee..0142fd25 100644 --- a/src/hyper/lex.c +++ b/src/hyper/lex.c @@ -249,8 +249,8 @@ parser_init(void) void init_scanner(void) { - if (getenv("HTASCII")) { - useAscii = (strcmp(getenv("HTASCII"), "yes") == 0); + if (oa_getenv("HTASCII")) { + useAscii = (strcmp(oa_getenv("HTASCII"), "yes") == 0); } else { if(gTtFontIs850==1) useAscii = 0; diff --git a/src/hyper/parse-types.c b/src/hyper/parse-types.c index 986df978..44227441 100644 --- a/src/hyper/parse-types.c +++ b/src/hyper/parse-types.c @@ -612,7 +612,7 @@ parse_env(TextNode *node) get_expected_token(openaxiom_Lbrace_token); get_expected_token(openaxiom_Word_token); - env = getenv(token.id); + env = oa_getenv(token.id); if (env == NULL) { /** The environment variable was not found **/ diff --git a/src/hyper/spadint.c b/src/hyper/spadint.c index 9541350c..fb1189ab 100644 --- a/src/hyper/spadint.c +++ b/src/hyper/spadint.c @@ -134,7 +134,7 @@ send_pile(openaxiom_sio *sock,char * str) FILE *f; char name[512], command[512]; - sprintf(name, "/tmp/hyper%s.input", getenv("SPADNUM")); + sprintf(name, "/tmp/hyper%s.input", oa_getenv("SPADNUM")); f = fopen(name, "w"); if (f == NULL) { fprintf(stderr, "Can't open temporary input file %s\n", name); @@ -211,7 +211,7 @@ start_user_buffer(HyperDocPage *page) char complfile[250]; int ret_val; - SPAD = (char *) getenv("AXIOM"); + SPAD = (char *) oa_getenv("AXIOM"); if (SPAD == NULL) { sprintf(SPAD, "/spad/mnt/rios"); } diff --git a/src/hyper/titlebar.c b/src/hyper/titlebar.c index 0768ba8c..2da6716e 100644 --- a/src/hyper/titlebar.c +++ b/src/hyper/titlebar.c @@ -307,7 +307,7 @@ readTitleBarImages(void) char filename[128]; char *axiomEnvVar = NULL; - axiomEnvVar = getenv("AXIOM"); + axiomEnvVar = oa_getenv("AXIOM"); if (axiomEnvVar) sprintf(filename, "%s/share/hypertex/bitmaps/%s", axiomEnvVar, tw1file); diff --git a/src/lib/cfuns-c.c b/src/lib/cfuns-c.c index 88a24d47..ff5b5966 100644 --- a/src/lib/cfuns-c.c +++ b/src/lib/cfuns-c.c @@ -82,7 +82,7 @@ addtopath(char *dir) { char *path, *newpath; - path = getenv("PATH"); + path = oa_getenv("PATH"); if (path == NULL) return -1; @@ -312,7 +312,7 @@ copyEnvValue(char *varName, char *buffer) { char *s; - s = getenv(varName); + s = oa_getenv(varName); if (s == NULL) return 0; strcpy(buffer, s); diff --git a/src/lib/cursor.c b/src/lib/cursor.c index 4038133d..c63f738d 100644 --- a/src/lib/cursor.c +++ b/src/lib/cursor.c @@ -61,7 +61,7 @@ Cursor_shape(int shape) struct hftgetid hftgid; char *termVal; - termVal = (char *) getenv("TERM"); + termVal = oa_getenv("TERM"); if (strcmp("hft", termVal) && strncmp("aixterm", termVal, 7)) return; diff --git a/src/lib/fnct_key.c b/src/lib/fnct_key.c index e130ad81..29b5ab55 100644 --- a/src/lib/fnct_key.c +++ b/src/lib/fnct_key.c @@ -108,7 +108,7 @@ define_function_keys(void) for (key = 0; key < 13; key++) (function_key[key]).str = NULL; /** see if the user has a .clef file ***/ - HOME = getenv("HOME"); + HOME = oa_getenv("HOME"); sprintf(path, "%s/.clef", HOME); if ((fd = open(path, O_RDONLY)) == -1) { return; diff --git a/src/lib/sockio-c.c b/src/lib/sockio-c.c index bec55d9a..c53d3981 100644 --- a/src/lib/sockio-c.c +++ b/src/lib/sockio-c.c @@ -1099,7 +1099,7 @@ make_server_name(char *name, const char* base) sprintf(name, "%s%d", base, spad_server_number); return 0; } - num = getenv("SPADNUM"); + num = oa_getenv("SPADNUM"); if (num == NULL) { /* fprintf(stderr, "\n(AXIOM Sockets) The AXIOM server number is undefined.\n"); @@ -1170,7 +1170,7 @@ open_server(const char* server_name) FD_SET(server[1].socket, &server_mask); listen(server[1].socket, 5); } - s = getenv("SPADSERVER"); + s = oa_getenv("SPADSERVER"); if (s == NULL) { /* fprintf(stderr, "Not a spad server system\n"); */ return -1; @@ -1226,7 +1226,7 @@ sock_accept_connection(int purpose) { fd_set rd; int ret_val, i, p; - if (getenv("SPADNUM") == NULL) return -1; + if (oa_getenv("SPADNUM") == NULL) return -1; while (1) { rd = server_mask; ret_val = sselect(FD_SETSIZE, (fd_set *)&rd, (fd_set *)0, (fd_set *)0, NULL); diff --git a/src/sman/sman.c b/src/sman/sman.c index 76c6d59e..a29edfa0 100644 --- a/src/sman/sman.c +++ b/src/sman/sman.c @@ -235,7 +235,7 @@ should_I_clef(void) static int in_X(void) { - if (getenv("DISPLAY")) return 1; + if (oa_getenv("DISPLAY")) return 1; return 0; } |