[85] in Athena Bugs

home help back first fref pref prev next nref lref last post

more all versions

daemon@ATHENA.MIT.EDU (geer@ATHENA.MIT.EDU)
Sun Mar 27 02:01:35 1988

From: <geer@ATHENA.MIT.EDU>
Date: Sun, 27 Mar 88 02:00:53 EST
To: bugs@ATHENA.MIT.EDU
we should distinguish the envars EDITOR and VISUAL in <more>

--dan

/*
 *	$Source: /source/4.3/ucb/more/RCS/more.c,v $
 *	$Header: more.c,v 1.4 87/03/09 15:43:41 kaufer Locked $
 */

	........

**	modified by Jim Gettys, DEC Athena, to add EDITOR environment variable

	........

	case 'e':
	case 'v':	/* This case should go right before default */
	    if (!no_intty) {
                char *editor,*name;
                extern char *rindex(),*getenv();
		kill_line ();
		cmdbuf[0] = '+';
                scanstr (Currline, &cmdbuf[1]);
                if((editor = getenv("EDITOR")) == NULL) editor = def_editor;
                if((name = rindex(editor,'/')) == NULL) name = editor;
			else name++;
                pr (name); pr(" ");
                pr (cmdbuf); putchar (' '); pr (fnames[fnum]);
                execute (filename, editor, name, cmdbuf, fnames[fnum], 0);
		break;
	    }

home help back first fref pref prev next nref lref last post