Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

lib/misc.h

Go to the documentation of this file.
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 /*@only@*/ char ** splitString(const char * str, int length, char sep);
00022 
00025 void    freeSplitString( /*@only@*/ char ** list);
00026 
00033 /*@unused@*/ static inline char * stripTrailingChar(char * s, char c)
00034         /*@modifies *s */
00035 {
00036     char * t;
00037     for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
00038         *t = '\0';
00039     return s;
00040 }
00041 
00044 int     rpmfileexists(const char * filespec)    /*@*/;
00045 
00048 int     rpmvercmp(const char * one, const char * two);
00049 
00050 /* these are like the normal functions, but they malloc() the space which
00051    is needed */
00052 
00055 int     dosetenv(const char *name, const char *value, int overwrite);
00056 
00059 int     doputenv(const char * str);
00060 
00063 int     makeTempFile(const char * prefix, /*@out@*/ const char ** fnptr,
00064                         /*@out@*/ FD_t * fdptr);
00065 
00069 /*@only@*/ char * currentDirectory(void);
00070 
00073 void    compressFilelist(Header h);
00074 
00077 void    expandFilelist(Header h);
00078 
00081 void    buildOrigFileList(Header h, /*@out@*/ const char *** fileListPtr, 
00082                         /*@out@*/ int * fileCountPtr);
00083 
00086 int myGlobPatternP (const char *patternURL)     /*@*/;
00087 
00090 int rpmGlob(const char * patterns, /*@out@*/ int * argcPtr,
00091         /*@out@*/ const char *** argvPtr)
00092                 /*@modifies *argcPtr, *argvPtr @*/;
00093 
00096 void providePackageNVR(Header h);
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 
00102 #endif  /* H_MISC */

Generated at Thu Apr 19 15:29:43 2001 for rpm by doxygen1.2.6-20010408 written by Dimitri van Heesch, © 1997-2001