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         /*@*/;
00023 
00026 void freeSplitString( /*@only@*/ char ** list)
00027         /*@modifies list @*/;
00028 
00035 /*@unused@*/ static inline
00036 /*@only@*/ char * stripTrailingChar(/*@only@*/ char * s, char c)
00037         /*@modifies *s */
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         /*@modifies fileSystem @*/;
00049 
00050 /*
00051  * These are like the libc functions, but they malloc() the space which
00052  * is needed.
00053  */
00054 
00057 int dosetenv(const char * name, const char * value, int overwrite)
00058         /*@modifies fileSystem @*/;
00059 
00062 int doputenv(const char * str)
00063         /*@modifies fileSystem @*/;
00064 
00078 int makeTempFile(/*@null@*/ const char * prefix,
00079                 /*@null@*/ /*@out@*/ const char ** fnptr,
00080                 /*@out@*/ FD_t * fdptr)
00081         /*@modifies *fnptr, *fdptr, fileSystem @*/;
00082 
00087 /*@only@*/ char * currentDirectory(void)
00088         /*@modifies fileSystem @*/;
00089 
00092 void compressFilelist(Header h)
00093         /*@modifies h @*/;
00094 
00097 void expandFilelist(Header h)
00098         /*@modifies h @*/;
00099 
00102 void buildOrigFileList(Header h, /*@out@*/ const char *** fileListPtr, 
00103                         /*@out@*/ int * fileCountPtr)
00104         /*@modifies *fileListPtr, *fileCountPtr @*/;
00105 
00108 int myGlobPatternP (const char *patternURL)     /*@*/;
00109 
00112 int rpmGlob(const char * patterns, /*@out@*/ int * argcPtr,
00113         /*@out@*/ const char *** argvPtr)
00114                 /*@modifies *argcPtr, *argvPtr, fileSystem @*/;
00115 
00118 void providePackageNVR(Header h)
00119         /*@modifies h @*/;
00120 
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124 
00125 #endif  /* H_MISC */

Generated at Thu Sep 6 11:25:41 2001 for rpm by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001