mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
[CMD]
Fix whitespace (part 2/x) (convert tabs into 4-space indent). svn path=/trunk/; revision=59378
This commit is contained in:
parent
b067add889
commit
9b6dc5bd15
21 changed files with 2581 additions and 2573 deletions
|
@ -1,7 +1,5 @@
|
|||
/*
|
||||
* BATCH.H - A structure to preserve the context of a batch file
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
@ -32,7 +30,8 @@ typedef struct tagFORCONTEXT
|
|||
} FOR_CONTEXT, *LPFOR_CONTEXT;
|
||||
|
||||
|
||||
/* The stack of current batch contexts.
|
||||
/*
|
||||
* The stack of current batch contexts.
|
||||
* NULL when no batch is active
|
||||
*/
|
||||
extern LPBATCH_CONTEXT bc;
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
* 24-Jan-1999 (Eric Kohl)
|
||||
* Fixed Win32 environment handling.
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
#include "precomp.h"
|
||||
|
||||
|
@ -198,13 +198,15 @@ INT cmd_prompt (LPTSTR param)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* if it is null, then it needs to set to default,
|
||||
because that means the user entered "prompt" only.
|
||||
so even if param is null you _must_ still set prompt
|
||||
to the default. There seems to be some kinda difference
|
||||
between winxp and 2k in this matter and this way will
|
||||
cover both. Do not use fixed size of szParam for param the buffer are 8192bytes
|
||||
and will later change to dymatic buffer */
|
||||
/*
|
||||
* if it is null, then it needs to set to default,
|
||||
* because that means the user entered "prompt" only.
|
||||
* so even if param is null you _must_ still set prompt
|
||||
* to the default. There seems to be some kinda difference
|
||||
* between winxp and 2k in this matter and this way will
|
||||
* cover both. Do not use fixed size of szParam for param the buffer
|
||||
* are 8192 bytes and will later change to dymatic buffer.
|
||||
*/
|
||||
|
||||
/* set PROMPT environment variable */
|
||||
if (param[0] != _T('\0'))
|
||||
|
@ -220,8 +222,6 @@ INT cmd_prompt (LPTSTR param)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
* 17-Oct-2001 (Eric Kohl)
|
||||
* Implemented basic rename code.
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*
|
||||
* 25-Nov-2008 (Victor Martinez) <vicmarcal@hotmail.com> Patch dedicated to Myrjala because her comprenhension and love :D
|
||||
* Fixing following Bugs:
|
||||
* -Wrong behavior with wildcards when Source and Destiny are Paths(FIXED).
|
||||
|
@ -47,7 +48,6 @@ enum
|
|||
|
||||
/*
|
||||
* file rename internal command.
|
||||
*
|
||||
*/
|
||||
INT cmd_rename (LPTSTR param)
|
||||
{
|
||||
|
@ -59,13 +59,11 @@ INT cmd_rename (LPTSTR param)
|
|||
DWORD dwFiles = 0; /* number of renamedd files */
|
||||
INT i;
|
||||
|
||||
|
||||
LPTSTR srcPattern = NULL; /* Source Argument*/
|
||||
TCHAR srcPath[MAX_PATH]; /*Source Path Directories*/
|
||||
LPTSTR srcFILE = NULL; /*Contains the files name(s)*/
|
||||
TCHAR srcFinal[MAX_PATH];
|
||||
|
||||
|
||||
LPTSTR dstPattern = NULL; /*Destiny Argument*/
|
||||
TCHAR dstPath[MAX_PATH]; /*Source Path Directories*/
|
||||
LPTSTR dstFILE = NULL; /*Contains the files name(s)*/
|
||||
|
@ -76,11 +74,6 @@ INT cmd_rename (LPTSTR param)
|
|||
BOOL bDstWildcard = FALSE;
|
||||
BOOL bPath = FALSE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
LPTSTR p,q,r;
|
||||
|
||||
HANDLE hFile;
|
||||
|
@ -88,8 +81,6 @@ INT cmd_rename (LPTSTR param)
|
|||
/*If the PARAM=/? then show the help*/
|
||||
if (!_tcsncmp(param, _T("/?"), 2))
|
||||
{
|
||||
|
||||
|
||||
ConOutResPaging(TRUE,STRING_REN_HELP1);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -26,14 +26,14 @@ enum
|
|||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/*just makes a print out if there is a problem with the switches*/
|
||||
/* just makes a print out if there is a problem with the switches */
|
||||
void invalid_switch(LPTSTR is)
|
||||
{
|
||||
ConOutResPrintf(STRING_REPLACE_ERROR1,is);
|
||||
ConOutResPaging(TRUE,STRING_REPLACE_HELP3);
|
||||
}
|
||||
|
||||
/*retrives the pathe dependen om the input file name*/
|
||||
/* retrives the pathe dependen om the input file name */
|
||||
void getPath(TCHAR* out, LPTSTR in)
|
||||
{
|
||||
if(_tcslen(in) == 2 && in[1] == _T(':'))
|
||||
|
@ -43,7 +43,7 @@ void getPath(TCHAR* out, LPTSTR in)
|
|||
}
|
||||
|
||||
|
||||
/*makes the replace*/
|
||||
/* makes the replace */
|
||||
INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *doMore)
|
||||
{
|
||||
TCHAR d[MAX_PATH];
|
||||
|
@ -58,10 +58,10 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
GetPathCase(dest, d);
|
||||
s[0] = _totupper(s[0]);
|
||||
d[0] = _totupper(d[0]);
|
||||
// ConOutPrintf(_T("old-src: %s\n"), s);
|
||||
// ConOutPrintf(_T("old-dest: %s\n"), d);
|
||||
// ConOutPrintf(_T("src: %s\n"), source);
|
||||
// ConOutPrintf(_T("dest: %s\n"), dest);
|
||||
// ConOutPrintf(_T("old-src: %s\n"), s);
|
||||
// ConOutPrintf(_T("old-dest: %s\n"), d);
|
||||
// ConOutPrintf(_T("src: %s\n"), source);
|
||||
// ConOutPrintf(_T("dest: %s\n"), dest);
|
||||
|
||||
/* Open up the sourcefile */
|
||||
hFileSrc = CreateFile (source, GENERIC_READ, FILE_SHARE_READ,NULL, OPEN_EXISTING, 0, NULL);
|
||||
|
@ -71,21 +71,29 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Get the time from source file to be used in the comparison with
|
||||
dest time if update switch is set */
|
||||
/*
|
||||
* Get the time from source file to be used in the comparison
|
||||
* with dest time if update switch is set.
|
||||
*/
|
||||
GetFileTime (hFileSrc, &srcCreationTime, &srcLastAccessTime, &srcLastWriteTime);
|
||||
|
||||
/* Retrieve the source attributes so that they later on can be
|
||||
inserted in to the destination */
|
||||
/*
|
||||
* Retrieve the source attributes so that they later on
|
||||
* can be inserted in to the destination.
|
||||
*/
|
||||
dwAttrib = GetFileAttributes (source);
|
||||
|
||||
if(IsExistingFile (dest))
|
||||
{
|
||||
/* Resets the attributes to avoid probles with read only files,
|
||||
checks for read only has been made earlier */
|
||||
/*
|
||||
* Resets the attributes to avoid probles with read only files,
|
||||
* checks for read only has been made earlier.
|
||||
*/
|
||||
SetFileAttributes(dest,FILE_ATTRIBUTE_NORMAL);
|
||||
/* Is the update flas set? The time has to be controled so that
|
||||
only older files are replaced */
|
||||
/*
|
||||
* Is the update flas set? The time has to be controled so that
|
||||
* only older files are replaced.
|
||||
*/
|
||||
if(dwFlags & REPLACE_UPDATE)
|
||||
{
|
||||
/* Read destination time */
|
||||
|
@ -101,7 +109,7 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
/* Compare time */
|
||||
GetFileTime (hFileDest, &destCreationTime, &destLastAccessTime, &destLastWriteTime);
|
||||
if(!((srcLastWriteTime.dwHighDateTime > destLastWriteTime.dwHighDateTime) ||
|
||||
( srcLastWriteTime.dwHighDateTime == destLastWriteTime.dwHighDateTime &&
|
||||
(srcLastWriteTime.dwHighDateTime == destLastWriteTime.dwHighDateTime &&
|
||||
srcLastWriteTime.dwLowDateTime > destLastWriteTime.dwLowDateTime)))
|
||||
{
|
||||
CloseHandle (hFileSrc);
|
||||
|
@ -200,7 +208,10 @@ INT replace(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], DWORD dwFlags, BOOL *d
|
|||
|
||||
|
||||
/* Function to iterate over source files and call replace for each of them */
|
||||
INT recReplace(DWORD dwFlags, TCHAR szSrcPath[MAX_PATH], TCHAR szDestPath[MAX_PATH], BOOL *doMore)
|
||||
INT recReplace(DWORD dwFlags,
|
||||
TCHAR szSrcPath[MAX_PATH],
|
||||
TCHAR szDestPath[MAX_PATH],
|
||||
BOOL *doMore)
|
||||
{
|
||||
TCHAR tmpDestPath[MAX_PATH], tmpSrcPath[MAX_PATH];
|
||||
INT filesReplaced=0;
|
||||
|
@ -212,13 +223,17 @@ INT recReplace(DWORD dwFlags, TCHAR szSrcPath[MAX_PATH], TCHAR szDestPath[MAX_PA
|
|||
/* Get file handel to the sourcefile(s) */
|
||||
hFile = FindFirstFile (szSrcPath, &findBuffer);
|
||||
|
||||
/* Strip the paths back to the folder they are in, so that the diffrent
|
||||
filenames can be added if more than one */
|
||||
/*
|
||||
* Strip the paths back to the folder they are in, so that
|
||||
* the different filenames can be added if more than one.
|
||||
*/
|
||||
for(i = (_tcslen(szSrcPath) - 1); i > -1; i--)
|
||||
{
|
||||
if(szSrcPath[i] != _T('\\'))
|
||||
szSrcPath[i] = _T('\0');
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/* Go through all the soursfiles and copy/replace them */
|
||||
do
|
||||
|
@ -285,7 +300,7 @@ INT recReplace(DWORD dwFlags, TCHAR szSrcPath[MAX_PATH], TCHAR szDestPath[MAX_PA
|
|||
}
|
||||
|
||||
/* Take next sourcefile if any */
|
||||
}while(FindNextFile (hFile, &findBuffer));
|
||||
} while(FindNextFile (hFile, &findBuffer));
|
||||
|
||||
return filesReplaced;
|
||||
}
|
||||
|
@ -302,8 +317,10 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
INT filesReplaced = 0;
|
||||
INT_PTR i;
|
||||
|
||||
/* Add a wildcard to dest end so the it will be easy to itterate
|
||||
over all the files and directorys in the dest directory */
|
||||
/*
|
||||
* Add a wildcard to dest end so the it will be easy to iterate
|
||||
* over all the files and directorys in the dest directory.
|
||||
*/
|
||||
_tcscat(szDestPath, _T("*"));
|
||||
|
||||
/* Get the first file in the directory */
|
||||
|
@ -311,10 +328,12 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
|
||||
/* Remove the star added earlyer to dest path */
|
||||
for(i = (_tcslen(szDestPath) - 1); i > -1; i--)
|
||||
{
|
||||
if(szDestPath[i] != _T('\\'))
|
||||
szDestPath[i] = _T('\0');
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
/* Iterate over all filed directories in the dest dir */
|
||||
do
|
||||
|
@ -328,8 +347,10 @@ INT recFindSubDirs(DWORD dwFlags,
|
|||
return filesReplaced;
|
||||
}
|
||||
|
||||
/* Check if the we should enter the dir or if it is a file
|
||||
or . or .. if so thake the next object to process */
|
||||
/*
|
||||
* Check if the we should enter the dir or if it is a file
|
||||
* or . or .. if so thake the next object to process.
|
||||
*/
|
||||
if(!_tcscmp (findBuffer.cFileName, _T(".")) ||
|
||||
!_tcscmp (findBuffer.cFileName, _T(".."))||
|
||||
IsExistingFile(findBuffer.cFileName))
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* 30 Aug 1999
|
||||
* started - Paolo Pantaleo <paolopan@freemail.it>
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
* 25-Feb-1999 (Eric Kohl)
|
||||
* Fixed little bug.
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -205,7 +205,7 @@ INT cmd_set (LPTSTR param)
|
|||
}
|
||||
|
||||
static INT
|
||||
ident_len ( LPCTSTR p )
|
||||
ident_len(LPCTSTR p)
|
||||
{
|
||||
LPCTSTR p2 = p;
|
||||
if ( __iscsymf(*p) )
|
||||
|
@ -225,7 +225,7 @@ ident_len ( LPCTSTR p )
|
|||
p += identlen;
|
||||
|
||||
static BOOL
|
||||
seta_identval ( LPCTSTR ident, INT* result )
|
||||
seta_identval(LPCTSTR ident, INT* result)
|
||||
{
|
||||
LPCTSTR identVal = GetEnvVarOrSpecial ( ident );
|
||||
if ( !identVal )
|
||||
|
@ -239,7 +239,7 @@ seta_identval ( LPCTSTR ident, INT* result )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
calc ( INT* lval, TCHAR op, INT rval )
|
||||
calc(INT* lval, TCHAR op, INT rval)
|
||||
{
|
||||
switch ( op )
|
||||
{
|
||||
|
@ -275,10 +275,10 @@ calc ( INT* lval, TCHAR op, INT rval )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_stmt ( LPCTSTR* p_, INT* result );
|
||||
seta_stmt (LPCTSTR* p_, INT* result);
|
||||
|
||||
static BOOL
|
||||
seta_unaryTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_unaryTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
LPCTSTR p = *p_;
|
||||
if ( *p == _T('(') )
|
||||
|
@ -316,7 +316,7 @@ seta_unaryTerm ( LPCTSTR* p_, INT* result )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_mulTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_mulTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
LPCTSTR p = *p_;
|
||||
TCHAR op = 0;
|
||||
|
@ -347,7 +347,7 @@ seta_mulTerm ( LPCTSTR* p_, INT* result )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_ltorTerm ( LPCTSTR* p_, INT* result, LPCTSTR ops, BOOL (*subTerm)(LPCTSTR*,INT*) )
|
||||
seta_ltorTerm(LPCTSTR* p_, INT* result, LPCTSTR ops, BOOL (*subTerm)(LPCTSTR*,INT*))
|
||||
{
|
||||
LPCTSTR p = *p_;
|
||||
INT lval;
|
||||
|
@ -373,19 +373,19 @@ seta_ltorTerm ( LPCTSTR* p_, INT* result, LPCTSTR ops, BOOL (*subTerm)(LPCTSTR*,
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_addTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_addTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
return seta_ltorTerm ( p_, result, _T("*/%"), seta_mulTerm );
|
||||
}
|
||||
|
||||
static BOOL
|
||||
seta_logShiftTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_logShiftTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
return seta_ltorTerm ( p_, result, _T("+-"), seta_addTerm );
|
||||
}
|
||||
|
||||
static BOOL
|
||||
seta_bitAndTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_bitAndTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
LPCTSTR p = *p_;
|
||||
INT lval;
|
||||
|
@ -421,25 +421,25 @@ seta_bitAndTerm ( LPCTSTR* p_, INT* result )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_bitExclOrTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_bitExclOrTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
return seta_ltorTerm ( p_, result, _T("&"), seta_bitAndTerm );
|
||||
}
|
||||
|
||||
static BOOL
|
||||
seta_bitOrTerm ( LPCTSTR* p_, INT* result )
|
||||
seta_bitOrTerm(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
return seta_ltorTerm ( p_, result, _T("^"), seta_bitExclOrTerm );
|
||||
}
|
||||
|
||||
static BOOL
|
||||
seta_expr ( LPCTSTR* p_, INT* result )
|
||||
seta_expr(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
return seta_ltorTerm ( p_, result, _T("|"), seta_bitOrTerm );
|
||||
}
|
||||
|
||||
static BOOL
|
||||
seta_assignment ( LPCTSTR* p_, INT* result )
|
||||
seta_assignment(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
LPCTSTR p = *p_;
|
||||
LPTSTR ident;
|
||||
|
@ -503,7 +503,7 @@ seta_assignment ( LPCTSTR* p_, INT* result )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_stmt ( LPCTSTR* p_, INT* result )
|
||||
seta_stmt(LPCTSTR* p_, INT* result)
|
||||
{
|
||||
LPCTSTR p = *p_;
|
||||
INT rval;
|
||||
|
@ -524,7 +524,7 @@ seta_stmt ( LPCTSTR* p_, INT* result )
|
|||
}
|
||||
|
||||
static BOOL
|
||||
seta_eval ( LPCTSTR p )
|
||||
seta_eval(LPCTSTR p)
|
||||
{
|
||||
INT rval;
|
||||
if ( !*p )
|
||||
|
|
|
@ -9,7 +9,8 @@
|
|||
|
||||
#include "precomp.h"
|
||||
|
||||
typedef struct _SETLOCAL {
|
||||
typedef struct _SETLOCAL
|
||||
{
|
||||
struct _SETLOCAL *Prev;
|
||||
BOOL DelayedExpansion;
|
||||
LPTSTR Environment;
|
||||
|
@ -21,13 +22,15 @@ DuplicateEnvironment(VOID)
|
|||
{
|
||||
LPTSTR Environ = GetEnvironmentStrings();
|
||||
LPTSTR End, EnvironCopy;
|
||||
if (!Environ)
|
||||
return NULL;
|
||||
for (End = Environ; *End; End += _tcslen(End) + 1)
|
||||
;
|
||||
|
||||
if (!Environ) return NULL;
|
||||
|
||||
for (End = Environ; *End; End += _tcslen(End) + 1) ;
|
||||
EnvironCopy = cmd_alloc((End + 1 - Environ) * sizeof(TCHAR));
|
||||
|
||||
if (EnvironCopy)
|
||||
memcpy(EnvironCopy, Environ, (End + 1 - Environ) * sizeof(TCHAR));
|
||||
|
||||
FreeEnvironmentStrings(Environ);
|
||||
return EnvironCopy;
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
* 20-Jan-1999 (Eric Kohl)
|
||||
* Unicode and redirection safe!
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
* 24-Jul-1999 (Eric Kohl)
|
||||
* Started.
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -313,7 +313,6 @@ INT cmd_start (LPTSTR Rest)
|
|||
_T("Error executing CreateProcess()!!\n"));
|
||||
}
|
||||
|
||||
|
||||
cmd_free(comspec);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
* 07-Oct-1999 (Paolo Pantaleo)
|
||||
* Started.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
* 04-Feb-1999 (Eric Kohl)
|
||||
* Fixed time input bug.
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc.
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc.
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -99,10 +99,10 @@ static BOOL ParseTime (LPTSTR s)
|
|||
{
|
||||
while (_istdigit(*p))
|
||||
{
|
||||
// t.wMilliseconds = t.wMilliseconds * 10 + *p - _T('0');
|
||||
// t.wMilliseconds = t.wMilliseconds * 10 + *p - _T('0');
|
||||
p++;
|
||||
}
|
||||
// t.wMilliseconds *= 10;
|
||||
// t.wMilliseconds *= 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* History:
|
||||
* 1999-02-11 Emanuele Aliberti
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
@ -16,7 +16,6 @@
|
|||
|
||||
INT cmd_title (LPTSTR param)
|
||||
{
|
||||
|
||||
/* Do nothing if no args */
|
||||
if (*param == _T('\0'))
|
||||
return 0;
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
* 19-Jan-1999 (Paolo Pantaleo <paolopan@freemail.it>)
|
||||
* Added multiple file support (copied from y.c)
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
|
|
@ -54,8 +54,6 @@ VOID ShortVersion (VOID)
|
|||
|
||||
/*
|
||||
* display shell version info internal command.
|
||||
*
|
||||
*
|
||||
*/
|
||||
INT cmd_ver (LPTSTR param)
|
||||
{
|
||||
|
@ -74,7 +72,6 @@ INT cmd_ver (LPTSTR param)
|
|||
/* Basic copyright notice */
|
||||
if (param[0] != _T('\0'))
|
||||
{
|
||||
|
||||
ConOutPuts (_T("Copyright (C) 1994-1998 Tim Norman and others."));
|
||||
ConOutPuts (_T("Copyright (C) 1998-") _T(COPYRIGHT_YEAR) _T(" ReactOS Team"));
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* 20-Jan-1999 (Eric Kohl)
|
||||
* Unicode and redirection ready!
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
|
|
@ -32,7 +32,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
|||
DWORD dwSerialNr;
|
||||
|
||||
/* get the volume information of the drive */
|
||||
if(!GetVolumeInformation (pszRootPath,
|
||||
if(!GetVolumeInformation(pszRootPath,
|
||||
szVolName,
|
||||
80,
|
||||
&dwSerialNr,
|
||||
|
@ -41,7 +41,7 @@ PrintVolumeHeader (LPTSTR pszRootPath)
|
|||
NULL,
|
||||
0))
|
||||
{
|
||||
ErrorMessage (GetLastError (), _T(""));
|
||||
ErrorMessage(GetLastError (), _T(""));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ INT cmd_vol (LPTSTR param)
|
|||
TCHAR szRootPath[] = _T("A:\\");
|
||||
TCHAR szPath[MAX_PATH];
|
||||
|
||||
if (!_tcsncmp (param, _T("/?"), 2))
|
||||
if (!_tcsncmp(param, _T("/?"), 2))
|
||||
{
|
||||
ConOutResPaging(TRUE,STRING_VOL_HELP4);
|
||||
return 0;
|
||||
|
@ -76,14 +76,16 @@ INT cmd_vol (LPTSTR param)
|
|||
|
||||
if (param[0] == _T('\0'))
|
||||
{
|
||||
GetCurrentDirectory (MAX_PATH, szPath);
|
||||
GetCurrentDirectory(MAX_PATH, szPath);
|
||||
szRootPath[0] = szPath[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
_tcsupr (param);
|
||||
if (param[1] == _T(':'))
|
||||
{
|
||||
szRootPath[0] = param[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
error_invalid_drive ();
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
* Some minor changes and improvements.
|
||||
*
|
||||
* 10-Jul-2004 (Jens Collin <jens.collin@lakhei.com>)
|
||||
* Fixed searxhing for files with specific extensions in PATHEXT order..
|
||||
* Fixed searching for files with specific extensions in PATHEXT order.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -10,14 +10,14 @@
|
|||
* activate and window in a single file using mainly the same code
|
||||
* (nice size optimization :)
|
||||
*
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>)
|
||||
* Remove all hardcode string to En.rc
|
||||
* 30-Apr-2005 (Magnus Olsen) <magnus@greatlord.com>
|
||||
* Remove all hardcoded strings in En.rc
|
||||
*/
|
||||
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#if ( defined(INCLUDE_CMD_WINDOW) || defined(INCLUDE_CMD_ACTIVATE) )
|
||||
#if defined(INCLUDE_CMD_WINDOW) || defined(INCLUDE_CMD_ACTIVATE)
|
||||
|
||||
|
||||
#define A_MIN 0x01
|
||||
|
@ -28,13 +28,12 @@
|
|||
#define A_CLOSE 0x20
|
||||
|
||||
|
||||
/*service funciton to perform actions on windows
|
||||
|
||||
param is a string to parse for options/actions
|
||||
hWnd is the handle of window on wich perform actions
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* service function to perform actions on windows
|
||||
*
|
||||
* param is a string to parse for options/actions
|
||||
* hWnd is the handle of window on which to perform actions
|
||||
*/
|
||||
static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
||||
{
|
||||
LPTSTR *p = 0, p_tmp;
|
||||
|
@ -45,7 +44,6 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
|||
RECT pos;
|
||||
LPTSTR tmp;
|
||||
|
||||
|
||||
if (*param)
|
||||
p = split(param, &argc, FALSE);
|
||||
|
||||
|
@ -151,7 +149,7 @@ static INT ServiceActivate (LPTSTR param, HWND hWnd)
|
|||
if (iAction & A_MAX)
|
||||
wp.showCmd = SW_SHOWMAXIMIZED;
|
||||
|
||||
/*if no actions are specified default is SW_RESTORE*/
|
||||
/* if no actions are specified default is SW_RESTORE */
|
||||
if ((iAction & A_RESTORE) || (!iAction))
|
||||
wp.showCmd = SW_RESTORE;
|
||||
|
||||
|
@ -203,7 +201,7 @@ INT CommandActivate (LPTSTR param)
|
|||
if(!(*param))
|
||||
return 1;
|
||||
|
||||
/*Split the user input into array*/
|
||||
/* Split the user input into array */
|
||||
arg = split (param, &argc, FALSE);
|
||||
if(argc < 2)
|
||||
{
|
||||
|
@ -224,4 +222,4 @@ INT CommandActivate (LPTSTR param)
|
|||
return ServiceActivate(param, hwnd);
|
||||
}
|
||||
|
||||
#endif /* ( defined(INCLUDE_CMD_WINDOW) || defined(INCLUDE_CMD_ACTIVATE) ) */
|
||||
#endif /* defined(INCLUDE_CMD_WINDOW) || defined(INCLUDE_CMD_ACTIVATE) */
|
||||
|
|
Loading…
Reference in a new issue