- Main Page
- Related Pages
- Modules
- Data Structures
- Files

# 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
    00069 int dosetenv(const char * name, const char * value, int overwrite)
    00070         /*@globals environ@*/
    00071         /*@modifies *environ @*/;
    00072
    00079 int doputenv(const char * str)
    00080         /*@globals environ@*/
    00081         /*@modifies *environ @*/;
    00082
    00087 /*@only@*/ char * currentDirectory(void)
    00088         /*@*/;
    00089
    00090 #ifdef __cplusplus
    00091 }
    00092 #endif
    00093
    00094 #endif  /* H_MISC */