Update to build cmd separately.

svn path=/trunk/; revision=445
This commit is contained in:
Eric Kohl 1999-05-11 12:40:11 +00:00
parent 6a7adfd71f
commit ffbc9d9c03
7 changed files with 30 additions and 43 deletions

View file

@ -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)
{

View file

@ -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 */

View file

@ -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,8 +866,8 @@ 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);
@ -918,8 +918,8 @@ 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(" %10s "), buffer);
bytecount.QuadPart += uliSize.QuadPart;

View file

@ -28,6 +28,7 @@
#include <string.h>
#include <stdlib.h>
#include "cmd.h"
#define MAXLINES 128

View file

@ -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

View file

@ -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__ */
}