Rechercher une page de manuel

Chercher une autre page de manuel:

vtoargv.3abz

Langue: en

Version: March 2007 (ubuntu - 01/11/07)

Section: 3 (Bibliothèques de fonctions)

NAME

strtoargv, vtoargv, toargv, freeargv, argvtostr - convert between argument lists and strings

LIBRARIES

Abz Library (-labz), Debug Library (-ldebug)

SYNOPSIS

 #include <abz/argv.h>
 
 char **strtoargv(const char *str);
 char **vtoargv(const char *fmt, va_list ap);
 char **toargv(const char *fmt, ...);
 void freeargv(char **argv);
 void argvtostr(char *str,size_t size, char *const argv[]);
 

DESCRIPTION

These functions can be used to convert between strings and argument lists as used by the exec() famility of functions, and vice versa.

The toargv() functions break up a string into NULL terminated list of arguments which can be used for the exec() family of functions. Same rules as that of most UNIX shells apply, i.e.

 
 a) '\' is the escape character
 b) '"' can be used to quote strings
 c) leading and trailing whitespace is stripped from each argument
 
 

The argvtostr() concatenates all the arguments in the specified argument list into a single string of specified size (arguments seperated with spaces). The argv list must be NULL terminated.

RETURN VALUE

All functions except freeargv() and argvtostr() return a pointer to a NULL terminated argument list if successful, or NULL if an error occurred.

Call abz_get_error() to retrieve error messages.

NOTES

None of the libabz routines are thread-safe. I'm not planning to change this either! For more information, please see http://threading.2038bug.com/

AUTHOR

Written by Abraham vd Merwe <abz@blio.com>
QUALITÉ

M : Les animaux élevé en batterie ne produisent que de la merde !
P : Ouais... J'ai dû abattre mon élevage de visons... Au lieu de donner de la fourrure, ils donnaient du skaï...