2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
9 static char sccsid
[] = "$Id: v_util.c,v 8.5 1993/11/15 09:15:36 bostic Exp $ (Berkeley) $Date: 1993/11/15 09:15:36 $";
12 #include <sys/types.h>
24 * Vi end-of-file error.
35 msgq(sp
, M_BERR
, "Already at end-of-file.");
37 if (file_lline(sp
, ep
, &lno
))
40 msgq(sp
, M_BERR
, "Already at end-of-file.");
43 "Movement past the end-of-file.");
49 * Vi end-of-line error.
60 msgq(sp
, M_BERR
, "Already at end-of-line.");
62 if (file_gline(sp
, ep
, mp
->lno
, &len
) == NULL
) {
63 GETLINE_ERR(sp
, mp
->lno
);
66 if (mp
->cno
== len
- 1)
67 msgq(sp
, M_BERR
, "Already at end-of-line.");
69 msgq(sp
, M_BERR
, "Movement past the end-of-line.");
75 * Vi start-of-file error.
82 if (mp
== NULL
|| mp
->lno
== 1)
83 msgq(sp
, M_BERR
, "Already at the beginning of the file.");
85 msgq(sp
, M_BERR
, "Movement past the beginning of the file.");
90 * Return if the line contains nothing but white-space characters.