HP3000-L Archives

May 1997, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bruce Toback <[log in to unmask]>
Reply To:
Bruce Toback <[log in to unmask]>
Date:
Mon, 12 May 1997 11:08:08 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
Gavin writes:

>Jeff writes:
>> shell/iX> wc -l /DEV/SOURCE/* | tail -1
>> wc: cannot execute: Arg list too long
>
>Unix sucks.

No, Unix is fine. Programmers who don't check boundary conditions suck.

This is one instance where MPE, more or less by accident, comes out way
ahead of Unix. Since the MPE CI doesn't think its job includes expanding
file lists, and since lots of C programs are written expecting file lists
in command lines to be expanded, the good folks who wrote the MPE C
run-time library implemented a solution. If you link your MPE C program
with LIBCWC.LIB.SYS before whatever other libraries you normally use, the
wildcard expansion is done by the library so the command line length
limitation isn't an issue when an expanded file list includes hundreds or
thousands of files.

At least on Unix, there _is_ a standard way to get a list of files for a
program to operate on. On MPE, every program that needs to operate on
multiple files has to implement this logic itself. It would have been
nice if HP had provided a nonprivileged interface to the directory scan
routines back in 1973.

-- Bruce


--------------------------------------------------------------------------
Bruce Toback    Tel: (602) 996-8601| My candle burns at both ends;
OPT, Inc.            (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142      | But ah, my foes, and oh, my friends -
Phoenix AZ 85028                   | It gives a lovely light.
[log in to unmask]                   |     -- Edna St. Vincent Millay

ATOM RSS1 RSS2