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
PROPERTIES(3) FreeBSD Library Functions Manual PROPERTIES(3)

properties_read, property_find, properties_freefunctions to allow creating simple property lists from ASCII file data

System Utilities Library (libutil, -lutil)

#include <libutil.h>

properties
properties_read(int fd);

char *
property_find(properties list, const char *name);

void
properties_free(properties list);

typedef struct _properties {
	struct _properties *next;
	char *name;
	char *value;
} *properties;

The function () reads name = value pairs from the file descriptor passed in fd and returns the head of a new property list, assuming that the file's contents have been parsed properly, or NULL in case of error.

The () function returns the associated value string for the property named name if found, otherwise NULL. The value returned may be up to PROPERTY_MAX_VALUE bytes in length.

The () function is used to free the structure returned by properties_read() when it is no longer needed.

Each property in the file is assumed to have the format of name = value where name is an alphanumeric string (and any punctuation not including the `=' character) and value is an arbitrary string of text terminated by a newline character. If newlines are desired, the entire value should be enclosed in { } (curly-bracket) characters. Any line beginning with a # or ; character is assumed to be a comment and will be ignored.

Jordan Hubbard

Simplistic.

October 7, 1998 FreeBSD 14.3-RELEASE

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.