check for and write new lines as ascii only in copy /A, regardless of whether cmd was compiled as unicode or ansi
Modified: trunk/reactos/subsys/system/cmd/copy.c

Modified: trunk/reactos/subsys/system/cmd/copy.c
--- trunk/reactos/subsys/system/cmd/copy.c	2005-10-01 12:21:55 UTC (rev 18187)
+++ trunk/reactos/subsys/system/cmd/copy.c	2005-10-01 12:50:16 UTC (rev 18188)
@@ -240,7 +240,8 @@
 		{
 			for (i = 0; i < dwRead; i++)
 			{
-				if (((LPTSTR)buffer)[i] == 0x1A)
+				/* we're dealing with ASCII files! */
+				if (((LPSTR)buffer)[i] == 0x1A)
 				{
 					bEof = TRUE;
 					break;
@@ -273,12 +274,13 @@
  
 	if (lpdwFlags & COPY_ASCII)
 	{
-		((LPTSTR)buffer)[0] = 0x1A;
-		((LPTSTR)buffer)[1] = _T('\0');
+		/* we're dealing with ASCII files! */
+		((LPSTR)buffer)[0] = 0x1A;
+		((LPSTR)buffer)[1] = '\0';
 #ifdef _DEBUG
 		DebugPrintf (_T("appending ^Z\n"));
 #endif
-		WriteFile (hFileDest, buffer, sizeof(TCHAR), &dwWritten, NULL);
+		WriteFile (hFileDest, buffer, sizeof(CHAR), &dwWritten, NULL);
 	}
  
 	free (buffer);