2 * SHIFT.C - shift internal batch command
7 * 16 Jul 1998 (Hans B Pufal)
10 * 16 Jul 1998 (John P Price)
11 * Separated commands into individual files.
13 * 27-Jul-1998 (John P Price <linux-guru@gcfl.net>)
14 * added config.h include
16 * 07-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
17 * Added help text ("shift /?") and cleaned up.
19 * 20-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
20 * Unicode and redirection safe!
23 #define WIN32_LEAN_AND_MEAN
36 * Perform the SHIFT command.
38 * Only valid inside batch files.
40 * FREEDOS extension : optional parameter DOWN to allow shifting
41 * parameters backwards.
44 INT
cmd_shift (LPTSTR cmd
, LPTSTR param
)
47 DebugPrintf ("cmd_shift: (\'%s\', \'%s\'\n", cmd
, param
);
50 if (!_tcsncmp (param
, _T("/?"), 2))
52 ConOutPuts (_T("Changes the position of replaceable parameters in a batch file.\n\n"
59 /* not in batch - error!! */
63 if (!_tcsicmp (param
, _T("down")))