STDIO fix
[unix-history] / usr / src / contrib / ed / equal.c
CommitLineData
dc0cc78e
KB
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
e692f66f 12static char sccsid[] = "@(#)equal.c 5.3 (Berkeley) %G%";
dc0cc78e
KB
13#endif /* not lint */
14
ecbf4ad0
KB
15#include <sys/types.h>
16
ecbf4ad0
KB
17#include <regex.h>
18#include <setjmp.h>
19#include <stdio.h>
20
e692f66f
KB
21#ifdef DBI
22#include <db.h>
23#endif
24
dc0cc78e 25#include "ed.h"
ecbf4ad0 26#include "extern.h"
dc0cc78e
KB
27
28/*
29 * Print out what the line number of the address given is; default to
30 * end-of-buffer ($).
31 */
dc0cc78e
KB
32void
33equal(inputt, errnum)
ecbf4ad0
KB
34 FILE *inputt;
35 int *errnum;
dc0cc78e 36{
ecbf4ad0
KB
37 if (End_default)
38 start = bottom;
39 else
40 start = End;
41 start_default = End_default = 0;
dc0cc78e 42
ecbf4ad0
KB
43 if (rol(inputt, errnum))
44 return;
dc0cc78e 45
ecbf4ad0
KB
46 (void)printf("%d\n", line_number(start));
47 *errnum = 1;
48}