sun-3 dbx, arguments, hacking, help...

Barry Shein bzs at bu-cs.BU.EDU
Tue Apr 26 09:39:11 AEST 1988



This "magic function that returns the number of args" started a long
time ago with the unix function nargs() which did the same basic
thing. You will now, undoubtedly, get all sorts of sneers from people
who like playing armchair quarterback about how you shouldn't do that
(even tho you explained that you inherited it!)

One idea that comes to mind is to use /usr/5bin/m4 on the Sun (the
other BSD/Pre-SysV m4 won't do this) to massage the calls into a
format where the first arg will be the number of arguments, then you
can work that one function to use varargs.h :

define(do_something,Do_something(`$#',$*))

(the quotes are necessary) with a little cleverness you could
batch-run that once on all your files. I ain't sayin it's a sure fix,
but it might get you thinking about solving that once and for all.

	-Barry Shein, Boston University



More information about the Comp.unix.wizards mailing list