Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

lib/misc.h

Go to the documentation of this file.
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 /*@only@*/ char ** splitString(const char * str, int length, char sep);
00021 
00024 void    freeSplitString( /*@only@*/ char ** list);
00025 
00032 /*@unused@*/ static inline char * stripTrailingChar(char * s, char c)
00033         /*@modifies *s */
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 /* these are like the normal functions, but they malloc() the space which
00054    is needed */
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, /*@out@*/ const char ** fnptr,
00071                         /*@out@*/ FD_t * fdptr);
00072 
00076 /*@only@*/ char * currentDirectory(void);
00077 
00080 void    compressFilelist(Header h);
00081 
00084 void    expandFilelist(Header h);
00085 
00088 void    buildOrigFileList(Header h, /*@out@*/ const char *** fileListPtr, 
00089                         /*@out@*/ int * fileCountPtr);
00090 
00093 int myGlobPatternP (const char *patternURL)     /*@*/;
00094 
00097 int rpmGlob(const char * patterns, /*@out@*/ int * argcPtr,
00098         /*@out@*/ const char *** argvPtr)
00099                 /*@modifies *argcPtr, *argvPtr @*/;
00100 
00103 void providePackageNVR(Header h);
00104 
00105 #ifdef __cplusplus
00106 }
00107 #endif
00108 
00109 #endif  /* H_MISC */

Generated at Mon May 21 08:53:39 2001 for rpm by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001