Преглед изворни кода

cmFileSys.h/c : Added cmFileSysMakeDirFn(),cmFileSysMakeUserDirFn().

master
kevin пре 8 година
родитељ
комит
0204c5084a
2 измењених фајлова са 21 додато и 0 уклоњено
  1. 11
    0
      cmFileSys.c
  2. 10
    0
      cmFileSys.h

+ 11
- 0
cmFileSys.c Прегледај датотеку

@@ -515,7 +515,12 @@ const cmChar_t* cmFileSysMakeUserDir(  cmFileSysH_t h, const cmChar_t* dir,  ...
515 515
   return retPtr;
516 516
 }
517 517
 
518
+const cmChar_t* cmFileSysMakeDirFn(    cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn )
519
+{ return cmFileSysMakeFn( h, dir, fn, NULL, NULL); }
518 520
 
521
+const cmChar_t* cmFileSysMakeUserDirFn(cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn )
522
+{ return cmFileSysMakeUserFn(h, dir, fn, NULL, NULL ); }
523
+    
519 524
 void cmFileSysFreeFn( cmFileSysH_t h, const cmChar_t* fn )
520 525
 {
521 526
   cmFs_t* p = _cmFileSysHandleToPtr(h);
@@ -1248,6 +1253,12 @@ const cmChar_t* cmFsMakeUserFn(  const cmChar_t* dirPrefix, const cmChar_t* fn,
1248 1253
   return retPtr;
1249 1254
 }
1250 1255
 
1256
+const cmChar_t* cmFsMakeDirFn(const cmChar_t* dir, const cmChar_t* fn )
1257
+{ return cmFileSysMakeDirFn(_cmFsH,dir,fn); }
1258
+
1259
+const cmChar_t* cmFsMakeUserDirFn(const cmChar_t* dir, const cmChar_t* fn )
1260
+{ return cmFileSysMakeUserDirFn(_cmFsH,dir,fn); }
1261
+
1251 1262
 const cmChar_t* cmFsVMakeDir(     const cmChar_t* dir,  va_list vl )
1252 1263
 { return cmFileSysVMakeDir(_cmFsH,dir,vl); }
1253 1264
 

+ 10
- 0
cmFileSys.h Прегледај датотеку

@@ -104,6 +104,13 @@ extern "C" {
104 104
   const cmChar_t* cmFileSysMakeDir(      cmFileSysH_t h, const cmChar_t* dir,  ... );
105 105
   const cmChar_t* cmFileSysVMakeUserDir( cmFileSysH_t h, const cmChar_t* dir,  va_list vl );
106 106
   const cmChar_t* cmFileSysMakeUserDir(  cmFileSysH_t h, const cmChar_t* dir,  ... );
107
+
108
+  // Equivalent to same named cmFileSysMake() functions but assumes a single directory prefix and the file name
109
+  // extension is attached to 'fn'.  
110
+  const cmChar_t* cmFileSysMakeDirFn(    cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn );
111
+  
112
+  // Same as cmFileSysMakeDirFn() but prefixes 'dir' with the users home directory.
113
+  const cmChar_t* cmFileSysMakeUserDirFn(cmFileSysH_t h, const cmChar_t* dir, const cmChar_t* fn );
107 114
   
108 115
   // Release the file name created through an earlier call to cmFileSysMakeFn().
109 116
   void            cmFileSysFreeFn( cmFileSysH_t h, const cmChar_t* fn );
@@ -242,6 +249,9 @@ extern "C" {
242 249
   const cmChar_t* cmFsMakeDir(      const cmChar_t* dirPrefix,  ... );
243 250
   const cmChar_t* cmFsVMakeUserDir( const cmChar_t* dirPrefix,  va_list vl );
244 251
   const cmChar_t* cmFsMakeUserDir(  const cmChar_t* dirPrefix,  ... );
252
+
253
+  const cmChar_t* cmFsMakeDirFn(    const cmChar_t* dir, const cmChar_t* fn );
254
+  const cmChar_t* cmFsMakeUserDirFn(const cmChar_t* dir, const cmChar_t* fn );
245 255
   
246 256
   void            cmFsFreeFn(      const cmChar_t* fn );
247 257
   cmFsRC_t        cmFsGenFn(       const cmChar_t* dir, const cmChar_t* prefixStr, const cmChar_t* extStr, const cmChar_t** fnPtr );

Loading…
Откажи
Сачувај