Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!ogicse!schaefer From: schaefer@ogicse.ogi.edu (Barton E. Schaefer) Newsgroups: comp.mail.mush Subject: Re: Maximum size (length) of an alias Message-ID: <11854@ogicse.ogi.edu> Date: 31 Aug 90 21:19:56 GMT References: <5761@rtech.Ingres.COM> Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR Lines: 49 In article <5761@rtech.Ingres.COM> sergio@squid.Ingres.COM (Sergio Aponte) writes: } In my .mushrc, I put } } alias aname This is it } } Is there a max len to this? After a few lines it complained of an } unmatched "<", and mush started behaving strange... The longest line (or series of lines continued by using backslash-newline) that mush can read from an init file is BUFSIZ characters, whatever that happens to be defined as on your system. The absolute limit on the number of characters in an alias expansion is HDRSIZ, which is a mush constant and is guaranteed to be >= BUFSIZ (unless your mush installer made a booboo). A common BUFSIZ is 1024, but longer and shorter values are sometimes used. The reason that mush "started behaving strange" is that it began attempting to execute the trailing part(s) of the line, beyond BUFSIZ, as commands. } Why can't I separate this into several lines ? You can, by placing a backslash before each newline, but the limit still applies. Continuation lines are provided mainly for human aesthetics. The only good way to accomplish this is to use something like alias aname aname1 aname2 aname3 alias aname1 alias aname2 alias aname3 where each "hunk" of names is less than (BUFSIZ-strlen("alias aname3 ")) characters in length. This will still break at alias expansion time if your installer has not provided a sufficiently large HDRSIZ to include all the names. For any installers out there listening, I recommend using (10*BUFSIZ) for the HDRSIZ value unless your memory or stack space is very limited. This has been large enough for a fairly extensive mailing list maintained here at OGI by one of the other students. } Somebody asked me about "VMS" style. In VMS, you can put a list of } addresses in a file, and have an alias point to the file. Can that } be done in mush? No. -- Bart Schaefer schaefer@cse.ogi.edu