ReactOS 0.4.15-dev-7991-ge77da17
interpreter.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS DiskPart
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/system/diskpart/interpreter.c
5 * PURPOSE: Reads the user input and then invokes the selected
6 * command by the user.
7 * PROGRAMMERS: Lee Schroeder
8 */
9
10#include "diskpart.h"
11#include "diskpart_msg.h"
12
15
16
18{
19 {L"ACTIVE", NULL, NULL, active_main, IDS_HELP_ACTIVE, MSG_COMMAND_ACTIVE},
20 {L"ADD", NULL, NULL, add_main, IDS_HELP_ADD, MSG_COMMAND_ADD},
21 {L"ASSIGN", NULL, NULL, assign_main, IDS_HELP_ASSIGN, MSG_COMMAND_ASSIGN},
22 {L"ATTACH", NULL, NULL, attach_main, IDS_HELP_ATTACH, MSG_COMMAND_ATTACH},
23 {L"ATTRIBUTES", NULL, NULL, attributes_main, IDS_HELP_ATTRIBUTES, MSG_COMMAND_ATTRIBUTES},
24 {L"AUTOMOUNT", NULL, NULL, automount_main, IDS_HELP_AUTOMOUNT, MSG_COMMAND_AUTOMOUNT},
25 {L"BREAK", NULL, NULL, break_main, IDS_HELP_BREAK, MSG_COMMAND_BREAK},
26 {L"CLEAN", NULL, NULL, clean_main, IDS_HELP_CLEAN, MSG_COMMAND_CLEAN},
27 {L"COMPACT", NULL, NULL, compact_main, IDS_HELP_COMPACT, MSG_COMMAND_COMPACT},
28 {L"CONVERT", NULL, NULL, convert_main, IDS_HELP_CONVERT, MSG_COMMAND_CONVERT},
29
30 {L"CREATE", NULL, NULL, NULL, IDS_HELP_CREATE, MSG_NONE},
31 {L"CREATE", L"PARTITION", NULL, NULL, IDS_HELP_CREATE_PARTITION, MSG_NONE},
32// {L"CREATE", L"PARTITION", L"EFI", CreateEfiPartition, IDS_HELP_CREATE_PARTITION_EFI, MSG_COMMAND_CREATE_PARTITION_EFI},
33 {L"CREATE", L"PARTITION", L"EXTENDED", CreateExtendedPartition, IDS_HELP_CREATE_PARTITION_EXTENDED, MSG_COMMAND_CREATE_PARTITION_EXTENDED},
34 {L"CREATE", L"PARTITION", L"LOGICAL", CreateLogicalPartition, IDS_HELP_CREATE_PARTITION_LOGICAL, MSG_COMMAND_CREATE_PARTITION_LOGICAL},
35// {L"CREATE", L"PARTITION", L"MSR", CreateMsrPartition, IDS_HELP_CREATE_PARTITION_MSR, MSG_COMMAND_CREATE_PARTITION_MSR},
36 {L"CREATE", L"PARTITION", L"PRIMARY", CreatePrimaryPartition, IDS_HELP_CREATE_PARTITION_PRIMARY, MSG_COMMAND_CREATE_PARTITION_PRIMARY},
37 {L"CREATE", L"VOLUME", NULL, NULL, IDS_HELP_CREATE_VOLUME, MSG_NONE},
38 {L"CREATE", L"VDISK", NULL, NULL, IDS_HELP_CREATE_VDISK, MSG_NONE},
39
40 {L"DELETE", NULL, NULL, NULL, IDS_HELP_DELETE, MSG_NONE},
41 {L"DELETE", L"DISK", NULL, DeleteDisk, IDS_HELP_DELETE_DISK, MSG_COMMAND_DELETE_DISK},
42 {L"DELETE", L"PARTITION", NULL, DeletePartition, IDS_HELP_DELETE_PARTITION, MSG_COMMAND_DELETE_PARTITION},
43 {L"DELETE", L"VOLUME", NULL, DeleteVolume, IDS_HELP_DELETE_VOLUME, MSG_COMMAND_DELETE_VOLUME},
44
45 {L"DETACH", NULL, NULL, detach_main, IDS_HELP_DETACH, MSG_COMMAND_DETACH},
46
47 {L"DETAIL", NULL, NULL, NULL, IDS_HELP_DETAIL, MSG_NONE},
48 {L"DETAIL", L"DISK", NULL, DetailDisk, IDS_HELP_DETAIL_DISK, MSG_COMMAND_DETAIL_DISK},
49 {L"DETAIL", L"PARTITION", NULL, DetailPartition, IDS_HELP_DETAIL_PARTITION, MSG_COMMAND_DETAIL_PARTITION},
50 {L"DETAIL", L"VOLUME", NULL, DetailVolume, IDS_HELP_DETAIL_VOLUME, MSG_COMMAND_DETAIL_VOLUME},
51
52 {L"DUMP", NULL, NULL, NULL, IDS_NONE, MSG_NONE},
53 {L"DUMP", L"DISK", NULL, DumpDisk, IDS_NONE, MSG_NONE},
54 {L"DUMP", L"PARTITION", NULL, DumpPartition, IDS_NONE, MSG_NONE},
55 {L"EXIT", NULL, NULL, NULL, IDS_HELP_EXIT, MSG_COMMAND_EXIT},
56
57 {L"EXPAND", NULL, NULL, expand_main, IDS_HELP_EXPAND, MSG_COMMAND_EXPAND},
58 {L"EXTEND", NULL, NULL, extend_main, IDS_HELP_EXTEND, MSG_COMMAND_EXTEND},
59 {L"FILESYSTEMS", NULL, NULL, filesystems_main, IDS_HELP_FILESYSTEMS, MSG_COMMAND_FILESYSTEMS},
60 {L"FORMAT", NULL, NULL, format_main, IDS_HELP_FORMAT, MSG_COMMAND_FORMAT},
61 {L"GPT", NULL, NULL, gpt_main, IDS_HELP_GPT, MSG_COMMAND_GPT},
62 {L"HELP", NULL, NULL, help_main, IDS_HELP_HELP, MSG_COMMAND_HELP},
63 {L"IMPORT", NULL, NULL, import_main, IDS_HELP_IMPORT, MSG_COMMAND_IMPORT},
64 {L"INACTIVE", NULL, NULL, inactive_main, IDS_HELP_INACTIVE, MSG_COMMAND_INACTIVE},
65
66 {L"LIST", NULL, NULL, NULL, IDS_HELP_LIST, MSG_NONE},
67 {L"LIST", L"DISK", NULL, ListDisk, IDS_HELP_LIST_DISK, MSG_COMMAND_LIST_DISK},
68 {L"LIST", L"PARTITION", NULL, ListPartition, IDS_HELP_LIST_PARTITION, MSG_COMMAND_LIST_PARTITION},
69 {L"LIST", L"VOLUME", NULL, ListVolume, IDS_HELP_LIST_VOLUME, MSG_COMMAND_LIST_VOLUME},
70 {L"LIST", L"VDISK", NULL, ListVirtualDisk, IDS_HELP_LIST_VDISK, MSG_COMMAND_LIST_VDISK},
71
72 {L"MERGE", NULL, NULL, merge_main, IDS_HELP_MERGE, MSG_COMMAND_MERGE},
73 {L"OFFLINE", NULL, NULL, offline_main, IDS_HELP_OFFLINE, MSG_COMMAND_OFFLINE},
74 {L"ONLINE", NULL, NULL, online_main, IDS_HELP_ONLINE, MSG_COMMAND_ONLINE},
75 {L"RECOVER", NULL, NULL, recover_main, IDS_HELP_RECOVER, MSG_COMMAND_RECOVER},
76 {L"REM", NULL, NULL, NULL, IDS_HELP_REM, MSG_COMMAND_REM},
77 {L"REMOVE", NULL, NULL, remove_main, IDS_HELP_REMOVE, MSG_COMMAND_REMOVE},
78 {L"REPAIR", NULL, NULL, repair_main, IDS_HELP_REPAIR, MSG_COMMAND_REPAIR},
79 {L"RESCAN", NULL, NULL, rescan_main, IDS_HELP_RESCAN, MSG_COMMAND_RESCAN},
80 {L"RETAIN", NULL, NULL, retain_main, IDS_HELP_RETAIN, MSG_COMMAND_RETAIN},
81 {L"SAN", NULL, NULL, san_main, IDS_HELP_SAN, MSG_COMMAND_SAN},
82
83 {L"SELECT", NULL, NULL, NULL, IDS_HELP_SELECT, MSG_NONE},
84 {L"SELECT", L"DISK", NULL, SelectDisk, IDS_HELP_SELECT_DISK, MSG_COMMAND_SELECT_DISK},
85 {L"SELECT", L"PARTITION", NULL, SelectPartition, IDS_HELP_SELECT_PARTITION, MSG_COMMAND_SELECT_PARTITION},
86 {L"SELECT", L"VOLUME", NULL, SelectVolume, IDS_HELP_SELECT_VOLUME, MSG_COMMAND_SELECT_VOLUME},
87// {L"SELECT", L"VDISK", NULL, SelectVirtualDisk, IDS_HELP_SELECT_VDISK, MSG_COMMAND_SELECT_VDISK},
88
89 {L"SET", NULL, NULL, setid_main, IDS_HELP_SETID, MSG_COMMAND_SETID},
90 {L"SETID", NULL, NULL, setid_main, IDS_HELP_SETID, MSG_COMMAND_SETID},
91 {L"SHRINK", NULL, NULL, shrink_main, IDS_HELP_SHRINK, MSG_COMMAND_SHRINK},
92
93 {L"UNIQUEID", NULL, NULL, NULL, IDS_HELP_UNIQUEID, MSG_NONE},
94 {L"UNIQUEID", L"DISK", NULL, UniqueIdDisk, IDS_HELP_UNIQUEID_DISK, MSG_COMMAND_UNIQUEID_DISK},
95
97};
98
99
100/* FUNCTIONS *****************************************************************/
101
102/*
103 * InterpretCmd(char *cmd_line, char *arg_line):
104 * compares the command name to a list of available commands, and
105 * determines which function to invoke.
106 */
107BOOL
109 int argc,
110 LPWSTR *argv)
111{
112 PCOMMAND cmdptr;
113 PCOMMAND cmdptr1 = NULL;
114 PCOMMAND cmdptr2 = NULL;
115 PCOMMAND cmdptr3 = NULL;
116
117 /* If no args provided */
118 if (argc < 1)
119 return TRUE;
120
121 /* First, determine if the user wants to exit
122 or to use a comment */
123 if (wcsicmp(argv[0], L"exit") == 0)
124 return FALSE;
125
126 if (wcsicmp(argv[0], L"rem") == 0)
127 return TRUE;
128
129 /* Scan internal command table */
130 for (cmdptr = cmds; cmdptr->cmd1; cmdptr++)
131 {
132 if ((cmdptr1 == NULL) &&
133 (cmdptr->cmd1 != NULL) && (wcsicmp(argv[0], cmdptr->cmd1) == 0))
134 cmdptr1 = cmdptr;
135
136 if ((cmdptr2 == NULL) &&
137 (argc >= 2) &&
138 (cmdptr->cmd1 != NULL) && (wcsicmp(argv[0], cmdptr->cmd1) == 0) &&
139 (cmdptr->cmd2 != NULL) && (wcsicmp(argv[1], cmdptr->cmd2) == 0))
140 cmdptr2 = cmdptr;
141
142 if ((cmdptr3 == NULL) &&
143 (argc >= 3) &&
144 (cmdptr->cmd1 != NULL) && (wcsicmp(argv[0], cmdptr->cmd1) == 0) &&
145 (cmdptr->cmd2 != NULL) && (wcsicmp(argv[1], cmdptr->cmd2) == 0) &&
146 (cmdptr->cmd3 != NULL) && (wcsicmp(argv[2], cmdptr->cmd3) == 0))
147 cmdptr3 = cmdptr;
148 }
149
150 if (cmdptr3 != NULL)
151 {
152 if (cmdptr3->func == NULL)
153 return HelpCommand(cmdptr3);
154 else
155 return cmdptr3->func(argc, argv);
156 }
157 else if (cmdptr2 != NULL)
158 {
159 if (cmdptr2->func == NULL)
160 return HelpCommand(cmdptr2);
161 else
162 return cmdptr2->func(argc, argv);
163 }
164 else if (cmdptr1 != NULL)
165 {
166 if (cmdptr1->func == NULL)
167 return HelpCommand(cmdptr1);
168 else
169 return cmdptr1->func(argc, argv);
170 }
171
173
174 return TRUE;
175}
176
177
178/*
179 * InterpretScript(char *line):
180 * The main function used for when reading commands from scripts.
181 */
182BOOL
184{
185 LPWSTR args_vector[MAX_ARGS_COUNT];
186 INT args_count = 0;
187 BOOL bWhiteSpace = TRUE;
188 BOOL bQuote = FALSE;
189 LPWSTR ptr;
190
191 memset(args_vector, 0, sizeof(args_vector));
192
193 bQuote = FALSE;
194 ptr = input_line;
195 while (*ptr != 0)
196 {
197 if (*ptr == L'"')
198 bQuote = !bQuote;
199
200 if ((iswspace(*ptr) && (bQuote == FALSE))|| *ptr == L'\n')
201 {
202 *ptr = 0;
203 bWhiteSpace = TRUE;
204 }
205 else
206 {
207 if ((bWhiteSpace != FALSE) && (bQuote == FALSE) && (args_count < MAX_ARGS_COUNT))
208 {
209 args_vector[args_count] = ptr;
210 args_count++;
211 }
212
213 bWhiteSpace = FALSE;
214 }
215
216 ptr++;
217 }
218
219 /* sends the string to find the command */
220 return InterpretCmd(args_count, args_vector);
221}
222
223
224/*
225 * InterpretMain():
226 * Contents for the main program loop as it reads each line, and then
227 * it sends the string to interpret_line, where it determines what
228 * command to use.
229 */
230VOID
232{
233 WCHAR input_line[MAX_STRING_SIZE];
234 LPWSTR args_vector[MAX_ARGS_COUNT];
235 INT args_count = 0;
236 BOOL bWhiteSpace = TRUE;
237 BOOL bQuote = FALSE;
238 BOOL bRun = TRUE;
239 LPWSTR ptr;
240
241 while (bRun != FALSE)
242 {
243 args_count = 0;
244 memset(args_vector, 0, sizeof(args_vector));
245
246 /* Shown just before the input where the user places commands */
248
249 /* Get input from the user. */
250 fgetws(input_line, MAX_STRING_SIZE, stdin);
251
252 bQuote = FALSE;
253 ptr = input_line;
254 while (*ptr != 0)
255 {
256 if (*ptr == L'"')
257 bQuote = !bQuote;
258
259 if ((iswspace(*ptr) && (bQuote == FALSE))|| *ptr == L'\n')
260 {
261 *ptr = 0;
262 bWhiteSpace = TRUE;
263 }
264 else
265 {
266 if ((bWhiteSpace != FALSE) && (bQuote == FALSE) && (args_count < MAX_ARGS_COUNT))
267 {
268 args_vector[args_count] = ptr;
269 args_count++;
270 }
271 bWhiteSpace = FALSE;
272 }
273 ptr++;
274 }
275
276 /* Send the string to find the command */
277 bRun = InterpretCmd(args_count, args_vector);
278 }
279}
static int argc
Definition: ServiceArgs.c:12
BOOL active_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: active.c:16
BOOL InterpretScript(_In_ LPWSTR pszInputLine)
Definition: interpreter.c:150
BOOL assign_main(INT argc, LPWSTR *argv)
Definition: assign.c:11
BOOL attach_main(INT argc, LPWSTR *argv)
Definition: attach.c:11
BOOL automount_main(INT argc, LPWSTR *argv)
Definition: automount.c:11
#define StdOut
Definition: fc.c:14
void ConResPuts(FILE *fp, UINT nID)
Definition: fc.c:27
#define IDS_NONE
Definition: resource.h:133
DWORD WINAPI HelpCommand(LPCWSTR pwszMachine, LPWSTR *ppwcArguments, DWORD dwCurrentIndex, DWORD dwArgCount, DWORD dwFlags, LPCVOID pvData, BOOL *pbDone)
Definition: help.c:116
#define MAX_STRING_SIZE
Definition: precomp.h:34
#define MAX_ARGS_COUNT
Definition: precomp.h:35
#define IDS_APP_PROMPT
Definition: resource.h:13
BOOL add_main(INT argc, LPWSTR *argv)
Definition: add.c:11
BOOL attributes_main(INT argc, LPWSTR *argv)
Definition: attributes.c:11
BOOL CreateLogicalPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:195
BOOL CreatePrimaryPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: create.c:395
BOOL DeleteVolume(_In_ INT argc, _In_ PWSTR *argv)
Definition: delete.c:203
BOOL DeleteDisk(_In_ INT argc, _In_ PWSTR *argv)
Definition: delete.c:28
#define IDS_HELP_SHRINK
Definition: resource.h:180
#define IDS_HELP_DETAIL_VOLUME
Definition: resource.h:144
#define IDS_HELP_MERGE
Definition: resource.h:162
#define IDS_HELP_GPT
Definition: resource.h:151
#define IDS_HELP_DELETE_VOLUME
Definition: resource.h:137
#define IDS_HELP_REM
Definition: resource.h:166
#define IDS_HELP_SETID
Definition: resource.h:179
#define IDS_HELP_EXTEND
Definition: resource.h:148
#define IDS_HELP_ACTIVE
Definition: resource.h:113
#define IDS_HELP_CLEAN
Definition: resource.h:120
#define IDS_HELP_CREATE_PARTITION_PRIMARY
Definition: resource.h:130
#define IDS_HELP_DELETE_PARTITION
Definition: resource.h:136
#define IDS_HELP_REMOVE
Definition: resource.h:167
#define IDS_HELP_CREATE_PARTITION
Definition: resource.h:125
#define IDS_HELP_CREATE_PARTITION_LOGICAL
Definition: resource.h:128
#define IDS_HELP_ONLINE
Definition: resource.h:163
#define IDS_HELP_LIST_VDISK
Definition: resource.h:160
#define IDS_HELP_CREATE_VDISK
Definition: resource.h:132
#define IDS_HELP_CREATE
Definition: resource.h:124
#define IDS_HELP_UNIQUEID
Definition: resource.h:182
#define IDS_HELP_SELECT_PARTITION
Definition: resource.h:175
#define IDS_HELP_OFFLINE
Definition: resource.h:164
#define IDS_HELP_UNIQUEID_DISK
Definition: resource.h:183
#define IDS_HELP_BREAK
Definition: resource.h:119
#define MSG_NONE
Definition: resource.h:12
#define IDS_HELP_DELETE
Definition: resource.h:134
#define IDS_HELP_ADD
Definition: resource.h:114
#define IDS_HELP_RESCAN
Definition: resource.h:169
#define IDS_HELP_RECOVER
Definition: resource.h:165
#define IDS_HELP_ATTACH
Definition: resource.h:117
#define IDS_HELP_CREATE_PARTITION_EXTENDED
Definition: resource.h:127
#define IDS_HELP_LIST_DISK
Definition: resource.h:157
#define IDS_HELP_LIST_VOLUME
Definition: resource.h:159
#define IDS_HELP_DETAIL_PARTITION
Definition: resource.h:143
#define IDS_HELP_DELETE_DISK
Definition: resource.h:135
#define IDS_HELP_SELECT_DISK
Definition: resource.h:174
#define IDS_HELP_ASSIGN
Definition: resource.h:115
#define IDS_HELP_HELP
Definition: resource.h:152
#define IDS_HELP_RETAIN
Definition: resource.h:170
#define IDS_HELP_DETAIL
Definition: resource.h:141
#define IDS_HELP_LIST_PARTITION
Definition: resource.h:158
#define IDS_HELP_DETACH
Definition: resource.h:139
#define IDS_HELP_EXPAND
Definition: resource.h:147
#define IDS_HELP_FILESYSTEMS
Definition: resource.h:149
#define IDS_HELP_AUTOMOUNT
Definition: resource.h:118
#define IDS_HELP_SELECT_VOLUME
Definition: resource.h:176
#define IDS_HELP_SELECT
Definition: resource.h:173
#define IDS_HELP_DETAIL_DISK
Definition: resource.h:142
#define IDS_HELP_EXIT
Definition: resource.h:146
#define IDS_HELP_FORMAT
Definition: resource.h:150
#define IDS_HELP_LIST
Definition: resource.h:156
#define IDS_HELP_SAN
Definition: resource.h:171
#define IDS_HELP_COMPACT
Definition: resource.h:121
#define IDS_HELP_IMPORT
Definition: resource.h:153
#define IDS_HELP_INACTIVE
Definition: resource.h:154
#define IDS_HELP_ATTRIBUTES
Definition: resource.h:116
#define IDS_HELP_CREATE_VOLUME
Definition: resource.h:131
#define IDS_HELP_REPAIR
Definition: resource.h:168
#define IDS_HELP_CONVERT
Definition: resource.h:122
BOOL break_main(INT argc, LPWSTR *argv)
Definition: break.c:11
BOOL clean_main(_In_ INT argc, _In_ PWSTR *argv)
Definition: clean.c:16
BOOL compact_main(INT argc, LPWSTR *argv)
Definition: compact.c:11
BOOL detach_main(INT argc, LPWSTR *argv)
Definition: detach.c:11
BOOL DetailPartition(_In_ INT argc, _In_ PWSTR *argv)
Definition: detail.c:125
BOOL DetailDisk(_In_ INT argc, _In_ PWSTR *argv)
Definition: detail.c:68
BOOL DetailVolume(_In_ INT argc, _In_ PWSTR *argv)
Definition: detail.c:198
BOOL retain_main(INT argc, LPWSTR *argv)
Definition: retain.c:11
BOOL ListPartition(INT argc, PWSTR *argv)
Definition: list.c:88
BOOL DumpPartition(_In_ INT argc, _In_ LPWSTR *argv)
Definition: dump.c:146
BOOL filesystems_main(INT argc, LPWSTR *argv)
BOOL SelectDisk(INT argc, PWSTR *argv)
Definition: select.c:17
BOOL online_main(INT argc, LPWSTR *argv)
Definition: online.c:11
BOOL extend_main(INT argc, LPWSTR *argv)
Definition: extend.c:11
BOOL expand_main(INT argc, LPWSTR *argv)
Definition: expand.c:11
BOOL rescan_main(INT argc, LPWSTR *argv)
Definition: rescan.c:11
BOOL merge_main(INT argc, LPWSTR *argv)
Definition: merge.c:11
BOOL UniqueIdDisk(_In_ INT argc, _In_ PWSTR *argv)
Definition: uniqueid.c:17
BOOL offline_main(INT argc, LPWSTR *argv)
Definition: offline.c:11
BOOL inactive_main(INT argc, LPWSTR *argv)
BOOL ListVolume(INT argc, PWSTR *argv)
Definition: list.c:282
BOOL shrink_main(INT argc, LPWSTR *argv)
Definition: shrink.c:11
BOOL DumpDisk(_In_ INT argc, _In_ LPWSTR *argv)
Definition: dump.c:48
BOOL SelectVolume(INT argc, PWSTR *argv)
Definition: select.c:169
BOOL import_main(INT argc, LPWSTR *argv)
Definition: import.c:11
BOOL repair_main(INT argc, LPWSTR *argv)
Definition: repair.c:11
BOOL format_main(INT argc, LPWSTR *argv)
Definition: format.c:11
BOOL ListVirtualDisk(INT argc, PWSTR *argv)
Definition: list.c:310
BOOL help_main(INT argc, LPWSTR *argv)
Definition: help.c:120
VOID HelpCommandList(VOID)
Definition: help.c:16
BOOL setid_main(INT argc, LPWSTR *argv)
BOOL remove_main(INT argc, LPWSTR *argv)
Definition: remove.c:11
BOOL san_main(INT argc, LPWSTR *argv)
Definition: san.c:11
BOOL gpt_main(INT argc, LPWSTR *argv)
Definition: gpt.c:11
BOOL ListDisk(INT argc, PWSTR *argv)
Definition: list.c:59
BOOL recover_main(INT argc, LPWSTR *argv)
Definition: recover.c:11
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define wcsicmp
Definition: compat.h:15
unsigned int BOOL
Definition: ntddk_ex.h:94
#define iswspace(_c)
Definition: ctype.h:669
#define stdin
Definition: stdio.h:98
static PVOID ptr
Definition: dispmode.c:27
#define argv
Definition: mplay32.c:18
#define L(x)
Definition: ntvdm.h:50
#define memset(x, y, z)
Definition: compat.h:39
PPARTENTRY SelectPartition(IN PPARTLIST List, IN ULONG DiskNumber, IN ULONG PartitionNumber)
Definition: partlist.c:2203
BOOLEAN DeletePartition(IN PPARTLIST List, IN PPARTENTRY PartEntry, OUT PPARTENTRY *FreeRegion OPTIONAL)
Definition: partlist.c:3091
BOOLEAN CreateExtendedPartition(_In_ PPARTLIST List, _Inout_ PPARTENTRY PartEntry, _In_opt_ ULONGLONG SizeBytes)
Definition: partlist.c:2930
Definition: main.c:15
INT(* func)(INT, WCHAR **)
Definition: main.c:17
PWSTR cmd3
Definition: diskpart.h:59
PWSTR cmd2
Definition: diskpart.h:58
PWSTR cmd1
Definition: diskpart.h:57
BOOL convert_main(INT argc, LPWSTR *argv)
Definition: convert.c:11
BOOL InterpretCmd(int argc, LPWSTR *argv)
Definition: interpreter.c:108
BOOL rem_main(INT argc, LPWSTR *argv)
VOID InterpretMain(VOID)
Definition: interpreter.c:231
COMMAND cmds[]
Definition: interpreter.c:17
BOOL exit_main(INT argc, LPWSTR *argv)
int32_t INT
Definition: typedefs.h:58
wchar_t * fgetws(wchar_t *buf, int bufsize, FILE *file)
Definition: wmain.c:22
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184