rpm  4.5
misc.h
Go to the documentation of this file.
1 #ifndef H_MISC
2 #define H_MISC
3 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
20 rpmRC rpmMkdirPath (const char * dpath, const char * dname)
21  /*@globals h_errno, fileSystem, internalState @*/
22  /*@modifies fileSystem, internalState @*/;
23 
31 /*@only@*/ char ** splitString(const char * str, int length, char sep)
32  /*@*/;
33 
38 void freeSplitString( /*@only@*/ char ** list)
39  /*@modifies list @*/;
40 
47 /*@unused@*/ static inline
48 /*@only@*/ char * stripTrailingChar(/*@only@*/ char * s, char c)
49  /*@modifies *s */
50 {
51  char * t;
52 /*@-boundswrite@*/
53  for (t = s + strlen(s) - 1; *t == c && t >= s; t--)
54  *t = '\0';
55 /*@=boundswrite@*/
56  return s;
57 }
58 
66 int dosetenv(const char * name, const char * value, int overwrite)
67  /*@globals environ@*/
68  /*@modifies *environ @*/;
69 
75 int doputenv(const char * str)
76  /*@globals environ@*/
77  /*@modifies *environ @*/;
78 
92 int makeTempFile(/*@null@*/ const char * prefix,
93  /*@null@*/ /*@out@*/ const char ** fnptr,
94  /*@out@*/ FD_t * fdptr)
95  /*@globals rpmGlobalMacroContext, h_errno,
96  fileSystem, internalState @*/
97  /*@modifies *fnptr, *fdptr, rpmGlobalMacroContext,
98  fileSystem, internalState @*/;
99 
104 /*@only@*/ char * currentDirectory(void)
105  /*@*/;
106 
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif /* H_MISC */