Xref: news-dnh.mv.net comp.os.msdos.djgpp:986 Newsgroups: comp.os.msdos.djgpp Path: news-dnh.mv.net!mv!news.sprintlink.net!EU.net!sun4nl!ichfsnl!joep From: joep AT ich DOT nl (Joep Jansen) Subject: Passing long command lines to MKS programs Organization: IC/h - Frog Systems Date: Wed, 19 Jul 1995 10:36:10 GMT Lines: 48 To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp As mentioned in the FAQ, there are currently 3 ways to pass long (more than 127 chars) command lines from DJGPP programs (such as make, gcc) to other programs: * the !proxy method, which is only suitable for calling another DJGPP program * the GNUish MSDOS method of passing arguments through environment variables * the response file method: passing arguments in @file The MKS toolkit (a Korn shell + lots of Unix like utilities) can pass arguments to the environment in a way similar to, but different from the GNUish MSDOS method. Basically, the arguments are put at the start of the environment, prepended with a ~ char. For instance, the command line: foo *.c "hello there" would be passed through the environment as follows: ~foo ~file1.c ~file2.c ~hello there COMSPEC=c:/dos/command.com PATH=;/bin;/usr/bin In addition, the abbreviated command line is still passed. I am trying to make the toolkit work with DJGPP make. Unfortunately, although I managed to get the parameters in the environment in this way, it is not recognized by MKS programs. The documentation mentions something about delimiting the command line with \r\n. So I have 2 questions: 1. did anyone else manage to pass long command lines to MKS programs? 2. How can I get at the command line which is passed to a (non-DJGPP) program? I am using djgpp 1.12, make 3.71, gcc263. Any help would be appreciated! -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Joep Jansen | Internet: joep AT ich DOT nl IC/h - FROG Systems | Voice: +31 30 882887 Winthontlaan 4 Utrecht | Fax: +31 30 882 877 Netherlands | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Never trust a computer bigger than you can lift."