[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_ConfigGetInt

Overview

Get a configuration file integer variable

Syntax

    int Ns_ConfigGetInt(
    	char 	*sectionName,
    	char 	*key,
    	int 	 *valuePtr
    );

Description

This function converts the specified value into an int and stores it in valuePtr. If the key does not exist in the config file or it is not an integer, the function returns NS_FALSE. Otherwise it returns NS_TRUE.

Example

    	int n;
    
    	if (Ns_ConfigGetInt("MySect", "MyKey", &n) != NS_TRUE) {
    		/* Integer was not present or invalid - set a default. */
    		n = 5;	/* off */
    	}

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.