Util_Getline; Util_Hostname - Netscape ENTERPRISE SERVER 6.1 - NSAPI PROGRAMMER GUIDE Manual

Nsapi
Table of Contents

Advertisement

NSAPI Functions (in Alphabetical Order)

util_getline

The
carriage-return/line-feed terminated string. The string is copied into the specified
buffer, and NULL-terminates it. The function returns a value that indicates
whether the operation stored a string in the buffer, encountered an error, or
reached the end of the file.
Use this function to scan lines out of a text file, such as a configuration file.
Syntax
int util_getline(filebuf *buf, int lineno, int maxlen, char *line);
Returns
0 if successful.
1 if the end of file was reached.
-1 if an error occurred.
Parameters
filebuf *buf
int lineno
occurs. The caller is responsible for making sure the line number is accurate.
int maxlen
char *l
allocating and deallocating
See also
util_can_exec, util_env_create, util_hostname

util_hostname

The
string. If the function cannot find a fully-qualified domain name, it returns NULL.
You may reallocate or free this string. Use this function to determine the name of
the system you are on.
Syntax
char *util_hostname(void);
Returns
If a fully-qualified domain name was found, returns a string containing that name
otherwise returns NULL if the fully-qualified domain name was not found.
198
Netscape Enterprise Server NSAPI Programmer's Guide • April 2002 (Draft)
function scans the specified file buffer to find a line-feed or
util_getline
contains the string.
line
line
is the file buffer to be scanned.
is used to include the line number in the error message when an error
is the maximum number of characters that can be written into
is the buffer in which to store the string. The user is responsible for
function retrieves the local host name and returns it as a
util_hostname
contains the string.
line
contains a description of the error.
.
line
l.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise server 6.1

Table of Contents