rs runs under SYSV
Stan Barber
sob at neuro1.UUCP
Sat Sep 21 09:04:49 AEST 1985
There was a program submitted by novavax!don sometime back to
add a reminder system for users. It was made on 4.2, but can be
made to work easily under SYSV. I also altered it to allow
the user to set his/her preferred editor in the environment and
rs will now use it instead of vi if it is defined.
Here are the diffs.
1c1
< static char rcsid[] = "$Header: rs.c,v 2.2 85/02/25 10:35:48 don Exp $";
---
> static char rcsid[] = "$Header: rs.c,v 2.3 85/09/20 17:49:35 sob Exp $";
4,5c4,10
< * Revision 2.2 85/02/25 10:35:48 don
< * Added to RCS
---
> * Revision 2.3 85/09/20 17:49:35 sob
> * Altered the VI define to EDITOR.
> * Altered VI section to look for EDITOR environment variable to
> * use instead of vi.
> * Added a SYSV define and modifications for use in SYSV OS.
> * Stan Barber, Baylor College of Medicine ihnp4!shell!neuro1!sob
> * sob at rice.edu
43a49
> #ifndef SYSV
44a51
> #endif
52a60,65
> #ifdef SYSV
> #define LPR "/usr/bin/lpr"
> #define EDITOR "/usr/bin/ved"
> #define index strchr
> #define rindex strrchr
> #else
54c67,68
< #define VI "/usr/ucb/vi" /* location of vi */
---
> #define EDITOR "/usr/ucb/vi" /* location of vi */
> #endif
68c82,83
< *mktemp();
---
> *mktemp(),
> *editor;
69a85
>
110c126
< s7htch(*&tn) {
---
> switch(*fun) {
131d146
<
178c193,195
< sprintf(cmd, "%s %s",VI,fname);
---
> if ((editor = getenv("EDITOR")) == NULL)
> strcpy(editor,EDITOR);
> sprintf(cmd, "%s %s",editor,fname);
--
Stan uucp:{ihnp4!shell,rice}!neuro1!sob Opinions expressed
Olan ARPA:sob at rice.arpa here are ONLY mine &
Barber CIS:71565,623 BBS:(713)660-9262 noone else's.
More information about the Comp.sources.unix
mailing list