- **** Please report bugs to ekohl@abo.rhein-zeitung.de! ****
+ **** Please report bugs to ekohl@rz-online.de! ****
-Known bugs in CMD version 0.0.4
+Known bugs in CMD version 0.1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
o let set work with or without the '=' sign. People like it that way.
o "alias v = dir" doesn't work because of the spaces.
- **** Please report bugs to ekohl@abo.rhein-zeitung.de! ****
+ **** Please report bugs to ekohl@rz-online.de! ****
-/* $Id: cmd.c,v 1.19 2000/02/18 00:53:11 ekohl Exp $
+/* $Id: cmd.c,v 1.20 2000/04/08 14:50:47 ekohl Exp $
*
* CMD.C - command-line interface.
*
#include "batch.h"
-#define CMDLINE_LENGTH 1024
+#define CMDLINE_LENGTH 2048 //1024
BOOL bExit = FALSE; /* indicates EXIT was typed */
/* Define to enable debugging code */
-/* #define _DEBUG */
+//#define _DEBUG
/* Define to enable the alias command, and aliases.*/
-/* $Id: copy.c,v 1.6 1999/12/24 17:20:54 ekohl Exp $
+/* $Id: copy.c,v 1.7 2000/04/08 14:50:47 ekohl Exp $
*
* COPY.C -- copy internal command.
*
}
-int setup_copy (LPFILES sources, char **p, BOOL bMultiple,
- char *drive_d, char *dir_d, char *file_d,
- char *ext_d, int *append, LPDWORD lpdwFlags)
+static INT
+SetupCopy (LPFILES sources, char **p, BOOL bMultiple,
+ char *drive_d, char *dir_d, char *file_d,
+ char *ext_d, int *append, LPDWORD lpdwFlags)
{
WIN32_FIND_DATA find;
BOOL bDone;
HANDLE hFind;
+#ifdef _DEBUG
+ DebugPrintf (_T("SetupCopy\n"));
+#endif
+
real_source = (LPTSTR)malloc (MAX_PATH);
real_dest = (LPTSTR)malloc (MAX_PATH);
if (hFind == INVALID_HANDLE_VALUE)
{
error_file_not_found();
- DeleteFileList (sources);
freep(p);
free(real_source);
free(real_dest);
if (bDestFound && !bWildcards)
{
- copied = setup_copy (sources, p, bMultiple, drive_d, dir_d, file_d, ext_d, &append, &dwFlags);
+ copied = SetupCopy (sources, p, bMultiple, drive_d, dir_d, file_d, ext_d, &append, &dwFlags);
}
else if (bDestFound && bWildcards)
{
file_d[0] = _T('\0');
ext_d[0] = _T('\0');
}
- copied = setup_copy (sources, p, FALSE, "", "", file_d, ext_d, &append, &dwFlags);
+ copied = SetupCopy (sources, p, FALSE, "", "", file_d, ext_d, &append, &dwFlags);
}
else
{
ConOutPuts (sources->szFile);
append = 1;
- copied = setup_copy (sources->next, p, bMultiple, drive_d, dir_d, file_d, ext_d, &append, &dwFlags) + 1;
+ copied = SetupCopy (sources->next, p, bMultiple, drive_d, dir_d, file_d, ext_d, &append, &dwFlags) + 1;
}
DeleteFileList (sources);
o Fixed bugs in MD and RD that crashed cmd when no directory was specified.
o Improved history support.
o Improved COLOR command.
+
+09-Apr-2000 ReactOS CMD version 0.1 (EricKohl <ekohl@rz-online.de>
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+o Fixed bug in COPY command. CMD crashed if source file didn't exist.
VOID ShortVersion (VOID)
{
ConOutPuts (_T("\n"
- SHELLINFO "\n"
- SHELLVER "\n"));
+ SHELLINFO "\n"
+ SHELLVER "\n"));
}
}
ConOutPuts (_T("\n"
- SHELLINFO "\n"
- SHELLVER "\n"
- "\n"
- "Copyright (C) 1994-1998 Tim Norman and others."));
- ConOutPuts (_T("Copyright (C) 1998,1999 Eric Kohl and others."));
+ SHELLINFO "\n"
+ SHELLVER "\n"
+ "\n"
+ "Copyright (C) 1994-1998 Tim Norman and others."));
+ ConOutPuts (_T("Copyright (C) 1998-2000 Eric Kohl and others."));
/* Basic copyright notice */
if (param[0] == _T('\0'))
{
ConOutPuts (_T("\n"SHELLINFO
- " comes with ABSOLUTELY NO WARRANTY; for details\n"
- "type: `ver /w'. This is free software, and you are welcome to redistribute\n"
- "it under certain conditions; type `ver /r' for details. Type `ver /c' for a\n"
- "listing of credits."));
+ " comes with ABSOLUTELY NO WARRANTY; for details\n"
+ "type: `ver /w'. This is free software, and you are welcome to redistribute\n"
+ "it under certain conditions; type `ver /r' for details. Type `ver /c' for a\n"
+ "listing of credits."));
}
else
{
{
/* Warranty notice */
ConOutPuts (_T("\n This program is distributed in the hope that it will be useful,\n"
- " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
- " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
- " GNU General Public License for more details."));
+ " but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ " GNU General Public License for more details."));
}
else if (_totupper (param[i]) == _T('R'))
{
/* Redistribution notice */
ConOutPuts (_T("\n This program is free software; you can redistribute it and/or modify\n"
- " it under the terms of the GNU General Public License as published by\n"
- " the Free Software Foundation; either version 2 of the License, or\n"
- " (at your option) any later version."));
+ " it under the terms of the GNU General Public License as published by\n"
+ " the Free Software Foundation; either version 2 of the License, or\n"
+ " (at your option) any later version."));
}
else if (_totupper (param[i]) == _T('C'))
{
/* Developer listing */
ConOutPuts (_T("\n"
- "FreeDOS version written by:\n"
- " Tim Norman Matt Rains\n"
- " Evan Jeffrey Steffen Kaiser\n"
- " Svante Frey Oliver Mueller\n"
- " Aaron Kaufman Marc Desrochers\n"
- " Rob Lake John P Price\n"
- " Hans B Pufal\n"
- "\n"
- "ReactOS version written by:\n"
- " Eric Kohl Emanuele Aliberti\n"
- " Paolo Pantaleo\n"));
+ "FreeDOS version written by:\n"
+ " Tim Norman Matt Rains\n"
+ " Evan Jeffrey Steffen Kaiser\n"
+ " Svante Frey Oliver Mueller\n"
+ " Aaron Kaufman Marc Desrochers\n"
+ " Rob Lake John P Price\n"
+ " Hans B Pufal\n"
+ "\n"
+ "ReactOS version written by:\n"
+ " Eric Kohl Emanuele Aliberti\n"
+ " Paolo Pantaleo\n"));
}
else
{
}
}
- ConOutPuts (_T("\nSend bug reports to <ekohl@abo.rhein-zeitung.de>."
-/*
- "\nUpdates are available at http://www.reactos.com"
-*/
- ));
+ ConOutPuts (_T("\n"
+ "Send bug reports to <ekohl@rz-online.de>.\n"
+ "Updates are available at: http://www.reactos.com"));
return 0;
}