1 #ifndef _CLIUTIL_H
2 #define _CLIUTIL_H
3 
4 /** \file cliutils.h
5  *
6  *  Misc helpers for RPM CLI tools
7  */
8 
9 #include <stdio.h>
10 #include <popt.h>
11 #include <rpm/rpmutil.h>
12 
13 /* "normalized" exit: avoid overflowing and xargs special value 255 */
14 #define RETVAL(rc) (((rc) > 254) ? 254 : (rc))
15 
16 RPM_GNUC_NORETURN
17 void argerror(const char * desc);
18 
19 void printUsage(poptContext con, FILE * fp, int flags);
20 
21 int initPipe(void);
22 
23 int finishPipe(void);
24 
25 #endif /* _CLIUTIL_H */
26