Author: cwittich
Date: Sun Feb 3 00:23:38 2008
New Revision: 32094
URL:
http://svn.reactos.org/svn/reactos?rev=32094&view=rev
Log:
add doskey (not finished yet)
Added:
trunk/reactos/base/applications/cmdutils/doskey/
trunk/reactos/base/applications/cmdutils/doskey/doskey.c (with props)
trunk/reactos/base/applications/cmdutils/doskey/doskey.rbuild (with props)
trunk/reactos/base/applications/cmdutils/doskey/doskey.rc (with props)
Modified:
trunk/reactos/base/applications/cmdutils/cmdutils.rbuild
Modified: trunk/reactos/base/applications/cmdutils/cmdutils.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/cmdutils.rbuild (original)
+++ trunk/reactos/base/applications/cmdutils/cmdutils.rbuild Sun Feb 3 00:23:38 2008
@@ -3,6 +3,9 @@
<group
xmlns:xi="http://www.w3.org/2001/XInclude">
<directory name="dbgprint">
<xi:include href="dbgprint/dbgprint.rbuild" />
+ </directory>
+ <directory name="doskey">
+ <xi:include href="doskey/doskey.rbuild" />
</directory>
<directory name="find">
<xi:include href="find/find.rbuild" />
Added: trunk/reactos/base/applications/cmdutils/doskey/doskey.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/doskey/doskey.c (added)
+++ trunk/reactos/base/applications/cmdutils/doskey/doskey.c Sun Feb 3 00:23:38 2008
@@ -1,0 +1,58 @@
+#include <windows.h>
+#include <stdio.h>
+#include <tchar.h>
+
+static VOID
+PrintAlias (VOID)
+{
+ LPTSTR Aliases;
+ LPTSTR ptr;
+ DWORD len;
+
+ len = GetConsoleAliasesLength(_T("cmd.exe"));
+ if (len <= 0)
+ return;
+
+ /* allocate memory for an extra \0 char to make parsing easier */
+ ptr = HeapAlloc(GetProcessHeap(), 0, (len + sizeof(TCHAR)));
+ if (!ptr)
+ return;
+
+ Aliases = ptr;
+
+ ZeroMemory(Aliases, len + sizeof(TCHAR));
+
+ if (GetConsoleAliases(Aliases, len, _T("cmd.exe")) != 0)
+ {
+ while (*Aliases != '\0')
+ {
+ printf(_T("%s\n"), Aliases);
+ Aliases = Aliases + lstrlen(Aliases);
+ Aliases++;
+ }
+ }
+ HeapFree(GetProcessHeap(), 0 , ptr);
+}
+
+int
+main (int argc, char **argv)
+{
+
+ if (argc < 2)
+ return 0;
+
+ if (argv[1][0] == '/')
+ {
+ if (stricmp(argv[1], "/macros") == 0)
+ PrintAlias();
+ }
+ else
+ {
+ /* FIXME */
+ }
+
+
+
+ return 0;
+}
+
Propchange: trunk/reactos/base/applications/cmdutils/doskey/doskey.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/doskey/doskey.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/doskey/doskey.rbuild (added)
+++ trunk/reactos/base/applications/cmdutils/doskey/doskey.rbuild Sun Feb 3 00:23:38
2008
@@ -1,0 +1,9 @@
+<?xml version="1.0"?>
+<!DOCTYPE module SYSTEM "../../../../tools/rbuild/project.dtd">
+<module name="doskey" type="win32cui"
installbase="system32" installname="doskey.exe">
+ <define name="_WIN32_IE">0x0501</define>
+ <define name="_WIN32_WINNT">0x0501</define>
+ <library>kernel32</library>
+ <file>doskey.c</file>
+ <file>doskey.rc</file>
+</module>
Propchange: trunk/reactos/base/applications/cmdutils/doskey/doskey.rbuild
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/base/applications/cmdutils/doskey/doskey.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/doskey/doskey.rc (added)
+++ trunk/reactos/base/applications/cmdutils/doskey/doskey.rc Sun Feb 3 00:23:38 2008
@@ -1,0 +1,7 @@
+/* $Id: find.rc 28350 2007-08-15 14:46:36Z fireball $ */
+
+#define REACTOS_STR_FILE_DESCRIPTION "W32 doskey command\0"
+#define REACTOS_STR_INTERNAL_NAME "doskey\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "doskey.exe\0"
+#include <reactos/version.rc>
+
Propchange: trunk/reactos/base/applications/cmdutils/doskey/doskey.rc
------------------------------------------------------------------------------
svn:eol-style = native