mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
add doskey (not finished yet)
svn path=/trunk/; revision=32094
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
<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" />
|
||||
</directory>
|
||||
|
||||
@@ -0,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;
|
||||
}
|
||||
|
||||
@@ -0,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>
|
||||
@@ -0,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>
|
||||
|
||||
Reference in New Issue
Block a user