* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
* This code is derived from software contributed to Berkeley by
* Rodney Ruddock of the University of Guelph.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)k.c 8.1 (Berkeley) %G%";
* This the mark command (k); see ed(1).
strcpy(help_msg
, "bad address");
Start_default
= End_default
= 0;
* The marks have to be "a" to "z" (inclusive); that is, ye olde
* portable character set (ASCII) lower case alphabet.
if ((l_mark
< 97) || (l_mark
> 122) || (End
== NULL
)) {
strcpy(help_msg
, "illegal mark character");
(mark_matrix
[l_mark
].address
) = End
;
* This gets the address of a marked line.
/* Ditto above comment. */
if ((l_mark
< 97) || (l_mark
> 122)) {
strcpy(help_msg
, "illegal mark character");
return (mark_matrix
[l_mark
].address
);
* This is for the restoration of marks during an undo.
for (l_cnt
= 0; l_cnt
< 26; l_cnt
++)
if (mark_matrix
[l_cnt
].address
== l_midd
) {
u_add_stk(&(mark_matrix
[l_cnt
].address
));
(mark_matrix
[l_cnt
].address
) = val
;