Add argvNew() to create an empty argv array

- yes it's silly ;)
This commit is contained in:
Panu Matilainen 2008-04-14 15:58:10 +03:00
parent 4e34fcc2bd
commit 08375fa2bc
2 changed files with 13 additions and 0 deletions

View File

@ -23,6 +23,12 @@ void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp)
}
ARGV_t argvNew(void)
{
ARGV_t argv = xcalloc(1, sizeof(*argv));
return argv;
}
ARGI_t argiFree(ARGI_t argi)
{
if (argi) {

View File

@ -37,6 +37,13 @@ void argvPrint(const char * msg, ARGV_const_t argv, FILE * fp);
*/
ARGI_t argiFree(ARGI_t argi);
/** \ingroup rpmargv
* Create an empty argv array.
* @return pointer to empty argv
*/
ARGV_t argvNew(void);
/** \ingroup rpmargv
* Destroy an argv array.
* @param argv argv array