4 #include <grass/config.h>
14 #if !defined(HAVE_PUTENV) && !defined(HAVE_SETENV)
22 #if defined(HAVE_PUTENV)
23 sprintf(buf,
"%s=%s", name, value);
25 #elif defined(HAVE_SETENV)
26 setenv(name, value, 1);
35 newenv = (
char **)G_malloc((i + 1) *
sizeof(
char *));
46 if (sscanf(env,
"%[^=]=%1s", buf, temp) < 1)
49 if (strcmp(buf, name) != 0)
53 sprintf(buf,
"%s=%s", name, value);
59 sprintf(buf,
"%s=%s", name, value);
sprintf(buf2,"%s", G3D_CATS_ELEMENT)
void G_free(void *buf)
Free allocated memory.
char * G_store(const char *s)
Copy string to allocated memory.
void G_putenv(const char *name, const char *value)
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]