| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: history.c,v 1.40 2011/07/27 13:18:20 christos Exp $ */ | | 1 | /* $NetBSD: history.c,v 1.41 2011/07/28 00:43:33 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1992, 1993 | | 4 | * Copyright (c) 1992, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to Berkeley by | | 7 | * This code is derived from software contributed to Berkeley by |
8 | * Christos Zoulas of Cornell University. | | 8 | * Christos Zoulas of Cornell University. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -27,40 +27,40 @@ | | | @@ -27,40 +27,40 @@ |
27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 27 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 28 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
32 | * SUCH DAMAGE. | | 32 | * SUCH DAMAGE. |
33 | */ | | 33 | */ |
34 | | | 34 | |
35 | #include "config.h" | | 35 | #include "config.h" |
36 | #if !defined(lint) && !defined(SCCSID) | | 36 | #if !defined(lint) && !defined(SCCSID) |
37 | #if 0 | | 37 | #if 0 |
38 | static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93"; | | 38 | static char sccsid[] = "@(#)history.c 8.1 (Berkeley) 6/4/93"; |
39 | #else | | 39 | #else |
40 | __RCSID("$NetBSD: history.c,v 1.40 2011/07/27 13:18:20 christos Exp $"); | | 40 | __RCSID("$NetBSD: history.c,v 1.41 2011/07/28 00:43:33 christos Exp $"); |
41 | #endif | | 41 | #endif |
42 | #endif /* not lint && not SCCSID */ | | 42 | #endif /* not lint && not SCCSID */ |
43 | | | 43 | |
44 | /* | | 44 | /* |
45 | * hist.c: TYPE(History) access functions | | 45 | * hist.c: TYPE(History) access functions |
46 | */ | | 46 | */ |
47 | #include <string.h> | | 47 | #include <string.h> |
48 | #include <stdlib.h> | | 48 | #include <stdlib.h> |
49 | #include <stdarg.h> | | 49 | #include <stdarg.h> |
50 | #ifdef HAVE_VIS_H | | 50 | #ifdef HAVE_VIS_H |
51 | #include <vis.h> | | 51 | #include <vis.h> |
52 | #else | | 52 | #else |
53 | #include "np/vis.h" | | 53 | #include "vis.h" |
54 | #endif | | 54 | #endif |
55 | #include <sys/stat.h> | | 55 | #include <sys/stat.h> |
56 | | | 56 | |
57 | static const char hist_cookie[] = "_HiStOrY_V2_\n"; | | 57 | static const char hist_cookie[] = "_HiStOrY_V2_\n"; |
58 | | | 58 | |
59 | #include "histedit.h" | | 59 | #include "histedit.h" |
60 | #include "chartype.h" | | 60 | #include "chartype.h" |
61 | | | 61 | |
62 | typedef int (*history_gfun_t)(ptr_t, TYPE(HistEvent) *); | | 62 | typedef int (*history_gfun_t)(ptr_t, TYPE(HistEvent) *); |
63 | typedef int (*history_efun_t)(ptr_t, TYPE(HistEvent) *, const Char *); | | 63 | typedef int (*history_efun_t)(ptr_t, TYPE(HistEvent) *, const Char *); |
64 | typedef void (*history_vfun_t)(ptr_t, TYPE(HistEvent) *); | | 64 | typedef void (*history_vfun_t)(ptr_t, TYPE(HistEvent) *); |
65 | typedef int (*history_sfun_t)(ptr_t, TYPE(HistEvent) *, const int); | | 65 | typedef int (*history_sfun_t)(ptr_t, TYPE(HistEvent) *, const int); |
66 | | | 66 | |