From dc0cc78e6803a537c549bf27e4bf3f1047b27bc8 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Sat, 23 Jan 1993 19:13:06 -0800 Subject: [PATCH] date and time created 93/01/23 11:13:06 by bostic SCCS-vsn: contrib/ed/equal.c 5.1 --- usr/src/contrib/ed/equal.c | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 usr/src/contrib/ed/equal.c diff --git a/usr/src/contrib/ed/equal.c b/usr/src/contrib/ed/equal.c new file mode 100644 index 0000000000..f1bde8a318 --- /dev/null +++ b/usr/src/contrib/ed/equal.c @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 1992 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% + */ + +#ifndef lint +static char sccsid[] = "@(#)equal.c 5.1 (Berkeley) %G%"; +#endif /* not lint */ + +#include "ed.h" + +/* + * Print out what the line number of the address given is; default to + * end-of-buffer ($). + */ + +void +equal(inputt, errnum) + +FILE *inputt; +int *errnum; + +{ + if (End_default) + start = bottom; + else + start = End; + start_default = End_default = 0; + + if (rol(inputt, errnum)) + return; + + printf("%d\n", line_number(start)); + *errnum = 1; +} /* end-equal */ -- 2.20.1