Author: ekohl
Date: Wed May 29 11:40:43 2013
New Revision: 59104
URL:
http://svn.reactos.org/svn/reactos?rev=59104&view=rev
Log:
[DISKPART]
* Simplified the help system
* Removed an unnecessary check in the help system that listed the first help entry
'active' no matter what was entered into the help system, even if the word is not
in the list.
* Removed exit_main and rem_main functions since it took a little extra processing time
and made the code a bit harder to read. Now it determines if the given command is rem or
exit first before looking through the entire function list.
* Converted WCHAR* to LPWSTR to make it a bit easier to read.
* Add a title to the program to make it easier for the user to determine the name of the
application currently running, especially if a large script is being used.
Patch by Lee Schroeder.
Thanks!
CORE-7187 #resolve #comment Committed in r79104.
Modified:
trunk/reactos/base/system/diskpart/CMakeLists.txt
trunk/reactos/base/system/diskpart/active.c
trunk/reactos/base/system/diskpart/add.c
trunk/reactos/base/system/diskpart/assign.c
trunk/reactos/base/system/diskpart/attach.c
trunk/reactos/base/system/diskpart/attributes.c
trunk/reactos/base/system/diskpart/automount.c
trunk/reactos/base/system/diskpart/break.c
trunk/reactos/base/system/diskpart/clean.c
trunk/reactos/base/system/diskpart/compact.c
trunk/reactos/base/system/diskpart/convert.c
trunk/reactos/base/system/diskpart/create.c
trunk/reactos/base/system/diskpart/delete.c
trunk/reactos/base/system/diskpart/detach.c
trunk/reactos/base/system/diskpart/detail.c
trunk/reactos/base/system/diskpart/diskpart.c
trunk/reactos/base/system/diskpart/diskpart.h
trunk/reactos/base/system/diskpart/expand.c
trunk/reactos/base/system/diskpart/extend.c
trunk/reactos/base/system/diskpart/filesystems.c
trunk/reactos/base/system/diskpart/format.c
trunk/reactos/base/system/diskpart/gpt.c
trunk/reactos/base/system/diskpart/help.c
trunk/reactos/base/system/diskpart/import.c
trunk/reactos/base/system/diskpart/inactive.c
trunk/reactos/base/system/diskpart/interpreter.c
trunk/reactos/base/system/diskpart/lang/en-US.rc
trunk/reactos/base/system/diskpart/lang/ro-RO.rc
trunk/reactos/base/system/diskpart/list.c
trunk/reactos/base/system/diskpart/merge.c
trunk/reactos/base/system/diskpart/offline.c
trunk/reactos/base/system/diskpart/online.c
trunk/reactos/base/system/diskpart/recover.c
trunk/reactos/base/system/diskpart/remove.c
trunk/reactos/base/system/diskpart/repair.c
trunk/reactos/base/system/diskpart/rescan.c
trunk/reactos/base/system/diskpart/resource.h
trunk/reactos/base/system/diskpart/retain.c
trunk/reactos/base/system/diskpart/san.c
trunk/reactos/base/system/diskpart/select.c
trunk/reactos/base/system/diskpart/setid.c
trunk/reactos/base/system/diskpart/shrink.c
trunk/reactos/base/system/diskpart/uniqueid.c
Modified: trunk/reactos/base/system/diskpart/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/CMake…
==============================================================================
--- trunk/reactos/base/system/diskpart/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/CMakeLists.txt [iso-8859-1] Wed May 29 11:40:43
2013
@@ -41,7 +41,7 @@
diskpart.rc)
set_module_type(diskpart win32cui UNICODE)
-add_importlibs(diskpart user32 msvcrt kernel32)
+add_importlibs(diskpart user32 msvcrt advapi32 kernel32)
if(MSVC)
add_importlibs(diskpart ntdll)
endif()
Modified: trunk/reactos/base/system/diskpart/active.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/activ…
==============================================================================
--- trunk/reactos/base/system/diskpart/active.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/active.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,18 +8,9 @@
#include "diskpart.h"
-BOOL active_main(INT argc, WCHAR **argv)
+BOOL active_main(INT argc, LPWSTR *argv)
{
printf("\nActive\n");
return TRUE;
}
-
-/*
- * help_active():
- * Shows the description and explains each argument type of the active command
- */
-VOID help_active(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_ACTIVE);
-}
Modified: trunk/reactos/base/system/diskpart/add.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/add.c…
==============================================================================
--- trunk/reactos/base/system/diskpart/add.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/add.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,16 +8,7 @@
#include "diskpart.h"
-BOOL add_main(INT argc, WCHAR **argv)
+BOOL add_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-/*
- * help_add():
- * Shows the description and explains each argument type of the add command
- */
-VOID help_add(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_ADD);
-}
Modified: trunk/reactos/base/system/diskpart/assign.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/assig…
==============================================================================
--- trunk/reactos/base/system/diskpart/assign.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/assign.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -7,16 +7,7 @@
*/
#include "diskpart.h"
-BOOL assign_main(INT argc, WCHAR **argv)
+BOOL assign_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-/*
- * help_assign():
- * Shows the description and explains each argument type of the assign command
- */
-VOID help_assign(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_ASSIGN);
-}
Modified: trunk/reactos/base/system/diskpart/attach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/attac…
==============================================================================
--- trunk/reactos/base/system/diskpart/attach.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/attach.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -7,17 +7,7 @@
*/
#include "diskpart.h"
-BOOL attach_main(INT argc, WCHAR **argv)
+BOOL attach_main(INT argc, LPWSTR *argv)
{
return TRUE;
-}
-
-
-/*
- * help_attach():
- * Shows the description and explains each argument type of the attach command
- */
-VOID help_attach(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_ATTACH);
-}
+}
Modified: trunk/reactos/base/system/diskpart/attributes.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/attri…
==============================================================================
--- trunk/reactos/base/system/diskpart/attributes.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/attributes.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -7,16 +7,7 @@
*/
#include "diskpart.h"
-BOOL attributes_main(INT argc, WCHAR **argv)
+BOOL attributes_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-/*
- * help_attributes():
- * Shows the description and explains each argument type of the attributes command
- */
-VOID help_attributes(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_ATTRIBUTES);
-}
Modified: trunk/reactos/base/system/diskpart/automount.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/autom…
==============================================================================
--- trunk/reactos/base/system/diskpart/automount.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/automount.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -7,17 +7,8 @@
*/
#include "diskpart.h"
-BOOL automount_main(INT argc, WCHAR **argv)
+BOOL automount_main(INT argc, LPWSTR *argv)
{
printf("Automount\n");
return TRUE;
}
-
-/*
- * help_automount():
- * Shows the description and explains each argument type of the automount command
- */
-VOID help_automount(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_AUTOMOUNT);
-}
Modified: trunk/reactos/base/system/diskpart/break.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/break…
==============================================================================
--- trunk/reactos/base/system/diskpart/break.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/break.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,18 +8,9 @@
*/
#include "diskpart.h"
-BOOL break_main(INT argc, WCHAR **argv)
+BOOL break_main(INT argc, LPWSTR *argv)
{
printf("\nTODO: Add code later since Win 7 Home Premium doesn't have this
feature.\n");
return TRUE;
}
-
-/*
- * help_break():
- * Shows the description and explains each argument type of the break command
- */
-VOID help_break(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_BREAK);
-}
Modified: trunk/reactos/base/system/diskpart/clean.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/clean…
==============================================================================
--- trunk/reactos/base/system/diskpart/clean.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/clean.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,17 +8,7 @@
*/
#include "diskpart.h"
-BOOL clean_main(INT argc, WCHAR **argv)
+BOOL clean_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-/*
- * help_clean():
- * Shows the description and explains each argument type of the clean command
- */
-VOID help_clean(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_CLEAN);
-}
Modified: trunk/reactos/base/system/diskpart/compact.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/compa…
==============================================================================
--- trunk/reactos/base/system/diskpart/compact.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/compact.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,17 +8,7 @@
*/
#include "diskpart.h"
-BOOL compact_main(INT argc, WCHAR **argv)
+BOOL compact_main(INT argc, LPWSTR *argv)
{
return 0;
}
-
-
-/*
- * help_compact():
- * Shows the description and explains each argument type of the compact command
- */
-VOID help_compact(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_COMPACT);
-}
Modified: trunk/reactos/base/system/diskpart/convert.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/conve…
==============================================================================
--- trunk/reactos/base/system/diskpart/convert.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/convert.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,17 +8,7 @@
*/
#include "diskpart.h"
-BOOL convert_main(INT argc, WCHAR **argv)
+BOOL convert_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-/*
- * help_convert():
- * Shows the description and explains each argument type of the convert command
- */
-VOID help_convert(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_CONVERT);
-}
Modified: trunk/reactos/base/system/diskpart/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/creat…
==============================================================================
--- trunk/reactos/base/system/diskpart/create.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/create.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,17 +8,7 @@
*/
#include "diskpart.h"
-BOOL create_main(INT argc, WCHAR **argv)
+BOOL create_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-/*
- * help_create():
- * Shows the description and explains each argument type of the create command
- */
-VOID help_create(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_CREATE);
-}
Modified: trunk/reactos/base/system/diskpart/delete.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/delet…
==============================================================================
--- trunk/reactos/base/system/diskpart/delete.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/delete.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,16 +8,7 @@
*/
#include "diskpart.h"
-BOOL delete_main(INT argc, WCHAR **argv)
+BOOL delete_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-/*
- * help_delete():
- * Shows the description and explains each argument type of the delete command
- */
-VOID help_delete(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_DELETE);
-}
Modified: trunk/reactos/base/system/diskpart/detach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/detac…
==============================================================================
--- trunk/reactos/base/system/diskpart/detach.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/detach.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL detach_main(INT argc, WCHAR **argv)
+BOOL detach_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_detach(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_DETACH);
-}
Modified: trunk/reactos/base/system/diskpart/detail.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/detai…
==============================================================================
--- trunk/reactos/base/system/diskpart/detail.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/detail.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL detail_main(INT argc, WCHAR **argv)
+BOOL detail_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_detail(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_DETAIL);
-}
Modified: trunk/reactos/base/system/diskpart/diskpart.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/diskp…
==============================================================================
--- trunk/reactos/base/system/diskpart/diskpart.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/diskpart.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -11,7 +11,6 @@
#include "diskpart.h"
/* FUNCTIONS ******************************************************************/
-
VOID
PrintResourceString(INT resID, ...)
{
@@ -37,7 +36,9 @@
wprintf(L"\n*WARNING*: This program is incomplete and may not work
properly.\n");
/* Print the header information */
+ wprintf(L"\n");
PrintResourceString(IDS_APP_HEADER);
+ wprintf(L"\n");
PrintResourceString(IDS_APP_LICENSE);
PrintResourceString(IDS_APP_CURR_COMPUTER, szComputerName);
}
@@ -79,14 +80,21 @@
* wmain():
* Main entry point of the application.
*/
-int wmain(int argc, const WCHAR *argv[])
+int wmain(int argc, const LPWSTR argv[])
{
LPCWSTR script = NULL;
LPCWSTR tmpBuffer = NULL;
+ WCHAR appTitle[50];
int index, timeout;
+ /* Sets the title of the program so the user will have an easier time
+ determining the current program, especially if diskpart is running a
+ script */
+ LoadStringW(GetModuleHandle(NULL), IDS_APP_HEADER, (LPWSTR)appTitle, 50);
+ SetConsoleTitleW(appTitle);
+
/* Sets the timeout value to 0 just in case the user doesn't
- specify a value. */
+ specify a value */
timeout = 0;
/* If there are no command arguments, then go straight to the interpreter */
Modified: trunk/reactos/base/system/diskpart/diskpart.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/diskp…
==============================================================================
--- trunk/reactos/base/system/diskpart/diskpart.h [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/diskpart.h [iso-8859-1] Wed May 29 11:40:43 2013
@@ -15,6 +15,7 @@
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
+#include <wincon.h>
#include <winuser.h>
#include <stdio.h>
#include <stdlib.h>
@@ -25,9 +26,10 @@
typedef struct _COMMAND
{
- WCHAR *name;
+ LPWSTR name;
BOOL (*func)(INT, WCHAR**);
- VOID (*help)(INT, WCHAR**);
+ INT help;
+ INT help_desc;
} COMMAND, *PCOMMAND;
extern COMMAND cmds[];
@@ -40,165 +42,126 @@
#define ERROR_SERVICE 4
#define ERROR_SYNTAX 5
-#define DISKPART_VERSION L"0.0.019"
-
#define MAX_STRING_SIZE 1024
#define MAX_ARGS_COUNT 256
/* PROTOTYPES *****************************************************************/
/* active.c */
-BOOL active_main(INT argc, WCHAR **argv);
-VOID help_active(INT argc, WCHAR **argv);
+BOOL active_main(INT argc, LPWSTR *argv);
/* add.c */
-BOOL add_main(INT argc, WCHAR **argv);
-VOID help_add(INT argc, WCHAR **argv);
+BOOL add_main(INT argc, LPWSTR *argv);
/* assign.c */
-BOOL assign_main(INT argc, WCHAR **argv);
-VOID help_assign(INT argc, WCHAR **argv);
+BOOL assign_main(INT argc, LPWSTR *argv);
/* attach.c */
-BOOL attach_main(INT argc, WCHAR **argv);
-VOID help_attach(INT argc, WCHAR **argv);
+BOOL attach_main(INT argc, LPWSTR *argv);
/* attributes.h */
-VOID help_attributes(INT argc, WCHAR **argv);
-BOOL attributes_main(INT argc, WCHAR **argv);
+BOOL attributes_main(INT argc, LPWSTR *argv);
/* automount.c */
-BOOL automount_main(INT argc, WCHAR **argv);
-VOID help_automount(INT argc, WCHAR **argv);
+BOOL automount_main(INT argc, LPWSTR *argv);
/* break.c */
-BOOL break_main(INT argc, WCHAR **argv);
-VOID help_break(INT argc, WCHAR **argv);
+BOOL break_main(INT argc, LPWSTR *argv);
/* clean.c */
-BOOL clean_main(INT argc, WCHAR **argv);
-VOID help_clean(INT argc, WCHAR **argv);
+BOOL clean_main(INT argc, LPWSTR *argv);
/* compact.c */
-BOOL compact_main(INT argc, WCHAR **argv);
-VOID help_compact(INT argc, WCHAR **argv);
+BOOL compact_main(INT argc, LPWSTR *argv);
/* convert.c */
-BOOL convert_main(INT argc, WCHAR **argv);
-VOID help_convert(INT argc, WCHAR **argv);
+BOOL convert_main(INT argc, LPWSTR *argv);
/* create.c */
-BOOL create_main(INT argc, WCHAR **argv);
-VOID help_create(INT argc, WCHAR **argv);
+BOOL create_main(INT argc, LPWSTR *argv);
/* delete.c */
-BOOL delete_main(INT argc, WCHAR **argv);
-VOID help_delete(INT argc, WCHAR **argv);
+BOOL delete_main(INT argc, LPWSTR *argv);
/* detach.c */
-BOOL detach_main(INT argc, WCHAR **argv);
-VOID help_detach(INT argc, WCHAR **argv);
+BOOL detach_main(INT argc, LPWSTR *argv);
/* detail.c */
-BOOL detail_main(INT argc, WCHAR **argv);
-VOID help_detail(INT argc, WCHAR **argv);
+BOOL detail_main(INT argc, LPWSTR *argv);
/* diskpart.c */
VOID PrintResourceString(INT resID, ...);
/* expand.c */
-BOOL expand_main(INT argc, WCHAR **argv);
-VOID help_expand(INT argc, WCHAR **argv);
+BOOL expand_main(INT argc, LPWSTR *argv);
/* extend.c */
-BOOL extend_main(INT argc, WCHAR **argv);
-VOID help_extend(INT argc, WCHAR **argv);
+BOOL extend_main(INT argc, LPWSTR *argv);
/* filesystem.c */
-BOOL filesystems_main(INT argc, WCHAR **argv);
-VOID help_filesystems(INT argc, WCHAR **argv);
+BOOL filesystems_main(INT argc, LPWSTR *argv);
/* format.c */
-BOOL format_main(INT argc, WCHAR **argv);
-VOID help_format(INT argc, WCHAR **argv);
+BOOL format_main(INT argc, LPWSTR *argv);
/* gpt.c */
-BOOL gpt_main(INT argc, WCHAR **argv);
-VOID help_gpt(INT argc, WCHAR **argv);
+BOOL gpt_main(INT argc, LPWSTR *argv);
/* help.c */
-BOOL help_main(INT argc, WCHAR **argv);
-VOID help_help(INT argc, WCHAR **argv);
+BOOL help_main(INT argc, LPWSTR *argv);
VOID help_cmdlist(VOID);
-VOID help_print_noerr(VOID);
/* import. c */
-BOOL import_main(INT argc, WCHAR **argv);
-VOID help_import(INT argc, WCHAR **argv);
+BOOL import_main(INT argc, LPWSTR *argv);
/* inactive.c */
-BOOL inactive_main(INT argc, WCHAR **argv);
-VOID help_inactive(INT argc, WCHAR **argv);
+BOOL inactive_main(INT argc, LPWSTR *argv);
/* interpreter.c */
-BOOL InterpretScript(WCHAR *line);
-BOOL InterpretCmd(INT argc, WCHAR **argv);
+BOOL InterpretScript(LPWSTR line);
+BOOL InterpretCmd(INT argc, LPWSTR *argv);
VOID InterpretMain(VOID);
/* list.c */
-BOOL list_main(INT argc, WCHAR **argv);
-VOID help_list(INT argc, WCHAR **argv);
+BOOL list_main(INT argc, LPWSTR *argv);
/* merge.c */
-BOOL merge_main(INT argc, WCHAR **argv);
-VOID help_merge(INT argc, WCHAR **argv);
+BOOL merge_main(INT argc, LPWSTR *argv);
/* offline.c */
-BOOL offline_main(INT argc, WCHAR **argv);
-VOID help_offline(INT argc, WCHAR **argv);
+BOOL offline_main(INT argc, LPWSTR *argv);
/* online.c */
-BOOL online_main(INT argc, WCHAR **argv);
-VOID help_online(INT argc, WCHAR **argv);
+BOOL online_main(INT argc, LPWSTR *argv);
/* recover.c */
-BOOL recover_main(INT argc, WCHAR **argv);
-VOID help_recover(INT argc, WCHAR **argv);
+BOOL recover_main(INT argc, LPWSTR *argv);
/* remove.c */
-BOOL remove_main(INT argc, WCHAR **argv);
-VOID help_remove(INT argc, WCHAR **argv);
+BOOL remove_main(INT argc, LPWSTR *argv);
/* repair.c */
-BOOL repair_main(INT argc, WCHAR **argv);
-VOID help_repair(INT argc, WCHAR **argv);
+BOOL repair_main(INT argc, LPWSTR *argv);
/* rescan.c */
-BOOL rescan_main(INT argc, WCHAR **argv);
-VOID help_rescan(INT argc, WCHAR **argv);
+BOOL rescan_main(INT argc, LPWSTR *argv);
/* retain.c */
-BOOL retain_main(INT argc, WCHAR **argv);
-VOID help_retain(INT argc, WCHAR **argv);
+BOOL retain_main(INT argc, LPWSTR *argv);
/* san.c */
-BOOL san_main(INT argc, WCHAR **argv);
-VOID help_san(INT argc, WCHAR **argv);
+BOOL san_main(INT argc, LPWSTR *argv);
/* select.c */
-BOOL select_main(INT argc, WCHAR **argv);
-VOID help_select(INT argc, WCHAR **argv);
+BOOL select_main(INT argc, LPWSTR *argv);
/* setid.c */
-BOOL setid_main(INT argc, WCHAR **argv);
-VOID help_setid(INT argc, WCHAR **argv);
+BOOL setid_main(INT argc, LPWSTR *argv);
/* shrink.c */
-BOOL shrink_main(INT argc, WCHAR **argv);
-VOID help_shrink(INT argc, WCHAR **argv);
+BOOL shrink_main(INT argc, LPWSTR *argv);
/* uniqueid.c */
-BOOL uniqueid_main(INT argc, WCHAR **argv);
-VOID help_uniqueid(INT argc, WCHAR **argv);
+BOOL uniqueid_main(INT argc, LPWSTR *argv);
#endif /* DISKPART_H */
Modified: trunk/reactos/base/system/diskpart/expand.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/expan…
==============================================================================
--- trunk/reactos/base/system/diskpart/expand.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/expand.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL expand_main(INT argc, WCHAR **argv)
+BOOL expand_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_expand(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_EXPAND);
-}
Modified: trunk/reactos/base/system/diskpart/extend.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/exten…
==============================================================================
--- trunk/reactos/base/system/diskpart/extend.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/extend.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL extend_main(INT argc, WCHAR **argv)
+BOOL extend_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_extend(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_EXTEND);
-}
Modified: trunk/reactos/base/system/diskpart/filesystems.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/files…
==============================================================================
--- trunk/reactos/base/system/diskpart/filesystems.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/filesystems.c [iso-8859-1] Wed May 29 11:40:43
2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL filesystems_main(INT argc, WCHAR **argv)
+BOOL filesystems_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_filesystems(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_FILESYSTEMS);
-}
Modified: trunk/reactos/base/system/diskpart/format.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/forma…
==============================================================================
--- trunk/reactos/base/system/diskpart/format.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/format.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -3,18 +3,12 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: base/system/diskpart/format.c
* PURPOSE: Manages all the partitions of the OS in
- * an interactive way
+ * an interactive way
* PROGRAMMERS: Lee Schroeder
*/
#include "diskpart.h"
-BOOL format_main(INT argc, WCHAR **argv)
+BOOL format_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_format(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_FORMAT);
-}
Modified: trunk/reactos/base/system/diskpart/gpt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/gpt.c…
==============================================================================
--- trunk/reactos/base/system/diskpart/gpt.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/gpt.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,12 +8,7 @@
*/
#include "diskpart.h"
-BOOL gpt_main(INT argc, WCHAR **argv)
+BOOL gpt_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-VOID help_gpt(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_GPT);
-}
Modified: trunk/reactos/base/system/diskpart/help.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/help.…
==============================================================================
--- trunk/reactos/base/system/diskpart/help.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/help.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,70 +8,29 @@
#include "diskpart.h"
-
/*
* help_cmdlist():
* shows all the available commands and basic descriptions for diskpart
*/
VOID help_cmdlist(VOID)
{
+ PCOMMAND cmdptr;
+
/* Print the header information */
- PrintResourceString(IDS_APP_HEADER, DISKPART_VERSION);
+ PrintResourceString(IDS_APP_HEADER);
+ printf("\n");
/* lists all the commands and the basic descriptions */
- PrintResourceString(IDS_HELP_CMD_DESC_ACTIVE);
- PrintResourceString(IDS_HELP_CMD_DESC_ADD);
- PrintResourceString(IDS_HELP_CMD_DESC_ASSIGN);
- PrintResourceString(IDS_HELP_CMD_DESC_ATTACH);
- PrintResourceString(IDS_HELP_CMD_DESC_ATTRIBUTES);
- PrintResourceString(IDS_HELP_CMD_DESC_AUTOMOUNT);
- PrintResourceString(IDS_HELP_CMD_DESC_BREAK);
- PrintResourceString(IDS_HELP_CMD_DESC_CLEAN);
- PrintResourceString(IDS_HELP_CMD_DESC_COMPACT);
- PrintResourceString(IDS_HELP_CMD_DESC_CONVERT);
- PrintResourceString(IDS_HELP_CMD_DESC_CREATE);
- PrintResourceString(IDS_HELP_CMD_DESC_DELETE);
- PrintResourceString(IDS_HELP_CMD_DESC_DETACH);
- PrintResourceString(IDS_HELP_CMD_DESC_DETAIL);
- PrintResourceString(IDS_HELP_CMD_DESC_EXIT);
- PrintResourceString(IDS_HELP_CMD_DESC_EXPAND);
- PrintResourceString(IDS_HELP_CMD_DESC_EXTEND);
- PrintResourceString(IDS_HELP_CMD_DESC_FS);
- PrintResourceString(IDS_HELP_CMD_DESC_FORMAT);
- PrintResourceString(IDS_HELP_CMD_DESC_GPT);
- PrintResourceString(IDS_HELP_CMD_DESC_HELP);
- PrintResourceString(IDS_HELP_CMD_DESC_IMPORT);
- PrintResourceString(IDS_HELP_CMD_DESC_INACTIVE);
- PrintResourceString(IDS_HELP_CMD_DESC_LIST);
- PrintResourceString(IDS_HELP_CMD_DESC_MERGE);
- PrintResourceString(IDS_HELP_CMD_DESC_OFFLINE);
- PrintResourceString(IDS_HELP_CMD_DESC_ONLINE);
- PrintResourceString(IDS_HELP_CMD_DESC_RECOVER);
- PrintResourceString(IDS_HELP_CMD_DESC_REM);
- PrintResourceString(IDS_HELP_CMD_DESC_REMOVE);
- PrintResourceString(IDS_HELP_CMD_DESC_REPAIR);
- PrintResourceString(IDS_HELP_CMD_DESC_RESCAN);
- PrintResourceString(IDS_HELP_CMD_DESC_RETAIN);
- PrintResourceString(IDS_HELP_CMD_DESC_SAN);
- PrintResourceString(IDS_HELP_CMD_DESC_SELECT);
- PrintResourceString(IDS_HELP_CMD_DESC_SETID);
- PrintResourceString(IDS_HELP_CMD_DESC_SHRINK);
- PrintResourceString(IDS_HELP_CMD_DESC_UNIQUEID);
+ for(cmdptr = cmds; cmdptr->name; cmdptr++)
+ PrintResourceString(cmdptr->help_desc);
+
printf("\n");
}
-
-
-VOID help_help(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_HELP);
-}
-
-
/* help_main(char *arg):
* main entry point for the help command. Gives help to users who needs it.
*/
-BOOL help_main(INT argc, WCHAR **argv)
+BOOL help_main(INT argc, LPWSTR *argv)
{
PCOMMAND cmdptr;
@@ -84,9 +43,9 @@
/* Scan internal command table */
for (cmdptr = cmds; cmdptr->name; cmdptr++)
{
- if (_wcsicmp(argv[1], cmdptr->name) == 0 && cmdptr->help != NULL)
+ if(_wcsicmp(argv[1], cmdptr->name) == 0)
{
- cmdptr->help(argc, argv);
+ PrintResourceString(cmdptr->help);
return TRUE;
}
}
Modified: trunk/reactos/base/system/diskpart/import.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/impor…
==============================================================================
--- trunk/reactos/base/system/diskpart/import.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/import.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,12 +8,7 @@
*/
#include "diskpart.h"
-BOOL import_main(INT argc, WCHAR **argv)
+BOOL import_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-VOID help_import(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_IMPORT);
-}
Modified: trunk/reactos/base/system/diskpart/inactive.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/inact…
==============================================================================
--- trunk/reactos/base/system/diskpart/inactive.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/inactive.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL inactive_main(INT argc, WCHAR **argv)
+BOOL inactive_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_inactive(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_INACTIVE);
-}
Modified: trunk/reactos/base/system/diskpart/interpreter.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/inter…
==============================================================================
--- trunk/reactos/base/system/diskpart/interpreter.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/interpreter.c [iso-8859-1] Wed May 29 11:40:43
2013
@@ -9,68 +9,55 @@
#include "diskpart.h"
-BOOL exit_main(INT argc, WCHAR **argv);
-BOOL rem_main(INT argc, WCHAR **argv);
+BOOL exit_main(INT argc, LPWSTR *argv);
+BOOL rem_main(INT argc, LPWSTR *argv);
COMMAND cmds[] =
{
- {L"active", active_main, help_active},
- {L"add", add_main, help_add},
- {L"assign", assign_main, help_assign},
- {L"attributes", attributes_main, help_attributes},
- {L"automount", automount_main, help_automount},
- {L"break", break_main, help_break},
- {L"clean", clean_main, help_clean},
- {L"compact", compact_main, help_compact},
- {L"convert", convert_main, help_convert},
- {L"create", create_main, help_create},
- {L"delete", delete_main, help_delete},
- {L"detail", detail_main, help_detail},
- {L"detach", detach_main, help_detach},
- {L"exit", exit_main, NULL},
- {L"expand", expand_main, help_expand},
- {L"extend", extend_main, help_extend},
- {L"filesystems", filesystems_main, help_filesystems},
- {L"format", format_main, help_format},
- {L"gpt", gpt_main, help_gpt},
- {L"help", help_main, help_help},
- {L"list", list_main, help_list},
- {L"import", import_main, help_import},
- {L"inactive", inactive_main, help_inactive},
- {L"merge", merge_main, help_merge},
- {L"offline", offline_main, help_offline},
- {L"online", online_main, help_online},
- {L"recover", recover_main, help_recover},
- {L"rem", rem_main, NULL},
- {L"remove", remove_main, help_remove},
- {L"repair", repair_main, help_repair},
- {L"rescan", rescan_main, help_rescan},
- {L"retain", retain_main, help_retain},
- {L"san", san_main, help_san},
- {L"select", select_main, help_select},
- {L"setid", setid_main, help_setid},
- {L"shrink", shrink_main, help_shrink},
- {L"uniqueid", uniqueid_main, help_uniqueid},
- {NULL, NULL, NULL}
+ {L"active", active_main, IDS_HELP_CMD_ACTIVE,
IDS_HELP_CMD_DESC_ACTIVE},
+ {L"add", add_main, IDS_HELP_CMD_ADD,
IDS_HELP_CMD_DESC_ADD},
+ {L"assign", assign_main, IDS_HELP_CMD_ASSIGN,
IDS_HELP_CMD_DESC_ASSIGN},
+ {L"attach", attach_main, IDS_HELP_CMD_ATTACH,
IDS_HELP_CMD_DESC_ATTACH},
+ {L"attributes", attributes_main, IDS_HELP_CMD_ATTRIBUTES,
IDS_HELP_CMD_DESC_ATTRIBUTES},
+ {L"automount", automount_main, IDS_HELP_CMD_AUTOMOUNT,
IDS_HELP_CMD_DESC_AUTOMOUNT},
+ {L"break", break_main, IDS_HELP_CMD_BREAK,
IDS_HELP_CMD_DESC_BREAK},
+ {L"clean", clean_main, IDS_HELP_CMD_CLEAN,
IDS_HELP_CMD_DESC_CLEAN},
+ {L"compact", compact_main, IDS_HELP_CMD_COMPACT,
IDS_HELP_CMD_DESC_COMPACT},
+ {L"convert", convert_main, IDS_HELP_CMD_CONVERT,
IDS_HELP_CMD_DESC_CONVERT},
+ {L"create", create_main, IDS_HELP_CMD_CREATE,
IDS_HELP_CMD_DESC_CREATE},
+ {L"delete", delete_main, IDS_HELP_CMD_DELETE,
IDS_HELP_CMD_DESC_DELETE},
+ {L"detail", detail_main, IDS_HELP_CMD_DETAIL,
IDS_HELP_CMD_DESC_DETAIL},
+ {L"detach", detach_main, IDS_HELP_CMD_DETACH,
IDS_HELP_CMD_DESC_DETACH},
+ {L"exit", NULL, IDS_NONE,
IDS_HELP_CMD_DESC_EXIT},
+ {L"expand", expand_main, IDS_HELP_CMD_EXPAND,
IDS_HELP_CMD_DESC_EXPAND},
+ {L"extend", extend_main, IDS_HELP_CMD_EXTEND,
IDS_HELP_CMD_DESC_EXTEND},
+ {L"filesystems", filesystems_main, IDS_HELP_CMD_FILESYSTEMS,
IDS_HELP_CMD_DESC_FS},
+ {L"format", format_main, IDS_HELP_CMD_FORMAT,
IDS_HELP_CMD_DESC_FORMAT},
+ {L"gpt", gpt_main, IDS_HELP_CMD_GPT,
IDS_HELP_CMD_DESC_GPT},
+ {L"help", help_main, IDS_HELP_CMD_HELP,
IDS_HELP_CMD_DESC_HELP},
+ {L"import", import_main, IDS_HELP_CMD_IMPORT,
IDS_HELP_CMD_DESC_IMPORT},
+ {L"inactive", inactive_main, IDS_HELP_CMD_INACTIVE,
IDS_HELP_CMD_DESC_INACTIVE},
+ {L"list", list_main, IDS_HELP_CMD_LIST,
IDS_HELP_CMD_DESC_LIST},
+ {L"merge", merge_main, IDS_HELP_CMD_MERGE,
IDS_HELP_CMD_DESC_MERGE},
+ {L"offline", offline_main, IDS_HELP_CMD_OFFLINE,
IDS_HELP_CMD_DESC_OFFLINE},
+ {L"online", online_main, IDS_HELP_CMD_ONLINE,
IDS_HELP_CMD_DESC_ONLINE},
+ {L"recover", recover_main, IDS_HELP_CMD_RECOVER,
IDS_HELP_CMD_DESC_RECOVER},
+ {L"rem", NULL, IDS_NONE,
IDS_HELP_CMD_DESC_REM},
+ {L"remove", remove_main, IDS_HELP_CMD_REMOVE,
IDS_HELP_CMD_DESC_REMOVE},
+ {L"repair", repair_main, IDS_HELP_CMD_REPAIR,
IDS_HELP_CMD_DESC_REPAIR},
+ {L"rescan", rescan_main, IDS_HELP_CMD_RESCAN,
IDS_HELP_CMD_DESC_RESCAN},
+ {L"retain", retain_main, IDS_HELP_CMD_RETAIN,
IDS_HELP_CMD_DESC_RETAIN},
+ {L"san", san_main, IDS_HELP_CMD_SAN,
IDS_HELP_CMD_DESC_SAN},
+ {L"select", select_main, IDS_HELP_CMD_SELECT,
IDS_HELP_CMD_DESC_SELECT},
+ {L"setid", setid_main, IDS_HELP_CMD_SETID,
IDS_HELP_CMD_DESC_SETID},
+ {L"shrink", shrink_main, IDS_HELP_CMD_SHRINK,
IDS_HELP_CMD_DESC_SHRINK},
+ {L"uniqueid", uniqueid_main, IDS_HELP_CMD_UNIQUEID,
IDS_HELP_CMD_DESC_UNIQUEID},
+ {NULL, NULL, IDS_NONE, IDS_NONE}
};
/* FUNCTIONS *****************************************************************/
-
-BOOL
-exit_main(INT argc, WCHAR **argv)
-{
- return FALSE;
-}
-
-
-BOOL
-rem_main(INT argc, WCHAR **argv)
-{
- return TRUE;
-}
-
/*
* InterpretCmd(char *cmd_line, char *arg_line):
@@ -78,17 +65,23 @@
* determines which function to envoke.
*/
BOOL
-InterpretCmd(int argc, WCHAR **argv)
+InterpretCmd(int argc, LPWSTR *argv)
{
PCOMMAND cmdptr;
/* Scan internal command table */
for (cmdptr = cmds; cmdptr->name; cmdptr++)
{
+ /* First, determine if the user wants to exit
+ or to use a comment */
+ if(wcsicmp(argv[0], L"exit") == 0)
+ return FALSE;
+
+ if(wcsicmp(argv[0], L"rem") == 0)
+ return TRUE;
+
if (wcsicmp(argv[0], cmdptr->name) == 0)
- {
return cmdptr->func(argc, argv);
- }
}
help_cmdlist();
@@ -102,12 +95,12 @@
* The main function used for when reading commands from scripts.
*/
BOOL
-InterpretScript(WCHAR *input_line)
+InterpretScript(LPWSTR input_line)
{
- WCHAR *args_vector[MAX_ARGS_COUNT];
+ LPWSTR args_vector[MAX_ARGS_COUNT];
INT args_count = 0;
BOOL bWhiteSpace = TRUE;
- WCHAR *ptr;
+ LPWSTR ptr;
memset(args_vector, 0, sizeof(args_vector));
@@ -148,11 +141,11 @@
InterpretMain(VOID)
{
WCHAR input_line[MAX_STRING_SIZE];
- WCHAR *args_vector[MAX_ARGS_COUNT];
+ LPWSTR args_vector[MAX_ARGS_COUNT];
INT args_count = 0;
BOOL bWhiteSpace = TRUE;
BOOL bRun = TRUE;
- WCHAR *ptr;
+ LPWSTR ptr;
while (bRun == TRUE)
{
@@ -180,10 +173,8 @@
args_vector[args_count] = ptr;
args_count++;
}
-
bWhiteSpace = FALSE;
}
-
ptr++;
}
Modified: trunk/reactos/base/system/diskpart/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
==============================================================================
--- trunk/reactos/base/system/diskpart/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/lang/en-US.rc [iso-8859-1] Wed May 29 11:40:43
2013
@@ -13,7 +13,7 @@
/* Basic application information */
STRINGTABLE DISCARDABLE
BEGIN
- IDS_APP_HEADER, "\nReactOS DiskPart\n"
+ IDS_APP_HEADER, "ReactOS DiskPart"
IDS_APP_USAGE, "\nDisk Partitioning Interpreter.\n\n\
Usage: DISKPART [/S filename] [/T timeout] [/?]\n\n\
/S filename\tRuns the given script.\n\
@@ -196,6 +196,13 @@
<Add convert command help text here>\n\n"
END
+/* Convert help description */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_HELP_CMD_CREATE "\n\
+<Add create command help text here>\n\n"
+END
+
/* Delete help description */
STRINGTABLE DISCARDABLE
BEGIN
@@ -203,6 +210,13 @@
<Add delete command help text here>\n\n"
END
+/* Delete help description */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_HELP_CMD_DETAIL "\n\
+<Add detail command help text here>\n\n"
+END
+
/* Detach help description */
STRINGTABLE DISCARDABLE
BEGIN
Modified: trunk/reactos/base/system/diskpart/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/lang/…
==============================================================================
--- trunk/reactos/base/system/diskpart/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/lang/ro-RO.rc [iso-8859-1] Wed May 29 11:40:43
2013
@@ -15,7 +15,7 @@
/* Basic application information */
STRINGTABLE DISCARDABLE
BEGIN
- IDS_APP_HEADER, "\nReactOS DiskPart\n"
+ IDS_APP_HEADER, "ReactOS DiskPart"
IDS_APP_USAGE, "Interpretor pentru partiÈionare discuri.\n\nUtilizare: DISKPART
[/S numefiÈier] [/T timplimitÄ] [/?]\n\n\
/S numefiÈier\tExecutÄ scriptul din fiÈierul dat.\n\
/T timplimitÄ\tLimitÄ temporalÄ pentru prevenirea utilizÄrii concurente.\n\
@@ -197,6 +197,14 @@
<AdÄugare manual pentru comanda «convert»>\n\n"
END
+/* Convert help description */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_HELP_CMD_CREATE "\n\
+<AdÄugare manual pentru comanda «create»>\n\n"
+END
+
+
/* Delete help description */
STRINGTABLE DISCARDABLE
BEGIN
@@ -204,6 +212,13 @@
<AdÄugare manual pentru comanda «delete»>\n\n"
END
+/* Delete help description */
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_HELP_CMD_DETAIL "\n\
+<AdÄugare manual pentru comanda «detail»>\n\n"
+END
+
/* Detach help description */
STRINGTABLE DISCARDABLE
BEGIN
Modified: trunk/reactos/base/system/diskpart/list.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/list.…
==============================================================================
--- trunk/reactos/base/system/diskpart/list.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/list.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -32,42 +32,26 @@
printf("List VDisk!!\n");
}
-BOOL list_main(INT argc, WCHAR **argv)
+BOOL list_main(INT argc, LPWSTR *argv)
{
/* gets the first word from the string */
if (argc == 1)
{
- help_list(0, NULL);
+ PrintResourceString(IDS_HELP_CMD_LIST);
return TRUE;
}
/* determines which to list (disk, partition, etc.) */
if(!wcsicmp(argv[1], L"disk"))
- {
list_disk();
- }
else if(!wcsicmp(argv[1], L"partition"))
- {
list_partition();
- }
else if(!wcsicmp(argv[1], L"volume"))
- {
list_volume();
- }
else if(!wcsicmp(argv[1], L"vdisk"))
- {
list_vdisk();
- }
else
- {
- help_list(0, NULL);
- }
+ PrintResourceString(IDS_HELP_CMD_LIST);
return TRUE;
}
-
-
-VOID help_list(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_LIST);
-}
Modified: trunk/reactos/base/system/diskpart/merge.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/merge…
==============================================================================
--- trunk/reactos/base/system/diskpart/merge.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/merge.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL merge_main(INT argc, WCHAR **argv)
+BOOL merge_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_merge(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_MERGE);
-}
Modified: trunk/reactos/base/system/diskpart/offline.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/offli…
==============================================================================
--- trunk/reactos/base/system/diskpart/offline.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/offline.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL offline_main(INT argc, WCHAR **argv)
+BOOL offline_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_offline(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_OFFLINE);
-}
Modified: trunk/reactos/base/system/diskpart/online.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/onlin…
==============================================================================
--- trunk/reactos/base/system/diskpart/online.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/online.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,15 +8,9 @@
*/
#include "diskpart.h"
-BOOL online_main(INT argc, WCHAR **argv)
+BOOL online_main(INT argc, LPWSTR *argv)
{
- help_online(0, NULL);
+ PrintResourceString(IDS_HELP_CMD_ONLINE);
return TRUE;
}
-
-
-VOID help_online(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_ONLINE);
-}
Modified: trunk/reactos/base/system/diskpart/recover.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/recov…
==============================================================================
--- trunk/reactos/base/system/diskpart/recover.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/recover.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL recover_main(INT argc, WCHAR **argv)
+BOOL recover_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_recover(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_RECOVER);
-}
Modified: trunk/reactos/base/system/diskpart/remove.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/remov…
==============================================================================
--- trunk/reactos/base/system/diskpart/remove.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/remove.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL remove_main(INT argc, WCHAR **argv)
+BOOL remove_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_remove(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_REMOVE);
-}
Modified: trunk/reactos/base/system/diskpart/repair.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/repai…
==============================================================================
--- trunk/reactos/base/system/diskpart/repair.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/repair.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,15 +8,9 @@
*/
#include "diskpart.h"
-BOOL repair_main(INT argc, WCHAR **argv)
+BOOL repair_main(INT argc, LPWSTR *argv)
{
printf("\nTODO: Add code later since Win 7 Home Premium doesn't have this
feature.\n");
return TRUE;
}
-
-
-VOID help_repair(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_REPAIR);
-}
Modified: trunk/reactos/base/system/diskpart/rescan.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/resca…
==============================================================================
--- trunk/reactos/base/system/diskpart/rescan.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/rescan.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL rescan_main(INT argc, WCHAR **argv)
+BOOL rescan_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_rescan(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_RESCAN);
-}
Modified: trunk/reactos/base/system/diskpart/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/resou…
==============================================================================
--- trunk/reactos/base/system/diskpart/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/resource.h [iso-8859-1] Wed May 29 11:40:43 2013
@@ -9,6 +9,7 @@
#ifndef RESOURCE_H
#define RESOURCE_H
+#define IDS_NONE -1
#define IDS_APP_HEADER 0
#define IDS_APP_USAGE 1
#define IDS_APP_LICENSE 2
@@ -16,24 +17,24 @@
#define IDS_APP_LEAVING 4
#define IDS_APP_PROMPT 5
-#define IDS_DETAIL_INFO_DISK_ID 6
-#define IDS_DETAIL_INFO_TYPE 7
-#define IDS_DETAIL_INFO_STATUS 8
-#define IDS_DETAIL_INFO_PATH 9
-#define IDS_DETAIL_INFO_TARGET 10
-#define IDS_DETAIL_INFO_LUN_ID 11
-#define IDS_DETAIL_INFO_LOC_PATH 12
-#define IDS_DETAIL_INFO_CURR_RO_STATE 13
-#define IDS_DETAIL_INFO_RO 14
-#define IDS_DETAIL_INFO_BOOT_DSK 15
-#define IDS_DETAIL_INFO_PAGE_FILE_DSK 16
-#define IDS_DETAIL_INFO_HIBER_FILE_DSK 17
-#define IDS_DETAIL_INFO_CRASH_DSK 18
-#define IDS_DETAIL_INFO_CLST_DSK 19
+#define IDS_DETAIL_INFO_DISK_ID 7
+#define IDS_DETAIL_INFO_TYPE 8
+#define IDS_DETAIL_INFO_STATUS 9
+#define IDS_DETAIL_INFO_PATH 10
+#define IDS_DETAIL_INFO_TARGET 11
+#define IDS_DETAIL_INFO_LUN_ID 12
+#define IDS_DETAIL_INFO_LOC_PATH 13
+#define IDS_DETAIL_INFO_CURR_RO_STATE 14
+#define IDS_DETAIL_INFO_RO 15
+#define IDS_DETAIL_INFO_BOOT_DSK 16
+#define IDS_DETAIL_INFO_PAGE_FILE_DSK 17
+#define IDS_DETAIL_INFO_HIBER_FILE_DSK 18
+#define IDS_DETAIL_INFO_CRASH_DSK 19
+#define IDS_DETAIL_INFO_CLST_DSK 20
-#define IDS_LIST_DISK_HEAD 20
-#define IDS_LIST_DISK_LINE 21
-#define IDS_LIST_VOLUME_HEAD 22
+#define IDS_LIST_DISK_HEAD 21
+#define IDS_LIST_DISK_LINE 22
+#define IDS_LIST_VOLUME_HEAD 23
#define IDS_STATUS_YES 31
#define IDS_STATUS_NO 32
Modified: trunk/reactos/base/system/diskpart/retain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/retai…
==============================================================================
--- trunk/reactos/base/system/diskpart/retain.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/retain.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL retain_main(INT argc, WCHAR **argv)
+BOOL retain_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_retain(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_RETAIN);
-}
Modified: trunk/reactos/base/system/diskpart/san.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/san.c…
==============================================================================
--- trunk/reactos/base/system/diskpart/san.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/san.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL san_main(INT argc, WCHAR **argv)
+BOOL san_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_san(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_SAN);
-}
Modified: trunk/reactos/base/system/diskpart/select.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/selec…
==============================================================================
--- trunk/reactos/base/system/diskpart/select.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/select.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL select_main(INT argc, WCHAR **argv)
+BOOL select_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_select(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_SELECT);
-}
Modified: trunk/reactos/base/system/diskpart/setid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/setid…
==============================================================================
--- trunk/reactos/base/system/diskpart/setid.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/setid.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL setid_main(INT argc, WCHAR **argv)
+BOOL setid_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_setid(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_SETID);
-}
Modified: trunk/reactos/base/system/diskpart/shrink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/shrin…
==============================================================================
--- trunk/reactos/base/system/diskpart/shrink.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/shrink.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL shrink_main(INT argc, WCHAR **argv)
+BOOL shrink_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_shrink(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_SHRINK);
-}
Modified: trunk/reactos/base/system/diskpart/uniqueid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/uniqu…
==============================================================================
--- trunk/reactos/base/system/diskpart/uniqueid.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/uniqueid.c [iso-8859-1] Wed May 29 11:40:43 2013
@@ -8,13 +8,7 @@
*/
#include "diskpart.h"
-BOOL uniqueid_main(INT argc, WCHAR **argv)
+BOOL uniqueid_main(INT argc, LPWSTR *argv)
{
return TRUE;
}
-
-
-VOID help_uniqueid(INT argc, WCHAR **argv)
-{
- PrintResourceString(IDS_HELP_CMD_UNIQUEID);
-}