1 /*************************************************************************
2  *  TinyFugue - programmable mud client
3  *  Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys
4  *
5  *  TinyFugue (aka "tf") is protected under the terms of the GNU
6  *  General Public License.  See the file "COPYING" for details.
7  ************************************************************************/
8 /* $Id: history.h,v 35004.30 2007/01/13 23:12:39 kkeys Exp $ */
9 
10 #ifndef HISTORY_H
11 #define HISTORY_H
12 
13 # if !NO_HISTORY
14 
15 extern void   init_histories(void);
16 extern struct History *init_history(struct History *hist, int maxsize);
17 extern void   free_history(struct History *hist);
18 extern void   recordline(struct History *hist, conString *line);
19 extern void   record_input(const conString *line);
20 extern String*recall_input(int n, int mode);
21 extern int    is_watchdog(struct History *hist, String *line);
22 extern int    is_watchname(struct History *hist, String *line);
23 extern String*history_sub(String *line);
24 extern void   sync_input_hist(void);
25 extern int    do_recall(String *args, int offset);
26 extern long   hist_getsize(const struct History *w);
27 
28 #if USE_DMALLOC
29 extern void   free_histories(void);
30 #endif
31 
32 #define record_global(line)  recordline(globalhist, (line))
33 #define record_local(line)   recordline(localhist, (line))
34 
35 extern struct History * const globalhist, * const localhist;
36 extern int log_count, norecord, nolog;
37 
38 # else /* NO_HISTORY */
39 
40 #define init_histories()               /* do nothing */
41 #define free_history(hist)             /* do nothing */
42 #define recordline(hist, line)         /* do nothing */
43 #define record_global(line)            /* do nothing */
44 #define record_local(line)             /* do nothing */
45 #define record_input(line, tv)         /* do nothing */
46 #define recall_history(args, file)     (eprintf("history disabled"), 0)
47 #define recall_input(n, mode)          (eprintf("history disabled"), 0)
48 #define check_watch(hist, line)        /* do nothing */
49 #define history_sub(pattern)           (0)
50 #define is_watchdog(hist, line)        (0)
51 #define is_watchname(hist, line)       (0)
52 
53 #define log_count                      (0)
54 static int norecord = 0, nolog = 0;
55 
56 # endif /* NO_HISTORY */
57 
58 #endif /* HISTORY_H */
59