/[global]/global/libutil/env.c
ViewVC logotype

Diff of /global/libutil/env.c

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

revision 1.7 by shigio, Tue May 10 05:17:52 2005 UTC revision 1.8 by h-iwamoto, Wed Jun 22 11:43:08 2005 UTC
# Line 37  Line 37 
37  #include "env.h"  #include "env.h"
38  #include "strbuf.h"  #include "strbuf.h"
39    
40    extern char **environ;
41    
42  /*  /*
43   * set_env: put environment variable.   * set_env: put environment variable.
44   *   *
# Line 72  get_home_directory(void) Line 74  get_home_directory(void)
74          return getenv("HOME");          return getenv("HOME");
75  #endif  #endif
76  }  }
77    
78    /*
79     * env_size: calculate the size of area used by environment.
80     */
81    int
82    env_size(void)
83    {
84            char **e;
85            int size = 0;
86    
87            for (e = environ; *e != NULL; e++)
88                    size += strlen(*e) + 1;
89    
90            return size;
91    }
92    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26