00001 #ifndef H_MISC
00002 #define H_MISC
00003
00009 #include <unistd.h>
00010 #include <sys/types.h>
00011
00012 #include "header.h"
00013 #include "ugid.h"
00014
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018
00021 char ** splitString(const char * str, int length, char sep)
00022 ;
00023
00026 void freeSplitString( char ** list)
00027 ;
00028
00035 static inline
00036 char * stripTrailingChar( char * s, char c)
00037
00038 {
00039 char * t;
00040 for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
00041 *t = '\0';
00042 return s;
00043 }
00044
00047 int rpmfileexists(const char * urlfn)
00048 ;
00049
00050
00051
00052
00053
00054
00057 int dosetenv(const char * name, const char * value, int overwrite)
00058 ;
00059
00062 int doputenv(const char * str)
00063 ;
00064
00078 int makeTempFile( const char * prefix,
00079 const char ** fnptr,
00080 FD_t * fdptr)
00081 ;
00082
00087 char * currentDirectory(void)
00088 ;
00089
00092 void compressFilelist(Header h)
00093 ;
00094
00097 void expandFilelist(Header h)
00098 ;
00099
00102 void buildOrigFileList(Header h, const char *** fileListPtr,
00103 int * fileCountPtr)
00104 ;
00105
00108 int myGlobPatternP (const char *patternURL) ;
00109
00112 int rpmGlob(const char * patterns, int * argcPtr,
00113 const char *** argvPtr)
00114 ;
00115
00118 void providePackageNVR(Header h)
00119 ;
00120
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124
00125 #endif