00001 #ifndef H_MISC
00002 #define H_MISC
00003
00008 #include <unistd.h>
00009 #include <sys/types.h>
00010
00011 #include "header.h"
00012 #include "ugid.h"
00013
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017
00020 char ** splitString(const char * str, int length, char sep);
00021
00024 void freeSplitString( char ** list);
00025
00032 static inline char * stripTrailingChar(char * s, char c)
00033
00034 {
00035 char * t;
00036 for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
00037 *t = '\0';
00038 return s;
00039 }
00040
00043 int rpmfileexists(const char * filespec) ;
00044
00047 int rpmfileexists(const char * filespec);
00048
00051 int rpmvercmp(const char * one, const char * two);
00052
00053
00054
00055
00058 int rpmfileexists(const char * filespec);
00059
00062 int dosetenv(const char *name, const char *value, int overwrite);
00063
00066 int doputenv(const char * str);
00067
00070 int makeTempFile(const char * prefix, const char ** fnptr,
00071 FD_t * fdptr);
00072
00076 char * currentDirectory(void);
00077
00080 void compressFilelist(Header h);
00081
00084 void expandFilelist(Header h);
00085
00088 void buildOrigFileList(Header h, const char *** fileListPtr,
00089 int * fileCountPtr);
00090
00093 int myGlobPatternP (const char *patternURL) ;
00094
00097 int rpmGlob(const char * patterns, int * argcPtr,
00098 const char *** argvPtr)
00099 ;
00100
00103 void providePackageNVR(Header h);
00104
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108
00109 #endif