lib/misc.h

Go to the documentation of this file.
00001 #ifndef H_MISC
00002 #define H_MISC
00003 
00009 #ifdef __cplusplus
00010 extern "C" {
00011 #endif
00012 
00020 rpmRC rpmMkdirPath (const char * dpath, const char * dname)
00021         /*@globals h_errno, fileSystem, internalState @*/
00022         /*@modifies fileSystem, internalState @*/;
00023 
00031 /*@only@*/ char ** splitString(const char * str, int length, char sep)
00032         /*@*/;
00033 
00038 void freeSplitString( /*@only@*/ char ** list)
00039         /*@modifies list @*/;
00040 
00047 /*@unused@*/ static inline
00048 /*@only@*/ char * stripTrailingChar(/*@only@*/ char * s, char c)
00049         /*@modifies *s */
00050 {
00051     char * t;
00052 /*@-boundswrite@*/
00053     for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
00054         *t = '\0';
00055 /*@=boundswrite@*/
00056     return s;
00057 }
00058 
00066 int dosetenv(const char * name, const char * value, int overwrite)
00067         /*@globals environ@*/
00068         /*@modifies *environ @*/;
00069 
00075 int doputenv(const char * str)
00076         /*@globals environ@*/
00077         /*@modifies *environ @*/;
00078 
00092 int makeTempFile(/*@null@*/ const char * prefix,
00093                 /*@null@*/ /*@out@*/ const char ** fnptr,
00094                 /*@out@*/ FD_t * fdptr)
00095         /*@globals rpmGlobalMacroContext, h_errno,
00096                 fileSystem, internalState @*/
00097         /*@modifies *fnptr, *fdptr, rpmGlobalMacroContext,
00098                 fileSystem, internalState @*/;
00099 
00104 /*@only@*/ char * currentDirectory(void)
00105         /*@*/;
00106 
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110 
00111 #endif  /* H_MISC */

Generated on Wed Jan 28 12:45:24 2009 for rpm by  doxygen 1.4.7