* clear out some warnings by gcc 9.3.1.
[alpine.git] / web / src / alpined.d / stubs.c
blobc25b305e77c5371f49e2053faaeec90327d8968b
1 #if !defined(lint) && !defined(DOS)
2 static char rcsid[] = "$Id: stubs.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
3 #endif
5 /* ========================================================================
6 * Copyright 2006-2007 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #include <system.h>
18 #include <general.h>
20 #include "../../../c-client/c-client.h"
22 #include "../../../pith/takeaddr.h"
23 #include "../../../pith/ldap.h"
24 #include "../../../pith/debug.h"
25 #include "../../../pith/osdep/coredump.h"
27 #include "alpined.h"
30 /* let cleanup calls know we're screwed */
31 static int in_panic = 0;
33 /* input timeout */
34 static int input_timeout = 0;
36 /* time of last user-initiated newmail check */
37 static time_t time_of_input;
40 void
41 peMarkInputTime(void)
43 time_of_input = time((time_t *)0);
47 /********* ../../../pith/newmail.c stub **********/
48 time_t
49 time_of_last_input()
51 return(time_of_input);
55 /********* ../../../pith/conf.c stub **********/
56 int
57 set_input_timeout(t)
58 int t;
60 int old_t = input_timeout;
62 input_timeout = t;
63 return(old_t);
67 int
68 get_input_timeout()
70 return(input_timeout);
74 int
75 unexpected_pinerc_change()
77 dprint((1, "Unexpected pinerc change"));
78 return(0); /* always overwrite */
81 /********* ../../../pith/mailcap.c stub **********/
82 int
83 exec_mailcap_test_cmd(cmd)
84 char *cmd;
86 return(-1); /* never succeeds on web server */
90 /****** various other stuff ******/
91 /*----------------------------------------------------------------------
92 panic - call on detected programmatic errors to exit pine
94 Args: message -- message to record in debug file and to be printed for user
96 Result: The various tty modes are restored
97 If debugging is active a core dump will be generated
98 Exits Pine
100 This is also called from imap routines and fs_get and fs_resize.
101 ----*/
102 void
103 alpine_panic(message)
104 char *message;
106 in_panic = 1;
108 syslog(LOG_ERR, "%s", message); /* may not work, but try */
110 #if 0
111 if(ps_global)
112 peDestroyUserContext(&ps_global);
113 #endif
115 #ifdef DEBUG
116 if(debug > 1)
117 coredump(); /*--- If we're debugging get a core dump --*/
118 #endif
120 exit(-1);
121 fatal("ffo"); /* BUG -- hack to get fatal out of library in right order*/
125 /*----------------------------------------------------------------------
126 panicking - called to test whether we're sunk
128 Args: none
130 ----*/
132 panicking()
134 return(in_panic);
138 /*----------------------------------------------------------------------
139 exceptional_exit - called to exit under unusual conditions (with no core)
141 Args: message -- message to record in debug file and to be printed for user
142 ev -- exit value
144 ----*/
145 void
146 exceptional_exit(message, ev)
147 char *message;
148 int ev;
150 syslog(LOG_ALERT, "%s", message);
151 exit(ev);
155 /*----------------------------------------------------------------------
156 write argument error to the display...
158 Args: none
160 Result: prints help messages
161 ----------------------------------------------------------------------*/
162 void
163 display_args_err(s, a, err)
164 char *s;
165 char **a;
166 int err;
168 syslog(LOG_INFO, "Arg Error: %s", s);