Mail Archives: djgpp/1995/11/14/09:24:43
I ran this program:-
#include<stdio.h>
main(int nargs,char**Arg){int i; printf("There are %d args\n",nargs);
for(i=0;i<nargs;i++) printf("arg[%1d] = `%s'\n",i,Arg[i]);}
thus:- (NB: Where I have `\252' below, the actual input and output had the
\252 character, i.e. the `logical not' character (170, 0xaa), but my emailer
(Pegasus) always alters or removes characters > 127 in messages that I send)
C:\WORK>t$ The patrol-mini-sub scooped up the scubadivers
There are 7 args
arg[0] = `c:/work/t$.exe'
arg[1] = `The'
arg[2] = `patrol-mini-sub'
arg[3] = `scooped'
arg[4] = `up'
arg[5] = `the'
arg[6] = `scubadivers' /* All args were sent to the program OK */
C:\WORK>t$ cat\252and\252mouse\252games /* with chars > 127 in */
There are 2 args
arg[0] = `c:/work/t$.exe'
arg[1] = `cat' /* and the args were truncated at the 0xaa character */
C:\WORK>\am\readscr
This is a nuisance. Will it still happen with version 2?
- Raw text -