1 /*
2  * PROJECT:     ReactOS Replace Command
3  * LICENSE:     GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4  * PURPOSE:     Main header
5  * COPYRIGHT:   Copyright Samuel Erdtman (samuel@erdtman.se)
6  * COPYRIGHT:   Copyright 2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
7  */
8 
9 #pragma once
10 
11 #define WIN32_LEAN_AND_MEAN
12 #include <windows.h>
13 #include <tchar.h>
14 #include <stdlib.h>
15 #include <conutils.h>
16 #include "resource.h"
17 
18 #define RC_STRING_MAX_SIZE 3072
19 
20 #define PROMPT_NO    0
21 #define PROMPT_YES   1
22 #define PROMPT_ALL   2
23 #define PROMPT_BREAK 3
24 
25 /* 16k = max buffer size */
26 #define BUFF_SIZE 16384
27 
28 #define ConOutResPuts(uID) \
29     ConResPuts(StdOut, (uID))
30 
31 #define ConOutResPrintf(uID, ...) \
32     ConResPrintf(StdOut, (uID), ##__VA_ARGS__)
33 
34 #define ConOutFormatMessage(MessageId, ...) \
35     ConFormatMessage(StdOut, (MessageId), ##__VA_ARGS__)
36 
37 /* util.c */
38 VOID ConInString(LPTSTR lpInput, DWORD dwLength);
39 VOID __cdecl ConFormatMessage(PCON_STREAM Stream, DWORD MessageId, ...);
40 VOID ConOutChar(TCHAR c);
41 VOID GetPathCase(TCHAR * Path, TCHAR * OutPath);
42 BOOL IsExistingFile(IN LPCTSTR pszPath);
43 BOOL IsExistingDirectory(IN LPCTSTR pszPath);
44 INT FilePromptYNA(UINT resID);
45 VOID msg_pause(VOID);
46 TCHAR cgetchar(VOID);
47 
48 INT
49 GetRootPath(
50     IN LPCTSTR InPath,
51     OUT LPTSTR OutPath,
52     IN INT size);
53 
54 extern BOOL bCtrlBreak;
55