mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 00:54:40 +00:00
Update to build cmd separately.
svn path=/trunk/; revision=445
This commit is contained in:
parent
6a7adfd71f
commit
ffbc9d9c03
7 changed files with 30 additions and 43 deletions
|
@ -360,19 +360,14 @@ VOID ReadCommand (LPTSTR str, INT maxlen)
|
|||
break;
|
||||
|
||||
default:
|
||||
#ifdef __REACTOS__
|
||||
ch = ir.Event.KeyEvent.AsciiChar;
|
||||
if ((ch >= 32) && (charcount != (maxlen - 2)))
|
||||
{
|
||||
#else
|
||||
#ifdef _UNICODE
|
||||
ch = ir.Event.KeyEvent.uChar.UnicodeChar;
|
||||
if ((ch >= 32 && ch <= 255) && (charcount != (maxlen - 2)))
|
||||
#else
|
||||
ch = ir.Event.KeyEvent.uChar.AsciiChar;
|
||||
if (ch >= 32 && (charcount != (maxlen - 2)))
|
||||
#endif /* _UNICODE */
|
||||
if ((ch >= 32 && ch <= 255) && (charcount != (maxlen - 2)))
|
||||
{
|
||||
#endif /* __REACTOS__ */
|
||||
/* insert character into string... */
|
||||
if (bInsert && current != charcount)
|
||||
{
|
||||
|
|
|
@ -14,9 +14,17 @@
|
|||
#ifndef _CONFIG_H_INCLUDED_
|
||||
#define _CONFIG_H_INCLUDED_
|
||||
|
||||
#ifndef __REACTOS__
|
||||
//#ifndef __REACTOS__
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif /* __REACTOS__ */
|
||||
//#endif /* __REACTOS__ */
|
||||
|
||||
|
||||
//#ifdef UNICODE
|
||||
//#define _T(x) L##x
|
||||
//#else
|
||||
//#define _T(x) x
|
||||
//#endif
|
||||
|
||||
|
||||
|
||||
/* JPP 20 Jul 1998 - define DEBUG to add debugging code */
|
||||
|
|
|
@ -810,8 +810,8 @@ DirList (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
|
|||
count = 0;
|
||||
}
|
||||
|
||||
uliSize.LowPart = file.nFileSizeLow;
|
||||
uliSize.HighPart = file.nFileSizeHigh;
|
||||
uliSize.u.LowPart = file.nFileSizeLow;
|
||||
uliSize.u.HighPart = file.nFileSizeHigh;
|
||||
bytecount.QuadPart += uliSize.QuadPart;
|
||||
}
|
||||
else if (dwFlags & DIR_BARE)
|
||||
|
@ -841,8 +841,8 @@ DirList (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
|
|||
if (IncLine (pLine, dwFlags))
|
||||
return 1;
|
||||
|
||||
uliSize.LowPart = file.nFileSizeLow;
|
||||
uliSize.HighPart = file.nFileSizeHigh;
|
||||
uliSize.u.LowPart = file.nFileSizeLow;
|
||||
uliSize.u.HighPart = file.nFileSizeHigh;
|
||||
bytecount.QuadPart += uliSize.QuadPart;
|
||||
}
|
||||
else
|
||||
|
@ -866,14 +866,14 @@ DirList (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
|
|||
{
|
||||
ULARGE_INTEGER uliSize;
|
||||
|
||||
uliSize.LowPart = file.nFileSizeLow;
|
||||
uliSize.HighPart = file.nFileSizeHigh;
|
||||
uliSize.u.LowPart = file.nFileSizeLow;
|
||||
uliSize.u.HighPart = file.nFileSizeHigh;
|
||||
|
||||
ConvertULargeInteger (uliSize, buffer, sizeof(buffer));
|
||||
ConOutPrintf (_T(" %20s"), buffer);
|
||||
|
||||
bytecount.QuadPart += uliSize.QuadPart;
|
||||
filecount++;
|
||||
filecount++;
|
||||
}
|
||||
|
||||
/* print long filename */
|
||||
|
@ -918,9 +918,9 @@ DirList (LPTSTR szPath, LPTSTR szFilespec, LPINT pLine, DWORD dwFlags)
|
|||
{
|
||||
ULARGE_INTEGER uliSize;
|
||||
|
||||
uliSize.LowPart = file.nFileSizeLow;
|
||||
uliSize.HighPart = file.nFileSizeHigh;
|
||||
ConvertULargeInteger (uliSize, buffer, sizeof(buffer));
|
||||
uliSize.u.LowPart = file.nFileSizeLow;
|
||||
uliSize.u.HighPart = file.nFileSizeHigh;
|
||||
ConvertULargeInteger (uliSize, buffer, sizeof(buffer));
|
||||
ConOutPrintf (_T(" %10s "), buffer);
|
||||
bytecount.QuadPart += uliSize.QuadPart;
|
||||
filecount++;
|
||||
|
@ -1058,7 +1058,7 @@ DirRecurse (LPTSTR szPath, LPTSTR szSpec, LPINT pLine, DWORD dwFlags)
|
|||
dwFlags &= ~DIR_RECURSE;
|
||||
|
||||
if (PrintSummary (szPath, recurse_file_cnt,
|
||||
recurse_dir_cnt, recurse_bytes, pLine, dwFlags))
|
||||
recurse_dir_cnt, recurse_bytes, pLine, dwFlags))
|
||||
return 1;
|
||||
|
||||
if ((dwFlags & DIR_BARE) == 0)
|
||||
|
|
|
@ -223,7 +223,7 @@ BOOL ShowCompletionMatches (LPTSTR str, INT charcount)
|
|||
continue;
|
||||
|
||||
if (file.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
_stprintf (fname, _T("[%s]"), file.cFileName);
|
||||
_stprintf (fname, _T("[%s]"), file.cFileName);
|
||||
else
|
||||
_tcscpy (fname, file.cFileName);
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "cmd.h"
|
||||
|
||||
#define MAXLINES 128
|
||||
|
||||
|
|
|
@ -2,21 +2,15 @@
|
|||
# ReactOS makefile for CMD
|
||||
#
|
||||
|
||||
# target: raw binary (does not work right now)
|
||||
#all: cmd.bin
|
||||
|
||||
# target: executable (not tested/experimental)
|
||||
all: cmd.exe
|
||||
|
||||
OBJECTS = ../common/crt0.o cmd.o attrib.o alias.o batch.o beep.o call.o \
|
||||
OBJECTS = cmd.o attrib.o alias.o batch.o beep.o call.o \
|
||||
chcp.o cls.o cmdinput.o cmdtable.o color.o console.o copy.o date.o \
|
||||
del.o dir.o dirstack.o echo.o error.o filecomp.o for.o goto.o \
|
||||
history.o if.o internal.o label.o locale.o misc.o move.o path.o \
|
||||
pause.o prompt.o redir.o ren.o ros.o set.o shift.o time.o title.o type.o \
|
||||
pause.o prompt.o redir.o ren.o set.o shift.o time.o title.o type.o \
|
||||
ver.o verify.o vol.o where.o
|
||||
|
||||
LIBS= ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
|
||||
|
||||
CLEAN_FILES = *.o cmd.exe cmd.sym
|
||||
|
||||
clean: $(CLEAN_FILES:%=%_clean)
|
||||
|
@ -26,15 +20,8 @@ $(CLEAN_FILES:%=%_clean): %_clean:
|
|||
|
||||
.phony: clean $(CLEAN_FILES:%=%_clean)
|
||||
|
||||
cmd.bin: $(OBJECTS)
|
||||
$(LD) -Ttext 0x10000 $(OBJECTS) $(LIBS) -o cmd.exe
|
||||
$(OBJCOPY) -O binary cmd.exe cmd.bin
|
||||
|
||||
cmd.exe: $(OBJECTS) $(LIBS)
|
||||
$(CC) -specs=../../specs $(OBJECTS) $(LIBS) -lgcc -o cmd.exe
|
||||
cmd.exe: $(OBJECTS)
|
||||
$(CC) $(OBJECTS) -lkernel32 -lcrtdll -o cmd.exe
|
||||
$(NM) --numeric-sort cmd.exe > cmd.sym
|
||||
|
||||
include ../../rules.mak
|
||||
|
||||
|
||||
|
||||
include ../rules.mak
|
||||
|
|
|
@ -62,15 +62,11 @@ TCHAR cgetchar (VOID)
|
|||
}
|
||||
while (TRUE);
|
||||
|
||||
#ifdef __REACTOS__
|
||||
return irBuffer.Event.KeyEvent.AsciiChar;
|
||||
#else
|
||||
#ifndef _UNICODE
|
||||
return irBuffer.Event.KeyEvent.uChar.AsciiChar;
|
||||
#else
|
||||
return irBuffer.Event.KeyEvent.uChar.UnicodeChar;
|
||||
#endif /* _UNICODE */
|
||||
#endif /* __REACTOS__ */
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue