Mail Archives: djgpp/2000/11/17/16:30:28.1
comp.os.msdos.djgpp:
Thank you all for your replies. :-)
>> d. Will it allow long command lines?
>
> Yes.
I think the answer is:
1. "Yes" for DJGPP-compiled programs running in DJGPP Bash.
2. "No" for Windows console applications running in DJGPP Bash.
3. "No" for DJGPP applications running in a DOS box.
See the end of this posting for how I arrived at the above conclusions.
Unfortunately, the client needs #2. :-(
>> Windows doesn't seem to be able to copy the CD (chokes on filenames
>> that differ only by case)
>
> ???? What file names are those, and how did you try to copy the CD
> contents? Also, what error messages, exactly, did you see?
Trying "xcopy" in a DOS box:
D:\>xcopy *.* c:\fsf\cd1\. /e /f
...
D:\gnu\gcc-2721\_GDBINIT -> c:\fsf\cd1\gnu\gcc-2721\_GDBINIT
D:\gnu\gcc-2721\_GDBINIT.000 -> c:\fsf\cd1\gnu\gcc-2721\_GDBINIT.000
Overwrite c:\fsf\cd1\gnu\gcc-2721\_gdbinit (Yes/No/All)?
Trying Windows Explorer (create directory c:\fsf\cd1, highlight and copy
contents of CD root, paste into C:\fsf\cd1):
Copying...
corefile.c
From 'ppc' to 'ppc'
Error Copying File
Cannot copy corefile: The file exists.
David Christensen
dchrist AT dnai DOT com
To test command line length issues, I wrote the following program:
C:\DChristensen\code\bc5>type args.c
#include "stdio.h"
#include "string.h"
int main(int argc, char* argv[])
{
int i, l, sum = 0;
printf("argc = %d\n", argc);
for (i = 0; i < argc; i++) {
l = strlen(argv[i]);
printf("argv[%d] = \"%s\" (length=%d)\n",
i, argv[i], l);
sum += l;
}
printf("total length args 1 through %d = %d\n", argc, sum);
return 0;
}
Then compiled it in a DOS box using Borland C++ 5.01 (edited to 72
columns):
C:\DChristensen\code\bc5>bcc args.c
Borland C++ 5.0 Copyright (c) 1987, 1996 Borland International
args.c:
Turbo Link Version 7.1.32.2. Copyright (c) 1987, 1996 Borland Inter
national
Then ran "args.exe" from a DOS box (edited to 72 columns):
C:\DChristensen\code\bc5>args 1234567890 1234567890 1234567890 12345
67890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567
890 1234567890 1
argc = 13
argv[0] = "C:\DCHRIS~1\CODE\BC5\ARGS.EXE" (length=29)
argv[1] = "1234567890" (length=10)
argv[2] = "1234567890" (length=10)
argv[3] = "1234567890" (length=10)
argv[4] = "1234567890" (length=10)
argv[5] = "1234567890" (length=10)
argv[6] = "1234567890" (length=10)
argv[7] = "1234567890" (length=10)
argv[8] = "1234567890" (length=10)
argv[9] = "1234567890" (length=10)
argv[10] = "1234567890" (length=10)
argv[11] = "1234567890" (length=10)
argv[12] = "1" (length=1)
total arg lengths = 140
Then ran "args.exe" from a Bash box:
<0 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890
argc = 13
argv[0] = "C:\DCHRIS~1\CODE\BC5\ARGS.EXE" (length=29)
argv[1] = "1234567890" (length=10)
argv[2] = "1234567890" (length=10)
argv[3] = "1234567890" (length=10)
argv[4] = "1234567890" (length=10)
argv[5] = "1234567890" (length=10)
argv[6] = "1234567890" (length=10)
argv[7] = "1234567890" (length=10)
argv[8] = "1234567890" (length=10)
argv[9] = "1234567890" (length=10)
argv[10] = "1234567890" (length=10)
argv[11] = "1234567890" (length=10)
argv[12] = "1234" (length=4)
total arg lengths = 143
Then compiled it using DJGPP:
~/code/bc5$ gcc args.c
Then ran "a.out" from a Bash box:
<4567890 1234567890 1234567890 1234567890 1234567890
argc = 13
argv[0] = "c:/DChristensen/code/bc5/a.out" (length=30)
argv[1] = "1234567890" (length=10)
argv[2] = "1234567890" (length=10)
argv[3] = "1234567890" (length=10)
argv[4] = "1234567890" (length=10)
argv[5] = "1234567890" (length=10)
argv[6] = "1234567890" (length=10)
argv[7] = "1234567890" (length=10)
argv[8] = "1234567890" (length=10)
argv[9] = "1234567890" (length=10)
argv[10] = "1234567890" (length=10)
argv[11] = "1234567890" (length=10)
argv[12] = "1234567890" (length=10)
total length args 1 through 13 = 150
Then ran "a.exe" from a DOS box:
C:\DChristensen\code\bc5>a.exe 1234567890 1234567890 1234567890 1234
567890 1234567890 1234567890 1234567890 1234567890 1234567890 123456
7890 1234567890
argc = 12
argv[0] = "c:/dchris~1/code/bc5/a.exe" (length=26)
argv[1] = "1234567890" (length=10)
argv[2] = "1234567890" (length=10)
argv[3] = "1234567890" (length=10)
argv[4] = "1234567890" (length=10)
argv[5] = "1234567890" (length=10)
argv[6] = "1234567890" (length=10)
argv[7] = "1234567890" (length=10)
argv[8] = "1234567890" (length=10)
argv[9] = "1234567890" (length=10)
argv[10] = "1234567890" (length=10)
argv[11] = "1234567890" (length=10)
total length args 1 through 12 = 136
Sent via Deja.com http://www.deja.com/
Before you buy.
- Raw text -