lib/misc.h

Go to the documentation of this file.
00001 #ifndef H_MISC
00002 #define H_MISC
00003 
00009 #include <string.h>
00010 
00011 #ifdef __cplusplus
00012 extern "C" {
00013 #endif
00014 
00022 rpmRC rpmMkdirPath (const char * dpath, const char * dname)
00023         /*@globals h_errno, fileSystem, internalState @*/
00024         /*@modifies fileSystem, internalState @*/;
00025 
00033 /*@only@*/ char ** splitString(const char * str, int length, char sep)
00034         /*@*/;
00035 
00040 void freeSplitString( /*@only@*/ char ** list)
00041         /*@modifies list @*/;
00042 
00049 /*@unused@*/ static inline
00050 /*@only@*/ char * stripTrailingChar(/*@only@*/ char * s, char c)
00051         /*@modifies *s */
00052 {
00053     char * t;
00054 /*@-boundswrite@*/
00055     for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
00056         *t = '\0';
00057 /*@=boundswrite@*/
00058     return s;
00059 }
00060 
00068 int dosetenv(const char * name, const char * value, int overwrite)
00069         /*@globals environ@*/
00070         /*@modifies *environ @*/;
00071 
00077 int doputenv(const char * str)
00078         /*@globals environ@*/
00079         /*@modifies *environ @*/;
00080 
00094 int makeTempFile(/*@null@*/ const char * prefix,
00095                 /*@null@*/ /*@out@*/ const char ** fnptr,
00096                 /*@out@*/ FD_t * fdptr)
00097         /*@globals rpmGlobalMacroContext, h_errno,
00098                 fileSystem, internalState @*/
00099         /*@modifies *fnptr, *fdptr, rpmGlobalMacroContext,
00100                 fileSystem, internalState @*/;
00101 
00106 /*@only@*/ char * currentDirectory(void)
00107         /*@*/;
00108 
00109 #ifdef __cplusplus
00110 }
00111 #endif
00112 
00113 #endif  /* H_MISC */

Generated on Fri Oct 12 08:44:53 2007 for rpm by  doxygen 1.5.2