1curl_getenv(3)                      libcurl                     curl_getenv(3)
2
3
4

NAME

6       curl_getenv - return value for environment name
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       char *curl_getenv(const char *name);
12

DESCRIPTION

14       curl_getenv() is a portable wrapper for the getenv() function, meant to
15       emulate its behavior and provide an identical interface for all operat‐
16       ing systems libcurl builds on (including win32).
17
18       You must curl_free(3) the returned string when you are done with it.
19

EXAMPLE

21         char *width = curl_getenv("COLUMNS");
22         if(width) {
23           /* it was set! */
24           curl_free(width);
25         }
26

AVAILABILITY

28       Always
29

RETURN VALUE

31       A  pointer to a null-terminated string or NULL if it failed to find the
32       specified name.
33

NOTE

35       Under unix operating systems, there is no point in returning  an  allo‐
36       cated  memory, although other systems will not work properly if this is
37       not done. The unix implementation thus has to suffer slightly from  the
38       drawbacks of other systems.
39

SEE ALSO

41       getenv(3C),
42
43
44
45libcurl 8.2.1                   April 26, 2023                  curl_getenv(3)
Impressum