/[pdpsoft]/trunk/grid-mw-security/cgul/environ/environ.h
ViewVC logotype

Diff of /trunk/grid-mw-security/cgul/environ/environ.h

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

revision 1448 by msalle, Sun Jan 31 18:24:07 2010 UTC revision 1449 by msalle, Tue Feb 2 02:35:46 2010 UTC
# Line 94  char **safe_copy_env(char **dst,const ch Line 94  char **safe_copy_env(char **dst,const ch
94    
95  /**  /**
96   * Creates a list of the var=value pairs from src which have varname in list.   * Creates a list of the var=value pairs from src which have varname in list.
97   * If it fails NULL is returned. This can also be done using add_src_list() using   * If it fails NULL is returned. This can also be done using add_src_list()
98   * dst==NULL, but this is more efficiently coded. All new entries are strdup-ed   * using dst==NULL, but this is more efficiently coded. All new entries are
99   * from those in src.   * strdup-ed from those in src.
100   */   */
101  char **copy_src_list(const char **src,const char **list);  char **copy_src_list(const char **src,const char **list);
102    
# Line 120  char **add_src_list(char **dst,const cha Line 120  char **add_src_list(char **dst,const cha
120  char **add_namevalue(char **dst,const char *namevalue);  char **add_namevalue(char **dst,const char *namevalue);
121    
122  /**  /**
123     * adds name=value pair to dst, as in setenv() with a 'external environment' .
124     * If the variable already exists, it's entry is replaced. Otherwise dst is
125     * realloc-ed and a new entry is added, the resulting array is returned. In case
126     * of error NULL is returned and dst is unchanged. name and value can be freed
127     * by the caller (unlike putenv(3p) )
128     */
129    char **setenv_dst(char **dst,const char *name, const char *value);
130    
131    /**
132   * Adds to the current environment the var=value pairs from src which have   * Adds to the current environment the var=value pairs from src which have
133   * varname in list. Returns number of entries added or -1 on error.   * varname in list. Returns number of entries added or -1 on error.
134   * NOTE: putenv doesn't reserve new memory so src should NOT be   * NOTE: putenv doesn't reserve new memory so src should NOT be

Legend:
Removed from v.1448  
changed lines
  Added in v.1449

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28