1 #if !defined(lint) && !defined(DOS)
2 static char rcsid
[] = "$Id: stubs.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
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 * ========================================================================
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"
30 /* let cleanup calls know we're screwed */
31 static int in_panic
= 0;
34 static int input_timeout
= 0;
36 /* time of last user-initiated newmail check */
37 static time_t time_of_input
;
43 time_of_input
= time((time_t *)0);
47 /********* ../../../pith/newmail.c stub **********/
51 return(time_of_input
);
55 /********* ../../../pith/conf.c stub **********/
60 int old_t
= input_timeout
;
70 return(input_timeout
);
75 unexpected_pinerc_change()
77 dprint((1, "Unexpected pinerc change"));
78 return(0); /* always overwrite */
81 /********* ../../../pith/mailcap.c stub **********/
83 exec_mailcap_test_cmd(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
100 This is also called from imap routines and fs_get and fs_resize.
103 alpine_panic(message
)
108 syslog(LOG_ERR
, "%s", message
); /* may not work, but try */
112 peDestroyUserContext(&ps_global
);
117 coredump(); /*--- If we're debugging get a core dump --*/
121 fatal("ffo"); /* BUG -- hack to get fatal out of library in right order*/
125 /*----------------------------------------------------------------------
126 panicking - called to test whether we're sunk
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
146 exceptional_exit(message
, ev
)
150 syslog(LOG_ALERT
, "%s", message
);
155 /*----------------------------------------------------------------------
156 write argument error to the display...
160 Result: prints help messages
161 ----------------------------------------------------------------------*/
163 display_args_err(s
, a
, err
)
168 syslog(LOG_INFO
, "Arg Error: %s", s
);