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


Manual Reference Pages  -  PH_ENCODE_SELECTOR (3)

NAME

ph_encode_selector, ph_free_selectors - retrieve data from a PH server

CONTENTS

Synopsis
Version
Description
Return Value
Errors
See Also

SYNOPSIS

#include <phclient.h>

int ph_encode_selector(char *string, int requirefield, int *lastindex, struct ph_fieldselector **selectors);
void ph_free_selectors(struct ph_fieldselector *selectors);

VERSION

This man page documents version 1.2 of libphclient.

DESCRIPTION

The ph_encode_selector() function is a utility function for text-based applications which need to convert field specifiers from a string format into an array of ph_fieldselector structures.

The string argument is a text string consisting of an optional field name and operator, as well as a mandantory value. The requirefield argument indicates whether the field portion of string is required.

The selectors argument is a pointer to a dynamically-allocated array of ph_fieldselector structures. The lastindex argument is a pointer to an integer which keeps track of the size of the selectors array.

Successive calls to ph_encode_selector() add the selector encoded in string to the array pointed to by selectors. Before calling ph_encode_selector() for the first time on a given array, the caller should initialize selectors to NULL and lastindex to 0.

The ph_free_selectors() function is used to free memory allocated by ph_encode_selector() for the selectors array.

RETURN VALUE

On success, the ph_encode_selector() function returns 0. On error, it returns -1 and sets errno.

ERRORS

If the requirefield argument is non-zero and string does not include the field name and operator, ph_encode_selector() returns -1 and sets errno to EINVAL.

SEE ALSO

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


University of Illinois PH_ENCODE_SELECTOR (3) Oct 2002

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