1 /*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. 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 8.1 (Berkeley) 05/31/93"; 13 #endif /* not lint */ 14 15 #include <sys/types.h> 16 17 #include <regex.h> 18 #include <setjmp.h> 19 #include <stdio.h> 20 21 #ifdef DBI 22 #include <db.h> 23 #endif 24 25 #include "ed.h" 26 #include "extern.h" 27 28 /* 29 * Print out what the line number of the address given is; default to 30 * end-of-buffer ($). 31 */ 32 void 33 equal(inputt, errnum) 34 FILE *inputt; 35 int *errnum; 36 { 37 if (End_default) 38 Start = bottom; 39 else 40 Start = End; 41 Start_default = End_default = 0; 42 43 if (rol(inputt, errnum)) 44 return; 45 46 (void)printf("%d\n", line_number(Start)); 47 *errnum = 1; 48 } 49