* Re: naming conventions
@ 1991-07-03 18:46 Arnold Robbins
0 siblings, 0 replies; 2+ messages in thread
From: Arnold Robbins @ 1991-07-03 18:46 UTC (permalink / raw)
To: rc
I'm quoting Byron w/o permission, since I thought the list might
be interested. I hope Byron won't mind...
> /usr/lib/rcmain is the file that td talks about, and I have REAL problems
> with it.
>
> BTW, td runs /usr/lib/rcmain on ALL invocations of rc, not just rc -l.
I agree that running it on all invocations is wrong.
> Have you seen what /usr/lib/rcmain does? It does the interpretation of all of
> rc's flags!! (-l, -c, and so on)
No, I haven't seen it; I don't remember it being in the v10 doc. I'd like
to see a copy. It's a pretty nifty idea putting that stuff outside the
shell itself. Makes it *very* easy to add a new option.
Doing -e, -x, & -v must be a neat trick.
> I don't believe in /etc/profile for sh either; it's just a way for fascist
> sysadmins
> to rule the lives of their users. I refuse to incorporate such an addition
> into rc.
Ah well, we agree to disagree. It's also a great way for a sysadmin to
make life easier for his or her novice users, but it's obviously religion so
I won't waste our time on it.
> As for dashdee, dashell, and so on, I think the meaning of the variable names is
> pretty clear. When in input.c I refer to the variable "dashex" I know that I'm
> talking about an option that was passed to rc at startup, and not just some random`
> boolean.
Okay, this is understandable. I just know that I personally hate looking
at code I've never seen before and it being necessary to have the man
page (if there is one) handy. I could argue that other naming conventions
would suffice, but won't push the issue.
Arnold
^ permalink raw reply [flat|nested] 2+ messages in thread
* naming conventions
@ 1991-07-03 17:54 Arnold Robbins
0 siblings, 0 replies; 2+ messages in thread
From: Arnold Robbins @ 1991-07-03 17:54 UTC (permalink / raw)
To: rc
Ugh, check out main.c. dashell, dashcee, give me a break. What's wrong
with isloginsh, inputisstr, and so on?
So that I'm doing something productive, here are two unrelated patches
to rc 1.1 beta. The first gives root the prompt ";; ", which would
be better than the traditional '#' for snarfing with a mouse. The second
runs /usr/lib/sysmain if -l is true, which if I remember right, is TD's
name for the system profile file.
Arnold
--------------------------------------
*** main.c.orig Wed Jul 3 13:33:55 1991
--- main.c Wed Jul 3 13:34:26 1991
***************
*** 68,74 ****
inithandler();
inithash();
initparse();
! assigndefault("prompt", "; ", "", REALLYNULL);
assigndefault("path", ".", "/bin", "/usr/bin", "/usr/ucb", REALLYNULL);
assigndefault("ifs", " ", "\t", "\n", REALLYNULL);
assigndefault("pid", sprint(pid, "%d", rc_pid = getpid()), REALLYNULL);
--- 68,77 ----
inithandler();
inithash();
initparse();
! if (geteuid() == 0)
! assigndefault("prompt", ";; ", "", REALLYNULL);
! else
! assigndefault("prompt", "; ", "", REALLYNULL);
assigndefault("path", ".", "/bin", "/usr/bin", "/usr/ucb", REALLYNULL);
assigndefault("ifs", " ", "\t", "\n", REALLYNULL);
assigndefault("pid", sprint(pid, "%d", rc_pid = getpid()), REALLYNULL);
*** input.c.orig Wed Jul 3 13:37:34 1991
--- input.c Wed Jul 3 13:39:14 1991
***************
*** 250,257 ****
if (dashell) {
char *fname[3];
- fname[1] = concat(varlookup("home"),word("/.rcrc",NULL))->w;
fname[2] = NULL;
rcrc = TRUE;
dashell = FALSE;
b_dot(fname);
--- 250,262 ----
if (dashell) {
char *fname[3];
fname[2] = NULL;
+ fname[1] = "/usr/lib/sysmain";
+ rcrc = TRUE;
+ dashell = FALSE;
+ b_dot(fname);
+
+ fname[1] = concat(varlookup("home"),word("/.rcrc",NULL))->w;
rcrc = TRUE;
dashell = FALSE;
b_dot(fname);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1991-07-03 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-07-03 18:46 naming conventions Arnold Robbins
-- strict thread matches above, loose matches on Subject: below --
1991-07-03 17:54 Arnold Robbins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).