2010-08-20 17:08:10 +08:00
|
|
|
#ifndef _CLIUTIL_H
|
|
|
|
#define _CLIUTIL_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <popt.h>
|
|
|
|
#include <rpm/rpmutil.h>
|
|
|
|
|
2010-08-20 20:17:08 +08:00
|
|
|
/* "normalized" exit: avoid overflowing and xargs special value 255 */
|
|
|
|
#define RETVAL(rc) (((rc) > 254) ? 254 : (rc))
|
|
|
|
|
2010-08-20 17:08:10 +08:00
|
|
|
RPM_GNUC_NORETURN
|
|
|
|
void argerror(const char * desc);
|
|
|
|
|
|
|
|
void printUsage(poptContext con, FILE * fp, int flags);
|
|
|
|
|
2010-08-20 18:47:05 +08:00
|
|
|
int initPipe(void);
|
|
|
|
|
2011-09-05 13:38:31 +08:00
|
|
|
int finishPipe(void);
|
2010-08-20 18:47:05 +08:00
|
|
|
|
2010-08-20 17:08:10 +08:00
|
|
|
#endif /* _CLIUTIL_H */
|