*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> properties_read (3)              
Title
Content
Arch
Section
 

PROPERTIES(3)

Contents


NAME    [Toc]    [Back]

     properties_read, propery_find, properties_free -- functions to allow creating
 simple property lists from ASCII file data

LIBRARY    [Toc]    [Back]

     System Utilities Library (libutil, -lutil)

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <libutil.h>

     properties
     properties_read(int fd);

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

     void
     properties_free(properties list);

DESCRIPTION    [Toc]    [Back]

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

     The function properties_read() 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 property_find() 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 properties_free() function is used to free the structure returned by
     properties_read() when it is no longer needed.

FILE FORMAT    [Toc]    [Back]

     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 arbitary 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.

SEE ALSO    [Toc]    [Back]

      
      
     auth_getval(3)

BUGS    [Toc]    [Back]

     Simplistic.

AUTHORS    [Toc]    [Back]

     Jordan Hubbard


FreeBSD 5.2.1			October 7, 1998 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
LIST_INSERT_BEFORE NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
TAILQ_FIRST NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
TAILQ_HEAD NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
TAILQ_HEAD_INITIALIZER NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
TAILQ_INIT NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
TAILQ_ENTRY NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
TAILQ_EMPTY NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
SIMPLEQ_REMOVE_HEAD NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
SIMPLEQ_NEXT NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
SIMPLEQ_INSERT_AFTER NetBSD implementations of singlylinked lists, lists, simple queues, tail queues, and circular queues
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service