From a59041336a663d5f2d261c7e8f4aa14ba0aed873 Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 16 Jul 2015 19:01:37 -0400 Subject: [PATCH] cmProc2.h/c : Added cmVectArrayWriteDirFn(). --- cmProc2.c | 8 ++++++++ cmProc2.h | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmProc2.c b/cmProc2.c index b5fb3d9..cb9c379 100644 --- a/cmProc2.c +++ b/cmProc2.c @@ -3997,6 +3997,14 @@ cmRC_t cmVectArrayWrite( cmVectArray_t* p, const char* fn ) return rc; } +cmRC_t cmVectArrayWriteDirFn(cmVectArray_t* p, const char* dir, const char* fn ) +{ + assert( dir!=NULL && fn!=NULL ); + const cmChar_t* path = cmFsMakeFn( dir, fn, NULL, NULL ); + cmRC_t rc = cmVectArrayWrite(p,path); + cmFsFreeFn(path); + return rc; +} cmRC_t cmVectArrayPrint( cmVectArray_t* p, cmRpt_t* rpt ) { diff --git a/cmProc2.h b/cmProc2.h index 206c598..3ca481d 100644 --- a/cmProc2.h +++ b/cmProc2.h @@ -853,7 +853,8 @@ extern "C" { cmRC_t cmVectArrayAppendU( cmVectArray_t* p, const unsigned* v, unsigned vn ); // Write a vector array in a format that can be read by readVectArray.m. - cmRC_t cmVectArrayWrite( cmVectArray_t* p, const char* fn ); + cmRC_t cmVectArrayWrite( cmVectArray_t* p, const char* fn ); + cmRC_t cmVectArrayWriteDirFn(cmVectArray_t* p, const char* dir, const char* fn ); // Print the vector array to rpt. cmRC_t cmVectArrayPrint( cmVectArray_t* p, cmRpt_t* rpt );