1b8ba871bSPeter Wemm /*- 2b8ba871bSPeter Wemm * Copyright (c) 1992, 1993, 1994 3b8ba871bSPeter Wemm * The Regents of the University of California. All rights reserved. 4b8ba871bSPeter Wemm * Copyright (c) 1992, 1993, 1994, 1995, 1996 5b8ba871bSPeter Wemm * Keith Bostic. All rights reserved. 6b8ba871bSPeter Wemm * 7b8ba871bSPeter Wemm * See the LICENSE file for redistribution information. 8b8ba871bSPeter Wemm */ 9b8ba871bSPeter Wemm 10b8ba871bSPeter Wemm #include "config.h" 11b8ba871bSPeter Wemm 12b8ba871bSPeter Wemm #ifndef lint 13b8ba871bSPeter Wemm static const char sccsid[] = "@(#)ex_mark.c 10.8 (Berkeley) 3/6/96"; 14b8ba871bSPeter Wemm #endif /* not lint */ 15b8ba871bSPeter Wemm 16b8ba871bSPeter Wemm #include <sys/types.h> 17b8ba871bSPeter Wemm #include <sys/queue.h> 18b8ba871bSPeter Wemm 19b8ba871bSPeter Wemm #include <bitstring.h> 20b8ba871bSPeter Wemm #include <limits.h> 21b8ba871bSPeter Wemm #include <stdio.h> 22b8ba871bSPeter Wemm 23b8ba871bSPeter Wemm #include "../common/common.h" 24b8ba871bSPeter Wemm 25b8ba871bSPeter Wemm /* 26b8ba871bSPeter Wemm * ex_mark -- :mark char 27b8ba871bSPeter Wemm * :k char 28b8ba871bSPeter Wemm * Mark lines. 29b8ba871bSPeter Wemm * 30b8ba871bSPeter Wemm * 31b8ba871bSPeter Wemm * PUBLIC: int ex_mark __P((SCR *, EXCMD *)); 32b8ba871bSPeter Wemm */ 33b8ba871bSPeter Wemm int 34b8ba871bSPeter Wemm ex_mark(sp, cmdp) 35b8ba871bSPeter Wemm SCR *sp; 36b8ba871bSPeter Wemm EXCMD *cmdp; 37b8ba871bSPeter Wemm { 38b8ba871bSPeter Wemm NEEDFILE(sp, cmdp); 39b8ba871bSPeter Wemm 40b8ba871bSPeter Wemm if (cmdp->argv[0]->len != 1) { 41b8ba871bSPeter Wemm msgq(sp, M_ERR, "136|Mark names must be a single character"); 42b8ba871bSPeter Wemm return (1); 43b8ba871bSPeter Wemm } 44b8ba871bSPeter Wemm return (mark_set(sp, cmdp->argv[0]->bp[0], &cmdp->addr1, 1)); 45b8ba871bSPeter Wemm } 46