GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FINDLINE(3) Schily´s LIBRARY FUNCTIONS FINDLINE(3)

findline() - finds a line that has a matching field

int findline(fname,delim,string,field,array,arraysize)
	char *fname;	/* file name */
	char delim;	/* field delimiter */
	char *string;	/* string to match */
	int field;	/* field number to match, 0-n */
	char *array[];	/* array to fill pointers in */
	int arraysize;	/* number of entries in the arrays */

findline() retrieves specific fields from the first line of the file fname.

findline() fills in array with pointers to strings that make up the fields on the line. The strings are allocated new storage. The field delimiter, delim, is used to break up each line of the file into fields. string is the string to match. fieldno is the field number to match. Fields are numbered 0..n. array is an array of pointers to fill in. arraysize is the number of elements in the array.

+1
match.
-1
no match.
-2
arg error.
-3
cannot open file.
-4
not enough memory to allocate space for fields.

Each line of the file must be less than 512 characters long.
15. Juli 1988 Joerg Schilling

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.