make better use of precompiled headers

svn path=/trunk/; revision=11595
This commit is contained in:
Thomas Bluemel
2004-11-08 02:16:06 +00:00
parent 3e1e519f2e
commit dbd1890dee
55 changed files with 58 additions and 355 deletions
+1 -8
View File
@@ -27,17 +27,10 @@
*/
#include "config.h"
#include "precomp.h"
#ifdef FEATURE_ALIASES
#include "precomp.h"
#include <tchar.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
typedef struct tagALIAS
{
struct tagALIAS *next;
+1 -6
View File
@@ -29,15 +29,10 @@
* Added handling of multiple filenames.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_ATTRIB
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
static VOID
PrintAttribute (LPTSTR pszPath, LPTSTR pszFile, BOOL bRecurse)
+1 -9
View File
@@ -1,4 +1,4 @@
/* $Id: batch.c,v 1.4 2004/08/15 22:15:23 chorns Exp $
/* $Id: batch.c,v 1.5 2004/11/08 02:16:06 weiden Exp $
*
* BATCH.C - batch file processor for CMD.EXE.
*
@@ -56,15 +56,7 @@
* Fixes made to get "for" working.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "batch.h"
/* The stack of current batch contexts.
+1 -7
View File
@@ -21,16 +21,10 @@
* Redirection ready!
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_BEEP
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include "batch.h"
INT cmd_beep (LPTSTR cmd, LPTSTR param)
{
+1 -9
View File
@@ -1,4 +1,4 @@
/* $Id: call.c,v 1.3 2004/08/15 22:15:23 chorns Exp $
/* $Id: call.c,v 1.4 2004/11/08 02:16:06 weiden Exp $
*
* CALL.C - call internal batch command.
*
@@ -26,15 +26,7 @@
* Unicode and redirection safe!
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "batch.h"
/*
+1 -7
View File
@@ -9,16 +9,10 @@
*
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_CHCP
#include "precomp.h"
#include <tchar.h>
#include <stdlib.h>
#include <string.h>
INT CommandChcp (LPTSTR cmd, LPTSTR param)
{
LPTSTR *arg;
+1 -9
View File
@@ -14,18 +14,10 @@
* Fixed timeout.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_CHOICE
#include "precomp.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <tchar.h>
#include "batch.h"
#define GC_TIMEOUT -1
#define GC_NOKEY 0 //an event occurred but it wasn't a key pressed
+1 -6
View File
@@ -23,15 +23,10 @@
* Redirection ready!
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_CLS
#include "precomp.h"
#include <tchar.h>
#include <string.h>
INT cmd_cls (LPTSTR cmd, LPTSTR param)
{
DWORD dwWritten;
+1 -14
View File
@@ -1,4 +1,4 @@
/* $Id: cmd.c,v 1.19 2004/08/22 20:47:20 hbirr Exp $
/* $Id: cmd.c,v 1.20 2004/11/08 02:16:06 weiden Exp $
*
* CMD.C - command-line interface.
*
@@ -131,25 +131,12 @@
* Added ShellExecute call when all else fails to be able to "launch" any file.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#include <winnt.h>
#include <winternl.h>
#ifndef NT_SUCCESS
#define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0)
#endif
#include "batch.h"
#include <shellapi.h>
typedef NTSTATUS (STDCALL *NtQueryInformationProcessProc)(HANDLE, PROCESSINFOCLASS,
PVOID, ULONG, PULONG);
typedef NTSTATUS (STDCALL *NtReadVirtualMemoryProc)(HANDLE, PVOID, PVOID, ULONG, PULONG);
-6
View File
@@ -97,13 +97,7 @@
* Fixed problems when the screen was scrolled away.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include "batch.h"
SHORT maxx;
-3
View File
@@ -17,10 +17,7 @@
* Unicode ready!
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
/* a list of all the internal commands, associating their command names */
+2 -6
View File
@@ -1,4 +1,4 @@
/* $Id: color.c,v 1.5 2004/08/15 22:15:23 chorns Exp $
/* $Id: color.c,v 1.6 2004/11/08 02:16:06 weiden Exp $
*
* COLOR.C - color internal command.
*
@@ -18,13 +18,9 @@
* 4nt's syntax implemented
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_COLOR
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
static VOID ColorHelp (VOID)
+1 -7
View File
@@ -1,4 +1,4 @@
/* $Id: console.c,v 1.9 2004/11/02 20:47:05 weiden Exp $
/* $Id: console.c,v 1.10 2004/11/08 02:16:06 weiden Exp $
*
* CONSOLE.C - console input/output functions.
*
@@ -9,13 +9,7 @@
* started
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#define OUTPUT_BUFFER_SIZE 4096
+2 -11
View File
@@ -1,4 +1,4 @@
/* $Id: copy.c,v 1.5 2004/08/15 22:15:23 chorns Exp $
/* $Id: copy.c,v 1.6 2004/11/08 02:16:06 weiden Exp $
*
* COPY.C -- copy internal command.
*
@@ -22,19 +22,10 @@
* Disabled prompting when used in batch mode.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_COPY
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <tchar.h>
#include "batch.h"
#define VERIFY 1 /* VERIFY Switch */
#define BINARY 2 /* File is to be copied as BINARY */
+1 -6
View File
@@ -28,15 +28,10 @@
* Fixed date input bug.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_DATE
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
static WORD awMonths[2][13] =
{
+1 -10
View File
@@ -34,19 +34,10 @@
* Added prompt ("/P"), yes ("/Y") and wipe("/W") option.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_DEL
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include "batch.h"
enum
{
+1 -5
View File
@@ -9,14 +9,10 @@
*
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_DELAY
#include "precomp.h"
#include <tchar.h>
#include <stdlib.h>
INT CommandDelay (LPTSTR cmd, LPTSTR param)
{
+2 -8
View File
@@ -1,4 +1,4 @@
/* $Id: dir.c,v 1.11 2004/08/15 22:15:23 chorns Exp $
/* $Id: dir.c,v 1.12 2004/11/08 02:16:06 weiden Exp $
*
* DIR.C - dir internal command.
*
@@ -121,15 +121,9 @@
* Fix /w to print long names.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_DIR
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
/* flag definitions */
+1 -7
View File
@@ -14,16 +14,10 @@
* Added DIRS command.
*/
#include "config.h"
#include "precomp.h"
#ifdef FEATURE_DIRECTORY_STACK
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
typedef struct tagDIRENTRY
{
struct tagDIRENTRY *prev;
+1 -7
View File
@@ -1,4 +1,4 @@
/* $Id: echo.c,v 1.4 2004/08/15 22:15:23 chorns Exp $
/* $Id: echo.c,v 1.5 2004/11/08 02:16:06 weiden Exp $
*
* ECHO.C - internal echo commands.
*
@@ -24,13 +24,7 @@
* Implemented 'echo.' and 'echoerr.'.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include "batch.h"
INT CommandEcho (LPTSTR cmd, LPTSTR param)
-5
View File
@@ -17,12 +17,7 @@
* Use FormatMessage() for error reports.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <stdio.h>
#include <stdarg.h>
#define INVALID_SWITCH _T("Invalid switch - /%c\n")
-7
View File
@@ -20,14 +20,7 @@
* Now expands lfn even when trailing " is omitted.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdio.h>
#ifdef FEATURE_UNIX_FILENAME_COMPLETION
-8
View File
@@ -27,15 +27,7 @@
* code in other files fixed, too.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "batch.h"
/*
+1 -7
View File
@@ -8,16 +8,10 @@
* Started.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_FREE
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
/*
* convert
-7
View File
@@ -23,14 +23,7 @@
* Added help text ("/?").
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
#include "batch.h"
/*
+1 -8
View File
@@ -37,17 +37,10 @@
*
*/
#include "config.h"
#include "precomp.h"
#ifdef FEATURE_HISTORY
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
typedef struct tagHISTORY
{
struct tagHISTORY *prev;
-7
View File
@@ -26,14 +26,7 @@
* IF DEFINED variable command
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
#include "batch.h"
#define X_EXEC 1
-6
View File
@@ -124,13 +124,7 @@
* Improved chdir/cd command.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#ifdef INCLUDE_CMD_CHDIR
+1 -6
View File
@@ -14,15 +14,10 @@
* Unicode ready!
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_LABEL
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
INT cmd_label (LPTSTR cmd, LPTSTR param)
{
-5
View File
@@ -11,12 +11,7 @@
* Unicode safe!
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
TCHAR cDateSeparator;
+2
View File
@@ -33,4 +33,6 @@ include $(PATH_TO_TOP)/rules.mak
include $(TOOLS_PATH)/helper.mk
include $(TOOLS_PATH)/depend.mk
# EOF
+1 -6
View File
@@ -8,15 +8,10 @@
* Started.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_MEMORY
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
/*
* convert
-7
View File
@@ -29,14 +29,7 @@
* Added PagePrompt() and FilePrompt().
*/
#include "config.h"
#include "precomp.h"
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <tchar.h>
/*
+1 -6
View File
@@ -22,15 +22,10 @@
* Added "/N" option.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_MOVE
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
#define OVERWRITE_NO 0
#define OVERWRITE_YES 1
+1 -5
View File
@@ -7,13 +7,9 @@
* started - Paolo Pantaleo <paolopan@freemail.it>
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_MSGBOX
#include "precomp.h"
#include <ctype.h>
#include <string.h>
#include <tchar.h>
#define U_TYPE_INIT 0
+1 -8
View File
@@ -22,17 +22,10 @@
* 24-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Fixed Win32 environment handling.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_PATH
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
/* size of environment variable buffer */
#define ENV_BUFFER_SIZE 1024
+1 -8
View File
@@ -17,17 +17,10 @@
* Unicode ready!
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_PAUSE
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include "batch.h"
/*
* Perform PAUSE command.
*
+14 -1
View File
@@ -1,2 +1,15 @@
#include "cmd.h"
#include <windows.h>
#include <winnt.h>
#include <winternl.h>
#include <shellapi.h>
#include <tchar.h>
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "cmd.h"
#include "config.h"
#include "batch.h"
-7
View File
@@ -43,14 +43,7 @@
* 24-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Fixed Win32 environment handling.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
/*
* print the command-line prompt
+1 -6
View File
@@ -22,15 +22,10 @@
* Added new error AND output redirection "&>" and "&>>".
*/
#include "config.h"
#include "precomp.h"
#ifdef FEATURE_REDIRECTION
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
static BOOL
IsRedirection (TCHAR c)
+1 -8
View File
@@ -17,17 +17,10 @@
* Implemented basic rename code.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_RENAME
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
#include "batch.h"
enum
{
REN_ATTRIBUTES = 0x001, /* /A : not implemented */
+1 -6
View File
@@ -9,15 +9,10 @@
*
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_SCREEN
#include "precomp.h"
#include <tchar.h>
#include <stdlib.h>
#include <ctype.h>
INT CommandScreen (LPTSTR cmd, LPTSTR param)
{
+1 -6
View File
@@ -31,15 +31,10 @@
* Fixed little bug.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_SET
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
/* initial size of environment variable buffer */
#define ENV_BUFFER_SIZE 1024
-6
View File
@@ -20,13 +20,7 @@
* Unicode and redirection safe!
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include "batch.h"
/*
+1 -6
View File
@@ -8,14 +8,9 @@
* Started.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_START
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
INT cmd_start (LPTSTR first, LPTSTR rest)
-4
View File
@@ -18,10 +18,6 @@ other are internal service functions*/
#include "precomp.h"
#include <ctype.h>
#include <tchar.h>
#define _B FOREGROUND_BLUE
#define _G FOREGROUND_GREEN
#define _R FOREGROUND_RED
+1 -6
View File
@@ -21,15 +21,10 @@
* Fixed time input bug.
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_TIME
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
static BOOL ParseTime (LPTSTR s)
{
+1 -6
View File
@@ -7,14 +7,9 @@
* started - Paolo Pantaleo <paolopan@freemail.it>
*/
#include "config.h"
#ifdef INCLUDE_CMD_TIMER
#include "precomp.h"
#include <ctype.h>
#include <string.h>
#include <tchar.h>
#ifdef INCLUDE_CMD_TIMER
#define NCS_NOT_SPECIFIED -1
+1 -5
View File
@@ -6,14 +6,10 @@
* 1999-02-11 Emanuele Aliberti
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_TITLE
#include "precomp.h"
#include <tchar.h>
#include <string.h>
INT cmd_title (LPTSTR cmd, LPTSTR param)
{
+1 -5
View File
@@ -23,14 +23,10 @@
* Added multiple file support (copied from y.c)
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_TYPE
#include "precomp.h"
#include <tchar.h>
#include <string.h>
INT cmd_type (LPTSTR cmd, LPTSTR param)
{
-5
View File
@@ -21,12 +21,7 @@
* New version info and some output changes.
*/
#include "config.h"
#include "precomp.h"
#include <tchar.h>
#include <string.h>
#include <ctype.h>
VOID ShortVersion (VOID)
+1 -5
View File
@@ -15,14 +15,10 @@
* Unicode and redirection ready!
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_VERIFY
#include "precomp.h"
#include <tchar.h>
#include <string.h>
/* global verify flag */
static BOOL bVerify = FALSE;
+1 -5
View File
@@ -20,14 +20,10 @@
* Redirection ready!
*/
#include "config.h"
#include "precomp.h"
#ifdef INCLUDE_CMD_VOL
#include "precomp.h"
#include <tchar.h>
#include <string.h>
static INT
PrintVolumeHeader (LPTSTR pszRootPath)
-4
View File
@@ -74,11 +74,7 @@
*
*/
#include "config.h"
#include "precomp.h"
#include <string.h>
#include <stdlib.h>
/* initial size of environment variable buffer */
+2 -7
View File
@@ -1,4 +1,4 @@
/* $Id: window.c,v 1.2 2004/08/15 22:15:23 chorns Exp $
/* $Id: window.c,v 1.3 2004/11/08 02:16:06 weiden Exp $
*
* WINDOW.C - activate & window internal commands.
*
@@ -13,15 +13,10 @@
*/
#include "config.h"
#include "precomp.h"
#if ( defined(INCLUDE_CMD_WINDOW) || defined(INCLUDE_CMD_ACTIVATE) )
#include "precomp.h"
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#define A_MIN 0x01
#define A_MAX 0x02