| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
 | /*
*/
#ifndef	sqwebmail_h
#define	sqwebmail_h
/*
** Copyright 1998 - 2006 Double Precision, Inc.  See COPYING for
** distribution information.
*/
#if	HAVE_CONFIG_H
#undef	PACKAGE
#undef	VERSION
#include	"config.h"
#endif
extern void error(const char *), error2(const char *, int);
extern void error3(const char *, int, const char *, const char *, int);
#define	enomem()	error2(__FILE__,__LINE__)
#define eio(x,y)	error3(__FILE__,__LINE__,x,y,-1)
#define emsg(x,y)	error3(__FILE__,__LINE__,x,y,0)
/* Location of the user's Maildir */
#define USER_DIR	"Maildir"
/* For PAM-based authentication */
#define	SQWEBMAIL_PAM	"webmail"
/* Socket filename */
#define SOCKFILENAME SOCKDIR "/sqwebmail.sock"
/* Where we keep the IP address we authenticated from */
#define	IPFILE		"sqwebmail-ip"
/* Last time the sent folder was renamed */
#define SENTSTAMP	"sqwebmail-sentstamp"
/* File that keeps the time of last access */
#define	TIMESTAMP	"sqwebmail-timestamp"
/* Various configuration stuff */
#define	CONFIGFILE	"sqwebmail-config"
/* More configuration stuff */
#define GPGCONFIGFILE	"sqwebmail-gpgconfig"
/* Eliminate duplicate messages being sent based on form reloads by using
** unique message tokens.
*/
#define	TOKENFILE	"sqwebmail-token"
/* Sig file */
#define	SIGNATURE	"sqwebmail-sig"
#define	CHECKFILENAME(p) { if (!*p || strchr((p), '/') || *p == '.') enomem(); }
/* Cached shared paths */
#define SHAREDPATHCACHE	"sqwebmail-sharedpath"
/* Wrap lines for new messages */
#define	MYLINESIZE	76
/* Automake dribble */
#ifndef	HAVE_STRDUP
extern char *strdup(const char *);
#endif
#ifndef	HAVE_STRCASECMP
extern int strcasecmp(const char *, const char *);
#endif
#ifndef	HAVE_STRNCASECMP
extern int strncasecmp(const char *, const char *, size_t);
#endif
extern void cleanup();
extern void http_redirect_argu(const char *, unsigned long);
extern void http_redirect_argss(const char *, const char *, const char *);
extern void http_redirect_argsss(const char *, const char *, const char *,
				const char *);
#define	ISCTRL(c)	((unsigned char)(c) < (unsigned char)' ')
extern void fake_exit(int);
extern void addarg(const char *);
extern void freeargs();
extern void insert_include(const char *);
extern const char *getarg(const char *);
extern char *get_templatedir();
extern char *get_imageurl();
#define	GPGDIR "gpg"
#define	MIMEGPGFILENAME "mimegpgfilename"
#define SEARCHRESFILENAME "searchres"
char *trim_spaces(const char *s);
#endif
 |