The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search
[Contents] [Previous] [Next] [Last] 

Chapter 21
Environment Variables

This chapter describes the NSPR API for looking up the values of environment variables.

Functions

PR_GetEnv

Return the value of the environment variable
Syntax
#include <prenv.h>

char* PR_GetEnv(const char *name);
Parameters
The function has the following parameters:
name A pointer to a  null terminated string containing the name of the environment variable
Returns
If the environment variable is defined, returns a pointer to it's value. Otherwise NULL is returned.

Caution: The returned pointer should be treated as a const char*.

Description
PR_GetEnv searches the environment list for a string of the form "name=value" and returns a pointer to the value, if a match is found. If the environment variable is not defined, NULL is returned.


[Contents] [Previous] [Next] [Last]
Last Updated: Tue Jul 14 17:25:32 PDT 1998 
Copyright © 1998 Netscape Communications Corporation
Copyright © 1998-2000 The Mozilla Organization.
Last modified July 17, 1998.