sl/roken and parsing ramblings

Assar Westerlund assar at sics.se
Wed Jun 24 05:44:17 CEST 1998


John Hawkinson <jhawk at MIT.EDU> writes:
> What does sl stand for?

The short answer is that you should ask Mark.

The long answer is that it used to be this old library part of MIT
krb4 that was called `ss' (that I believe is short for subsystem, and
that was part of some unknown operating system a long time ago.
(Again, ask Mark.)), for reading and handling command line loops and
parsing.  That wasn't IMHO optimal so we wrote a new library which we
called `sl'.  The reason for SL is that the local transport authority
in Stockholm used to be called SS (Stockholms Spårvägar) but due to
the bad PR this abbreviation got under the second world war, they
renamed themselves to SL (Stor-stockholms Lokaltrafik).

> There's an inconsistency in the way sl_command() handles return
> values versus the way fs (et al) do so.

Yes, that's broken.

> It also coredumps on some architectures:
> 
> > (setenv SLMANDOC 1; ./vos help)
> .\" Things to fix:
> .\"   * correct section, and operating system
> .\"   * remove Op from mandatory flags
> .\"   * use better macros for arguments (like .Pa for files)
> .\"
> .Dd Jun 21, 1998
> Segmentation fault (core dumped)
>
> because __progname isn't initialized:
> 
>     p = strrchr(__progname, '/');
> 
> Of course, under Solaris, it will work with:
> 
> > ( setenv LD_PRELOAD 0 at 0.so.1 ; setenv SLMANDOC 1 ; ./vos help )
> 
> but you didn't want to know that, I think :-)

__progname should be initialized by calling set_progname() in main().

> I'm unhappy with the choice of __progname, since __ is reserved for
> the operating system's private stuff, and we shouldn't be poking at it.
> It looks like the sl/roken stuff comes from kth-krb (if not other places),
> so maybe it's hard to change and there's a lot of version skew?

__progname is the named used on 4.4BSD and that's why we want to try
to use the same name.  There's a configure test for it in krb4 that
I'll steal and put in arla.

> I'm unsure it's so wise to use -mandoc macros over -man macros, but
> perhaps that's because I haven't gotten around to installing
> much on this system at the moment, so I'm biased.

mandoc is structure-oriented as opposed to formatting-oriented.  If
you preformat man-pages beforing making a release they'll work
everywhere.

/assar





More information about the Arla-drinkers mailing list