Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!samsung!cs.utexas.edu!asuvax!anasaz!rick From: rick@anasaz.UUCP (Rick Coupland) Newsgroups: comp.sys.amiga.tech Subject: Re: What should be in future SKsh versions? Message-ID: <1040@anasaz.UUCP> Date: 14 Dec 89 04:59:19 GMT References: <13920018@hpfelg.HP.COM> Reply-To: rick@anasaz.UUCP (Rick Coupland) Organization: Anasazi Inc, Phoenix AZ Lines: 61 In article kim@uts.amdahl.com (Kim DeVaughn) writes: >In article , bader+@andrew.cmu.edu (Miles Bader) writes: >> >> Why exactly do you need builtins at all, even on a floppy disk, given the >> existance of REZ? [Which has the large advantage of letting the USER decide >> which commands take up memory space...] > >I am all for leaving it up to the user to decide which commands, or specific >implementations thereof, to use. Absolutely. > >However, there is a fundemental problem that exists that builtin's allow you >to get around. That is the braindamaged limitation on the length of the >command line that AmigaDOS can handle. Something like 256 bytes. Ridiculous! > >Sure, that is long enough for most things, but it is a real pain to try and >deal with directories that may have, oh, say 1200 files in them (such as >root0:spool/news/comp/sys/amiga frequently has on my machine). I have also run into this problem and have come up with a solution. I use "make" (my own version) for maintaining libraries of my own routines. Over a period of time I have added more and more routines to the library and now have about 50 modules in the library. Everything appeared to be working fine untill I made a change to a header file which caused most of the source files to be recompiled. I then discovered that the last several files didn't get updated in the library. After some investigation I discovered that the reason for this was that the command line to "oml" (the Lattice library maintenance program) was getting truncated to about 256 bytes. My solution to this was to write my own routines to execute a program which did not limit the length of the command line. I then modified my make program to use these new routines. After doing this I discovered that the Lattice startup routines also place limits on command command line arguments (max of 32 arguments). So, I coded my own startup routines which also place no limits on the length or number of command line arguments. This of course did not directly solve the problem with "oml" since all of the Lattice utilities were linked with the Lattice startup routines. However, all of my own utilities, as well as public domain utilities which I build from the sources, do not have a maximum command line length and do not have a limit on the number of command line arguments. I was then able to solve the problem with "oml" by changint the Makefile to use my own "echo" command to create a temp file and then reference this file on the "oml" command line using the "@" construct. I realize that I could have solved my particular problem more simply by other means. For example I could have changed the Makefile to rebuild the entire library on every update and maintained a seperate file containing a list of all of the object file names. However, I felt that this was a more general problem and a general solution should be applied if possible. Otherwise, I would keep running into the same problem again and again. I would be willing to place this code in the public domain if it could be used to remove command line length limitations for Amiga utilities in general. I don't know whether or not the Manx startup routines have similar limitations to Lattice. Maybe someone else can answer this. However, it does no good to have shells which can generate long command lines if the programs being run by the shell cannot accept them. -- Rick Coupland ...!{noao!asuvax | mcdphx}!anasaz!rick (602) 870-3330