| Bertrand SIMONNET | e6cd738 | 2015-07-01 15:39:44 -0700 | [diff] [blame] | 1 | .\" ************************************************************************** |
| 2 | .\" * _ _ ____ _ |
| 3 | .\" * Project ___| | | | _ \| | |
| 4 | .\" * / __| | | | |_) | | |
| 5 | .\" * | (__| |_| | _ <| |___ |
| 6 | .\" * \___|\___/|_| \_\_____| |
| 7 | .\" * |
| 8 | .\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 9 | .\" * |
| 10 | .\" * This software is licensed as described in the file COPYING, which |
| 11 | .\" * you should have received as part of this distribution. The terms |
| 12 | .\" * are also available at http://curl.haxx.se/docs/copyright.html. |
| 13 | .\" * |
| 14 | .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell |
| 15 | .\" * copies of the Software, and permit persons to whom the Software is |
| 16 | .\" * furnished to do so, under the terms of the COPYING file. |
| 17 | .\" * |
| 18 | .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 19 | .\" * KIND, either express or implied. |
| 20 | .\" * |
| 21 | .\" ************************************************************************** |
| Lucas Eckels | 9bd90e6 | 2012-08-06 15:07:02 -0700 | [diff] [blame] | 22 | .TH curl_getenv 3 "30 April 2004" "libcurl 7.12" "libcurl Manual" |
| 23 | .SH NAME |
| 24 | curl_getenv - return value for environment name |
| 25 | .SH SYNOPSIS |
| 26 | .B #include <curl/curl.h> |
| 27 | .sp |
| 28 | .BI "char *curl_getenv(const char *" name ");" |
| 29 | .ad |
| 30 | .SH DESCRIPTION |
| 31 | curl_getenv() is a portable wrapper for the getenv() function, meant to |
| 32 | emulate its behaviour and provide an identical interface for all operating |
| 33 | systems libcurl builds on (including win32). |
| 34 | .SH AVAILABILITY |
| 35 | This function will be removed from the public libcurl API in a near future. It |
| 36 | will instead be made "available" by source code access only, and then as |
| 37 | curlx_getenv(). |
| 38 | .SH RETURN VALUE |
| 39 | If successful, curl_getenv() returns a pointer to the value of the specified |
| 40 | environment. The memory it refers to is malloc()ed so the application must |
| 41 | free() this when the data is no longer needed. When \fIcurl_getenv(3)\fP fails |
| 42 | to find the specified name, it returns a null pointer. |
| 43 | .SH NOTE |
| 44 | Under unix operating systems, there isn't any point in returning an allocated |
| 45 | memory, although other systems won't work properly if this isn't done. The |
| 46 | unix implementation thus has to suffer slightly from the drawbacks of other |
| 47 | systems. |
| 48 | .SH "SEE ALSO" |
| 49 | .BR getenv "(3C), " |