Re: C functions
Posted in 1992
Quoting Tim Sailer... } } Well, 4GL doesn't have a getenv function. Has anyone written one? If so, } could you post it or email it to me? I don't want to have to struggle } with the C to hack my own. Are there any other useful functions in C } that anyone has written? } Sure it does... version 4.10 (or higher) has a function called fgl_getenv(). If you're not running 4.10 (or higher) here is the function... Here --------- Snip Here --------- Snip Here --------- Snip Here --------- Snip /******************************************************************************* * This function returns the character value of an environment variable. * *******************************************************************************/ fgl_getenv(arg) int arg; { char s[33], *getenv(); register int i; popquote(s, sizeof(s)); for (i = strlen(s) - 1; i >= 0; i--) if (s[i] == ' ') s[i] = '\\0'; retquote(getenv(s)); return(1); } Here --------- Snip Here --------- Snip Here --------- Snip Here --------- Snip DAS -- David Snyder @ Snide Computer Services - Folcroft, PA Current Release is db4glgen-3.7 UUCP: ..!uunet!das13!dave INTERNET: dave.snyder@snide.com