瀏覽代碼

cmProc2.h/c : Added cmVectArrayWriteDirFn().

master
kevin 9 年之前
父節點
當前提交
a59041336a
共有 2 個文件被更改,包括 10 次插入1 次删除
  1. 8
    0
      cmProc2.c
  2. 2
    1
      cmProc2.h

+ 8
- 0
cmProc2.c 查看文件

@@ -3997,6 +3997,14 @@ cmRC_t cmVectArrayWrite( cmVectArray_t* p, const char* fn )
3997 3997
   return rc;
3998 3998
 }
3999 3999
 
4000
+cmRC_t cmVectArrayWriteDirFn(cmVectArray_t* p, const char* dir, const char* fn )
4001
+{
4002
+  assert( dir!=NULL && fn!=NULL );
4003
+  const cmChar_t* path = cmFsMakeFn( dir, fn, NULL, NULL );
4004
+  cmRC_t rc = cmVectArrayWrite(p,path);
4005
+  cmFsFreeFn(path);
4006
+  return rc;
4007
+}
4000 4008
 
4001 4009
 cmRC_t cmVectArrayPrint( cmVectArray_t* p, cmRpt_t* rpt )
4002 4010
 {

+ 2
- 1
cmProc2.h 查看文件

@@ -853,7 +853,8 @@ extern "C" {
853 853
   cmRC_t cmVectArrayAppendU( cmVectArray_t* p, const unsigned* v,   unsigned vn );
854 854
 
855 855
   // Write a vector array in a format that can be read by readVectArray.m.
856
-  cmRC_t cmVectArrayWrite(   cmVectArray_t* p, const char* fn );
856
+  cmRC_t cmVectArrayWrite(     cmVectArray_t* p, const char* fn );
857
+  cmRC_t cmVectArrayWriteDirFn(cmVectArray_t* p, const char* dir, const char* fn );
857 858
 
858 859
   // Print the vector array to rpt.
859 860
   cmRC_t cmVectArrayPrint( cmVectArray_t* p, cmRpt_t* rpt );

Loading…
取消
儲存