<[EMAIL PROTECTED]> writes:
>
> ..The problem is that the c function is not getting the vars from
> the env, when running under Perl. The getenv() does not seem to
> work. If I set the variables $ENV{PROJECT} = 9999 and $ENV{SERVICE} = 1,
> call the function OpenLog(Arg, Arg, "", ""), the function will see the
> 2 empty strings and attemt to read the values from the env. These env
> variables could be set by a shell script before the perl is run. The perl
> code could be last in a series of utilities that use these env vars. It works
> if the actual arguments are sent to the function, but I would like to have
> the interface behave as the C calls do. Here is some of the C code if my
> explaination is to vague,
>
>
> DotsLog.Project = GETENV(inproject, "PROJECTNUM");
>>>
>>> #define GETENV(var, env) ( (var) == NULL ? getenv((env)) : (var) )
But you are not passing NULL you are passing ""
NULL is (char *) 0
"" is pointer to a byte containing '\0'.
You may need a custom typemap to cause "" (or better undef)
to be passed to your library as NULL.
--
Nick Ing-Simmons
http://www.ni-s.u-net.com/