summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2024-01-30 21:12:06 -0700
committerEduardo Chappa <chappa@washington.edu>2024-01-30 21:12:06 -0700
commiteaa7b17bca60632bc703f97c169ee4af2a519a2a (patch)
tree1c39d658ccf304f7d64fa3ef8ce104a44dcd3c03
parentf7deb74aa5612d4d49da4ec179e61124e8fa0763 (diff)
downloadalpine-eaa7b17bca60632bc703f97c169ee4af2a519a2a.tar.xz
* Changes in the source code of Alpine to define internal prototypes
of all functions so that they follow modern C standards. This lead to the splitting of the gf_io_t type into two types gf_i_t and gf_o_t with different internal prototypes. More details in the file pith/detach.c. This work was initiated based on a report by Holger Hoffstätte.
-rw-r--r--alpine/adrbkcmd.c21
-rw-r--r--alpine/adrbkcmd.h2
-rw-r--r--alpine/alpine.c8
-rw-r--r--alpine/dispfilt.c5
-rw-r--r--alpine/dispfilt.h2
-rw-r--r--alpine/folder.c28
-rw-r--r--alpine/help.c28
-rw-r--r--alpine/help.h6
-rw-r--r--alpine/imap.c56
-rw-r--r--alpine/imap.h4
-rw-r--r--[-rwxr-xr-x]alpine/ldap32.dllbin138752 -> 138752 bytes
-rw-r--r--alpine/mailcmd.c14
-rw-r--r--alpine/mailcmd.h2
-rw-r--r--alpine/mailindx.c2
-rw-r--r--alpine/mailpart.c30
-rw-r--r--[-rwxr-xr-x]alpine/mailtrfc.sh0
-rw-r--r--alpine/mailview.c8
-rw-r--r--alpine/mailview.h2
-rw-r--r--alpine/newuser.c2
-rw-r--r--alpine/osdep/debuging.c6
-rw-r--r--alpine/osdep/termin.gen.c2
-rw-r--r--alpine/osdep/termout.unx.c2
-rw-r--r--alpine/pattern.c2
-rw-r--r--alpine/pipe.c2
-rw-r--r--alpine/pipe.h2
-rw-r--r--alpine/remote.c3
-rw-r--r--alpine/reply.c21
-rw-r--r--alpine/send.c10
-rw-r--r--alpine/send.h2
-rw-r--r--alpine/signal.c8
-rw-r--r--alpine/signal.h2
-rw-r--r--alpine/smime.c25
-rw-r--r--alpine/status.c8
-rw-r--r--alpine/takeaddr.c2
-rw-r--r--pico/estruct.h2
-rw-r--r--pico/osdep/color.c2
-rw-r--r--pico/osdep/filesys.c2
-rw-r--r--pico/osdep/mswin.h2
-rw-r--r--pico/osdep/signals.h2
-rw-r--r--pico/osdep/terminal.c2
-rw-r--r--pico/pico.c2
-rw-r--r--pico/pico.h99
-rw-r--r--pith/detach.c43
-rw-r--r--pith/detach.h6
-rw-r--r--pith/editorial.c4
-rw-r--r--pith/editorial.h2
-rw-r--r--pith/filter.c24
-rw-r--r--pith/filter.h20
-rw-r--r--pith/filttype.h3
-rw-r--r--pith/ical.c196
-rw-r--r--pith/mailindx.c2
-rw-r--r--pith/mailview.c61
-rw-r--r--pith/mailview.h16
-rw-r--r--pith/mimedesc.c2
-rw-r--r--pith/mimedesc.h2
-rw-r--r--pith/options.h2
-rw-r--r--pith/remote.c2
-rw-r--r--pith/reply.c20
-rw-r--r--pith/reply.h12
-rw-r--r--pith/save.c32
-rw-r--r--pith/send.c4
-rw-r--r--pith/smime.c4
-rw-r--r--pith/smime.h2
-rw-r--r--pith/sort.c2
-rw-r--r--pith/state.h2
-rw-r--r--pith/takeaddr.c2
-rw-r--r--pith/text.c8
-rw-r--r--pith/text.h2
-rw-r--r--web/src/alpined.d/alpined.c19
-rw-r--r--web/src/alpined.d/ldap.c30
-rw-r--r--web/src/alpined.d/remote.c5
71 files changed, 524 insertions, 435 deletions
diff --git a/alpine/adrbkcmd.c b/alpine/adrbkcmd.c
index e9af5915..f36b6956 100644
--- a/alpine/adrbkcmd.c
+++ b/alpine/adrbkcmd.c
@@ -79,7 +79,7 @@ int do_the_shuffle(int *, int, int, char **);
void ab_compose_internal(BuildTo, int);
int ab_export(struct pine *, long, int, int);
VCARD_INFO_S *prepare_abe_for_vcard(struct pine *, AdrBk_Entry *, int);
-void write_single_tab_entry(gf_io_t, VCARD_INFO_S *);
+void write_single_tab_entry(gf_o_t, VCARD_INFO_S *);
int percent_done_copying(void);
int cmp_action_list(const qsort_t *, const qsort_t *);
void set_act_list_member(ACTION_LIST_S *, a_c_arg_t, PerAddrBook *, PerAddrBook *, char *);
@@ -131,7 +131,8 @@ view_abook_entry(struct pine *ps, long int cur_line)
SCROLL_S sargs;
HANDLE_S *handles = NULL;
URL_HILITE_S uh;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
int cmd, abook_indent;
long offset = 0L;
char b[500];
@@ -785,7 +786,7 @@ char *
view_message_for_pico(char **error)
{
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
void (*redraw)(void) = ps_global->redrawer;
SourceType src = CharStar;
SCROLL_S sargs;
@@ -1132,7 +1133,7 @@ _("\n to use single quotation marks; for example: George 'Husky' Washington."));
standard_picobuf_teardown(&pbf);
if(editor_result & COMP_GOTHUP)
- hup_signal();
+ hup_signal(0);
else{
fix_windsize(ps_global);
init_signals();
@@ -1872,7 +1873,7 @@ _(" To exit and save the configuration, press ^X. To cancel, press ^C.");
if(editor_result & COMP_GOTHUP){
ret = -1;
- hup_signal();
+ hup_signal(0);
}
else{
fix_windsize(ps_global);
@@ -4162,7 +4163,7 @@ ab_export(struct pine *ps, long int cur_line, int command_line, int agg)
struct variable *vars = ps->vars;
char filename[MAXPATH+1], full_filename[MAXPATH+1];
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
long start_of_append;
char *addr = NULL, *error = NULL;
BuildTo bldto;
@@ -4505,7 +4506,7 @@ ab_forward(struct pine *ps, long int cur_line, int agg)
BODY *pb, *body = NULL;
PART **pp;
char *sig;
- gf_io_t pc;
+ gf_o_t pc;
int i, ret = 0;
VCARD_INFO_S *vinfo;
ACTION_S *role = NULL;
@@ -4945,7 +4946,7 @@ free_vcard_info(VCARD_INFO_S **vinfo)
*
*/
void
-write_single_vcard_entry(struct pine *ps, gf_io_t pc, VCARD_INFO_S *vinfo)
+write_single_vcard_entry(struct pine *ps, gf_o_t pc, VCARD_INFO_S *vinfo)
{
char *decoded, *tmp2, *tmp = NULL, *hdr;
char **ll;
@@ -5111,7 +5112,7 @@ write_single_vcard_entry(struct pine *ps, gf_io_t pc, VCARD_INFO_S *vinfo)
*
*/
void
-write_single_tab_entry(gf_io_t pc, VCARD_INFO_S *vinfo)
+write_single_tab_entry(gf_o_t pc, VCARD_INFO_S *vinfo)
{
char *decoded, *tmp = NULL;
char **ll;
@@ -6704,7 +6705,7 @@ _("\n \"^G\" for help specific to each item. \"^X\" to make the query, or \"^C\"
standard_picobuf_teardown(&pbf);
if(editor_result & COMP_GOTHUP)
- hup_signal();
+ hup_signal(0);
else{
fix_windsize(ps_global);
init_signals();
diff --git a/alpine/adrbkcmd.h b/alpine/adrbkcmd.h
index 98a070c5..fa770a5c 100644
--- a/alpine/adrbkcmd.h
+++ b/alpine/adrbkcmd.h
@@ -49,7 +49,7 @@ int ab_agg_delete(struct pine *, int);
int single_entry_delete(AdrBk *, long, int *);
char *query_server(struct pine *, int, int *, int, char **);
void free_headents(struct headerentry **);
-void write_single_vcard_entry(struct pine *, gf_io_t, VCARD_INFO_S *);
+void write_single_vcard_entry(struct pine *, gf_o_t, VCARD_INFO_S *);
void free_vcard_info(VCARD_INFO_S **);
#ifdef ENABLE_LDAP
void view_ldap_entry(struct pine *, LDAP_CHOOSE_S *);
diff --git a/alpine/alpine.c b/alpine/alpine.c
index 6daed0ff..1b96d7b3 100644
--- a/alpine/alpine.c
+++ b/alpine/alpine.c
@@ -80,7 +80,7 @@ static unsigned long gets_bytes;
*/
void convert_args_to_utf8(struct pine *, ARGDATA_S *);
void preopen_stayopen_folders(void);
-int read_stdin_char(char *);
+int read_stdin_char(unsigned char *);
void main_redrawer(void);
void show_main_screen(struct pine *, int, OtherMenu, struct key_menu *, int, Pos *);
void do_menu(int, Pos *, struct key_menu *);
@@ -147,7 +147,7 @@ main(int argc, char **argv)
int rv;
long rvl;
struct pine *pine_state;
- gf_io_t stdin_getc = NULL;
+ gf_i_t stdin_getc = NULL;
char *args_for_debug = NULL, *init_pinerc_debugging = NULL;
/*----------------------------------------------------------------------
@@ -947,7 +947,7 @@ main(int argc, char **argv)
redir++;
src = CharStar;
if(isatty(0) && (store = so_get(src, NULL, EDIT_ACCESS))){
- gf_io_t pc;
+ gf_o_t pc;
gf_set_so_writec(&pc, store);
gf_filter_init();
@@ -1550,7 +1550,7 @@ preopen_stayopen_folders(void)
* redirected stdin
*/
int
-read_stdin_char(char *c)
+read_stdin_char(unsigned char *c)
{
int rv;
diff --git a/alpine/dispfilt.c b/alpine/dispfilt.c
index fd894450..58dc03d2 100644
--- a/alpine/dispfilt.c
+++ b/alpine/dispfilt.c
@@ -50,7 +50,7 @@ int df_valid_test(BODY *, char *);
* That's converted back to UTF-8 and passed through aux_filters.
*/
char *
-dfilter(char *rawcmd, STORE_S *input_so, gf_io_t output_pc, FILTLIST_S *aux_filters)
+dfilter(char *rawcmd, STORE_S *input_so, gf_o_t output_pc, FILTLIST_S *aux_filters)
{
char *status = NULL, *cmd, *resultf = NULL, *tmpfile = NULL;
int key = 0, silent = 0;
@@ -75,7 +75,8 @@ dfilter(char *rawcmd, STORE_S *input_so, gf_io_t output_pc, FILTLIST_S *aux_filt
if(tmpfile){
PIPE_S *filter_pipe;
FILE *fp;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
STORE_S *tmpf_so;
/* write the tmp file */
diff --git a/alpine/dispfilt.h b/alpine/dispfilt.h
index 285902f8..39607518 100644
--- a/alpine/dispfilt.h
+++ b/alpine/dispfilt.h
@@ -20,7 +20,7 @@
/* exported prototypes */
-char *dfilter(char *, STORE_S *, gf_io_t, FILTLIST_S *);
+char *dfilter(char *, STORE_S *, gf_o_t, FILTLIST_S *);
char *dfilter_trigger(BODY *, char *, size_t);
char *expand_filter_tokens(char *, ENVELOPE *, char **, char **, char **, int *, int *, int *);
char *filter_session_key(void);
diff --git a/alpine/folder.c b/alpine/folder.c
index 1daf7a08..48b6e81d 100644
--- a/alpine/folder.c
+++ b/alpine/folder.c
@@ -171,14 +171,14 @@ int fl_val_gen(FOLDER_S *, FSTATE_S *);
int fl_val_writable(FOLDER_S *, FSTATE_S *);
int fl_val_subscribe(FOLDER_S *, FSTATE_S *);
STRLIST_S *folder_lister(struct pine *, FSTATE_S *);
-int folder_list_text(struct pine *, FPROC_S *, gf_io_t, HANDLE_S **, int);
-int folder_list_write(gf_io_t, HANDLE_S **, CONTEXT_S *, int, char *, int);
-int folder_list_write_prefix(FOLDER_S *, int, gf_io_t);
-int folder_list_write_middle(FOLDER_S *fp, CONTEXT_S *ctxt, gf_io_t pc, HANDLE_S *);
-int folder_list_write_suffix(FOLDER_S *, int, gf_io_t);
+int folder_list_text(struct pine *, FPROC_S *, gf_o_t, HANDLE_S **, int);
+int folder_list_write(gf_o_t, HANDLE_S **, CONTEXT_S *, int, char *, int);
+int folder_list_write_prefix(FOLDER_S *, int, gf_o_t);
+int folder_list_write_middle(FOLDER_S *fp, CONTEXT_S *ctxt, gf_o_t pc, HANDLE_S *);
+int folder_list_write_suffix(FOLDER_S *, int, gf_o_t);
int color_monitored(FOLDER_S *, int, int);
int color_test_for_folder(char *, char *);
-int color_write_for_folder(gf_io_t pc, int testtype);
+int color_write_for_folder(gf_o_t pc, int testtype);
int use_color_for_folder(FOLDER_S *fp);
int folder_list_ith(int, CONTEXT_S *);
char *folder_list_center_space(char *, int);
@@ -994,7 +994,7 @@ context_edit_screen(struct pine *ps, char *func, char *def_nick,
editor_result = pico(&pbf);
if(editor_result & COMP_GOTHUP){
- hup_signal();
+ hup_signal(0);
}
else{
fix_windsize(ps_global);
@@ -1421,7 +1421,7 @@ folder_lister(struct pine *ps, FSTATE_S *fs)
HANDLE_S *handles = NULL;
STORE_S *screen_text = NULL;
FPROC_S folder_proc_data;
- gf_io_t pc;
+ gf_o_t pc;
dprint((1, "\n\n ---- FOLDER LISTER ----\n"));
@@ -1571,7 +1571,7 @@ folder_lister(struct pine *ps, FSTATE_S *fs)
* folder_list_text - format collection's contents for display
*/
int
-folder_list_text(struct pine *ps, FPROC_S *fp, gf_io_t pc, HANDLE_S **handlesp, int cols)
+folder_list_text(struct pine *ps, FPROC_S *fp, gf_o_t pc, HANDLE_S **handlesp, int cols)
{
int rv = 1, i, j, ftotal, fcount, slot_width, slot_rows,
slot_cols, index, findex, width, shown, selected;
@@ -1933,7 +1933,7 @@ folder_list_text(struct pine *ps, FPROC_S *fp, gf_io_t pc, HANDLE_S **handlesp,
int
-folder_list_write(gf_io_t pc, HANDLE_S **handlesp, CONTEXT_S *ctxt, int fnum, char *alt_name, int flags)
+folder_list_write(gf_o_t pc, HANDLE_S **handlesp, CONTEXT_S *ctxt, int fnum, char *alt_name, int flags)
{
char buf[256];
int width = 0, lprefix = 0, lmiddle = 0, lsuffix = 0;
@@ -2004,7 +2004,7 @@ folder_list_write(gf_io_t pc, HANDLE_S **handlesp, CONTEXT_S *ctxt, int fnum, ch
int
-folder_list_write_prefix(FOLDER_S *f, int flags, gf_io_t pc)
+folder_list_write_prefix(FOLDER_S *f, int flags, gf_o_t pc)
{
int rv = 0;
@@ -2032,7 +2032,7 @@ folder_list_write_prefix(FOLDER_S *f, int flags, gf_io_t pc)
}
int
-folder_list_write_middle(FOLDER_S *fp, CONTEXT_S *ctxt, gf_io_t pc, HANDLE_S *h2)
+folder_list_write_middle(FOLDER_S *fp, CONTEXT_S *ctxt, gf_o_t pc, HANDLE_S *h2)
{
int rv = -1, use_color;
char buf[256];
@@ -2074,7 +2074,7 @@ folder_list_write_middle(FOLDER_S *fp, CONTEXT_S *ctxt, gf_io_t pc, HANDLE_S *h2
int
-folder_list_write_suffix(FOLDER_S *f, int flags, gf_io_t pc)
+folder_list_write_suffix(FOLDER_S *f, int flags, gf_o_t pc)
{
int rv = 0;
@@ -2115,7 +2115,7 @@ folder_list_write_suffix(FOLDER_S *f, int flags, gf_io_t pc)
}
int
-color_write_for_folder(gf_io_t pc, int testtype)
+color_write_for_folder(gf_o_t pc, int testtype)
{
int rv;
if(!pico_usingcolor())
diff --git a/alpine/help.c b/alpine/help.c
index 4784dc9b..c5d4db22 100644
--- a/alpine/help.c
+++ b/alpine/help.c
@@ -123,7 +123,7 @@ helper_internal(HelpType text, char *frag, char *title, int flags)
STORE_S *store;
HANDLE_S *handles = NULL, *htmp;
HELP_SCROLL_S hscroll;
- gf_io_t pc;
+ gf_o_t pc;
dprint((1, "\n\n ---- HELPER ----\n"));
@@ -404,7 +404,7 @@ init_helper_getc(char **help_txt)
int
-helper_getc(char *c)
+helper_getc(unsigned char *c)
{
if(g_h_text.crlf){
*c = '\012';
@@ -704,7 +704,8 @@ review_messages(void)
{
SCROLL_S sargs;
STORE_S *in_store = NULL, *out_store = NULL;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
int jo, lo, hi, donejo, donelo, donehi;
RMCat rmcat;
int cmd, timestamps=0, show_level=-1;
@@ -960,8 +961,7 @@ journal_processor(int cmd, MSGNO_S *msgmap, SCROLL_S *sparms)
int
-gripe_gripe_to(url)
- char *url;
+gripe_gripe_to(char *url)
{
char *composer_title, *url_copy, *optstr, *p;
int opts = 0;
@@ -1037,16 +1037,12 @@ gripe_gripe_to(url)
int
-gripe_newbody(ps, body, msgno, flags)
- struct pine *ps;
- BODY **body;
- long msgno;
- int flags;
+gripe_newbody(struct pine *ps, BODY **body, long msgno, int flags)
{
BODY *pb;
PART **pp;
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
static char *err = "Problem creating space for message text.";
int i;
char tmp[MAILTMPLEN], *p;
@@ -1163,7 +1159,7 @@ gripe_newbody(ps, body, msgno, flags)
if((store = so_get(CharStar, NULL, EDIT_ACCESS)) != NULL){
PIPE_S *syspipe;
- gf_io_t gc;
+ gf_i_t gc;
pb->contents.text.data = (void *) store;
gf_set_so_writec(&pc, store);
@@ -1255,8 +1251,7 @@ gripe_newbody(ps, body, msgno, flags)
ADDRESS *
-gripe_token_addr(token)
- char *token;
+gripe_token_addr(char *token)
{
char *p;
ADDRESS *a = NULL;
@@ -1290,8 +1285,7 @@ gripe_token_addr(token)
char *
-gripe_id(key)
- char *key;
+gripe_id(char *key)
{
int i,j,k,l;
@@ -1354,7 +1348,7 @@ pcpine_help(HelpType section)
{
char **help_lines, *help_text = NULL;
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
/* assumption here is that HelpType is char ** */
help_lines = section;
diff --git a/alpine/help.h b/alpine/help.h
index 7795fdac..ec06bc6e 100644
--- a/alpine/help.h
+++ b/alpine/help.h
@@ -35,7 +35,7 @@
int url_local_helper(char *);
int url_local_config(char *);
void init_helper_getc(char **);
-int helper_getc(char *);
+int helper_getc(unsigned char *);
int helper(HelpType, char *, int);
void review_messages(void);
void print_help(char **);
@@ -43,8 +43,8 @@ void print_help(char **);
char *pcpine_help(HelpType);
#endif
#ifdef DEBUG
-void dump_config(struct pine *, gf_io_t, int);
-void dump_pine_struct(struct pine *, gf_io_t);
+void dump_config(struct pine *, gf_o_t, int);
+void dump_pine_struct(struct pine *, gf_o_t);
#endif
diff --git a/alpine/imap.c b/alpine/imap.c
index 45f2c97e..c55b09cf 100644
--- a/alpine/imap.c
+++ b/alpine/imap.c
@@ -370,7 +370,8 @@ oauth2_set_device_info(OAUTH2_S *oa2, char *method, NETMBX *mb)
if(ps_global->ttyo){
SCROLL_S sargs;
STORE_S *in_store, *out_store;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
HANDLE_S *handles = NULL;
AUTH_CODE_S user_input;
@@ -540,7 +541,8 @@ oauth2_get_access_code(unsigned char *url, char *method, OAUTH2_S *oauth2, NETMB
if(ps_global->ttyo){
SCROLL_S sargs;
STORE_S *in_store, *out_store;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
HANDLE_S *handles = NULL;
AUTH_CODE_S user_input;
@@ -2514,7 +2516,8 @@ pine_sslcertquery(char *reason, char *host, char *cert)
if(ps_global->ttyo){
SCROLL_S sargs;
STORE_S *in_store, *out_store;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
HANDLE_S *handles = NULL;
int the_answer = 'n';
@@ -3240,9 +3243,7 @@ typedef struct pwd_s {
* the existing code and so that orighost data could be easily used.
*/
int
-read_passfile(pinerc, l)
- char *pinerc;
- MMLOGIN_S **l;
+read_passfile(char *pinerc, MMLOGIN_S **l)
{
#ifdef WINCRED
# if (WINCRED > 0)
@@ -3792,9 +3793,7 @@ read_passfile(pinerc, l)
void
-write_passfile(pinerc, l)
- char *pinerc;
- MMLOGIN_S *l;
+write_passfile(char *pinerc, MMLOGIN_S *l)
{
char *authend, *authtype;
#ifdef WINCRED
@@ -4081,10 +4080,7 @@ ask_erase_credentials(void)
#ifdef LOCAL_PASSWD_CACHE
int
-get_passfile_passwd(pinerc, passwd, user, hostlist, altflag)
- char *pinerc, **passwd, *user;
- STRLIST_S *hostlist;
- int altflag;
+get_passfile_passwd(char *pinerc, char **passwd, char *user, STRLIST_S *hostlist, int altflag)
{
return get_passfile_passwd_auth(pinerc, passwd, user, hostlist, altflag, NULL);
}
@@ -4095,11 +4091,7 @@ get_passfile_passwd(pinerc, passwd, user, hostlist, altflag)
* as the pinerc with the name defined above.
*/
int
-get_passfile_passwd_auth(pinerc, passwd, user, hostlist, altflag, authtype)
- char *pinerc, **passwd, *user;
- STRLIST_S *hostlist;
- int altflag;
- char *authtype;
+get_passfile_passwd_auth(char *pinerc, char **passwd, char *user, STRLIST_S *hostlist, int altflag, char *authtype)
{
dprint((10, "get_passfile_passwd_auth\n"));
return((mm_login_list || read_passfile(pinerc, &mm_login_list))
@@ -4119,9 +4111,7 @@ is_using_passfile(void)
* host, the user will confirm.
*/
char *
-get_passfile_user(pinerc, hostlist)
- char *pinerc;
- STRLIST_S *hostlist;
+get_passfile_user(char *pinerc, STRLIST_S *hostlist)
{
return((mm_login_list || read_passfile(pinerc, &mm_login_list))
? imap_get_user(mm_login_list, hostlist)
@@ -4335,10 +4325,7 @@ macos_erase_keychain(void)
#ifdef LOCAL_PASSWD_CACHE
void
-set_passfile_passwd(pinerc, passwd, user, hostlist, altflag, already_prompted)
- char *pinerc, *passwd, *user;
- STRLIST_S *hostlist;
- int altflag, already_prompted;
+set_passfile_passwd(char *pinerc, char **passwd, char *user, STRLIST_S *hostlist, int altflag, int already_prompted)
{
set_passfile_passwd_auth(pinerc, passwd, user, hostlist, altflag, already_prompted, NULL);
}
@@ -4351,11 +4338,7 @@ set_passfile_passwd(pinerc, passwd, user, hostlist, altflag, already_prompted)
* 2 prompted, answered no
*/
void
-set_passfile_passwd_auth(pinerc, passwd, user, hostlist, altflag, already_prompted, authtype)
- char *pinerc, *passwd, *user;
- STRLIST_S *hostlist;
- int altflag, already_prompted;
- char *authtype;
+set_passfile_passwd_auth(char *pinerc, char **passwd, char *user, STRLIST_S *hostlist, int altflag, int already_prompted, char *authtype)
{
dprint((10, "set_passfile_passwd_auth\n"));
if(((already_prompted == 0 && preserve_prompt_auth(pinerc, authtype))
@@ -4368,11 +4351,7 @@ set_passfile_passwd_auth(pinerc, passwd, user, hostlist, altflag, already_prompt
}
void
-update_passfile_hostlist(pinerc, user, hostlist, altflag)
- char *pinerc;
- char *user;
- STRLIST_S *hostlist;
- int altflag;
+update_passfile_hostlist(char *pinerc, char *user, STRLIST_S *hostlist, int altflag)
{
update_passfile_hostlist_auth(pinerc, user, hostlist, altflag, NULL);
}
@@ -4386,12 +4365,7 @@ update_passfile_hostlist(pinerc, user, hostlist, altflag)
* This routine attempts to repair that.
*/
void
-update_passfile_hostlist_auth(pinerc, user, hostlist, altflag, authtype)
- char *pinerc;
- char *user;
- STRLIST_S *hostlist;
- int altflag;
- char *authtype;
+update_passfile_hostlist_auth(char *pinerc, char *user, STRLIST_S *hostlist, int altflag, char *authtype)
{
#ifdef WINCRED
return;
diff --git a/alpine/imap.h b/alpine/imap.h
index cc4afce0..b1e25f1b 100644
--- a/alpine/imap.h
+++ b/alpine/imap.h
@@ -43,8 +43,8 @@ UCS oauth2device_decode_reply(void *, void *);
int get_passfile_passwd(char *, char **, char *, STRLIST_S *, int);
int get_passfile_passwd_auth(char *, char **, char *, STRLIST_S *, int, char *);
int is_using_passfile(void);
-void set_passfile_passwd(char *, char *, char *, STRLIST_S *, int, int);
-void set_passfile_passwd_auth(char *, char *, char *, STRLIST_S *, int, int, char *);
+void set_passfile_passwd(char *, char **, char *, STRLIST_S *, int, int);
+void set_passfile_passwd_auth(char *, char **, char *, STRLIST_S *, int, int, char *);
char *get_passfile_user(char *, STRLIST_S *);
#endif /* LOCAL_PASSWD_CACHE */
diff --git a/alpine/ldap32.dll b/alpine/ldap32.dll
index 2284f9f8..2284f9f8 100755..100644
--- a/alpine/ldap32.dll
+++ b/alpine/ldap32.dll
Binary files differ
diff --git a/alpine/mailcmd.c b/alpine/mailcmd.c
index 586ee5b4..a144b2d2 100644
--- a/alpine/mailcmd.c
+++ b/alpine/mailcmd.c
@@ -3602,7 +3602,7 @@ cmd_export(struct pine *state, MSGNO_S *msgmap, int qline, int aopt)
MESSAGECACHE *mc;
BODY *b;
long i, count = 0L, start_of_append = 0, rawno;
- gf_io_t pc;
+ gf_o_t pc;
STORE_S *store;
struct variable *vars = state ? ps_global->vars : NULL;
ESCKEY_S export_opts[5];
@@ -3711,7 +3711,7 @@ cmd_export(struct pine *state, MSGNO_S *msgmap, int qline, int aopt)
int next = 0;
PIPE_S *syspipe;
STORE_S *so;
- gf_io_t pc;
+ gf_o_t pc;
if(ps_global->restricted){
q_status_message(SM_ORDER | SM_DING, 3, 3,
@@ -4110,7 +4110,8 @@ simple_export(struct pine *ps, void *srctext, SourceType srctype, char *prompt_m
if((store = so_get(FileStar, full_filename, WRITE_ACCESS|WRITE_TO_LOCALE)) != NULL){
char *pipe_err;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
gf_set_so_writec(&pc, store);
gf_set_readc(&gc, srctext, (srctype == CharStar)
@@ -5103,7 +5104,7 @@ build_updown_cmd(char *cmd, size_t cmdlen, char *prefix, char *cfg_str, char *fn
NOTE: follows delimiter with OS-dependent newline
----*/
int
-bezerk_delimiter(ENVELOPE *env, MESSAGECACHE *mc, gf_io_t pc, int leading_newline)
+bezerk_delimiter(ENVELOPE *env, MESSAGECACHE *mc, gf_o_t pc, int leading_newline)
{
MESSAGECACHE telt;
time_t when;
@@ -6387,7 +6388,7 @@ cmd_pipe(struct pine *state, MSGNO_S *msgmap, int aopt)
PIPE_S *syspipe;
char *resultfilename = NULL, prompt[80], *p;
int done = 0, rv = 0;
- gf_io_t pc;
+ gf_o_t pc;
int fourlabel = -1, j = 0, next = 0, ku;
int pipe_rv; /* rv of proc to separate from close_system_pipe rv */
long i, rawno;
@@ -6870,7 +6871,8 @@ list_mgmt_screen(STORE_S *html)
char *error = NULL;
STORE_S *store;
HANDLE_S *handles = NULL;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
do{
so_seek(html, 0L, 0);
diff --git a/alpine/mailcmd.h b/alpine/mailcmd.h
index 68aad3ce..e08f0b92 100644
--- a/alpine/mailcmd.h
+++ b/alpine/mailcmd.h
@@ -84,7 +84,7 @@ int simple_export(struct pine *, void *, SourceType, char *, char *);
int get_export_filename(struct pine *, char *, char *, char *, size_t, char *,
char *, ESCKEY_S *, int *, int, int, HISTORY_S **);
char *build_updown_cmd(char *, size_t, char *, char *, char*);
-int bezerk_delimiter(ENVELOPE *, MESSAGECACHE *, gf_io_t, int);
+int bezerk_delimiter(ENVELOPE *, MESSAGECACHE *, gf_o_t, int);
long jump_to(MSGNO_S *, int, UCS, SCROLL_S *, CmdWhere);
char *broach_folder(int, int, int *, CONTEXT_S **);
int ask_mailbox_reopen(struct pine *, int *);
diff --git a/alpine/mailindx.c b/alpine/mailindx.c
index 70926d53..61f6418b 100644
--- a/alpine/mailindx.c
+++ b/alpine/mailindx.c
@@ -3390,7 +3390,7 @@ index_gettext_callback(title, titlelen, text, l, style)
ENVELOPE *env;
BODY *body;
STORE_S *so;
- gf_io_t pc;
+ gf_o_t pc;
if(mn_get_total(ps_global->msgmap) > 0L
&& (so = so_get(CharStar, NULL, WRITE_ACCESS))){
diff --git a/alpine/mailpart.c b/alpine/mailpart.c
index 63ead766..24bb03be 100644
--- a/alpine/mailpart.c
+++ b/alpine/mailpart.c
@@ -139,7 +139,7 @@ int display_msg_att(long, ATTACH_S *, int);
void display_digest_att(long, ATTACH_S *, int);
int scroll_attachment(char *, STORE_S *, SourceType, HANDLE_S *, ATTACH_S *, int);
int process_attachment_cmd(int, MSGNO_S *, SCROLL_S *);
-int format_msg_att(long, ATTACH_S **, HANDLE_S **, gf_io_t, int);
+int format_msg_att(long, ATTACH_S **, HANDLE_S **, gf_o_t, int);
void display_vcard_att(long, ATTACH_S *, int);
void display_vcalendar_att(long, ATTACH_S *, int);
void display_attach_info(long, ATTACH_S *);
@@ -1363,7 +1363,7 @@ write_attachment(int qline, long int msgno, ATTACH_S *a, char *method)
else if(r == 12){ /* Download */
char cmd[MAXPATH], *tfp = NULL;
PIPE_S *syspipe;
- gf_io_t pc;
+ gf_o_t pc;
long len;
STORE_S *store;
char prompt_buf[256];
@@ -1452,7 +1452,7 @@ write_attachment_to_file(MAILSTREAM *stream, long int msgno, ATTACH_S *a, int fl
char *l_string, sbuf[256], *err, *err2 = NULL;
int is_text, we_cancel = 0, dt_flags = 0, so_flags;
long len, orig_size;
- gf_io_t pc;
+ gf_o_t pc;
STORE_S *store;
if(!(a && a->body && a->number && a->number[0] && file && file[0]
@@ -1534,7 +1534,7 @@ write_attached_msg(long int msgno, ATTACH_S **ap, STORE_S *store, int newfile)
{
char *err = NULL;
long start_of_append;
- gf_io_t pc;
+ gf_o_t pc;
MESSAGECACHE *mc;
if(ap && *ap && (*ap)->body && (*ap)->body->nested.msg
@@ -2001,7 +2001,7 @@ display_html_external_attachment(long int msgno, ATTACH_S *a, int flags)
char *filename = NULL;
char *file_path; /* file:///some/path/ */
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
char *err;
int we_cancel = 0, errs;
char *tool;
@@ -2172,7 +2172,7 @@ display_attachment(long int msgno, ATTACH_S *a, int flags)
char sender_filename[1000];
char *extp = NULL;
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
char *err;
int we_cancel = 0, rv;
char prefix[70 + 1000]; /* 1000 = sizeof(sender_filename) */
@@ -2462,7 +2462,7 @@ STORE_S *
format_text_att(long int msgno, ATTACH_S *a, HANDLE_S **handlesp)
{
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
if((store = so_get(CharStar, NULL, EDIT_ACCESS)) != NULL){
if(handlesp)
@@ -2520,7 +2520,7 @@ int
display_msg_att(long int msgno, ATTACH_S *a, int flags)
{
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
ATTACH_S *ap = a;
HANDLE_S *handles = NULL;
int rv = 0;
@@ -2573,7 +2573,7 @@ display_digest_att(long int msgno, ATTACH_S *a, int flags)
STORE_S *store;
ATTACH_S *ap;
HANDLE_S *handles = NULL;
- gf_io_t pc;
+ gf_o_t pc;
SourceType src = CharStar;
int bad_news = 0;
@@ -2864,7 +2864,7 @@ process_attachment_cmd(int cmd, MSGNO_S *msgmap, SCROLL_S *sparms)
* Returns 1 on success, 0 on error.
*/
int
-format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_io_t pc, int flags)
+format_msg_att(long int msgno, ATTACH_S **a, HANDLE_S **handlesp, gf_o_t pc, int flags)
{
int rv = 1;
@@ -2968,7 +2968,8 @@ display_vcard_att(long int msgno, ATTACH_S *a, int flags)
STORE_S *in_store, *out_store = NULL;
HANDLE_S *handles = NULL;
URL_HILITE_S uh;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
char **lines, **ll, *errstr = NULL, tmp[MAILTMPLEN], *p;
int cmd = MC_RESIZE, indent, begins = 0;
@@ -3087,7 +3088,8 @@ display_vevent_summary(long int msgno, ATTACH_S *a, int flags, int depth)
STORE_S *in_store, *out_store = NULL;
HANDLE_S *handles = NULL;
URL_HILITE_S uh;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
char *errstr = NULL;
int cmd, i, k;
@@ -4174,7 +4176,7 @@ pipe_attachment(long int msgno, ATTACH_S *a)
(flags&PIPE_RESET) ? NULL : &resultfilename,
NULL, flags, 0, pipe_callback, pipe_report_error)) != NULL){
int is_text = 0;
- gf_io_t pc; /* wire up a generic putchar */
+ gf_o_t pc; /* wire up a generic putchar */
is_text = (a && a->body && a->body->type == TYPETEXT);
@@ -4432,7 +4434,7 @@ display_msg_att_window(a)
ATTACH_S *a;
{
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
ATTACH_S *ap = a;
long msgno;
diff --git a/alpine/mailtrfc.sh b/alpine/mailtrfc.sh
index 51d6ba48..51d6ba48 100755..100644
--- a/alpine/mailtrfc.sh
+++ b/alpine/mailtrfc.sh
diff --git a/alpine/mailview.c b/alpine/mailview.c
index 5c886c32..b4a6c0d6 100644
--- a/alpine/mailview.c
+++ b/alpine/mailview.c
@@ -1622,7 +1622,8 @@ imgdata_open(HANDLE_S *handle)
int
do_imgdata_open(char *toolp, char *data)
{
- gf_io_t pc, writec, readc;
+ gf_o_t pc, writec;
+ gf_i_t readc;
STORE_S *so, *img;
char *tmpfile = NULL, *err = NULL, *imgdata, *encoding;
@@ -2448,7 +2449,7 @@ ical_send_reply(char *url)
* List-* header supplied commands
*/
int
-rfc2369_editorial(long int msgno, HANDLE_S **handlesp, int flags, int width, gf_io_t pc)
+rfc2369_editorial(long int msgno, HANDLE_S **handlesp, int flags, int width, gf_o_t pc)
{
char *p, *hdrp, *hdrs[MLCMD_COUNT + 1],
color[64], buf[2048];
@@ -5326,7 +5327,8 @@ display_output_file(char *filename, char *title, char *alt_msg, int mode)
*/
if(in_file){
char *errstr;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
if(!(out_store = so_get(CharStar, NULL, EDIT_ACCESS))){
so_give(&in_file);
diff --git a/alpine/mailview.h b/alpine/mailview.h
index 802806b0..f7c3b904 100644
--- a/alpine/mailview.h
+++ b/alpine/mailview.h
@@ -128,7 +128,7 @@ int ng_scroll_edit(CONTEXT_S *, int);
int folder_select_update(CONTEXT_S *, int);
int scroll_add_listmode(CONTEXT_S *, int);
void display_output_file(char *, char *, char *, int);
-int rfc2369_editorial(long, HANDLE_S **, int, int, gf_io_t);
+int rfc2369_editorial(long, HANDLE_S **, int, int, gf_o_t);
void view_writec_init(STORE_S *, HANDLE_S **, int, int);
void view_writec_destroy(void);
int view_writec(int);
diff --git a/alpine/newuser.c b/alpine/newuser.c
index 5ab897a5..3b77f04e 100644
--- a/alpine/newuser.c
+++ b/alpine/newuser.c
@@ -47,7 +47,7 @@ new_user_or_version(struct pine *ps)
SCROLL_S sargs;
STORE_S *store;
HANDLE_S *handles = NULL, *htmp;
- gf_io_t pc;
+ gf_o_t pc;
char *vers = ps->vers_internal;
first_time_alpine_user = (ps->first_time_user
diff --git a/alpine/osdep/debuging.c b/alpine/osdep/debuging.c
index 8887a2af..504ba077 100644
--- a/alpine/osdep/debuging.c
+++ b/alpine/osdep/debuging.c
@@ -372,7 +372,7 @@ output_debug_msg(int dlevel, char *fmt, ...)
void
dump_configuration(int brief)
{
- gf_io_t pc;
+ gf_o_t pc;
if(!do_debug(debugfile))
return;
@@ -384,7 +384,7 @@ dump_configuration(int brief)
void
-dump_config(struct pine *ps, gf_io_t pc, int brief)
+dump_config(struct pine *ps, gf_o_t pc, int brief)
{
int i;
char quotes[3], tmp[MAILTMPLEN];
@@ -479,7 +479,7 @@ dump_config(struct pine *ps, gf_io_t pc, int brief)
----*/
void
-dump_pine_struct(struct pine *ps, gf_io_t pc)
+dump_pine_struct(struct pine *ps, gf_o_t pc)
{
char *p;
extern char term_name[];
diff --git a/alpine/osdep/termin.gen.c b/alpine/osdep/termin.gen.c
index 0179e524..c1207581 100644
--- a/alpine/osdep/termin.gen.c
+++ b/alpine/osdep/termin.gen.c
@@ -181,7 +181,7 @@ read_command(char **utf8str)
int
-read_command_prep()
+read_command_prep(void)
{
int i;
char *fname;
diff --git a/alpine/osdep/termout.unx.c b/alpine/osdep/termout.unx.c
index 4e7b951f..d5511f0c 100644
--- a/alpine/osdep/termout.unx.c
+++ b/alpine/osdep/termout.unx.c
@@ -398,7 +398,7 @@ static void
moveabsolute(int col, int row)
{
- char *stuff, *tgoto();
+ char *stuff, *tgoto(char *, int, int);
stuff = tgoto(_moveto, col, row);
tputs(stuff, 1, outchar);
diff --git a/alpine/pattern.c b/alpine/pattern.c
index 0d6bfe76..01043485 100644
--- a/alpine/pattern.c
+++ b/alpine/pattern.c
@@ -173,7 +173,7 @@ test_message_with_cmd(MAILSTREAM *stream, long int msgno, char *cmd,
int *exitval)
{
PIPE_S *tpipe;
- gf_io_t pc;
+ gf_o_t pc;
int status = 0, flags, err = 0;
char *resultfile = NULL, *pipe_err;
diff --git a/alpine/pipe.c b/alpine/pipe.c
index 472a284e..9d6f6e99 100644
--- a/alpine/pipe.c
+++ b/alpine/pipe.c
@@ -129,7 +129,7 @@ prime_raw_pipe_getc(MAILSTREAM *stream, long int msgno, long int char_limit, lon
----*/
PIPE_S *
-cmd_pipe_open(char *cmd, char **result, int flags, gf_io_t *pc)
+cmd_pipe_open(char *cmd, char **result, int flags, gf_o_t *pc)
{
char err[200];
PIPE_S *pipe;
diff --git a/alpine/pipe.h b/alpine/pipe.h
index 7db52a9a..eb6849ba 100644
--- a/alpine/pipe.h
+++ b/alpine/pipe.h
@@ -25,6 +25,6 @@
/* exported prototypes */
int raw_pipe_getc(unsigned char *);
void prime_raw_pipe_getc(MAILSTREAM *, long, long, long);
-PIPE_S *cmd_pipe_open(char *, char **, int, gf_io_t *);
+PIPE_S *cmd_pipe_open(char *, char **, int, gf_o_t *);
#endif /* ALPINE_PIPE_INCLUDED */
diff --git a/alpine/remote.c b/alpine/remote.c
index 685d3c34..242e023a 100644
--- a/alpine/remote.c
+++ b/alpine/remote.c
@@ -91,7 +91,8 @@ rd_prompt_about_forged_remote_data(int reason, REMDATA_S *rd, char *extra)
if(ps_global->ttyo){
SCROLL_S sargs;
STORE_S *in_store, *out_store;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
HANDLE_S *handles = NULL;
int the_answer = 'n';
diff --git a/alpine/reply.c b/alpine/reply.c
index 6ce5b8e6..bb3a72cb 100644
--- a/alpine/reply.c
+++ b/alpine/reply.c
@@ -67,7 +67,7 @@ int reply_poster_followup(ENVELOPE *);
int sigedit_exit_for_pico(struct headerentry *, void (*)(void), int, char **);
long new_mail_for_pico(int, int);
void cmd_input_for_pico(void);
-int display_message_for_pico(int);
+int display_message_for_pico(UCS);
char *checkpoint_dir_for_pico(char *, size_t);
void resize_for_pico(void);
PCOLORS *colors_for_pico(void);
@@ -106,7 +106,7 @@ reply(struct pine *pine_state, ACTION_S *role_arg)
int i, include_text = 0, times = -1, warned = 0, rv = 0,
flags = RSF_QUERY_REPLY_ALL, reply_raw_body = 0;
int rolemsg = 0, copytomsg = 0;
- gf_io_t pc;
+ gf_o_t pc;
PAT_STATE dummy;
REDRAFT_POS_S *redraft_pos = NULL;
ACTION_S *role = NULL, *nrole;
@@ -1380,7 +1380,8 @@ get_signature_file(char *file, int prenewlines, int postnewlines, int is_sig)
STORE_S *store;
int flags;
PIPE_S *syspipe;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
long start;
if((store = so_get(CharStar, NULL, EDIT_ACCESS)) != NULL){
@@ -1498,7 +1499,7 @@ forward(struct pine *ps, ACTION_S *role_arg)
BODY *orig_body, *body = NULL;
REPLY_S reply;
void *msgtext = NULL;
- gf_io_t pc;
+ gf_o_t pc;
int impl, template_len = 0;
PAT_STATE dummy;
REDRAFT_POS_S *redraft_pos = NULL;
@@ -1872,7 +1873,8 @@ forward_text(struct pine *pine_state, void *text, SourceType source)
{
ENVELOPE *env;
BODY *body;
- gf_io_t pc, gc;
+ gf_o_t pc;
+ gf_i_t gc;
STORE_S *msgtext;
char *enc_error, *sig;
ACTION_S *role = NULL;
@@ -2077,7 +2079,8 @@ signature_edit(char *sigfile, char *title)
char sig_path[MAXPATH+1], errbuf[2000], *errstr = NULL;
char *ret = NULL;
STORE_S *msgso, *tmpso = NULL;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
PICO pbf;
struct variable *vars = ps_global->vars;
REMDATA_S *rd = NULL;
@@ -2230,7 +2233,7 @@ signature_edit(char *sigfile, char *title)
mswin_setwindowmenu (MENU_DEFAULT);
#endif
if(editor_result & COMP_GOTHUP){
- hup_signal(); /* do what's normal for a hup */
+ hup_signal(0); /* do what's normal for a hup */
}
else{
fix_windsize(ps_global);
@@ -2389,7 +2392,7 @@ signature_edit_lit(char *litsig, char **result, char *title, HelpType composer_h
mswin_setwindowmenu (MENU_DEFAULT);
#endif
if(editor_result & COMP_GOTHUP){
- hup_signal(); /* do what's normal for a hup */
+ hup_signal(0); /* do what's normal for a hup */
}
else{
fix_windsize(ps_global);
@@ -2589,7 +2592,7 @@ Args: x -- char processed
Returns:
----*/
int
-display_message_for_pico(int x)
+display_message_for_pico(UCS x)
{
int rv;
diff --git a/alpine/send.c b/alpine/send.c
index 2853b86a..ad74e380 100644
--- a/alpine/send.c
+++ b/alpine/send.c
@@ -256,7 +256,7 @@ alt_compose_screen(struct pine *pine_state)
----*/
void
compose_mail(char *given_to, char *fcc_arg, ACTION_S *role_arg,
- PATMT *attach, gf_io_t inc_text_getc)
+ PATMT *attach, gf_i_t inc_text_getc)
{
BODY *body = NULL;
ENVELOPE *outgoing = NULL;
@@ -3583,7 +3583,8 @@ pine_send(ENVELOPE *outgoing, struct mail_bodystruct **body,
if(editor_result & (COMP_GOTHUP | COMP_CANCEL)){
char *err;
STORE_S *hup_so;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
int we_cancel = 0;
if(editor_result & COMP_CANCEL){
@@ -3641,7 +3642,7 @@ pine_send(ENVELOPE *outgoing, struct mail_bodystruct **body,
dprint((1, "Save composition on HUP %sED\n",
fcc_result ? "SUCCEED" : "FAIL"));
- hup_signal(); /* Do what we normally do on SIGHUP */
+ hup_signal(0); /* Do what we normally do on SIGHUP */
}
else if((editor_result & COMP_SUSPEND) && fcc_result){
if(ps_global->VAR_FORM_FOLDER
@@ -5296,7 +5297,8 @@ filter_message_text(char *fcmd, ENVELOPE *outgoing, struct mail_bodystruct *body
{
char *cmd, *tmpf = NULL, *resultf = NULL, *errstr = NULL, *mtf = NULL;
int key = 0, include_hdrs = 0;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
STORE_S **so = (STORE_S **)((body->type == TYPEMULTIPART)
? &body->nested.part->body.contents.text.data
: &body->contents.text.data),
diff --git a/alpine/send.h b/alpine/send.h
index 3bafce1c..66b47dd2 100644
--- a/alpine/send.h
+++ b/alpine/send.h
@@ -37,7 +37,7 @@
/* exported prototypes */
void compose_screen(struct pine *);
void alt_compose_screen(struct pine *);
-void compose_mail(char *, char *, ACTION_S *, PATMT *, gf_io_t);
+void compose_mail(char *, char *, ACTION_S *, PATMT *, gf_i_t);
int pine_simple_send(ENVELOPE *, BODY **, ACTION_S **, char *, char *, char **, int);
void pine_send(ENVELOPE *, BODY **, char *, ACTION_S *, char *, REPLY_S *,
REDRAFT_POS_S *, char *, PINEFIELD *, int);
diff --git a/alpine/signal.c b/alpine/signal.c
index b254a9d8..f6da9e8e 100644
--- a/alpine/signal.c
+++ b/alpine/signal.c
@@ -50,7 +50,7 @@
static RETSIGTYPE auger_in_signal(int);
void init_sighup(void);
void end_sighup(void);
-RETSIGTYPE term_signal(void);
+RETSIGTYPE term_signal(int);
void fast_clean_up(void);
static RETSIGTYPE usr2_signal(int);
static RETSIGTYPE winch_signal(int);
@@ -232,7 +232,7 @@ end_sighup(void)
Not much to do. Rely on periodic mail file check pointing.
----------------------------------------------------------------------*/
RETSIGTYPE
-hup_signal(void)
+hup_signal(int s)
{
if(ps_global)
ps_global->signal_in_progress = 1;
@@ -286,7 +286,7 @@ user_input_timeout_exit(int to_hours)
Not much to do. Rely on periodic mail file check pointing.
----------------------------------------------------------------------*/
RETSIGTYPE
-term_signal(void)
+term_signal(int c)
{
#if !defined(DOS) && !defined(OS2)
end_signals(1); /* don't catch any more signals */
@@ -607,7 +607,7 @@ pipe_callback(PIPE_S *syspipe, int flags, void *data)
* pipe to complete. When we're in the background for
* a shell, the the side effect is pinging
*/
- RETSIGTYPE (*alarm_sig)();
+ RETSIGTYPE (*alarm_sig)(int);
int old_cue = F_ON(F_SHOW_DELAY_CUE, ps_global);
/*
diff --git a/alpine/signal.h b/alpine/signal.h
index 2e17600f..da11c97c 100644
--- a/alpine/signal.h
+++ b/alpine/signal.h
@@ -29,7 +29,7 @@
/* exported prototypes */
-RETSIGTYPE hup_signal(void);
+RETSIGTYPE hup_signal(int);
RETSIGTYPE child_signal(int);
void user_input_timeout_exit(int);
void init_signals(void);
diff --git a/alpine/smime.c b/alpine/smime.c
index 552438a3..081d11ba 100644
--- a/alpine/smime.c
+++ b/alpine/smime.c
@@ -43,11 +43,11 @@
#include "smime.h"
/* internal prototypes */
-void format_smime_info(int pass, BODY *body, long msgno, gf_io_t pc);
-void print_separator_line(int percent, int ch, gf_io_t pc);
-void output_cert_info(X509 *cert, gf_io_t pc);
-void output_X509_NAME(X509_NAME *name, gf_io_t pc);
-void side_by_side(STORE_S *left, STORE_S *right, gf_io_t pc);
+void format_smime_info(int pass, BODY *body, long msgno, gf_o_t pc);
+void print_separator_line(int percent, int ch, gf_o_t pc);
+void output_cert_info(X509 *cert, gf_o_t pc);
+void output_X509_NAME(X509_NAME *name, gf_o_t pc);
+void side_by_side(STORE_S *left, STORE_S *right, gf_o_t pc);
STORE_S *wrap_store(STORE_S *in, int width);
void smime_config_init_display(struct pine *, CONF_S **, CONF_S **);
void revert_to_saved_smime_config(struct pine *ps, SAVED_CONFIG_S *vsave);
@@ -223,7 +223,7 @@ smime_info_screen(struct pine *ps)
void
-format_smime_info(int pass, BODY *body, long msgno, gf_io_t pc)
+format_smime_info(int pass, BODY *body, long msgno, gf_o_t pc)
{
PKCS7 *p7 = NULL;
int i;
@@ -347,7 +347,7 @@ format_smime_info(int pass, BODY *body, long msgno, gf_io_t pc)
void
-print_separator_line(int percent, int ch, gf_io_t pc)
+print_separator_line(int percent, int ch, gf_o_t pc)
{
int i, start, len;
@@ -365,11 +365,11 @@ print_separator_line(int percent, int ch, gf_io_t pc)
void
-output_cert_info(X509 *cert, gf_io_t pc)
+output_cert_info(X509 *cert, gf_o_t pc)
{
char buf[256];
STORE_S *left,*right;
- gf_io_t spc;
+ gf_o_t spc;
int len, error;
STACK_OF(X509) *chain;
@@ -544,7 +544,7 @@ output_cert_info(X509 *cert, gf_io_t pc)
void
-output_X509_NAME(X509_NAME *name, gf_io_t pc)
+output_X509_NAME(X509_NAME *name, gf_o_t pc)
{
int i, c;
char buf[256];
@@ -574,7 +574,7 @@ output_X509_NAME(X509_NAME *name, gf_io_t pc)
* and merged.
*/
void
-side_by_side(STORE_S *left, STORE_S *right, gf_io_t pc)
+side_by_side(STORE_S *left, STORE_S *right, gf_o_t pc)
{
STORE_S *left_wrapped;
STORE_S *right_wrapped;
@@ -635,7 +635,8 @@ wrap_store(STORE_S *in, int width)
{
STORE_S *result;
void *ws;
- gf_io_t ipc,opc;
+ gf_i_t ipc;
+ gf_o_t opc;
if(width<10)
width = 10;
diff --git a/alpine/status.c b/alpine/status.c
index 2737ded7..5a1c70b4 100644
--- a/alpine/status.c
+++ b/alpine/status.c
@@ -64,8 +64,8 @@ void delay_cmd_cue(int);
int modal_bogus_input(UCS);
int messages_in_queue(void);
int status_message_remaining_nolock(void);
-void set_saw_it_to_zero();
-void mark_modals_done();
+void set_saw_it_to_zero(void);
+void mark_modals_done(void);
SMQ_T *copy_status_queue(SMQ_T *);
@@ -728,7 +728,7 @@ start_over2:
void
-set_saw_it_to_zero()
+set_saw_it_to_zero(void)
{
SMQ_T *q;
@@ -743,7 +743,7 @@ set_saw_it_to_zero()
void
-mark_modals_done()
+mark_modals_done(void)
{
SMQ_T *q;
diff --git a/alpine/takeaddr.c b/alpine/takeaddr.c
index f9bdfab5..96057aed 100644
--- a/alpine/takeaddr.c
+++ b/alpine/takeaddr.c
@@ -3316,7 +3316,7 @@ save_ldap_entry(struct pine *ps, LDAP_CHOOSE_S *e, int save)
if(!(srcstore = so_get(srctype, NULL, EDIT_ACCESS)))
q_status_message(SM_ORDER,0,2, _("Error allocating space"));
else{
- gf_io_t pc;
+ gf_o_t pc;
VCARD_INFO_S *vinfo;
vinfo = (VCARD_INFO_S *)fs_get(sizeof(VCARD_INFO_S));
diff --git a/pico/estruct.h b/pico/estruct.h
index 4d0287e6..c6255760 100644
--- a/pico/estruct.h
+++ b/pico/estruct.h
@@ -317,7 +317,7 @@ typedef struct {
typedef struct {
UCS k_code; /* Key code */
- int (*k_fp)(); /* Routine to handle it */
+ int (*k_fp)(int, int); /* Routine to handle it */
} KEYTAB;
/* structure used for key menu painting */
diff --git a/pico/osdep/color.c b/pico/osdep/color.c
index 9b9f40d6..be2fd048 100644
--- a/pico/osdep/color.c
+++ b/pico/osdep/color.c
@@ -88,7 +88,7 @@ void free_color_name_list(struct color_name_list **nl);
#if HAS_TERMINFO
extern char *tparm(char *, ...);
#endif
-extern char *tgoto();
+extern char *tgoto(char *, int, int);
void tinitcolor(void);
int tfgcolor(int);
int tbgcolor(int);
diff --git a/pico/osdep/filesys.c b/pico/osdep/filesys.c
index 05be5fae..6b9784fa 100644
--- a/pico/osdep/filesys.c
+++ b/pico/osdep/filesys.c
@@ -62,7 +62,7 @@ fexist(char *file,
#ifndef _WINDOWS
struct stat sbuf;
int rv;
- int (*stat_f)() = (m && *m == 't') ? our_lstat : our_stat;
+ int (*stat_f)(char *, struct stat *) = (m && *m == 't') ? our_lstat : our_stat;
if(l)
*l = (off_t)0;
diff --git a/pico/osdep/mswin.h b/pico/osdep/mswin.h
index f76821dd..ec85cc7c 100644
--- a/pico/osdep/mswin.h
+++ b/pico/osdep/mswin.h
@@ -318,8 +318,6 @@ int mswin_caninput(void);
void mswin_beginupdate(void);
void mswin_endupdate(void);
int mswin_sethelptextcallback(cbstr_t);
-int strucmp(char *, char *);
-int struncmp(char *, char *, int);
#ifdef MSC_MALLOC
/*
diff --git a/pico/osdep/signals.h b/pico/osdep/signals.h
index 2ea33cc4..1ef6dc80 100644
--- a/pico/osdep/signals.h
+++ b/pico/osdep/signals.h
@@ -55,7 +55,7 @@ RETSIGTYPE winch_handler(int);
#endif
#ifdef POSIX_SIGNALS
-void (*posix_signal(int, RETSIGTYPE (*)()))(int);
+void (*posix_signal(int, RETSIGTYPE (*)(int)))(int);
int posix_sigunblock(int);
#endif
diff --git a/pico/osdep/terminal.c b/pico/osdep/terminal.c
index 74761212..6150c6fc 100644
--- a/pico/osdep/terminal.c
+++ b/pico/osdep/terminal.c
@@ -75,7 +75,7 @@ static void setup_dflt_esc_seq(void);
static void tinfoinsert(UCS);
static void tinfodelete(void);
-extern int tput();
+extern int tput(char);
extern int tputs(char *, int, int (*)(int));
extern char *tgoto(char *, int, int);
extern char *tigetstr (char *);
diff --git a/pico/pico.c b/pico/pico.c
index bb1376fa..639deccc 100644
--- a/pico/pico.c
+++ b/pico/pico.c
@@ -1456,7 +1456,7 @@ mouse_get_last(mousehandler_t *f, MOUSEPRESS *mp)
* register_key - register the given keystroke to accept mouse events
*/
void
-register_key(int i, unsigned rval, char *label, void (*label_printer)(),
+register_key(int i, unsigned rval, char *label, void (*label_printer)(int, MENUITEM *),
int row, int col, int len, COLOR_PAIR *kn, COLOR_PAIR *kl)
{
if(i > 11)
diff --git a/pico/pico.h b/pico/pico.h
index 907efe36..69cd8ba3 100644
--- a/pico/pico.h
+++ b/pico/pico.h
@@ -68,6 +68,24 @@ struct hdr_line {
/* must be the same as HelpType in pith/helptext.h */
#define HELP_T char **
+/*
+ * Structure to pass as arg to builders.
+ *
+ * me -- A pointer to the bldr_private data for the entry currently
+ * being edited.
+ * tptr -- A malloc'd copy of the displayed text for the affected_entry
+ * pointed to by the aff argument.
+ * aff -- A pointer to the bldr_private data for the affected_entry (the
+ * entry that this entry affects).
+ * next -- The next affected_entry in the list. For example, the Lcc entry
+ * affects the To entry which affects the Fcc entry.
+ */
+typedef struct bld_arg {
+ void **me;
+ char *tptr;
+ void **aff;
+ struct bld_arg *next;
+} BUILDER_ARG;
/*
* This structure controls the header line items on the screen. An
@@ -83,13 +101,16 @@ struct headerentry {
int prwid; /* prompt width on screen */
int maxlen;
char **realaddr;
- int (*builder)(); /* Function to verify/canonicalize val */
+ /* Function to verify/canonicalize val */
+ int (*builder)(char *, char **, char **, BUILDER_ARG *, int *);
struct headerentry *affected_entry, *next_affected;
/* entry builder's 4th arg affects */
- char *(*selector)(); /* Browser for possible values */
+ /* Browser for possible values */
+ char *(*selector)(char **);
char *key_label; /* Key label for key to call browser */
- char *(*fileedit)(); /* Editor for file named in header */
- int (*nickcmpl)(); /* routine that helps with nickname completion */
+ char *(*fileedit)(char *); /* Editor for file named in header */
+ /* routine that helps with nickname completion */
+ int (*nickcmpl)(char *, char **, int, unsigned int);
unsigned display_it:1; /* field is to be displayed by default */
unsigned break_on_comma:1; /* Field breaks on commas */
unsigned is_attach:1; /* Special case field for attachments */
@@ -108,27 +129,6 @@ struct headerentry {
struct hdr_line *hd_text;
};
-
-/*
- * Structure to pass as arg to builders.
- *
- * me -- A pointer to the bldr_private data for the entry currently
- * being edited.
- * tptr -- A malloc'd copy of the displayed text for the affected_entry
- * pointed to by the aff argument.
- * aff -- A pointer to the bldr_private data for the affected_entry (the
- * entry that this entry affects).
- * next -- The next affected_entry in the list. For example, the Lcc entry
- * affects the To entry which affects the Fcc entry.
- */
-typedef struct bld_arg {
- void **me;
- char *tptr;
- void **aff;
- struct bld_arg *next;
-} BUILDER_ARG;
-
-
/*
* structure to keep track of header display
*/
@@ -213,24 +213,33 @@ typedef struct pico_struct {
/* If we had this to do over, it would probably be one giant bitmap */
unsigned always_spell_check:1; /* always spell-checking upon quit */
unsigned strip_ws_before_send:1; /* don't default strip bc of flowed */
- unsigned allow_flowed_text:1; /* clean text when done to keep flowed */
- int (*helper)(); /* Pine's help function */
- int (*showmsg)(); /* Pine's display_message */
- UCS (*suspend)(); /* Pine's suspend */
- void (*keybinput)(); /* Pine's keyboard input indicator */
- int (*tty_fix)(); /* Let Pine fix tty state */
- long (*newmail)(); /* Pine's report_new_mail */
- long (*msgntext)(); /* callback to get msg n's text */
- int (*upload)(); /* callback to rcv uploaded text */
- char *(*ckptdir)(); /* callback for checkpoint file dir */
- int (*exittest)(); /* callback to verify exit request */
- char *(*canceltest)(); /* callback to verify cancel request */
- int (*mimetype)(); /* callback to display mime type */
- int (*expander)(); /* callback to expand address lists */
- int (*user_says_noflow)(); /* callback to tell us we're not flowing */
- void (*resize)(); /* callback handling screen resize */
- void (*winch_cleanup)(); /* callback handling screen resize */
- void (*newthread)(); /* callback to create new thread */
+ unsigned allow_flowed_text:1; /* clean text when done to keep flowed */
+ /* Pine's help function */
+ int (*helper)(HELP_T, char *, int);
+ int (*showmsg)(UCS); /* Pine's display_message */
+ UCS (*suspend)(void); /* Pine's suspend */
+ void (*keybinput)(void); /* Pine's keyboard input indicator */
+ int (*tty_fix)(int); /* Let Pine fix tty state */
+ long (*newmail)(int, int); /* Pine's report_new_mail */
+ /* callback to get msg n's text */
+ long (*msgntext)(long, int (*)(int));
+ /* callback to rcv uploaded text */
+ int (*upload)(char *, size_t, long *);
+ /* callback for checkpoint file dir */
+ char *(*ckptdir)(char *, size_t);
+ /* callback to verify exit request */
+ int (*exittest)(struct headerentry *, void (*)(void), int, char **);
+ /* callback to verify cancel request */
+ char *(*canceltest)(void(*)(void));
+ int (*mimetype)(char *); /* callback to display mime type */
+ /* callback to expand address lists */
+ int (*expander)(struct headerentry *, char ***);
+ int (*user_says_noflow)(void); /* callback to tell us we're not flowing */
+ /* callback handling screen resize */
+ void (*resize)(void);
+ /* callback handling screen resize */
+ void (*winch_cleanup)(void);
+ void (*newthread)(void); /* callback to create new thread */
int arm_winch_cleanup; /* do the winch_cleanup if resized */
HELP_T search_help;
HELP_T ins_help;
@@ -336,7 +345,7 @@ typedef struct menuitem {
MPOINT br; /* bottom-right corner of active area */
MPOINT lbl; /* where the label starts */
char *label;
- void (*label_hiliter)();
+ void (*label_hiliter)(int, struct menuitem *);
COLOR_PAIR *kncp; /* key name color pair */
COLOR_PAIR *klcp; /* key label color pair */
struct menuitem *next;
@@ -453,7 +462,7 @@ void clear_mfunc(mousehandler_t);
unsigned long mouse_in_content(unsigned long, int, int, int, int);
unsigned long mouse_in_pico(unsigned long, int, int, int, int);
void mouse_get_last(mousehandler_t *, MOUSEPRESS *);
-void register_key(int, unsigned, char *, void (*)(),
+void register_key(int, unsigned, char *, void (*)(int, MENUITEM *),
int, int, int, COLOR_PAIR *, COLOR_PAIR *);
int mouse_on_key(int, int);
#endif /* MOUSE */
diff --git a/pith/detach.c b/pith/detach.c
index 112f9628..6cb85e4d 100644
--- a/pith/detach.c
+++ b/pith/detach.c
@@ -65,14 +65,47 @@ FETCH_READC_S *g_fr_desc;
/*
* Internal Prototypes
*/
-/*
+/* HISTORICAL COMMENT
* This function is intentionally declared without an argument type so
* that warnings will go away in Windows. We're using gf_io_t for both
* input and output functions and the arguments aren't actually the
* same in the two cases. We should really have a read version and
* a write version of gf_io_t. That's why this is like this for now.
+ *
+ * EXPANDED VERSION
+ * The previous paragraph refers to the definition of the detach_writec
+ * function. It used to be that that function was defined as
+ * detach_writec();
+ * without any internal prototype. The reason why this was defined like
+ * that was because a function of type gf_io_t could be used to read
+ * data from or write data to a store object. In the case that a function
+ * of type gf_io_t is used to read data its internal prototype is of
+ * type (unsigned char *), and in the case that it is used to write
+ * data its internal prototype is of type (int).
+ *
+ * One way to deal with this is to make functions of type gf_io_t
+ * with internal prototype of type (void *) and to cast this to (int)
+ * and (unsigned char *) as needed, but then we get to into casting
+ * of different size warnings that will never lose information, but
+ * are not nice to read, so the solution is to really eliminate the
+ * type gf_io_t and split it into two types:
+ * One type is gf_i_t with internal prototype (unsigned char *) and
+ * another is gf_o_t with internal prototype (int).
+ *
+ * In the source code of Alpine the functions of this type are typically
+ * called gc for functions of the type gf_i_t, where gc stands for getchar,
+ * and pc for functions of the type gf_o_t, where pc stands for putchar.
+ * So a pc function writes data, and a gc function reads data. The gf_io_t
+ * type is gone. I have left some comments that refer to this type in the
+ * source code for historical reasons, now they must be interpreted as
+ * a gf_i_t or gf_o_t as appropiate, depending on if we need to read or
+ * write to a store object.
+ *
+ * One last thing, the gf_ prefix is for generic filter. Most of the gf_
+ * functions live in the file pith/filter.c, but there is a chance one can
+ * a function outside there. Have fun searching for them. ECh, 01/30/2024.
*/
-int detach_writec();
+int detach_writec(int);
TRGR_S *build_trigger_list(void);
void blast_trigger_list(TRGR_S **);
int df_trigger_cmp(long, char *, LT_INS_S **, void *);
@@ -96,7 +129,7 @@ char *
detach_raw(MAILSTREAM *stream, /* c-client stream to use */
long int msg_no, /* message number to deal with */
char *part_no, /* part number of message */
- gf_io_t pc, /* where to put it */
+ gf_o_t pc, /* where to put it */
int flags)
{
FETCH_READC_S *frd = (FETCH_READC_S *)fs_get(sizeof(FETCH_READC_S));
@@ -137,7 +170,7 @@ detach(MAILSTREAM *stream, /* c-client stream to use */
char *part_no, /* part number of message */
long int partial, /* if >0, limit read to this many bytes */
long int *len, /* returns bytes read in this arg */
- gf_io_t pc, /* where to put it */
+ gf_o_t pc, /* where to put it */
FILTLIST_S *aux_filters, /* null terminated array of filts */
long flags)
{
@@ -337,7 +370,7 @@ detach(MAILSTREAM *stream, /* c-client stream to use */
fs_give((void **)&aux);
}
else{ /* just copy it, then */
- gf_io_t gc;
+ gf_i_t gc;
gf_set_so_readc(&gc, detach_so);
so_seek(detach_so, 0L, 0);
diff --git a/pith/detach.h b/pith/detach.h
index 96daa6dc..13681209 100644
--- a/pith/detach.h
+++ b/pith/detach.h
@@ -41,7 +41,7 @@ typedef struct _fetch_read {
allocsize; /* allocated size of chunk block */
long flags, /* flags to use fetching block */
fetchtime; /* usecs avg per chunk fetch */
- gf_io_t readc;
+ gf_i_t readc;
STORE_S *cache;
} FETCH_READC_S;
@@ -62,8 +62,8 @@ extern FETCH_READC_S *g_fr_desc;
#define DT_ALLIMAGES (long) 0x100000
/* exported prototypes */
-char *detach_raw(MAILSTREAM *, long, char *, gf_io_t, int);
-char *detach(MAILSTREAM *, long, char *, long, long *, gf_io_t, FILTLIST_S *, long);
+char *detach_raw(MAILSTREAM *, long, char *, gf_o_t, int);
+char *detach(MAILSTREAM *, long, char *, long, long *, gf_o_t, FILTLIST_S *, long);
int valid_filter_command(char **);
void fetch_readc_init(FETCH_READC_S *, MAILSTREAM *, long, char *,
unsigned long, long, long);
diff --git a/pith/editorial.c b/pith/editorial.c
index a93051b8..e841e371 100644
--- a/pith/editorial.c
+++ b/pith/editorial.c
@@ -48,9 +48,9 @@ typedef struct _editorial_s {
char *
-format_editorial(char *s, int width, int flags, HANDLE_S **handlesp, gf_io_t pc)
+format_editorial(char *s, int width, int flags, HANDLE_S **handlesp, gf_o_t pc)
{
- gf_io_t gc;
+ gf_i_t gc;
int *margin;
EDITORIAL_S es;
URL_HILITE_S uh;
diff --git a/pith/editorial.h b/pith/editorial.h
index 6ca16365..73f24fd2 100644
--- a/pith/editorial.h
+++ b/pith/editorial.h
@@ -23,7 +23,7 @@
/* exported prototypes */
-char *format_editorial(char *, int, int, HANDLE_S **, gf_io_t);
+char *format_editorial(char *, int, int, HANDLE_S **, gf_o_t);
#endif /* PITH_EDITORIAL_INCLUDED */
diff --git a/pith/filter.c b/pith/filter.c
index d2bd6c8f..e7da2238 100644
--- a/pith/filter.c
+++ b/pith/filter.c
@@ -68,7 +68,7 @@ int gf_freadc_getchar(unsigned char *, void *);
int gf_fwritec(int);
int gf_fwritec_locale(int);
#ifdef _WINDOWS
-int gf_freadc_windows(unsigned char *);
+int gf_freadc_windows(void *); /* of type unsigned char * */
#endif /* _WINDOWS */
int gf_preadc(unsigned char *);
int gf_preadc_locale(unsigned char *);
@@ -108,7 +108,7 @@ char *(*pith_opt_pretty_feature_name)(char *, int);
* pointer to first function in a pipe, and pointer to last filter
*/
FILTER_S *gf_master = NULL;
-static gf_io_t last_filter;
+static gf_o_t last_filter;
static char *gf_error_string;
static long gf_byte_count;
static jmp_buf gf_error_state;
@@ -252,7 +252,7 @@ static GF_SO_STACK {
* unprotected malloc/free/realloc, which can't be interrupted.
*/
int
-pc_is_picotext(gf_io_t pc)
+pc_is_picotext(gf_o_t pc)
{
return(pc == gf_so_writec && gf_so_out && gf_so_out->so &&
gf_so_out->so->src == ExternalText);
@@ -265,7 +265,7 @@ pc_is_picotext(gf_io_t pc)
* getc function
*/
void
-gf_set_readc(gf_io_t *gc, void *txt, long unsigned int len, SourceType src, int flags)
+gf_set_readc(gf_i_t *gc, void *txt, long unsigned int len, SourceType src, int flags)
{
gf_in.n = len;
gf_in.flags = flags;
@@ -303,7 +303,7 @@ gf_set_readc(gf_io_t *gc, void *txt, long unsigned int len, SourceType src, int
* putc function
*/
void
-gf_set_writec(gf_io_t *pc, void *txt, long unsigned int len, SourceType src, int flags)
+gf_set_writec(gf_o_t *pc, void *txt, long unsigned int len, SourceType src, int flags)
{
gf_out.n = len;
gf_out.flags = flags;
@@ -338,7 +338,7 @@ gf_set_writec(gf_io_t *pc, void *txt, long unsigned int len, SourceType src, int
* getc function
*/
void
-gf_set_so_readc(gf_io_t *gc, STORE_S *so)
+gf_set_so_readc(gf_i_t *gc, STORE_S *so)
{
GF_SO_STACK *sp = (GF_SO_STACK *) fs_get(sizeof(GF_SO_STACK));
@@ -372,7 +372,7 @@ gf_clear_so_readc(STORE_S *so)
* putc function
*/
void
-gf_set_so_writec(gf_io_t *pc, STORE_S *so)
+gf_set_so_writec(gf_o_t *pc, STORE_S *so)
{
GF_SO_STACK *sp = (GF_SO_STACK *) fs_get(sizeof(GF_SO_STACK));
@@ -695,7 +695,7 @@ gf_swritec_locale(int c)
* output the given string with the given function
*/
int
-gf_puts(register char *s, gf_io_t pc)
+gf_puts(register char *s, gf_o_t pc)
{
while(*s != '\0')
if(!(*pc)((unsigned char)*s++))
@@ -709,7 +709,7 @@ gf_puts(register char *s, gf_io_t pc)
* output the given string with the given function
*/
int
-gf_nputs(register char *s, long int n, gf_io_t pc)
+gf_nputs(register char *s, long int n, gf_o_t pc)
{
while(n--)
if(!(*pc)((unsigned char)*s++))
@@ -905,7 +905,7 @@ gf_terminal(FILTER_S *f, int flg)
* for example: a function to write a char to a file or into a buffer
*/
void
-gf_set_terminal(gf_io_t f) /* function to set generic filter */
+gf_set_terminal(gf_o_t f) /* function to set generic filter */
{
last_filter = f;
@@ -932,7 +932,7 @@ gf_error(char *s)
* it on to the first filter in the chain.
*/
char *
-gf_pipe(gf_io_t gc, gf_io_t pc)
+gf_pipe(gf_i_t gc, gf_o_t pc)
/* how to get a character */
{
unsigned char c;
@@ -1016,7 +1016,7 @@ gf_bytes_piped(void)
* Returns: NULL on success, reason for failure (not alloc'd!) on error
*/
char *
-gf_filter(char *cmd, char *prepend, STORE_S *source_so, gf_io_t pc,
+gf_filter(char *cmd, char *prepend, STORE_S *source_so, gf_o_t pc,
FILTLIST_S *aux_filters, int silent, int disable_reset,
void (*pipecb_f)(PIPE_S *, int, void *))
{
diff --git a/pith/filter.h b/pith/filter.h
index e3656bcb..4061333c 100644
--- a/pith/filter.h
+++ b/pith/filter.h
@@ -161,21 +161,21 @@ int generic_readc_locale(unsigned char *c,
int (*get_a_char)(unsigned char *, void *),
void *extraarg,
CBUF_S *cb);
-int pc_is_picotext(gf_io_t);
-void gf_set_readc(gf_io_t *, void *, unsigned long, SourceType, int);
-void gf_set_writec(gf_io_t *, void *, unsigned long, SourceType, int);
-void gf_set_so_readc(gf_io_t *, STORE_S *);
+int pc_is_picotext(gf_o_t);
+void gf_set_readc(gf_i_t *, void *, unsigned long, SourceType, int);
+void gf_set_writec(gf_o_t *, void *, unsigned long, SourceType, int);
+void gf_set_so_readc(gf_i_t *, STORE_S *);
void gf_clear_so_readc(STORE_S *);
-void gf_set_so_writec(gf_io_t *, STORE_S *);
+void gf_set_so_writec(gf_o_t *, STORE_S *);
void gf_clear_so_writec(STORE_S *);
-int gf_puts(char *, gf_io_t);
-int gf_nputs(char *, long, gf_io_t);
+int gf_puts(char *, gf_o_t);
+int gf_nputs(char *, long, gf_o_t);
void gf_filter_init(void);
void gf_link_filter(filter_t, void *);
-void gf_set_terminal(gf_io_t);
-char *gf_pipe(gf_io_t, gf_io_t);
+void gf_set_terminal(gf_o_t);
+char *gf_pipe(gf_i_t, gf_o_t);
long gf_bytes_piped(void);
-char *gf_filter(char *, char *, STORE_S *, gf_io_t, FILTLIST_S *, int,
+char *gf_filter(char *, char *, STORE_S *, gf_o_t, FILTLIST_S *, int,
int, void (*)(PIPE_S *, int, void *));
void gf_binary_b64(FILTER_S *, int);
void gf_b64_binary(FILTER_S *, int);
diff --git a/pith/filttype.h b/pith/filttype.h
index d3d08539..08a8d9d0 100644
--- a/pith/filttype.h
+++ b/pith/filttype.h
@@ -51,7 +51,8 @@ typedef struct filter_insert_s {
} LT_INS_S;
-typedef int (*gf_io_t)(); /* type of get and put char function */
+typedef int (*gf_i_t)(unsigned char *);
+typedef int (*gf_o_t)(int);
typedef void (*filter_t)(FILTER_S *, int);
typedef int (*linetest_t)(long, char *, LT_INS_S **, void *);
typedef void (*htmlrisk_t)(void);
diff --git a/pith/ical.c b/pith/ical.c
index 98080b5b..17dda00a 100644
--- a/pith/ical.c
+++ b/pith/ical.c
@@ -16,7 +16,7 @@ typedef struct ical_iana_prop_s {
char *prop; /* component PROPerty name */
size_t len; /* size of component name (strlen(x->prop)) */
int pos; /* location of this component in the prop array */
- void *(*parse)(); /* parser */
+ void *(*parse)(void **); /* parser */
void (*give)(void **); /* free memory */
} ICAL_PROP_S;
@@ -58,19 +58,22 @@ void ical_free_valarm(void **);
void ical_free_unknown_comp(ICAL_S **);
/* parse properties */
-void *ical_cline_from_token(void *, char **, char *);
-void *ical_gencline_from_token(void *, char **, char *);
-
-void *ical_parse_rrule(void *, char **, char *);
-void *ical_parse_time(void *, char **, char *);
-void *ical_parse_offset(void *, char **, char *);
-
-void *ical_parse_freq(void *, char *);
-void *ical_parse_until(void *, char *);
-void *ical_parse_count(void *, char *);
-void *ical_parse_interval(void *, char *);
-void *ical_parse_weekday_list(void *, char *);
-void *ical_parse_number_list(void *, char *);
+/* argument of type void *, char **, char * */
+void *ical_cline_from_token(void **);
+void *ical_gencline_from_token(void **);
+
+/* argument of type void *, char **, char * */
+void *ical_parse_rrule(void **);
+void *ical_parse_time(void **);
+void *ical_parse_offset(void **);
+
+/* argument of type (void *, char *) */
+void *ical_parse_freq(void **);
+void *ical_parse_until(void **);
+void *ical_parse_count(void **);
+void *ical_parse_interval(void **);
+void *ical_parse_weekday_list(void **);
+void *ical_parse_number_list(void **);
int ical_get_number_value(char *, int, int);
void ical_set_date(ICLINE_S *, VTIMEZONE_S *);
@@ -695,11 +698,18 @@ ical_parse_text(char *text)
}
void *
-ical_parse_time(void *ic_datep, char **text, char *token)
+ical_parse_time(void **arg)
{
+ void *ic_datep;
+ char **text;
+ char *token;
struct tm *datep;
ICLINE_S *icl;
+ ic_datep = arg[0];
+ text = (char **) arg[1];
+ token = (char *) arg[2];
+
datep = fs_get(sizeof(struct tm));
icl = ical_parse_line(text, token);
ical_parse_date(icl->value, datep);
@@ -710,11 +720,16 @@ ical_parse_time(void *ic_datep, char **text, char *token)
}
void *
-ical_parse_interval(void *longvp, char *value)
+ical_parse_interval(void **arg)
{
+ void *longvp;
+ char *value;
unsigned long *longp;
+ longvp = arg[0];
+ value = (char *) arg[1];
+
longp = fs_get(sizeof(unsigned long));
*longp = atoi(value);
longvp = (void *) longp;
@@ -724,12 +739,18 @@ ical_parse_interval(void *longvp, char *value)
void *
-ical_parse_offset(void *offsetv, char **text, char *token)
+ical_parse_offset(void **arg)
{
+ void *offsetv;
+ char **text;
+ char *token;
ICLINE_S *icl;
char *value;
int h, m, *offset;
+ offsetv = arg[0];
+ text = (char **) arg[1];
+ token = (char *) arg[2];
offset = fs_get(sizeof(int));
icl = ical_parse_line(text, token);
@@ -760,10 +781,17 @@ ical_parse_offset(void *offsetv, char **text, char *token)
* rv = (cast here *) ical_cline_from_token((void *)rv, &text, token);
*/
void *
-ical_cline_from_token(void *iclp, char **text, char *token)
+ical_cline_from_token(void **arg)
{
+ void *iclp;
+ char **text;
+ char *token;
ICLINE_S *icl;
+ iclp = arg[0];
+ text = (char **) arg[1];
+ token = (char *) arg[2];
+
ical_debug("ical_cline_from_token", *text);
icl = ical_parse_line(text, token);
@@ -777,16 +805,28 @@ ical_cline_from_token(void *iclp, char **text, char *token)
}
void *
-ical_gencline_from_token(void *giclv, char **text, char *token)
+ical_gencline_from_token(void **arg)
{
+ void *giclv;
+ char **text;
+ char *token;
+ void *a[3];
GEN_ICLINE_S *gicl= NULL;
+ giclv = arg[0];
+ text = (char **) arg[1];
+ token = (char *) arg[2];
+
if(!struncmp(*text, token, strlen(token))){
gicl = fs_get(sizeof(GEN_ICLINE_S));
memset((void *) gicl, 0, sizeof(GEN_ICLINE_S));
gicl->cline = ical_parse_line(text, token);
// gicl->line = (ICLINE_S *) ical_cline_from_token((void *) gicl->cline, text, token);
- gicl->next = (GEN_ICLINE_S *) ical_gencline_from_token((void *) gicl->next, text, token);
+ a[0] = (void *) gicl->next;
+ a[1] = (void *) text;
+ a[2] = (void *) token;
+ gicl->next = (GEN_ICLINE_S *) ical_gencline_from_token((void **)a);
+ arg[1] = (void *) text;
}
if(giclv != NULL)
@@ -873,9 +913,11 @@ ical_parse_vcalendar(char **text)
case 'C':
case 'c': if(!struncmp(s+1, "ALSCALE", 7)){
- v = (void *) vcal->calscale;
- v = ical_cline_from_token(v, &s, "CALSCALE");
- vcal->calscale = (ICLINE_S *) v;
+ void *a[3];
+ a[0] = (void *) vcal->calscale;
+ a[1] = (void *) &s;
+ a[2] = (char *) "CALSCALE";
+ vcal->calscale = (ICLINE_S *) ical_cline_from_token((void **) a);
}
else ukn++;
break;
@@ -894,27 +936,33 @@ ical_parse_vcalendar(char **text)
case 'M':
case 'm': if(!struncmp(s+1, "ETHOD", 5)){
- v = (void *) vcal->method;
- v = ical_cline_from_token(v, &s, "METHOD");
- vcal->method = (ICLINE_S *) v;
+ void *a[3];
+ a[0] = (void *) vcal->method;
+ a[1] = (void *) &s;
+ a[2] = (char *) "METHOD";
+ vcal->method = (ICLINE_S *) ical_cline_from_token((void **) a);
}
else ukn++;
break;
case 'P':
case 'p': if(!struncmp(s+1, "RODID", 5)){
- v = (void *) vcal->prodid;
- v = ical_cline_from_token(v, &s, "PRODID");
- vcal->prodid = (ICLINE_S *) v;
+ void *a[3];
+ a[0] = (void *) vcal->prodid;
+ a[1] = (void *) &s;
+ a[2] = (char *) "PRODID";
+ vcal->prodid = (ICLINE_S *) ical_cline_from_token((void **) a);
}
else ukn++;
break;
case 'V':
case 'v': if(!struncmp(s+1, "ERSION", 6)){
- v = (void *) vcal->version;
- v = ical_cline_from_token(v, &s, "VERSION");
- vcal->version = (ICLINE_S *) v;
+ void *a[3];
+ a[0] = (void *) vcal->version;
+ a[1] = (void *) &s;
+ a[2] = (char *) "VERSION";
+ vcal->version = (ICLINE_S *) ical_cline_from_token((void **) a);
} else ukn++;
break;
@@ -1004,14 +1052,15 @@ ical_parse_vevent(char **text)
if(!struncmp(s, event_prop[i].prop, t-s))
break;
if(event_prop[i].parse){
- void *v;
+ void *a[3];
if(vevent->prop == NULL){
vevent->prop = fs_get((EvUnknown+1)*sizeof(void *));
memset((void *)vevent->prop, 0, (EvUnknown+1)*sizeof(void *));
}
- v = vevent->prop[event_prop[i].pos];
- v = (event_prop[i].parse)(v , &s, event_prop[i].prop);
- vevent->prop[event_prop[i].pos] = v;
+ a[0] = vevent->prop[event_prop[i].pos];
+ a[1] = (void *) &s;
+ a[2] = (void *) event_prop[i].prop;
+ vevent->prop[event_prop[i].pos] = (event_prop[i].parse)((void **) a);
}
else
ukn++;
@@ -1107,14 +1156,15 @@ ical_parse_vtimezone(char **text)
if(!struncmp(s, tz_comp[i].prop, t-s))
break;
if(tz_comp[i].parse){
- void *v;
+ void *a[3];
if(vtz->prop == NULL){
vtz->prop = fs_get(TZCUnknown*sizeof(void *));
memset((void *)vtz->prop, 0, TZCUnknown*sizeof(void *));
}
- v = vtz->prop[tz_comp[i].pos];
- v = (tz_comp[i].parse)(v, &s, tz_comp[i].prop);
- vtz->prop[tz_comp[i].pos] = v;
+ a[0] = vtz->prop[tz_comp[i].pos];
+ a[1] = (void *) &s;
+ a[2] = (void *) tz_comp[i].prop;
+ vtz->prop[tz_comp[i].pos] = (tz_comp[i].parse)((void **) a);
}
else
ukn++;
@@ -1189,14 +1239,15 @@ ical_parse_timezone(char **text)
if(!struncmp(s, tz_prop[i].prop, t-s))
break;
if(tz_prop[i].parse){
- void *v;
+ void *a[3];
if(tzprop->prop == NULL){
tzprop->prop = fs_get(TZPUnknown*sizeof(void *));
memset((void *)tzprop->prop, 0, TZPUnknown*sizeof(void *));
}
- v = tzprop->prop[tz_prop[i].pos];
- v = (tz_prop[i].parse)(v, &s, tz_prop[i].prop);
- tzprop->prop[tz_prop[i].pos] = v;
+ a[0] = tzprop->prop[tz_prop[i].pos];
+ a[1] = (void *) &s;
+ a[2] = (void *) tz_prop[i].prop;
+ tzprop->prop[tz_prop[i].pos] = (tz_prop[i].parse)((void **) a);
}
else
ukn++;
@@ -1270,14 +1321,15 @@ ical_parse_valarm(char **text)
if(!struncmp(s, alarm_prop[i].prop, t-s))
break;
if(alarm_prop[i].parse){
- void *v;
+ void *a[3];
if(valarm->prop == NULL){
valarm->prop = fs_get((AlUnknown+1)*sizeof(void *));
memset((void *)valarm->prop, 0, (AlUnknown+1)*sizeof(void *));
}
- v = valarm->prop[alarm_prop[i].pos];
- v = (alarm_prop[i].parse)(v, &s, alarm_prop[i].prop);
- valarm->prop[alarm_prop[i].pos] = v;
+ a[0] = valarm->prop[alarm_prop[i].pos];
+ a[1] = (void *) &s;
+ a[2] = (void *) alarm_prop[i].prop;
+ valarm->prop[alarm_prop[i].pos] = (alarm_prop[i].parse)((void **) a);
}
else
ukn++;
@@ -1476,10 +1528,14 @@ ical_parse_line(char **text, char *name)
***/
void *
-ical_parse_freq(void *fvalp, char *text)
+ical_parse_freq(void **arg)
{
+ void *fvalp;
+ char *text;
Freq_value *fval;
+ fvalp = arg[0];
+ text = (char *) arg[1];
fval = fs_get(sizeof(Freq_value));
*fval = FUnknown;
@@ -1500,10 +1556,14 @@ ical_parse_freq(void *fvalp, char *text)
}
void *
-ical_parse_until(void *Tmp, char *text)
+ical_parse_until(void **arg)
{
+ void *Tmp;
+ char *text;
struct tm *Tm;
+ Tmp = arg[0];
+ text = (char *) arg[1];
if(text != NULL){
Tm = fs_get(sizeof(struct tm));
ical_parse_date(text, Tm);
@@ -1514,10 +1574,14 @@ ical_parse_until(void *Tmp, char *text)
}
void *
-ical_parse_count(void *countp, char *text)
+ical_parse_count(void **arg)
{
+ void *countp;
+ char *text;
int *count;
+ countp = arg[0];
+ text = (char *) arg[1];
if(text != NULL){
count = fs_get(sizeof(int));
*count = atoi(text);
@@ -1528,13 +1592,18 @@ ical_parse_count(void *countp, char *text)
}
void *
-ical_parse_weekday_list(void *bywkdyp, char *wklist)
+ical_parse_weekday_list(void **arg)
{
+ void *bywkdyp;
+ char *wklist;
BYWKDY_S *bywkdy, *w;
char *s, *t, c;
int done;
size_t len;
+ bywkdyp = arg[0];
+ wklist = (char *) arg[1];
+
bywkdy = NULL;
bywkdyp = (void *) bywkdy;
@@ -1581,14 +1650,17 @@ ical_parse_weekday_list(void *bywkdyp, char *wklist)
}
void *
-ical_parse_number_list(void *bynop, char *nolist)
+ical_parse_number_list(void **arg)
{
+ void *bynop;
+ char *nolist;
BYWKDY_S *byno, *n;
char *s, *t, c;
int done = 0;
byno = NULL;
- bynop = (void *) byno;
+ bynop = arg[0];
+ nolist = (char *) arg[1];
if(nolist == NULL) return bynop;
@@ -1621,14 +1693,21 @@ ical_parse_number_list(void *bynop, char *nolist)
}
void *
-ical_parse_rrule(void *rrulep, char **text, char *token)
+ical_parse_rrule(void **arg)
{
+ void *rrulep;
+ char **text;
+ char *token;
RRULE_S *rrule;
ICLINE_S *icl;
char *s;
ICAL_PARAMETER_S *param, *p;
int i;
+ rrulep = arg[0];
+ text = (char **) arg[1];
+ token = (char *) arg[2];
+
if(text == NULL || *text == NULL || struncmp(*text, "RRULE", 5))
return rrulep;
@@ -1652,9 +1731,10 @@ ical_parse_rrule(void *rrulep, char **text, char *token)
for(p = param; p != NULL; p = p->next){
for(i = 0; rrule_prop[i].prop != NULL && strucmp(p->name, rrule_prop[i].prop); i++);
if(rrule_prop[i].parse){
- void *v = rrule->prop[rrule_prop[i].pos];
- v = (rrule_prop[i].parse)(v, p->value);
- rrule->prop[rrule_prop[i].pos] = v;
+ void *a[2];
+ a[0] = rrule->prop[rrule_prop[i].pos];
+ a[1] = (void *) p->value;
+ rrule->prop[rrule_prop[i].pos] = (rrule_prop[i].parse)((void **) a);
}
}
rrule->prop[RRUnknown] = NULL;
diff --git a/pith/mailindx.c b/pith/mailindx.c
index 27e1b298..2e19a602 100644
--- a/pith/mailindx.c
+++ b/pith/mailindx.c
@@ -3733,7 +3733,7 @@ fetch_firsttext(INDEXDATA_S *idata, int delete_quotes)
BODY *body = NULL, *new_body = NULL;
char *firsttext = NULL;
STORE_S *so;
- gf_io_t pc;
+ gf_o_t pc;
long partial_fetch_len = 0L;
SEARCHSET *ss, **sset;
MESSAGECACHE *mc;
diff --git a/pith/mailview.c b/pith/mailview.c
index a3763329..c49d0ac2 100644
--- a/pith/mailview.c
+++ b/pith/mailview.c
@@ -89,7 +89,7 @@ static struct envelope_s {
/*
* Hook for optional display of rfc2369 content
*/
-int (*pith_opt_rfc2369_editorial)(long, HANDLE_S **, int, int, gf_io_t);
+int (*pith_opt_rfc2369_editorial)(long, HANDLE_S **, int, int, gf_o_t);
@@ -101,28 +101,28 @@ int format_blip_seen(long);
int is_an_env_hdr(char *);
int is_an_addr_hdr(char *);
void format_env_hdr(MAILSTREAM *, long, char *, ENVELOPE *,
- fmt_env_t, gf_io_t, char *, char *, int);
+ fmt_env_t, gf_o_t, char *, char *, int);
int delineate_this_header(char *, char *, char **, char **);
char *url_embed(int);
int color_headers(long, char *, LT_INS_S **, void *);
int url_hilite_hdr(long, char *, LT_INS_S **, void *);
int pad_to_right_edge(long, char *, LT_INS_S **, void *);
int url_bogus_imap(char **, char *, char *);
-int format_raw_header(MAILSTREAM *, long, char *, gf_io_t);
+int format_raw_header(MAILSTREAM *, long, char *, gf_o_t);
void format_envelope(MAILSTREAM *, long, char *, ENVELOPE *,
- gf_io_t, long, char *, int);
+ gf_o_t, long, char *, int);
int any_hdr_color(char *);
void format_addr_string(MAILSTREAM *, long, char *, char *,
- ADDRESS *, int, char *, gf_io_t);
-void pine_rfc822_write_address_noquote(ADDRESS *, gf_io_t, int *);
-void format_newsgroup_string(char *, char *, int, gf_io_t);
-int format_raw_hdr_string(char *, char *, gf_io_t, char *, int);
-int format_env_puts(char *, gf_io_t);
+ ADDRESS *, int, char *, gf_o_t);
+void pine_rfc822_write_address_noquote(ADDRESS *, gf_o_t, int *);
+void format_newsgroup_string(char *, char *, int, gf_o_t);
+int format_raw_hdr_string(char *, char *, gf_o_t, char *, int);
+int format_env_puts(char *, gf_o_t);
int find_field(char **, char *, size_t);
-int embed_color(COLOR_PAIR *, gf_io_t);
+int embed_color(COLOR_PAIR *, gf_o_t);
COLOR_PAIR *get_cur_embedded_color(void);
void clear_cur_embedded_color(void);
-void format_calendar_vevent(VCALENDAR_S *, ATTACH_S *, HANDLE_S **, int, int, gf_io_t, int);
+void format_calendar_vevent(VCALENDAR_S *, ATTACH_S *, HANDLE_S **, int, int, gf_o_t, int);
@@ -148,7 +148,7 @@ parts that are not displayed or can't be displayed.
----*/
int
format_message(long int msgno, ENVELOPE *env, struct mail_bodystruct *body,
- HANDLE_S **handlesp, int flgs, gf_io_t pc)
+ HANDLE_S **handlesp, int flgs, gf_o_t pc)
{
char *decode_err = NULL;
HEADER_S h;
@@ -217,7 +217,7 @@ format_message(long int msgno, ENVELOPE *env, struct mail_bodystruct *body,
}
void
-format_calendar_vevent(VCALENDAR_S *vcal, ATTACH_S *a, HANDLE_S **handlesp, int flgs, int width, gf_io_t pc, int cflags)
+format_calendar_vevent(VCALENDAR_S *vcal, ATTACH_S *a, HANDLE_S **handlesp, int flgs, int width, gf_o_t pc, int cflags)
{
int avail, m1, m2, hwid, i, partwid, padwid;
int s1, s2, dwid, minkey;
@@ -487,7 +487,7 @@ format_calendar_vevent(VCALENDAR_S *vcal, ATTACH_S *a, HANDLE_S **handlesp, int
}
int
-format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int width, gf_io_t pc)
+format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int width, gf_o_t pc)
{
char *rawtext, *caltext;
unsigned long callen;
@@ -561,14 +561,14 @@ format_calendar(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int w
char *
-format_body(long int msgno, BODY *body, HANDLE_S **handlesp, HEADER_S *hp, int flgs, int width, gf_io_t pc)
+format_body(long int msgno, BODY *body, HANDLE_S **handlesp, HEADER_S *hp, int flgs, int width, gf_o_t pc)
{
int filt_only_c0 = 0, wrapflags, error_found = 0;
int is_in_sig = OUT_SIG_BLOCK;
char *charset, *decode_err = NULL, *tmp1, *description;
ATTACH_S *a;
URL_HILITE_S uh;
- gf_io_t gc;
+ gf_i_t gc;
if(body == NULL
|| (ps_global->full_header == 2
@@ -883,7 +883,7 @@ format_body(long int msgno, BODY *body, HANDLE_S **handlesp, HEADER_S *hp, int f
int
-format_attachment_list(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int width, gf_io_t pc)
+format_attachment_list(long int msgno, BODY *body, HANDLE_S **handlesp, int flgs, int width, gf_o_t pc)
{
ATTACH_S *a;
@@ -1263,7 +1263,7 @@ is_an_addr_hdr(char *fieldname)
*/
void
format_env_hdr(MAILSTREAM *stream, long int msgno, char *section, ENVELOPE *env,
- fmt_env_t fmt_env, gf_io_t pc, char *field, char *oacs, int flags)
+ fmt_env_t fmt_env, gf_o_t pc, char *field, char *oacs, int flags)
{
register int i;
@@ -2307,7 +2307,7 @@ url_bogus(char *url, char *reason)
int
format_header(MAILSTREAM *stream, long int msgno, char *section, ENVELOPE *env,
HEADER_S *hdrs, char *prefix, HANDLE_S **handlesp, int flags,
- fmt_env_t fmt_env, gf_io_t final_pc)
+ fmt_env_t fmt_env, gf_o_t final_pc)
{
int rv = FHT_OK;
int nfields, i;
@@ -2315,7 +2315,8 @@ format_header(MAILSTREAM *stream, long int msgno, char *section, ENVELOPE *env,
*finish, *current;
STORE_S *tmp_store;
URL_HILITE_S uh;
- gf_io_t tmp_pc, tmp_gc;
+ gf_o_t tmp_pc;
+ gf_i_t tmp_gc;
struct variable *vars = ps_global->vars;
if((tmp_store = so_get(CharStar, NULL, EDIT_ACCESS)) != NULL)
@@ -2646,7 +2647,7 @@ format_header(MAILSTREAM *stream, long int msgno, char *section, ENVELOPE *env,
----*/
int
-format_raw_header(MAILSTREAM *stream, long int msgno, char *section, gf_io_t pc)
+format_raw_header(MAILSTREAM *stream, long int msgno, char *section, gf_o_t pc)
{
char *h = mail_fetch_header(stream, msgno, section, NULL, NULL, FT_PEEK);
unsigned char c;
@@ -2699,7 +2700,7 @@ format_raw_header(MAILSTREAM *stream, long int msgno, char *section, gf_io_t pc)
----*/
void
-format_envelope(MAILSTREAM *s, long int n, char *sect, ENVELOPE *e, gf_io_t pc,
+format_envelope(MAILSTREAM *s, long int n, char *sect, ENVELOPE *e, gf_o_t pc,
long int which, char *oacs, int flags)
{
char *q, *p2, buftmp[MAILTMPLEN];
@@ -2905,7 +2906,7 @@ any_hdr_color(char *fieldname)
----------------------------------------------------------------------*/
void
format_addr_string(MAILSTREAM *stream, long int msgno, char *section, char *field_name,
- struct mail_address *addr, int flags, char *oacs, gf_io_t pc)
+ struct mail_address *addr, int flags, char *oacs, gf_o_t pc)
{
char *ptmp, *mtmp = NULL;
int trailing = 0, group = 0;
@@ -3026,7 +3027,7 @@ const char *rspecials_minus_quote_and_dot = "()<>@,;:\\[]";
* doesn't usually break anything.
*/
void
-pine_rfc822_write_address_noquote(struct mail_address *adr, gf_io_t pc, int *group)
+pine_rfc822_write_address_noquote(struct mail_address *adr, gf_o_t pc, int *group)
{
extern const char *rspecials;
@@ -3064,7 +3065,7 @@ pine_rfc822_write_address_noquote(struct mail_address *adr, gf_io_t pc, int *gro
*/
void
-pine_rfc822_address(struct mail_address *adr, gf_io_t pc)
+pine_rfc822_address(struct mail_address *adr, gf_o_t pc)
{
extern char *wspecials;
@@ -3090,7 +3091,7 @@ pine_rfc822_address(struct mail_address *adr, gf_io_t pc)
*/
void
-pine_rfc822_cat(char *src, const char *specials, gf_io_t pc)
+pine_rfc822_cat(char *src, const char *specials, gf_o_t pc)
{
char *s;
@@ -3128,7 +3129,7 @@ pine_rfc822_cat(char *src, const char *specials, gf_io_t pc)
The resulting lines formatted are 80 columns wide.
----------------------------------------------------------------------*/
void
-format_newsgroup_string(char *field_name, char *newsgrps, int flags, gf_io_t pc)
+format_newsgroup_string(char *field_name, char *newsgrps, int flags, gf_o_t pc)
{
char buf[MAILTMPLEN];
int trailing = 0, llen, alen;
@@ -3208,7 +3209,7 @@ format_newsgroup_string(char *field_name, char *newsgrps, int flags, gf_io_t pc)
----------------------------------------------------------------------*/
int
-format_raw_hdr_string(char *start, char *finish, gf_io_t pc, char *oacs, int flags)
+format_raw_hdr_string(char *start, char *finish, gf_o_t pc, char *oacs, int flags)
{
register char *current;
unsigned char *p, *tmp = NULL, c;
@@ -3272,7 +3273,7 @@ format_raw_hdr_string(char *start, char *finish, gf_io_t pc, char *oacs, int fla
----------------------------------------------------------------------*/
int
-format_env_puts(char *s, gf_io_t pc)
+format_env_puts(char *s, gf_o_t pc)
{
if(ps_global->pass_ctrl_chars)
return(gf_puts(s, pc));
@@ -3454,7 +3455,7 @@ static char *_last_embedded_fg_color, *_last_embedded_bg_color;
int
-embed_color(COLOR_PAIR *cp, gf_io_t pc)
+embed_color(COLOR_PAIR *cp, gf_o_t pc)
{
if(cp && cp->fg){
if(_last_embedded_fg_color)
diff --git a/pith/mailview.h b/pith/mailview.h
index 8ffb53c1..f86ce591 100644
--- a/pith/mailview.h
+++ b/pith/mailview.h
@@ -80,7 +80,7 @@
/*
* Function to format
*/
-typedef void (*fmt_env_t)(MAILSTREAM *, long int, char *, ENVELOPE *, gf_io_t, long int, char *, int);
+typedef void (*fmt_env_t)(MAILSTREAM *, long int, char *, ENVELOPE *, gf_o_t, long int, char *, int);
/*
* Structure and macros to help control format_header_text
@@ -123,10 +123,10 @@ typedef struct header_s {
/* exported prototypes */
-int format_message(long, ENVELOPE *, BODY *, HANDLE_S **, int, gf_io_t);
-int format_attachment_list(long int, BODY *, HANDLE_S **, int, int, gf_io_t);
-char *format_body(long int, BODY *, HANDLE_S **, HEADER_S *, int, int, gf_io_t);
-int format_calendar(long int, BODY *, HANDLE_S **, int, int, gf_io_t);
+int format_message(long, ENVELOPE *, BODY *, HANDLE_S **, int, gf_o_t);
+int format_attachment_list(long int, BODY *, HANDLE_S **, int, int, gf_o_t);
+char *format_body(long int, BODY *, HANDLE_S **, HEADER_S *, int, int, gf_o_t);
+int format_calendar(long int, BODY *, HANDLE_S **, int, int, gf_o_t);
int url_hilite(long, char *, LT_INS_S **, void *);
int handle_start_color(char *, size_t, int *, int);
int handle_end_color(char *, size_t, int *);
@@ -138,10 +138,10 @@ int handle_end_color(char *, size_t, int *);
int url_external_specific_handler(char *, int);
int url_imap_folder(char *, char **, imapuid_t *, imapuid_t *, char **, int);
int url_bogus(char *, char *);
-void pine_rfc822_address(ADDRESS *, gf_io_t);
-void pine_rfc822_cat(char *, const char *, gf_io_t);
+void pine_rfc822_address(ADDRESS *, gf_o_t);
+void pine_rfc822_cat(char *, const char *, gf_o_t);
int format_header(MAILSTREAM *, long, char *, ENVELOPE *, HEADER_S *,
- char *, HANDLE_S **, int, fmt_env_t, gf_io_t);
+ char *, HANDLE_S **, int, fmt_env_t, gf_o_t);
COLOR_PAIR *hdr_color(char *, char *, SPEC_COLOR_S *);
char *display_parameters(PARAMETER *);
char *pine_fetch_header(MAILSTREAM *, long, char *, char **, long);
diff --git a/pith/mimedesc.c b/pith/mimedesc.c
index d79d9765..b5cff98e 100644
--- a/pith/mimedesc.c
+++ b/pith/mimedesc.c
@@ -764,7 +764,7 @@ Args: number -- A string with the part number i.e. "3.2.1"
Result: formatted description written to object ref'd by "pc"
----*/
char *
-part_desc(char *number, BODY *body, int type, int width, int flags, gf_io_t pc)
+part_desc(char *number, BODY *body, int type, int width, int flags, gf_o_t pc)
{
char *t;
char buftmp[MAILTMPLEN], sizebuf[256];
diff --git a/pith/mimedesc.h b/pith/mimedesc.h
index 85d41121..b99ead33 100644
--- a/pith/mimedesc.h
+++ b/pith/mimedesc.h
@@ -28,7 +28,7 @@ void zero_atmts(ATTACH_S *);
char *body_type_names(int);
char *type_desc(int, char *, PARAMETER *, PARAMETER *, int);
long fcc_size_guess(BODY *);
-char *part_desc(char *, BODY *, int, int, int, gf_io_t);
+char *part_desc(char *, BODY *, int, int, int, gf_o_t);
char *parameter_val(PARAMETER *, char *);
int mime_can_display(int, char *, BODY *);
char *get_filename_parameter(char *, size_t, BODY *, char **);
diff --git a/pith/options.h b/pith/options.h
index ac45aca3..41df3380 100644
--- a/pith/options.h
+++ b/pith/options.h
@@ -62,7 +62,7 @@ extern void (*pith_opt_paint_index_hline)(MAILSTREAM *, long, ICE_S *);
* [editorial comment] in message text to indicate the message contains
* list-management pointers
*/
-extern int (*pith_opt_rfc2369_editorial)(long, HANDLE_S **, int, int, gf_io_t);
+extern int (*pith_opt_rfc2369_editorial)(long, HANDLE_S **, int, int, gf_o_t);
#ifdef ENABLE_LDAP
/*
diff --git a/pith/remote.c b/pith/remote.c
index feddf1c2..a2a1a72f 100644
--- a/pith/remote.c
+++ b/pith/remote.c
@@ -1855,7 +1855,7 @@ rd_update_local(REMDATA_S *rd)
{
char *error;
STORE_S *store;
- gf_io_t pc;
+ gf_o_t pc;
int i, we_cancel = 0;
BODY *body = NULL;
ENVELOPE *env;
diff --git a/pith/reply.c b/pith/reply.c
index 41ae9fe6..07f4b9ad 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -937,7 +937,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
char *p, *sig = NULL, *section, sect_buf[SECTBUFLEN];
BODY *body = NULL, *tmp_body = NULL;
PART *part;
- gf_io_t pc;
+ gf_o_t pc;
int impl, template_len = 0, leave_cursor_at_top = 0, reply_raw_body = 0;
if(sect_prefix) /* SECTBUFLEN = sizeof(sect_buf) */
@@ -2036,7 +2036,7 @@ get_reply_data(ENVELOPE *env, ACTION_S *role, IndexColType type, char *buf, size
* with supplied character writing function.
*/
void
-reply_delimiter(ENVELOPE *env, ACTION_S *role, gf_io_t pc)
+reply_delimiter(ENVELOPE *env, ACTION_S *role, gf_o_t pc)
{
#define MAX_DELIM 2000
char buf[MAX_DELIM+1];
@@ -2223,7 +2223,7 @@ forward_mime_msg(MAILSTREAM *stream, long int msgno, char *section, ENVELOPE *en
* forward_delimiter - return delimiter for forwarded text
*/
void
-forward_delimiter(gf_io_t pc)
+forward_delimiter(gf_o_t pc)
{
gf_puts(NEWLINE, pc);
/* TRANSLATORS: When a message is forwarded by the user this is the
@@ -2247,7 +2247,7 @@ forward_delimiter(gf_io_t pc)
----------------------------------------------------------------------*/
void
reply_forward_header(MAILSTREAM *stream, long int msgno, char *part, ENVELOPE *env,
- gf_io_t pc, char *prefix)
+ gf_o_t pc, char *prefix)
{
int rv;
HEADER_S h;
@@ -2363,7 +2363,7 @@ forward_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_bod
{
BODY *body = NULL, *text_body, *tmp_body;
PART *part;
- gf_io_t pc;
+ gf_o_t pc;
char *tmp_text, *section, sect_buf[256];
int forward_raw_body = 0;
@@ -2589,7 +2589,7 @@ bounce_msg_body(MAILSTREAM *stream,
char *h, *p, *errstr = NULL;
int i;
STORE_S *msgtext;
- gf_io_t pc;
+ gf_o_t pc;
*outgoingp = mail_newenvelope();
(*outgoingp)->subject = cpystr(subject ? subject : "Resent mail....");
@@ -2729,7 +2729,7 @@ DOESN'T sanity check the prefix given!!!
----*/
int
get_body_part_text(MAILSTREAM *stream, struct mail_bodystruct *body,
- long int msg_no, char *part_no, long partial, gf_io_t pc,
+ long int msg_no, char *part_no, long partial, gf_o_t pc,
char *prefix, char **ret_charset, unsigned flags)
{
int we_cancel = 0, dashdata, wrapflags = GFW_FORCOMPOSE, flow_res = 0;
@@ -2752,7 +2752,7 @@ get_body_part_text(MAILSTREAM *stream, struct mail_bodystruct *body,
*/
if(body == NULL){
char *text, *decode_error;
- gf_io_t gc;
+ gf_i_t gc;
SourceType src = CharStar;
int rv = 0;
@@ -3691,7 +3691,7 @@ bail_out:
*/
BODY *
forward_multi_alt_mixed(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
- long int msgno, char *sect_prefix, void *msgtext, gf_io_t pc, int flags)
+ long int msgno, char *sect_prefix, void *msgtext, gf_o_t pc, int flags)
{
#define FWDTMPLEN 256
BODY *body = NULL, *text_body = NULL;
@@ -3784,7 +3784,7 @@ forward_multi_alt_mixed(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruc
----------------------------------------------------------------------*/
BODY *
forward_multi_alt(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
- long int msgno, char *sect_prefix, void *msgtext, gf_io_t pc, int flags)
+ long int msgno, char *sect_prefix, void *msgtext, gf_o_t pc, int flags)
{
#define FWDTMPLEN 256
BODY *body = NULL;
diff --git a/pith/reply.h b/pith/reply.h
index 97c8f131..7a43c105 100644
--- a/pith/reply.h
+++ b/pith/reply.h
@@ -71,16 +71,16 @@ char *reply_signature(ACTION_S *, ENVELOPE *, REDRAFT_POS_S **, int *);
void get_addr_data(ENVELOPE *, IndexColType, char *, size_t);
void get_news_data(ENVELOPE *, IndexColType, char *, size_t);
char *get_reply_data(ENVELOPE *, ACTION_S *, IndexColType, char *, size_t);
-void reply_delimiter(ENVELOPE *, ACTION_S *, gf_io_t);
+void reply_delimiter(ENVELOPE *, ACTION_S *, gf_o_t);
void free_redraft_pos(REDRAFT_POS_S **);
int forward_mime_msg(MAILSTREAM *, long, char *, ENVELOPE *, PART **, void *);
-void forward_delimiter(gf_io_t);
-void reply_forward_header(MAILSTREAM *, long, char *, ENVELOPE *, gf_io_t, char *);
+void forward_delimiter(gf_o_t);
+void reply_forward_header(MAILSTREAM *, long, char *, ENVELOPE *, gf_o_t, char *);
char *forward_subject(ENVELOPE *, int);
BODY *forward_body(MAILSTREAM *, ENVELOPE *, BODY *, long, char *, void *, int);
char *bounce_msg_body(MAILSTREAM *, long int, char *, char **, char *, ENVELOPE **, BODY **, int *);
int get_body_part_text(MAILSTREAM *, BODY *, long, char *, long,
- gf_io_t, char *, char **, unsigned);
+ gf_o_t, char *, char **, unsigned);
int quote_fold(long, char *, LT_INS_S **, void *);
int twsp_strip(long, char *, LT_INS_S **, void *);
int post_quote_space(long, char *, LT_INS_S **, void *);
@@ -101,8 +101,8 @@ char *get_signature_lit(char *, int, int, int, int);
int sigdashes_are_present(char *);
char *signature_path(char *, char *, size_t);
char *simple_read_remote_file(char *, char *);
-BODY *forward_multi_alt(MAILSTREAM *, ENVELOPE *, BODY *, long, char *, void *, gf_io_t, int);
-BODY *forward_multi_alt_mixed(MAILSTREAM *, ENVELOPE *, BODY *, long, char *, void *, gf_io_t, int);
+BODY *forward_multi_alt(MAILSTREAM *, ENVELOPE *, BODY *, long, char *, void *, gf_o_t, int);
+BODY *forward_multi_alt_mixed(MAILSTREAM *, ENVELOPE *, BODY *, long, char *, void *, gf_o_t, int);
int same_subject(char *, char *s);
void shorten_subject(char *);
diff --git a/pith/save.c b/pith/save.c
index e1c13f7f..e12eb9a8 100644
--- a/pith/save.c
+++ b/pith/save.c
@@ -38,13 +38,13 @@
/*
* Internal prototypes
*/
-int save_ex_replace_body(char *, unsigned long *,BODY *,gf_io_t);
-int save_ex_output_body(MAILSTREAM *, long, char *, BODY *, unsigned long *, gf_io_t);
-int save_ex_mask_types(char *, unsigned long *, gf_io_t);
-int save_ex_explain_body(BODY *, unsigned long *, gf_io_t);
-int save_ex_explain_parts(BODY *, int, unsigned long *, gf_io_t);
-int save_ex_output_line(char *, unsigned long *, gf_io_t);
-int save_ex_output_text(char *, int, unsigned long *, gf_io_t);
+int save_ex_replace_body(char *, unsigned long *,BODY *,gf_o_t);
+int save_ex_output_body(MAILSTREAM *, long, char *, BODY *, unsigned long *, gf_o_t);
+int save_ex_mask_types(char *, unsigned long *, gf_o_t);
+int save_ex_explain_body(BODY *, unsigned long *, gf_o_t);
+int save_ex_explain_parts(BODY *, int, unsigned long *, gf_o_t);
+int save_ex_output_line(char *, unsigned long *, gf_o_t);
+int save_ex_output_text(char *, int, unsigned long *, gf_o_t);
/*
@@ -1092,7 +1092,7 @@ long save_fetch_append_cb(MAILSTREAM *stream, void *data, char **flags,
char section[64];
int failure = 0;
BODY *body;
- gf_io_t pc;
+ gf_o_t pc;
size = 0; /* all bets off, abort sanity test */
gf_set_so_writec(&pc, pkg->so);
@@ -1225,7 +1225,7 @@ save_fetch_append(MAILSTREAM *stream, long int raw, char *sect,
char section[64];
int failure = 0;
BODY *body;
- gf_io_t pc;
+ gf_o_t pc;
size = 0; /* all bets off, abort sanity test */
gf_set_so_writec(&pc, so);
@@ -1393,7 +1393,7 @@ save_fetch_append(MAILSTREAM *stream, long int raw, char *sect,
* *BUT* which is to contain the count of written bytes on exit
*/
int
-save_ex_replace_body(char *hdr, long unsigned int *hlen, struct mail_bodystruct *body, gf_io_t pc)
+save_ex_replace_body(char *hdr, long unsigned int *hlen, struct mail_bodystruct *body, gf_o_t pc)
{
unsigned long len;
@@ -1453,7 +1453,7 @@ save_ex_replace_body(char *hdr, long unsigned int *hlen, struct mail_bodystruct
int
save_ex_output_body(MAILSTREAM *stream, long int raw, char *section,
- struct mail_bodystruct *body, long unsigned int *len, gf_io_t pc)
+ struct mail_bodystruct *body, long unsigned int *len, gf_o_t pc)
{
char *txtp, newsect[128];
unsigned long ilen;
@@ -1565,7 +1565,7 @@ Args: hdr -- pointer to start of a header line
----*/
int
-save_ex_mask_types(char *hdr, long unsigned int *len, gf_io_t pc)
+save_ex_mask_types(char *hdr, long unsigned int *len, gf_o_t pc)
{
char *s = NULL;
@@ -1582,7 +1582,7 @@ save_ex_mask_types(char *hdr, long unsigned int *len, gf_io_t pc)
int
-save_ex_explain_body(struct mail_bodystruct *body, long unsigned int *len, gf_io_t pc)
+save_ex_explain_body(struct mail_bodystruct *body, long unsigned int *len, gf_o_t pc)
{
unsigned long ilen;
char **blurbp;
@@ -1608,7 +1608,7 @@ save_ex_explain_body(struct mail_bodystruct *body, long unsigned int *len, gf_io
int
-save_ex_explain_parts(struct mail_bodystruct *body, int depth, long unsigned int *len, gf_io_t pc)
+save_ex_explain_parts(struct mail_bodystruct *body, int depth, long unsigned int *len, gf_o_t pc)
{
char *tmp, namebuf[MAILTMPLEN], descbuf[MAILTMPLEN];
unsigned long ilen, tmplen;
@@ -1715,7 +1715,7 @@ save_ex_explain_parts(struct mail_bodystruct *body, int depth, long unsigned int
* line.
*/
int
-save_ex_output_text(char *text, int depth, unsigned long *len, gf_io_t pc)
+save_ex_output_text(char *text, int depth, unsigned long *len, gf_o_t pc)
{
int starti, i, startpos, pos, rv;
char tmp[100]; /* a number bigger than 68, we justify text here. */
@@ -1751,7 +1751,7 @@ save_ex_output_text(char *text, int depth, unsigned long *len, gf_io_t pc)
}
int
-save_ex_output_line(char *line, long unsigned int *len, gf_io_t pc)
+save_ex_output_line(char *line, long unsigned int *len, gf_o_t pc)
{
snprintf(tmp_20k_buf, SIZEOF_20KBUF, " [ %-*.*s ]\015\012", 68, 68, line);
*len = strlen(tmp_20k_buf);
diff --git a/pith/send.c b/pith/send.c
index c8f7f123..e33545ed 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -319,7 +319,7 @@ redraft_work(MAILSTREAM **streamp, long int cont_msg, ENVELOPE **outgoing,
BODY *b;
PART *part;
PINEFIELD *pf;
- gf_io_t pc;
+ gf_o_t pc;
char *extras, **fields, **values, *p;
char *hdrs[2], *h, *charset;
char **smtp_servers = NULL, **nntp_servers = NULL;
@@ -4242,7 +4242,7 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s)
char tmp[MAILTMPLEN];
int add_trailing_crlf;
LOC_2022_JP ljp;
- gf_io_t gc;
+ gf_i_t gc;
dprint((4, "-- pine_rfc822_output_body: %d\n",
body ? body->type : 0));
diff --git a/pith/smime.c b/pith/smime.c
index d0ee89a1..1e74316e 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -2669,7 +2669,7 @@ static STORE_S*
get_part_contents(long msgno, const char *section)
{
long len;
- gf_io_t pc;
+ gf_o_t pc;
STORE_S *store = NULL;
char *err;
@@ -3651,7 +3651,7 @@ fiddle_smime_message(BODY *b, long msgno)
* Output a string in a distinctive style
*/
void
-gf_puts_uline(char *txt, gf_io_t pc)
+gf_puts_uline(char *txt, gf_o_t pc)
{
pc(TAG_EMBED); pc(TAG_BOLDON);
gf_puts(txt, pc);
diff --git a/pith/smime.h b/pith/smime.h
index fe20cf17..df91fd80 100644
--- a/pith/smime.h
+++ b/pith/smime.h
@@ -44,7 +44,7 @@ int is_pkcs7_body(BODY *b);
int fiddle_smime_message(BODY *b, long msgno);
int encrypt_outgoing_message(METAENV *header, BODY **bodyP);
int sign_outgoing_message(METAENV *header, BODY **bodyP, int dont_detach, BODY **bp);
-void gf_puts_uline(char *txt, gf_io_t pc);
+void gf_puts_uline(char *txt, gf_o_t pc);
PERSONAL_CERT *find_certificate_matching_recip_info(PKCS7_RECIP_INFO *ri);
PERSONAL_CERT *get_personal_certs(char *path);
void smime_init(void);
diff --git a/pith/sort.c b/pith/sort.c
index 4783b682..c5399980 100644
--- a/pith/sort.c
+++ b/pith/sort.c
@@ -227,7 +227,7 @@ sort_folder(MAILSTREAM *stream, MSGNO_S *msgmap, SortOrder new_sort,
clear_index_cache(stream, 0);
if(flags & SRT_VRB){
- int (*sort_func)() = NULL;
+ int (*sort_func)(void) = NULL;
/*
* IMAP sort doesn't give us any way to get progress,
diff --git a/pith/state.h b/pith/state.h
index 5339f069..9f63d46f 100644
--- a/pith/state.h
+++ b/pith/state.h
@@ -360,7 +360,7 @@ struct pine {
* Optional tools Pine Data Engine caller might provide
*/
struct {
- char *(*display_filter)(char *, STORE_S *, gf_io_t, FILTLIST_S *);
+ char *(*display_filter)(char *, STORE_S *, gf_o_t, FILTLIST_S *);
char *(*display_filter_trigger)(BODY *, char *, size_t);
} tools;
diff --git a/pith/takeaddr.c b/pith/takeaddr.c
index 95d67945..630144ba 100644
--- a/pith/takeaddr.c
+++ b/pith/takeaddr.c
@@ -1817,7 +1817,7 @@ grab_addrs_from_body(MAILSTREAM *stream, long int msgno,
#define MAXLINESZ 2000
char line[MAXLINESZ + 1];
STORE_S *so;
- gf_io_t pc;
+ gf_o_t pc;
SourceType src = CharStar;
int added = 0, failure;
char *partno = "1";
diff --git a/pith/text.c b/pith/text.c
index 679a7be7..2a9d20d6 100644
--- a/pith/text.c
+++ b/pith/text.c
@@ -37,7 +37,7 @@
/* internal prototypes */
-int charset_editorial(char *, long, HANDLE_S **, int, int, int, gf_io_t);
+int charset_editorial(char *, long, HANDLE_S **, int, int, int, gf_o_t);
int replace_quotes(long, char *, LT_INS_S **, void *);
void mark_handles_in_line(char *, HANDLE_S **, int);
void clear_html_risk(void);
@@ -79,7 +79,7 @@ Returns: 1 if errors encountered, 0 if everything went A-OK
int
decode_text(ATTACH_S *att,
long int msgno,
- gf_io_t pc,
+ gf_o_t pc,
HANDLE_S **handlesp,
DetachErrStyle style,
int flags)
@@ -229,7 +229,7 @@ decode_text(ATTACH_S *att,
clear_html_risk();
if(flags & FM_DISPLAY){
- gf_io_t warn_pc;
+ gf_o_t warn_pc;
if(handlesp){ /* pass on handles awareness */
opts |= GFHP_HANDLES;
@@ -465,7 +465,7 @@ decode_text(ATTACH_S *att,
*/
int
charset_editorial(char *charset, long int msgno, HANDLE_S **handlesp, int flags,
- int quality, int width, gf_io_t pc)
+ int quality, int width, gf_o_t pc)
{
char *p, color[64], buf[2048];
int i, n;
diff --git a/pith/text.h b/pith/text.h
index 1982ea8d..b64d638b 100644
--- a/pith/text.h
+++ b/pith/text.h
@@ -50,7 +50,7 @@ typedef struct del_q_s {
/* exported prototypes */
-int decode_text(ATTACH_S *, long, gf_io_t, HANDLE_S **, DetachErrStyle, int);
+int decode_text(ATTACH_S *, long, gf_o_t, HANDLE_S **, DetachErrStyle, int);
int translate_utf8_to_2022_jp(long, char *, LT_INS_S **, void *);
int delete_quotes(long, char *, LT_INS_S **, void *);
diff --git a/web/src/alpined.d/alpined.c b/web/src/alpined.d/alpined.c
index c02a8e0e..b5d8420a 100644
--- a/web/src/alpined.d/alpined.c
+++ b/web/src/alpined.d/alpined.c
@@ -379,9 +379,9 @@ char *peSendSpamReport(long, char *, char *, char *);
int peMsgnoFromUID(Tcl_Interp *, imapuid_t, int, Tcl_Obj **);
int peMessageText(Tcl_Interp *, imapuid_t, int, Tcl_Obj **);
int peMessageHeader(Tcl_Interp *, imapuid_t, int, Tcl_Obj **);
-void peFormatEnvelope(MAILSTREAM *, long, char *, ENVELOPE *, gf_io_t, long, char *, int);
-void peFormatEnvelopeAddress(MAILSTREAM *, long, char *, char *, ADDRESS *, int, char *, gf_io_t);
-void peFormatEnvelopeNewsgroups(char *, char *, int, gf_io_t);
+void peFormatEnvelope(MAILSTREAM *, long, char *, ENVELOPE *, gf_o_t, long, char *, int);
+void peFormatEnvelopeAddress(MAILSTREAM *, long, char *, char *, ADDRESS *, int, char *, gf_o_t);
+void peFormatEnvelopeNewsgroups(char *, char *, int, gf_o_t);
void peFormatEnvelopeText(char *, char *);
int peMessageAttachments(Tcl_Interp *, imapuid_t, int, Tcl_Obj **);
int peMessageBody(Tcl_Interp *, imapuid_t, int, Tcl_Obj **);
@@ -8563,7 +8563,7 @@ peMessageHeader(Tcl_Interp *interp, imapuid_t uid, int objc, Tcl_Obj **objv)
}
void
-peFormatEnvelope(MAILSTREAM *s, long int n, char *sect, ENVELOPE *e, gf_io_t pc, long int which, char *oacs, int flags)
+peFormatEnvelope(MAILSTREAM *s, long int n, char *sect, ENVELOPE *e, gf_o_t pc, long int which, char *oacs, int flags)
{
char *p2, buftmp[MAILTMPLEN];
Tcl_Obj *objHdr;
@@ -8667,14 +8667,14 @@ peFormatEnvelopeText(char *field_name, char *field_value)
*/
void
peFormatEnvelopeAddress(MAILSTREAM *stream, long int msgno, char *section, char *field_name,
- struct mail_address *addr, int flags, char *oacs, gf_io_t pc)
+ struct mail_address *addr, int flags, char *oacs, gf_o_t pc)
{
char *ptmp, *mtmp, *atype = "addr";
int group = 0;
ADDRESS *atmp;
Tcl_Obj *objAddrList = NULL;
STORE_S *tso;
- gf_io_t tpc;
+ gf_o_t tpc;
extern const char *rspecials;
extern const char *rspecials_minus_quote_and_dot;
@@ -8803,7 +8803,7 @@ peFormatEnvelopeAddress(MAILSTREAM *stream, long int msgno, char *section, char
* appends caller's result with: {"news" field_name {{newsgroup1} {newsgroup2} ... }}
*/
void
-peFormatEnvelopeNewsgroups(char *field_name, char *newsgrps, int flags, gf_io_t pc)
+peFormatEnvelopeNewsgroups(char *field_name, char *newsgrps, int flags, gf_o_t pc)
{
char buf[MAILTMPLEN];
int llen;
@@ -9973,7 +9973,7 @@ peDetach(Tcl_Interp *interp, imapuid_t uid, int objc, Tcl_Obj **objv)
{
char *part, *err, *tfd, *tfn = NULL, *filename;
long raw;
- gf_io_t pc;
+ gf_o_t pc;
BODY *body;
STORE_S *store;
Tcl_Obj *rvobj, *tObj, *stObj, *fnObj;
@@ -16368,7 +16368,8 @@ peRssFetch(Tcl_Interp *interp, char *link)
RSS_FEED_S *feed;
char *err;
STORE_S *bucket;
- gf_io_t gc, pc;
+ gf_i_t gc;
+ gf_o_t pc;
/* grok response */
bucket = so_get(CharStar, NULL, EDIT_ACCESS);
diff --git a/web/src/alpined.d/ldap.c b/web/src/alpined.d/ldap.c
index 347283fa..1fe5d811 100644
--- a/web/src/alpined.d/ldap.c
+++ b/web/src/alpined.d/ldap.c
@@ -26,13 +26,8 @@
#ifdef ENABLE_LDAP
int
-ldap_addr_select(ps, ac, result, style, wp_err, srchstr)
- struct pine *ps;
- ADDR_CHOOSE_S *ac;
- LDAP_CHOOSE_S **result;
- LDAPLookupStyle style;
- WP_ERR_S *wp_err;
- char *srchstr;
+ldap_addr_select(struct pine *ps, ADDR_CHOOSE_S *ac, LDAP_CHOOSE_S **result,
+ LDAPLookupStyle style, WP_ERR_S *wp_err, char *srchstr)
{
LDAP_SERV_RES_S *res_list, *tmp_rl;
LDAPMessage *e, *tmp_e;
@@ -83,9 +78,7 @@ ldap_addr_select(ps, ac, result, style, wp_err, srchstr)
char *
-peLdapPname(mailbox, host)
- char *mailbox;
- char *host;
+peLdapPname(char *mailbox, char *host)
{
char *retstr = NULL;
char adrstr[1024];
@@ -132,16 +125,10 @@ peLdapPname(mailbox, host)
}
int
-peLdapEntryParse(trl, e, ret_cn, ret_org, ret_unit,
- ret_title, ret_mail, ret_sn)
- LDAP_SERV_RES_S *trl;
- LDAPMessage *e;
- struct berval ***ret_cn;
- struct berval ***ret_org;
- struct berval ***ret_unit;
- struct berval ***ret_title;
- struct berval ***ret_mail;
- struct berval ***ret_sn;
+peLdapEntryParse(LDAP_SERV_RES_S *trl, LDAPMessage *e, struct berval ***ret_cn,
+ struct berval ***ret_org, struct berval ***ret_unit,
+ struct berval ***ret_title, struct berval ***ret_mail,
+ struct berval ***ret_sn)
{
char *a;
struct berval **cn, **org, **unit, **title, **mail, **sn;
@@ -222,8 +209,7 @@ peLdapEntryParse(trl, e, ret_cn, ret_org, ret_unit,
}
WPLDAPRES_S *
-free_wpldapres(wpldapr)
- WPLDAPRES_S *wpldapr;
+free_wpldapres(WPLDAPRES_S *wpldapr)
{
WPLDAPRES_S *tmp1, *tmp2;
diff --git a/web/src/alpined.d/remote.c b/web/src/alpined.d/remote.c
index 73d594fe..2e15785f 100644
--- a/web/src/alpined.d/remote.c
+++ b/web/src/alpined.d/remote.c
@@ -28,10 +28,7 @@
*/
int
-rd_prompt_about_forged_remote_data(reason, rd, extra)
- int reason;
- REMDATA_S *rd;
- char *extra;
+rd_prompt_about_forged_remote_data(int reason, REMDATA_S *rd, char *extra)
{
char tmp[2000];
char *unknown = "<unknown>";