The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Newsbot
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Quality
Search
Feedback


[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 The Mozilla Organization.