/[ascend]/trunk/base/generic/general/env.h
ViewVC logotype

Diff of /trunk/base/generic/general/env.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 588 by johnpye, Wed May 10 16:56:00 2006 UTC revision 589 by johnpye, Thu May 11 03:10:43 2006 UTC
# Line 40  Line 40 
40      It doesn't have to actually consult the environment; it could do all      It doesn't have to actually consult the environment; it could do all
41      sorts of other stuff if you wanted.      sorts of other stuff if you wanted.
42  */  */
43  typedef char *(GetEnvFn)(const char *name);  typedef char *(GetEnvFn)(const char *name);
44    
45    /**
46        This the type of a putenv function that can be used to set and environment
47        variable.
48    */
49    typedef int (PutEnvFn)(const char *inputstring);
50    
51    /**
52        Attempts to read from a getenv function, and if the value is found, write it
53        using a putenv function. You would use this to copy values from one
54        environment to another.
55    
56        @return nonzero on error, -1 means that the value didn't exist in getenv,
57        otherwise the errors are those returned by putenv.
58    */
59    ASC_DLLSPEC(int) env_import(const char *varname,GetEnvFn *getenvptr,PutEnvFn *putenvptr);
60    
61  /**  /**
62      Perform variable substitution on a string in shell-like way.      Perform variable substitution on a string in shell-like way.

Legend:
Removed from v.588  
changed lines
  Added in v.589

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22