No empty .Rs/.Re
[netbsd-mini2440.git] / usr.bin / mail / thread.h
blobe3bb0de50ace205537ab4f9bc5da7c6cabb25138
1 /* $NetBSD: thread.h,v 1.1 2006/11/28 18:45:32 christos Exp $ */
3 /*-
4 * Copyright (c) 2006 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Anon Ymous.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifdef THREAD_SUPPORT
34 #ifndef __THREAD_H__
35 #define __THREAD_H__
37 #if 0
38 #define NDEBUG /* disable the asserts */
39 #endif
42 * The core message control routines. Without thread support, they
43 * live in fio.c.
45 struct message *next_message(struct message *);
46 struct message *prev_message(struct message *);
47 struct message *get_message(int);
48 int get_msgnum(struct message *);
49 int get_msgCount(void);
51 /* These give special access to the message array needed in lex.c */
52 struct message *get_abs_message(int);
53 struct message *next_abs_message(struct message *);
54 int get_abs_msgCount(void);
57 * Support hooks used by other modules.
59 void thread_fix_old_links(struct message *, struct message *, int);
60 void thread_fix_new_links(struct message *, int, int);
61 int thread_hidden(void);
62 int thread_depth(void);
63 int do_recursion(void);
64 int thread_recursion(struct message *, int (*)(struct message *, void *), void *);
65 const char *thread_next_key_name(const void **);
68 * Commands.
70 /* thread setup */
71 int flattencmd(void *);
72 int reversecmd(void *v);
73 int sortcmd(void *);
74 int threadcmd(void *);
75 int unthreadcmd(void *);
77 /* thread navigation */
78 int downcmd(void *);
79 int tsetcmd(void *);
80 int upcmd(void *);
82 /* thread display */
83 int exposecmd(void *);
84 int hidecmd(void *);
86 /* tag commands */
87 int invtagscmd(void *);
88 int tagbelowcmd(void *);
89 int tagcmd(void *);
90 int untagcmd(void *);
92 /* tag display */
93 int hidetagscmd(void *);
94 int showtagscmd(void *);
96 /* something special */
97 int deldupscmd(void *);
99 #define ENAME_RECURSIVE_CMDS "recursive-commands"
102 * Debugging stuff that should go away.
104 #define THREAD_DEBUG
105 #ifdef THREAD_DEBUG
106 int thread_showcmd(void *);
107 #endif /* THREAD_DEBUG */
109 #endif /* __THREAD_H__ */
110 #endif /* THREAD_SUPPORT */