1 /*- 2 * Copyright (c) 1992 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rodney Ruddock of the University of Guelph. 7 * 8 * %sccs.include.redist.c% 9 */ 10 11 #ifndef lint 12 static char sccsid[] = "@(#)equal.c 5.2 (Berkeley) 01/23/93"; 13 #endif /* not lint */ 14 15 #include <sys/types.h> 16 17 #include <db.h> 18 #include <regex.h> 19 #include <setjmp.h> 20 #include <stdio.h> 21 22 #include "ed.h" 23 #include "extern.h" 24 25 /* 26 * Print out what the line number of the address given is; default to 27 * end-of-buffer ($). 28 */ 29 void 30 equal(inputt, errnum) 31 FILE *inputt; 32 int *errnum; 33 { 34 if (End_default) 35 start = bottom; 36 else 37 start = End; 38 start_default = End_default = 0; 39 40 if (rol(inputt, errnum)) 41 return; 42 43 (void)printf("%d\n", line_number(start)); 44 *errnum = 1; 45 } 46