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
00024 ;
00025
00033 char ** splitString(const char * str, int length, char sep)
00034 ;
00035
00040 void freeSplitString( char ** list)
00041 ;
00042
00049 static inline
00050 char * stripTrailingChar( char * s, char c)
00051
00052 {
00053 char * t;
00054
00055 for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
00056 *t = '\0';
00057
00058 return s;
00059 }
00060
00069 int dosetenv(const char * name, const char * value, int overwrite)
00070
00071 ;
00072
00079 int doputenv(const char * str)
00080
00081 ;
00082
00087 char * currentDirectory(void)
00088 ;
00089
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093
00094 #endif