diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-11-23 19:09:09 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-11-23 19:09:09 +0900 |
commit | 4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (patch) | |
tree | 98110734c91668dfdbb126fcc0e15ddbd93738ca /src/ToolBox/superpmi/mcs/verbmerge.h | |
parent | fa45f57ed55137c75ac870356a1b8f76c84b229c (diff) | |
download | coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.gz coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.tar.bz2 coreclr-4b4aad7217d3292650e77eec2cf4c198ea9c3b4b.zip |
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'src/ToolBox/superpmi/mcs/verbmerge.h')
-rw-r--r-- | src/ToolBox/superpmi/mcs/verbmerge.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ToolBox/superpmi/mcs/verbmerge.h b/src/ToolBox/superpmi/mcs/verbmerge.h new file mode 100644 index 0000000000..1d612426f3 --- /dev/null +++ b/src/ToolBox/superpmi/mcs/verbmerge.h @@ -0,0 +1,29 @@ +// +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +//---------------------------------------------------------- +// verbMerge.h - verb that merges multiple .MC into one .MCH file +//---------------------------------------------------------- +#ifndef _verbMerge +#define _verbMerge + +class verbMerge +{ +public: + static int DoWork(const char* nameOfOutputFile, const char* pattern, bool recursive); + +private: + typedef bool (*DirectoryFilterFunction_t)(WIN32_FIND_DATAA*); + static bool DirectoryFilterDirectories(WIN32_FIND_DATAA* findData); + static bool DirectoryFilterFile(WIN32_FIND_DATAA* findData); + static int __cdecl WIN32_FIND_DATAA_qsort_helper(const void* p1, const void* p2); + static int FilterDirectory(const char* searchPattern, DirectoryFilterFunction_t filter, /* out */ WIN32_FIND_DATAA** ppFileArray, int* pElemCount); + + static char* MergePathStrings(const char* dir, const char* file); + + static int AppendFile(HANDLE hFileOut, const char* fileName, unsigned char* buffer, size_t bufferSize); + static int AppendAllInDir(HANDLE hFileOut, const char* dir, const char* file, unsigned char* buffer, size_t bufferSize, bool recursive, /* out */ LONGLONG* size); +}; +#endif |