summaryrefslogtreecommitdiff
path: root/pith
diff options
context:
space:
mode:
Diffstat (limited to 'pith')
-rw-r--r--pith/Makefile.in9
-rw-r--r--pith/abdlc.c14
-rw-r--r--pith/abdlc.h2
-rw-r--r--pith/ablookup.c6
-rw-r--r--pith/ablookup.h2
-rw-r--r--pith/addrbook.c6
-rw-r--r--pith/addrbook.h2
-rw-r--r--pith/addrstring.c6
-rw-r--r--pith/addrstring.h2
-rw-r--r--pith/adjtime.c6
-rw-r--r--pith/adjtime.h2
-rw-r--r--pith/adrbklib.c6
-rw-r--r--pith/adrbklib.h2
-rw-r--r--pith/atttype.h2
-rw-r--r--pith/bitmap.h2
-rw-r--r--pith/bldaddr.c8
-rw-r--r--pith/bldaddr.h2
-rw-r--r--pith/body.c2
-rw-r--r--pith/busy.h2
-rw-r--r--pith/charconv/Makefile.in9
-rw-r--r--pith/charconv/filesys.c6
-rw-r--r--pith/charconv/filesys.h2
-rw-r--r--pith/charconv/utf8.c51
-rw-r--r--pith/charconv/utf8.h3
-rw-r--r--pith/charset.c8
-rw-r--r--pith/charset.h2
-rw-r--r--pith/color.c6
-rw-r--r--pith/color.h2
-rw-r--r--pith/conf.c31
-rw-r--r--pith/conf.h2
-rw-r--r--pith/conftype.h4
-rw-r--r--pith/context.c6
-rw-r--r--pith/context.h2
-rw-r--r--pith/copyaddr.c8
-rw-r--r--pith/copyaddr.h2
-rw-r--r--pith/debug.h2
-rw-r--r--pith/detach.c6
-rw-r--r--pith/detach.h2
-rw-r--r--pith/detoken.c8
-rw-r--r--pith/detoken.h2
-rw-r--r--pith/editorial.c6
-rw-r--r--pith/editorial.h2
-rw-r--r--pith/escapes.c6
-rw-r--r--pith/escapes.h2
-rw-r--r--pith/filter.c141
-rw-r--r--pith/filter.h2
-rw-r--r--pith/filttype.h2
-rw-r--r--pith/flag.c14
-rw-r--r--pith/flag.h2
-rw-r--r--pith/folder.c12
-rw-r--r--pith/folder.h2
-rw-r--r--pith/foldertype.h2
-rw-r--r--pith/handle.c17
-rw-r--r--pith/handle.h9
-rw-r--r--pith/headers.h2
-rw-r--r--pith/help.c6
-rw-r--r--pith/help.h2
-rw-r--r--pith/help_c_gen.c2
-rw-r--r--pith/help_h_gen.c2
-rw-r--r--pith/helpindx.c6
-rw-r--r--pith/hist.c6
-rw-r--r--pith/hist.h2
-rw-r--r--pith/icache.c6
-rw-r--r--pith/icache.h2
-rw-r--r--pith/ical.c84
-rw-r--r--pith/icaltype.h8
-rw-r--r--pith/imap.c77
-rw-r--r--pith/imap.h4
-rw-r--r--pith/indxtype.h2
-rw-r--r--pith/init.c6
-rw-r--r--pith/init.h2
-rw-r--r--pith/keyword.c8
-rw-r--r--pith/keyword.h2
-rw-r--r--pith/ldap.c34
-rw-r--r--pith/ldap.h2
-rw-r--r--pith/list.c6
-rw-r--r--pith/list.h2
-rw-r--r--pith/mailcap.c6
-rw-r--r--pith/mailcap.h2
-rw-r--r--pith/mailcmd.c39
-rw-r--r--pith/mailcmd.h2
-rw-r--r--pith/mailindx.c10
-rw-r--r--pith/mailindx.h2
-rw-r--r--pith/maillist.c6
-rw-r--r--pith/maillist.h2
-rw-r--r--pith/mailpart.h2
-rw-r--r--pith/mailview.c10
-rw-r--r--pith/mailview.h2
-rw-r--r--pith/margin.c6
-rw-r--r--pith/margin.h2
-rw-r--r--pith/mimedesc.c6
-rw-r--r--pith/mimedesc.h2
-rw-r--r--pith/mimetype.c6
-rw-r--r--pith/mimetype.h2
-rw-r--r--pith/msgno.c10
-rw-r--r--pith/msgno.h2
-rw-r--r--pith/newmail.c6
-rw-r--r--pith/newmail.h2
-rw-r--r--pith/news.c8
-rw-r--r--pith/news.h2
-rw-r--r--pith/options.h2
-rw-r--r--pith/osdep/Makefile.in9
-rw-r--r--pith/osdep/bldpath.c6
-rw-r--r--pith/osdep/bldpath.h2
-rw-r--r--pith/osdep/canaccess.c6
-rw-r--r--pith/osdep/canaccess.h2
-rw-r--r--pith/osdep/canonicl.c6
-rw-r--r--pith/osdep/canonicl.h2
-rw-r--r--pith/osdep/collate.c6
-rw-r--r--pith/osdep/collate.h2
-rw-r--r--pith/osdep/color.c6
-rw-r--r--pith/osdep/color.h2
-rw-r--r--pith/osdep/coredump.c6
-rw-r--r--pith/osdep/coredump.h2
-rw-r--r--pith/osdep/creatdir.c8
-rw-r--r--pith/osdep/creatdir.h2
-rw-r--r--pith/osdep/debugtime.c6
-rw-r--r--pith/osdep/debugtime.h2
-rw-r--r--pith/osdep/domnames.c6
-rw-r--r--pith/osdep/domnames.h2
-rw-r--r--pith/osdep/err_desc.c6
-rw-r--r--pith/osdep/err_desc.h2
-rw-r--r--pith/osdep/fgetpos.c6
-rw-r--r--pith/osdep/fgetpos.h2
-rw-r--r--pith/osdep/filesize.c6
-rw-r--r--pith/osdep/filesize.h2
-rw-r--r--pith/osdep/fnexpand.c6
-rw-r--r--pith/osdep/fnexpand.h2
-rw-r--r--pith/osdep/forkwait.h2
-rw-r--r--pith/osdep/hostname.c6
-rw-r--r--pith/osdep/hostname.h2
-rw-r--r--pith/osdep/lstcmpnt.c6
-rw-r--r--pith/osdep/lstcmpnt.h2
-rw-r--r--pith/osdep/mimedisp.c6
-rw-r--r--pith/osdep/mimedisp.h2
-rw-r--r--pith/osdep/pipe.c11
-rw-r--r--pith/osdep/pipe.h2
-rw-r--r--pith/osdep/pithosd.h2
-rw-r--r--pith/osdep/pw_stuff.c6
-rw-r--r--pith/osdep/pw_stuff.h2
-rw-r--r--pith/osdep/rename.c6
-rw-r--r--pith/osdep/rename.h2
-rw-r--r--pith/osdep/temp_nam.c8
-rw-r--r--pith/osdep/temp_nam.h2
-rw-r--r--pith/osdep/tempfile.c6
-rw-r--r--pith/osdep/tempfile.h2
-rw-r--r--pith/osdep/writ_dir.c6
-rw-r--r--pith/osdep/writ_dir.h2
-rw-r--r--pith/pattern.c32
-rw-r--r--pith/pattern.h2
-rw-r--r--pith/pine.hlp476
-rw-r--r--pith/pineelt.h2
-rw-r--r--pith/pipe.c5
-rw-r--r--pith/pipe.h2
-rw-r--r--pith/readfile.c6
-rw-r--r--pith/readfile.h2
-rw-r--r--pith/remote.c6
-rw-r--r--pith/remote.h2
-rw-r--r--pith/remtype.h2
-rw-r--r--pith/repltype.h2
-rw-r--r--pith/reply.c23
-rw-r--r--pith/reply.h2
-rw-r--r--pith/rfc2231.c6
-rw-r--r--pith/rfc2231.h2
-rw-r--r--pith/save.c14
-rw-r--r--pith/save.h2
-rw-r--r--pith/savetype.h2
-rw-r--r--pith/search.c6
-rw-r--r--pith/search.h2
-rw-r--r--pith/send.c30
-rw-r--r--pith/send.h2
-rw-r--r--pith/sequence.c6
-rw-r--r--pith/sequence.h2
-rw-r--r--pith/signal.h2
-rw-r--r--pith/smime.c50
-rw-r--r--pith/smime.h2
-rw-r--r--pith/smkeys.c13
-rw-r--r--pith/smkeys.h2
-rw-r--r--pith/sort.c6
-rw-r--r--pith/sort.h2
-rw-r--r--pith/sorttype.h2
-rw-r--r--pith/state.c6
-rw-r--r--pith/state.h4
-rw-r--r--pith/status.c6
-rw-r--r--pith/status.h2
-rw-r--r--pith/store.c6
-rw-r--r--pith/store.h2
-rw-r--r--pith/stream.c10
-rw-r--r--pith/stream.h2
-rw-r--r--pith/string.c116
-rw-r--r--pith/string.h4
-rw-r--r--pith/strlst.c6
-rw-r--r--pith/strlst.h2
-rw-r--r--pith/takeaddr.c10
-rw-r--r--pith/takeaddr.h2
-rw-r--r--pith/tempfile.c6
-rw-r--r--pith/tempfile.h2
-rw-r--r--pith/text.c10
-rw-r--r--pith/text.h2
-rw-r--r--pith/thread.c8
-rw-r--r--pith/thread.h2
-rw-r--r--pith/url.c6
-rw-r--r--pith/url.h2
-rw-r--r--pith/user.h2
-rw-r--r--pith/util.c6
-rw-r--r--pith/util.h2
206 files changed, 1132 insertions, 887 deletions
diff --git a/pith/Makefile.in b/pith/Makefile.in
index ee87d63e..e97b5fa1 100644
--- a/pith/Makefile.in
+++ b/pith/Makefile.in
@@ -110,6 +110,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -279,12 +280,18 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_EXEEXT = @BUILD_EXEEXT@
+BUILD_OBJEXT = @BUILD_OBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+CPP_FOR_BUILD = @CPP_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
C_CLIENT_AUTHS = @C_CLIENT_AUTHS@
C_CLIENT_BUNDLED = @C_CLIENT_BUNDLED@
@@ -318,6 +325,7 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
ISPELLPROG = @ISPELLPROG@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
@@ -384,6 +392,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
acx_pthread_config = @acx_pthread_config@
alpine_interactive_spellcheck = @alpine_interactive_spellcheck@
diff --git a/pith/abdlc.c b/pith/abdlc.c
index 727c209b..d8842113 100644
--- a/pith/abdlc.c
+++ b/pith/abdlc.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: abdlc.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -217,10 +213,10 @@ dlc_siblings(DL_CACHE_S *dlc1, DL_CACHE_S *dlc2)
DL_CACHE_S *
dlc_mgr(long int row, DlMgrOps op, DL_CACHE_S *dlc_start)
{
- int new_index, known_index, next_index;
+ int new_index, known_index, next_index = 0;
DL_CACHE_S *dlc = (DL_CACHE_S *)NULL;
- long next_row;
- long prev_row;
+ long next_row = 0L;
+ long prev_row = 0L;
if(op == Lookup){
@@ -1711,7 +1707,7 @@ fill_in_dl_field(DL_CACHE_S *new)
hostbuf[0] = '\0';
folder = NULL;
if(pab->type & REMOTE_VIA_IMAP && pab->filename){
- char *start, *end;
+ char *start, *end = NULL;
start = strindex(pab->filename, '{');
if(start)
diff --git a/pith/abdlc.h b/pith/abdlc.h
index ff44877f..ffc7c7a0 100644
--- a/pith/abdlc.h
+++ b/pith/abdlc.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/ablookup.c b/pith/ablookup.c
index fca00bfc..6134af3d 100644
--- a/pith/ablookup.c
+++ b/pith/ablookup.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: ablookup.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2009 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/ablookup.h b/pith/ablookup.h
index 00fd5d99..7003482f 100644
--- a/pith/ablookup.h
+++ b/pith/ablookup.h
@@ -2,7 +2,7 @@
* $Id: ablookup.h 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/addrbook.c b/pith/addrbook.c
index b52fe018..3aad654d 100644
--- a/pith/addrbook.c
+++ b/pith/addrbook.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: addrbook.c 90 2006-07-19 22:30:36Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/addrbook.h b/pith/addrbook.h
index 600f4148..4f440c82 100644
--- a/pith/addrbook.h
+++ b/pith/addrbook.h
@@ -2,7 +2,7 @@
* $Id: addrbook.h 82 2006-07-12 23:36:59Z mikes@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/addrstring.c b/pith/addrstring.c
index 7eb844eb..783dcb7c 100644
--- a/pith/addrstring.c
+++ b/pith/addrstring.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: addrstring.c 770 2007-10-24 00:23:09Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/addrstring.h b/pith/addrstring.h
index 2940ff2c..d2087f27 100644
--- a/pith/addrstring.h
+++ b/pith/addrstring.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/adjtime.c b/pith/adjtime.c
index 759e8fb0..dfd56cc7 100644
--- a/pith/adjtime.c
+++ b/pith/adjtime.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: adjtime.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/adjtime.h b/pith/adjtime.h
index 233b24c4..07c6fd2d 100644
--- a/pith/adjtime.h
+++ b/pith/adjtime.h
@@ -2,7 +2,7 @@
* $Id: adjtime.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/adrbklib.c b/pith/adrbklib.c
index c743ae8d..51099302 100644
--- a/pith/adrbklib.c
+++ b/pith/adrbklib.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: adrbklib.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2009 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/adrbklib.h b/pith/adrbklib.h
index 1cc74029..38e5bf79 100644
--- a/pith/adrbklib.h
+++ b/pith/adrbklib.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/atttype.h b/pith/atttype.h
index 392d467f..5d633655 100644
--- a/pith/atttype.h
+++ b/pith/atttype.h
@@ -2,7 +2,7 @@
* $Id: atttype.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/bitmap.h b/pith/bitmap.h
index 27466e8a..17591c1a 100644
--- a/pith/bitmap.h
+++ b/pith/bitmap.h
@@ -2,7 +2,7 @@
* $Id: bitmap.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/bldaddr.c b/pith/bldaddr.c
index 7c028b93..c01b865b 100644
--- a/pith/bldaddr.c
+++ b/pith/bldaddr.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: bldaddr.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -472,7 +468,7 @@ expand_address(BuildTo to, char *userdomain, char *localdomain, int *loop_detect
int simple_verify, int *mangled)
{
size_t domain_length, length;
- ADDRESS *adr, *a, *a_tail, *adr2, *a2, *a_temp, *wp_a;
+ ADDRESS *adr, *a, *a_tail, *adr2 = NULL, *a2, *a_temp, *wp_a;
AdrBk_Entry *abe, *abe2;
char *list, *l1, **l2;
char *tmp_a_string, *q;
diff --git a/pith/bldaddr.h b/pith/bldaddr.h
index e2cc28e5..0ba3d8f0 100644
--- a/pith/bldaddr.h
+++ b/pith/bldaddr.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/body.c b/pith/body.c
index 80667a33..40bc725e 100644
--- a/pith/body.c
+++ b/pith/body.c
@@ -1,6 +1,6 @@
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/busy.h b/pith/busy.h
index 4bdc0863..e79f8eab 100644
--- a/pith/busy.h
+++ b/pith/busy.h
@@ -2,7 +2,7 @@
* $Id: busy.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/charconv/Makefile.in b/pith/charconv/Makefile.in
index 20f626c6..533cf133 100644
--- a/pith/charconv/Makefile.in
+++ b/pith/charconv/Makefile.in
@@ -108,6 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -206,12 +207,18 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_EXEEXT = @BUILD_EXEEXT@
+BUILD_OBJEXT = @BUILD_OBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+CPP_FOR_BUILD = @CPP_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
C_CLIENT_AUTHS = @C_CLIENT_AUTHS@
C_CLIENT_BUNDLED = @C_CLIENT_BUNDLED@
@@ -245,6 +252,7 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
ISPELLPROG = @ISPELLPROG@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
@@ -311,6 +319,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
acx_pthread_config = @acx_pthread_config@
alpine_interactive_spellcheck = @alpine_interactive_spellcheck@
diff --git a/pith/charconv/filesys.c b/pith/charconv/filesys.c
index 3a9b5d91..29c99110 100644
--- a/pith/charconv/filesys.c
+++ b/pith/charconv/filesys.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: filesys.c 770 2007-10-24 00:23:09Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/charconv/filesys.h b/pith/charconv/filesys.h
index 4355364a..69f2b0e4 100644
--- a/pith/charconv/filesys.h
+++ b/pith/charconv/filesys.h
@@ -4,7 +4,7 @@
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/charconv/utf8.c b/pith/charconv/utf8.c
index 42a364b3..6a1034fd 100644
--- a/pith/charconv/utf8.c
+++ b/pith/charconv/utf8.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: utf8.c 1184 2008-12-16 23:52:15Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -236,7 +232,7 @@ convert_to_utf8(char *str, char *fromcharset, int flags)
char *ret = NULL;
char *fcharset;
SIZEDTEXT src, result;
- const CHARSET *cs;
+ const CHARSET *cs = NULL;
int try;
src.data = (unsigned char *) str;
@@ -683,6 +679,49 @@ ucs4_to_utf8_cpystr_n(UCS *ucs4src, int ucs4src_len)
return ((char *) ret);
}
+/*
+ * Similar to above but copy what is possible to a
+ * string of a size at most the given retlen.
+ */
+char *
+ucs4_to_utf8_n_cpystr(UCS *ucs4src, int retlen)
+{
+ unsigned char *ret = NULL;
+ unsigned char *writeptr;
+ int i, oldlen, len;
+
+ if(!ucs4src)
+ return NULL;
+
+ /*
+ * Over-allocate and then resize at the end.
+ */
+
+ /* count characters in source */
+ for(i = 0; ucs4src[i]; i++)
+ ;
+
+ ret = (unsigned char *) fs_get((6*i + 1) * sizeof(unsigned char));
+ memset(ret, 0, (6*i + 1) * sizeof(unsigned char));
+
+ writeptr = ret;
+ oldlen = len = 0;
+ for(i = 0; ucs4src[i] && (len < retlen); i++){
+ oldlen = len;
+ writeptr = utf8_put(writeptr, (unsigned long) ucs4src[i]);
+ len = strlen((char *)ret);
+ }
+ if(len > retlen){
+ ret[oldlen] = '\0';
+ len = oldlen;
+ }
+
+ /* get rid of excess size */
+ fs_resize((void **) &ret, (len + 1) * sizeof(unsigned char));
+
+ return ((char *) ret);
+}
+
#ifdef _WINDOWS
/*
diff --git a/pith/charconv/utf8.h b/pith/charconv/utf8.h
index f9597cbf..ee303277 100644
--- a/pith/charconv/utf8.h
+++ b/pith/charconv/utf8.h
@@ -4,7 +4,7 @@
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -66,6 +66,7 @@ UCS *ucs4_particular_width(UCS*, int);
UCS *utf8_to_ucs4_cpystr(char *);
char *ucs4_to_utf8_cpystr(UCS *);
char *ucs4_to_utf8_cpystr_n(UCS *, int);
+char *ucs4_to_utf8_n_cpystr(UCS *, int);
#ifdef _WINDOWS
LPTSTR utf8_to_lptstr(LPSTR);
LPSTR lptstr_to_utf8(LPTSTR);
diff --git a/pith/charset.c b/pith/charset.c
index 387079a4..ca2e6272 100644
--- a/pith/charset.c
+++ b/pith/charset.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: charset.c 1032 2008-04-11 00:30:04Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -846,7 +842,7 @@ conversion_table(char *from_cs, char *to_cs)
p = ct->table = (unsigned char *)
fs_get(256 * sizeof(unsigned char));
for(i = 0; i < 256; i++){
- unsigned int fc;
+ unsigned int fc = 0;
p[i] = '?';
switch(from->type){ /* get "from" UCS-2 codepoint */
case CT_1BYTE0: /* ISO 8859-1 */
diff --git a/pith/charset.h b/pith/charset.h
index 95718f58..7b8c693e 100644
--- a/pith/charset.h
+++ b/pith/charset.h
@@ -2,7 +2,7 @@
* $Id: charset.h 765 2007-10-23 23:51:37Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/color.c b/pith/color.c
index 0b036529..b110d7c7 100644
--- a/pith/color.c
+++ b/pith/color.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: color.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/color.h b/pith/color.h
index 31b1cee7..1d8b8227 100644
--- a/pith/color.h
+++ b/pith/color.h
@@ -2,7 +2,7 @@
* $Id: color.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/conf.c b/pith/conf.c
index 8de54278..d25bf14f 100644
--- a/pith/conf.c
+++ b/pith/conf.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: conf.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2009 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -768,8 +764,10 @@ static struct variable variables[] = {
NULL, cf_text_disable_drivers},
{"disable-these-authenticators", 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0,
NULL, cf_text_disable_auths},
+#ifdef DF_ENCRYPTION_RANGE
{"encryption-protocol-range", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
NULL, cf_text_encryption_range},
+#endif /* DF_ENCRYPTION_RANGE */
{"remote-abook-metafile", 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0,
NULL, cf_text_remote_abook_metafile},
{"remote-abook-history", 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0,
@@ -1001,7 +999,7 @@ init_init_vars(struct pine *ps)
void
init_pinerc(struct pine *ps, char **debug_out)
{
- char buf[MAXPATH+1], *p, *db;
+ char buf[MAXPATH+1], *p, *db = NULL;
#if defined(DOS) || defined(OS2)
char buf2[MAXPATH+1], l_pinerc[MAXPATH+1];
int nopinerc = 0, confregset = -1;
@@ -1631,7 +1629,9 @@ init_vars(struct pine *ps, void (*cmds_f) (struct pine *, char **))
GLO_PRINTER = cpystr(DF_DEFAULT_PRINTER);
GLO_ELM_STYLE_SAVE = cpystr(DF_ELM_STYLE_SAVE);
+#ifdef DF_ENCRYPTION_RANGE
GLO_ENCRYPTION_RANGE = cpystr(DF_ENCRYPTION_RANGE);
+#endif /* DF_ENCRYPTION_RANGE */
GLO_SAVE_BY_SENDER = cpystr(DF_SAVE_BY_SENDER);
GLO_HEADER_IN_REPLY = cpystr(DF_HEADER_IN_REPLY);
GLO_INBOX_PATH = cpystr("inbox");
@@ -2411,7 +2411,9 @@ init_vars(struct pine *ps, void (*cmds_f) (struct pine *, char **))
set_current_val(&vars[V_FORCED_ABOOK_ENTRY], TRUE, TRUE);
set_current_val(&vars[V_DISABLE_DRIVERS], TRUE, TRUE);
set_current_val(&vars[V_DISABLE_AUTHS], TRUE, TRUE);
+#ifdef DF_ENCRYPTION_RANGE
set_current_val(&vars[V_ENCRYPTION_RANGE], TRUE, TRUE);
+#endif /* DF_ENCRYPTION_RANGE */
set_current_val(&vars[V_VIEW_HEADERS], TRUE, TRUE);
/* strip spaces and colons */
@@ -4885,7 +4887,7 @@ set_feature_list_current_val(struct variable *var)
*/
j = 0;
- strncpy(no_allow, "no-", 3);
+ strcpy(no_allow, "no-");
strncpy(no_allow+3, feature_list_name(F_ALLOW_CHANGING_FROM), sizeof(no_allow)-3-1);
no_allow[sizeof(no_allow)-1] = '\0';
@@ -5134,7 +5136,7 @@ Those that are <unset> will be left unset; their values will be NULL.
void
read_pinerc(PINERC_S *prc, struct variable *vars, ParsePinerc which_vars)
{
- char *filename, *file, *value, **lvalue, *line, *error;
+ char *filename = NULL, *file, *value = NULL, **lvalue = NULL, *line, *error;
char *p, *p1, *free_file = NULL;
struct variable *v;
PINERC_LINE *pline = NULL;
@@ -5644,20 +5646,19 @@ int
write_pinerc(struct pine *ps, EditWhich which, int flags)
{
char *p, *dir, *tmp = NULL, *pinrc;
- char *pval, **lval;
+ char *pval = NULL, **lval = NULL;
char *linep = NULL, *lineq = NULL;
int bc = 1;
int buflen;
PINERC_LINE *pline;
struct variable *var;
time_t mtime;
- char *filename;
+ char *filename = NULL;
REMDATA_S *rd = NULL;
PINERC_S *prc = NULL;
STORE_S *so = NULL;
#ifndef _WINDOWS
struct stat sbuf;
- char *slink = NULL;
#endif
#define MAXPLINESIZE 10000
@@ -6532,7 +6533,7 @@ set_variable(int var, char *value, int expand, int commit, EditWhich which)
{
struct variable *v;
char **apval;
- PINERC_S *prc;
+ PINERC_S *prc = NULL;
v = &ps_global->vars[var];
@@ -6590,7 +6591,7 @@ set_variable_list(int var, char **lvalue, int write_it, EditWhich which)
char ***alval;
int i;
struct variable *v = &ps_global->vars[var];
- PINERC_S *prc;
+ PINERC_S *prc = NULL;
if(!v->is_user || !v->is_list)
panic1("BOTCH: Trying to set non-user or non-list variable %s", v->name);
@@ -7985,8 +7986,10 @@ config_help(int var, int feature)
return(h_config_disable_drivers);
case V_DISABLE_AUTHS :
return(h_config_disable_auths);
+#ifdef DF_ENCRYPTION_RANGE
case V_ENCRYPTION_RANGE :
return(h_config_encryption_range);
+#endif /* DF_ENCRYPTION_RANGE */
case V_REMOTE_ABOOK_METADATA :
return(h_config_abook_metafile);
case V_REPLY_STRING :
@@ -8329,7 +8332,7 @@ get_supported_options(void)
AUTHENTICATOR *a;
char *title = _("Supported features in this Alpine");
char sbuf[MAX_SCREEN_COLS+1], tmp[128];
- int cnt, alcnt, len, cols, disabled, any_disabled = 0, i;
+ int cnt, alcnt, len, cols, disabled, any_disabled = 0;
/*
* Line count:
diff --git a/pith/conf.h b/pith/conf.h
index 739b0155..3505f399 100644
--- a/pith/conf.h
+++ b/pith/conf.h
@@ -2,7 +2,7 @@
* $Id: conf.h 1155 2008-08-21 18:33:21Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/conftype.h b/pith/conftype.h
index 5f2dd505..0bfa8922 100644
--- a/pith/conftype.h
+++ b/pith/conftype.h
@@ -2,7 +2,7 @@
* $Id: conftype.h 1155 2008-08-21 18:33:21Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -177,7 +177,9 @@ typedef enum { V_PERSONAL_NAME = 0
, V_NEW_VER_QUELL
, V_DISABLE_DRIVERS
, V_DISABLE_AUTHS
+#ifdef DF_ENCRYPTION_RANGE
, V_ENCRYPTION_RANGE
+#endif /* DF_ENCRYPTION_RANGE */
, V_REMOTE_ABOOK_METADATA
, V_REMOTE_ABOOK_HISTORY
, V_REMOTE_ABOOK_VALIDITY
diff --git a/pith/context.c b/pith/context.c
index 3b368fef..a66a2304 100644
--- a/pith/context.c
+++ b/pith/context.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: context.c 1144 2008-08-14 16:53:34Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/context.h b/pith/context.h
index 98d8a2fb..b0b39711 100644
--- a/pith/context.h
+++ b/pith/context.h
@@ -2,7 +2,7 @@
* $Id: context.h 764 2007-10-23 23:44:49Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/copyaddr.c b/pith/copyaddr.c
index 8604509a..10f060a4 100644
--- a/pith/copyaddr.c
+++ b/pith/copyaddr.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: copyaddr.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -55,7 +51,7 @@ copyaddr(struct mail_address *a)
ADDRESS *
copyaddrlist(struct mail_address *a)
{
- ADDRESS *new = NULL, *head = NULL, *current;
+ ADDRESS *new = NULL, *head = NULL, *current = NULL;
for(; a; a = a->next){
new = copyaddr(a);
diff --git a/pith/copyaddr.h b/pith/copyaddr.h
index f1b6bdf4..73c5bf84 100644
--- a/pith/copyaddr.h
+++ b/pith/copyaddr.h
@@ -2,7 +2,7 @@
* $Id: copyaddr.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/debug.h b/pith/debug.h
index 9fe68653..c33ac578 100644
--- a/pith/debug.h
+++ b/pith/debug.h
@@ -2,7 +2,7 @@
* $Id: debug.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/detach.c b/pith/detach.c
index d664a112..112f9628 100644
--- a/pith/detach.c
+++ b/pith/detach.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: detach.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/detach.h b/pith/detach.h
index 41226180..96daa6dc 100644
--- a/pith/detach.h
+++ b/pith/detach.h
@@ -2,7 +2,7 @@
* $Id: detach.h 1025 2008-04-08 22:59:38Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/detoken.c b/pith/detoken.c
index cb4fc5f3..6f4c4cc1 100644
--- a/pith/detoken.c
+++ b/pith/detoken.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: detoken.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -144,7 +140,7 @@ detoken_src(char *src, int for_what, ENVELOPE *env, ACTION_S *role,
REDRAFT_POS_S **redraft_pos, int *impl)
{
int loopcnt = 25; /* just in case, avoid infinite loop */
- char *ret, *str1, *str2;
+ char *ret = NULL, *str1, *str2;
int done = 0;
if(!src)
diff --git a/pith/detoken.h b/pith/detoken.h
index e2ef182a..a3a44cad 100644
--- a/pith/detoken.h
+++ b/pith/detoken.h
@@ -2,7 +2,7 @@
* $Id: detoken.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/editorial.c b/pith/editorial.c
index dbbdbd0b..a93051b8 100644
--- a/pith/editorial.c
+++ b/pith/editorial.c
@@ -1,9 +1,5 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: editorial.c 768 2007-10-24 00:10:03Z hubert@u.washington.edu $";
-#endif
-
/* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/editorial.h b/pith/editorial.h
index 5d9bd28c..6ca16365 100644
--- a/pith/editorial.h
+++ b/pith/editorial.h
@@ -3,7 +3,7 @@
-----------------------------------------------------------------------*/
/* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/escapes.c b/pith/escapes.c
index d6b7165a..f9d1b425 100644
--- a/pith/escapes.c
+++ b/pith/escapes.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: escapes.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/escapes.h b/pith/escapes.h
index 73cbdc5c..8d3865e4 100644
--- a/pith/escapes.h
+++ b/pith/escapes.h
@@ -2,7 +2,7 @@
* $Id: escapes.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/filter.c b/pith/filter.c
index 4607cc63..d2bd6c8f 100644
--- a/pith/filter.c
+++ b/pith/filter.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: filter.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -2848,7 +2844,8 @@ typedef struct _center_s {
* Collector data and state information
*/
typedef struct collector_s {
- char buf[HTML_BUF_LEN]; /* buffer to collect data */
+ char *buf; /* buffer to collect data */
+ unsigned long bufsize; /* size of buffer to collect data */
int len; /* length of that buffer */
unsigned unquoted_data:1; /* parameter is not quoted... */
unsigned end_tag:1; /* collecting a closing tag */
@@ -2956,6 +2953,7 @@ typedef struct _html_opts {
#define NEW_CLCTR(X) { \
ED(X) = (CLCTR_S *)fs_get(sizeof(CLCTR_S)); \
memset(ED(X), 0, sizeof(CLCTR_S)); \
+ ED(X)->buf = memset((void *) fs_get(ED(X)->bufsize = HTML_BUF_LEN), 0, HTML_BUF_LEN); \
HD(X)->token = html_element_collector; \
}
@@ -3228,7 +3226,7 @@ int html_code(HANDLER_S *, int, int);
int html_ins(HANDLER_S *, int, int);
int html_del(HANDLER_S *, int, int);
int html_abbr(HANDLER_S *, int, int);
-char *cid_tempfile_name(char *, long, int *);
+char *img_tempfile_name(char *, long, int *);
/*
* Protos for RSS 2.0 Tag handlers
@@ -4476,30 +4474,50 @@ html_img(HANDLER_S *hd, int ch, int cmd)
* if we ever decide web bugs aren't a problem
* anymore then we might expand the scope
*/
- if(src
- && DO_HANDLES(hd->html_data)
- && RELATED_OK(hd->html_data)
- && struncmp(src, "cid:", 4) == 0){
- char buf[32];
- int i, n;
- HANDLE_S *h = new_handle(HANDLESP(hd->html_data));
-
- h->type = IMG;
- h->h.img.src = cpystr(src + 4);
- h->h.img.alt = cpystr((alt) ? alt : "Attached Image");
-
- HTML_TEXT(hd->html_data, TAG_EMBED);
- HTML_TEXT(hd->html_data, TAG_HANDLE);
-
- sprintf(buf, "%d", h->key);
- n = strlen(buf);
- HTML_TEXT(hd->html_data, n);
- for(i = 0; i < n; i++){
+ if(src && DO_HANDLES(hd->html_data)){
+ if(RELATED_OK(hd->html_data)
+ && struncmp(src, "cid:", 4) == 0){
+ char buf[32];
+ int i, n;
+ HANDLE_S *h = new_handle(HANDLESP(hd->html_data));
+
+ h->type = IMG;
+ h->h.img.src = cpystr(src + 4);
+ h->h.img.alt = cpystr((alt) ? alt : "Attached Image");
+
+ HTML_TEXT(hd->html_data, TAG_EMBED);
+ HTML_TEXT(hd->html_data, TAG_HANDLE);
+
+ sprintf(buf, "%d", h->key);
+ n = strlen(buf);
+ HTML_TEXT(hd->html_data, n);
+ for(i = 0; i < n; i++){
unsigned int uic = buf[i];
HTML_TEXT(hd->html_data, uic);
- }
+ }
- return(0);
+ return(0);
+ }
+ else if(struncmp(src, "data:", 5) == 0){
+ char buf[32];
+ int i, n;
+ HANDLE_S *h = new_handle(HANDLESP(hd->html_data));
+
+ h->type = imgData;
+ h->h.img.src = cpystr(src + 5);
+ h->h.img.alt = cpystr((alt) ? alt : "Embedded Image");
+
+ HTML_TEXT(hd->html_data, TAG_EMBED);
+ HTML_TEXT(hd->html_data, TAG_HANDLE);
+
+ sprintf(buf, "%d", h->key);
+ n = strlen(buf);
+ HTML_TEXT(hd->html_data, n);
+ for(i = 0; i < n; i++){
+ unsigned int uic = buf[i];
+ HTML_TEXT(hd->html_data, uic);
+ }
+ }
}
else if(alt && strlen(alt) < 256){ /* arbitrary "reasonable" limit */
HTML_DUMP_LIT(hd->html_data, alt, strlen(alt));
@@ -5794,7 +5812,7 @@ html_li(HANDLER_S *hd, int ch, int cmd)
if(PASS_HTML(hd->html_data)){
}
else{
- char buf[16], tmp[16], *p;
+ char buf[20], tmp[16], *p;
int wrapstate;
/* Start a new line */
@@ -7475,8 +7493,15 @@ html_element_collector(FILTER_S *fd, int ch)
|| ED(fd)->unquoted_data
|| isalnum(ch)
|| strchr("#-.!", ch)){
+ if(ED(fd)->len >= ((ED(fd)->element || !ED(fd)->hit_equal)
+ ? ED(fd)->bufsize:MAX_ELEMENT)){
+ unsigned long i, bufsize = ED(fd)->bufsize;
+ ED(fd)->bufsize = ED(fd)->len + HTML_BUF_LEN;
+ fs_resize((void **) &ED(fd)->buf, ED(fd)->bufsize);
+ memset(&ED(fd)->buf[bufsize], '\0', ED(fd)->bufsize - bufsize);
+ }
if(ED(fd)->len < ((ED(fd)->element || !ED(fd)->hit_equal)
- ? HTML_BUF_LEN:MAX_ELEMENT)){
+ ? ED(fd)->bufsize:MAX_ELEMENT)){
ED(fd)->buf[(ED(fd)->len)++] = ch;
}
else
@@ -7498,8 +7523,15 @@ html_element_collector(FILTER_S *fd, int ch)
if(!ep->alternate)
ED(fd)->badform = 1;
else{
+ if(ED(fd)->len >= ((ED(fd)->element || !ED(fd)->hit_equal)
+ ? ED(fd)->bufsize:MAX_ELEMENT)){
+ unsigned long bufsize = ED(fd)->bufsize;
+ ED(fd)->bufsize = ED(fd)->len + HTML_BUF_LEN;
+ fs_resize((void **) &ED(fd)->buf, ED(fd)->bufsize);
+ memset(&ED(fd)->buf[bufsize], '\0', ED(fd)->bufsize - bufsize);
+ }
if(ED(fd)->len < ((ED(fd)->element || !ED(fd)->hit_equal)
- ? HTML_BUF_LEN:MAX_ELEMENT)){
+ ? ED(fd)->bufsize:MAX_ELEMENT)){
ED(fd)->buf[(ED(fd)->len)++] = ch; /* add this exception */
}
else
@@ -7567,7 +7599,8 @@ html_element_flush(CLCTR_S *el_data)
el_data->was_quoted = 0; /* reset collector buf and state */
el_data->len = 0;
- memset(el_data->buf, 0, HTML_BUF_LEN);
+ fs_give((void **) &el_data->buf);
+ el_data->bufsize = 0;
return(rv); /* report whatever happened above */
}
@@ -7602,6 +7635,12 @@ html_element_comment(FILTER_S *f, char *s)
#ifdef _WINDOWS
else if(!strucmp(s, "os_windows"))
HD(f)->bitbucket = 0;
+#elif OSX_TARGET
+ else if(!strucmp(s, "os_osx") || !strucmp(s, "os_unix_and_osx"))
+ HD(f)->bitbucket = 0;
+#else
+ else if(!strucmp(s, "os_unix") || !strucmp(s, "os_unix_and_osx"))
+ HD(f)->bitbucket = 0;
#endif
}
@@ -7684,6 +7723,11 @@ html_element_comment(FILTER_S *f, char *s)
else if(!strcmp(s, "C_CLIENT_VERSION")){
p = CCLIENTVERSION;
}
+#ifdef PASSFILE
+ else if(!strcmp(s, "PASSWORD_FILE")){
+ p = PASSFILE;
+ }
+#endif
else if(!strcmp(s, "ALPINE_COMPILE_DATE")){
p = datestamp;
}
@@ -9054,25 +9098,31 @@ gf_html2plain_rss_free_items(RSS_ITEM_S **itemp)
}
}
+#define CID_NONE 0x00
+#define CID_DATA 0x01
+#define IMG_DATA 0x10
+
char *
-cid_tempfile_name(char *line, long n, int *is_cidp)
+img_tempfile_name(char *line, long n, int *flagp)
{
int f2 = 0;
int i, found;
- char *s, *t = NULL, *u, c;
+ char *s, *t = NULL, c;
char imgfile[1024];
char *extp = NULL;
c = line[n];
line[n] = '\0';
s = NULL;
- *is_cidp = 0;
+ *flagp = CID_NONE;
if(n > 0){
if (line[0] == '\"')
f2 = 1;
- if (n - f2 > 3){
+ if (n - f2 > 4 && !struncmp(line+f2, "data:", 5))
+ *flagp = IMG_DATA;
+ else if (n - f2 > 3){
if (!struncmp(line+f2, "cid:", 4)){
- *is_cidp = 1;
+ *flagp = CID_DATA;
f2 += 4;
s = fs_get((n - f2 + 4)*sizeof(char));
sprintf(s, "<%s", line+f2);
@@ -9171,19 +9221,18 @@ gf_html_cid2file(FILTER_S *f, int cmd)
}
else if (state == 2){ /* collect all data */
if(ASCII_ISSPACE(c) || c == '>'){
- long n;
- int is_cid;
+ int flag;
if(f->n > 0){
- char *s = cid_tempfile_name(f->line, f->n, &is_cid);
- if(is_cid){
+ char *s = img_tempfile_name(f->line, f->n, &flag);
+ if(flag & CID_DATA){
RESET_FILTER(f);
if(s != NULL)
for(; *s != '\0'; s++)
COLLECT(f, *s);
- }
- }
- GF_PUTC(f->next, '\"');
- if(is_cid || f->t){
+ }
+ }
+ GF_PUTC(f->next, '\"');
+ if((flag & (CID_DATA | IMG_DATA)) || f->t){
for(p = f->line; f->n; f->n--, p++){
if(*p == '\"') continue;
GF_PUTC(f->next, *p);
@@ -9208,7 +9257,7 @@ gf_html_cid2file(FILTER_S *f, int cmd)
}
else if(cmd == GF_EOD){
if(f->f1 == 2){
- char *s = cid_tempfile_name(f->line, f->n, &f->f2);
+ char *s = img_tempfile_name(f->line, f->n, &f->f2);
GF_PUTC(f->next, '\"');
if (f->f2 || f->t){
for(p = s; *p; p++){
diff --git a/pith/filter.h b/pith/filter.h
index 9c08063a..e3656bcb 100644
--- a/pith/filter.h
+++ b/pith/filter.h
@@ -2,7 +2,7 @@
* $Id: filter.h 1169 2008-08-27 06:42:06Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/filttype.h b/pith/filttype.h
index c8374372..d3d08539 100644
--- a/pith/filttype.h
+++ b/pith/filttype.h
@@ -2,7 +2,7 @@
* $Id: filttype.h 767 2007-10-24 00:03:59Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/flag.c b/pith/flag.c
index f9c2cb53..a8f28ff8 100644
--- a/pith/flag.c
+++ b/pith/flag.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: flag.c 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -338,10 +334,8 @@ flag_search(MAILSTREAM *stream, int flags, MsgNo set_start, MSGNO_S *set_msgmap,
(n = flag_search_sequence(stream, set_msgmap, i, MH_ANYTHD)) >= 0L;
i++)
if(n > 0L && n <= stream->nmsgs
- && (mc = mail_elt(stream, n)) && !mc->valid)
- mc->sequence = 1;
- else
- mc->sequence = 0;
+ && (mc = mail_elt(stream, n)) != NULL)
+ mc->sequence = !mc->valid ? 1 : 0;
}
for(i = 1L; i <= stream->nmsgs; i++)
@@ -583,7 +577,7 @@ set_lflag(MAILSTREAM *stream, MSGNO_S *msgs, long int n, int f, int v)
if((rawno=mn_m2raw(msgs, n)) > 0L && stream && rawno <= stream->nmsgs
&& (mc = mail_elt(stream, rawno))){
int was_invisible, is_invisible;
- int chk_thrd_cnt = 0, thrd_was_visible, was_hidden, is_hidden;
+ int chk_thrd_cnt = 0, thrd_was_visible = 0, was_hidden = 0, is_hidden;
if(*(peltp = (PINELT_S **) &mc->sparep) == NULL){
*peltp = (PINELT_S *) fs_get(sizeof(PINELT_S));
diff --git a/pith/flag.h b/pith/flag.h
index 8a142a22..03a7ee4f 100644
--- a/pith/flag.h
+++ b/pith/flag.h
@@ -2,7 +2,7 @@
* $Id: flag.h 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/folder.c b/pith/folder.c
index 7382d8ac..81f331a5 100644
--- a/pith/folder.c
+++ b/pith/folder.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: folder.c 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -1157,7 +1153,7 @@ mail_list_filter(MAILSTREAM *stream, char *mailbox, int delim, long int attribs,
*/
if(!strucmp(mailbox, ps_global->inbox_name)){
int ftotal, i;
- FOLDER_S *f;
+ FOLDER_S *f = NULL;
char fullname[1000], tmp1[1000], tmp2[1000], *l1, *l2;
/* fullname is the name of the mailbox in the list response */
@@ -1549,7 +1545,7 @@ folder_complete_internal(CONTEXT_S *context, char *name, size_t namelen,
int *completions, int flags)
{
int i, match = -1, ftotal;
- char tmp[MAXFOLDER+2], *a, *b, *fn, *pat;
+ char tmp[MAXFOLDER+2], *a, *b, *fn, *pat = NULL;
FOLDER_S *f;
if(completions)
@@ -2419,7 +2415,7 @@ get_recent_in_folder(char *mailbox_name, long unsigned int *new,
MAILSTREAM *this_is_the_stream)
{
MAILSTREAM *strm = NIL;
- unsigned long tot, nw, uns;
+ unsigned long tot = 0L, nw = 0L, uns = 0L;
int gotit = 0;
int maildrop = 0;
char *target = NULL;
diff --git a/pith/folder.h b/pith/folder.h
index 7f63087b..0c71e8ca 100644
--- a/pith/folder.h
+++ b/pith/folder.h
@@ -2,7 +2,7 @@
* $Id: folder.h 880 2007-12-18 00:57:56Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/foldertype.h b/pith/foldertype.h
index fabe0d20..24344ac6 100644
--- a/pith/foldertype.h
+++ b/pith/foldertype.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/handle.c b/pith/handle.c
index 321b14b1..1e7f4b61 100644
--- a/pith/handle.c
+++ b/pith/handle.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: handle.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -133,6 +129,17 @@ free_handle(HANDLE_S **h)
fs_give((void **) &(*h)->h.url.name);
}
+ if((*h)->type == imgData){ /* destroy malloc'd data */
+ if((*h)->h.img.src)
+ fs_give((void **) &(*h)->h.img.src);
+
+ if((*h)->h.img.alt)
+ fs_give((void **) &(*h)->h.img.alt);
+
+ if((*h)->h.url.tool)
+ fs_give((void **) &(*h)->h.url.tool);
+ }
+
free_handle_locations(&(*h)->loc);
fs_give((void **) h);
diff --git a/pith/handle.h b/pith/handle.h
index eae39da2..dcce1462 100644
--- a/pith/handle.h
+++ b/pith/handle.h
@@ -2,7 +2,7 @@
* $Id: handle.h 814 2007-11-14 18:39:28Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -35,7 +35,7 @@ typedef struct screen_position_list {
*/
typedef struct handle_s {
int key; /* tag number embedded in text */
- enum {URL, iCal, Attach, Folder, Function, IMG} type;
+ enum {URL, iCal, Attach, Folder, Function, IMG, imgData} type;
unsigned force_display:1; /* Don't ask before launching */
unsigned using_is_used:1; /* bit below is being used */
unsigned is_used:1; /* if not, remove it from list */
@@ -49,8 +49,9 @@ typedef struct handle_s {
*name; /* URL's NAME attribute */
} url; /* stuff to describe URL handle */
struct {
- char *src, /* src of image (CID: only?) */
- *alt; /* image alternate text */
+ char *src, /* src of image [cid:, data:] */
+ *alt, /* image alternate text */
+ *tool; /* program to display data: */
} img; /* stuff to describe img */
ATTACH_S *attach; /* Attachment struct for this handle */
struct {
diff --git a/pith/headers.h b/pith/headers.h
index 4542d64d..36033cf9 100644
--- a/pith/headers.h
+++ b/pith/headers.h
@@ -2,7 +2,7 @@
* $Id: headers.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/help.c b/pith/help.c
index 91907f20..bb91d376 100644
--- a/pith/help.c
+++ b/pith/help.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: help.c 900 2008-01-05 01:13:26Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/help.h b/pith/help.h
index 5f453ce1..07491308 100644
--- a/pith/help.h
+++ b/pith/help.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/help_c_gen.c b/pith/help_c_gen.c
index 8a579ef2..76f74007 100644
--- a/pith/help_c_gen.c
+++ b/pith/help_c_gen.c
@@ -1,7 +1,7 @@
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/help_h_gen.c b/pith/help_h_gen.c
index 21e052b8..8c30b81a 100644
--- a/pith/help_h_gen.c
+++ b/pith/help_h_gen.c
@@ -1,7 +1,7 @@
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/helpindx.c b/pith/helpindx.c
index e04459c4..eb32236d 100644
--- a/pith/helpindx.c
+++ b/pith/helpindx.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: helpindx.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/hist.c b/pith/hist.c
index 24aa530c..edbe9c93 100644
--- a/pith/hist.c
+++ b/pith/hist.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: hist.c 807 2007-11-09 01:21:33Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/hist.h b/pith/hist.h
index 1eac10ae..37a66de8 100644
--- a/pith/hist.h
+++ b/pith/hist.h
@@ -2,7 +2,7 @@
* $Id: hist.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/icache.c b/pith/icache.c
index 4de55387..19f15214 100644
--- a/pith/icache.c
+++ b/pith/icache.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: icache.c 874 2007-12-15 02:51:06Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/icache.h b/pith/icache.h
index dbe2c752..d3b8cfe2 100644
--- a/pith/icache.h
+++ b/pith/icache.h
@@ -2,7 +2,7 @@
* $Id: icache.h 874 2007-12-15 02:51:06Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/ical.c b/pith/ical.c
index 7022bb55..64817e64 100644
--- a/pith/ical.c
+++ b/pith/ical.c
@@ -1,6 +1,7 @@
#include "../pith/headers.h"
#include "../pith/mailpart.h"
#include "../pith/store.h"
+#include "../pith/string.h"
#include "../pith/ical.h"
typedef struct ical_iana_comp_s {
@@ -1677,7 +1678,7 @@ ical_non_ascii_valid(unsigned char c)
static unsigned char icu[6];
static int utf8_len = 0;
static int utf8_type = 0;
- int rv;
+ int rv = 0;
if(utf8_len == 0)
utf8_type = (c >= 0xF0 && c <= 0xF4)
@@ -1817,9 +1818,9 @@ ical_parse_duration(char *value, ICAL_DURATION_S *ic_d)
}
/* return -1 if any error,
- 0 if value has the DATE-TIME form
- 1 if value has the DATE form only
- 2 if value has the DATE-TIME form and is in GMT.
+ ICAL_DATE_TIME if value has the DATE-TIME form
+ ICAL_DATE if value has the DATE form only
+ ICAL_DATE_TIME_GMT if value has the DATE-TIME form and is in GMT.
*/
int
ical_parse_date(char *value, struct tm *t)
@@ -1833,32 +1834,32 @@ ical_parse_date(char *value, struct tm *t)
if(value == NULL) return rv;
- rv = 0; /* assume DATE-TIME format */
+ rv = ICAL_DATE_TIME; /* assume DATE-TIME format */
/* a simple check for the format of the string */
for(i = 0; isdigit(value[i]); i++);
if (i == 8 && value[i] == '\0')
- rv = 1;
+ rv = ICAL_DATE;
else
if (i != 8 || value[i++] != 'T') return -1;
- if(rv == 0) {
+ if(rv == ICAL_DATE_TIME) {
for(; isdigit(value[i]); i++);
if(i != 15 || (value[i] != '\0' && (value[i] != 'Z' || value[i+1] != '\0')))
return -1;
if(i == 15 && value[i] == 'Z')
- rv = 2;
+ rv = ICAL_DATE_TIME_GMT;
}
Tm.tm_year = ical_get_number_value(value, 0, 4) - 1900;
Tm.tm_mon = ical_get_number_value(value, 4, 6) - 1;
Tm.tm_mday = ical_get_number_value(value, 6, 8);
- if(rv != 1){
+ if(rv != ICAL_DATE){
Tm.tm_hour = ical_get_number_value(value, 9, 11);
Tm.tm_min = ical_get_number_value(value, 11, 13);
Tm.tm_sec = ical_get_number_value(value, 13, 15);
- Tm.tm_isdst = ICAL_DST_UNKNOWN;
+ Tm.tm_isdst = rv | ICAL_DST_UNKNOWN;
}
else
- Tm.tm_isdst = -1;
+ Tm.tm_isdst = rv;
*t = Tm;
return (t->tm_mon > 11 || t->tm_mon < 0
@@ -2180,9 +2181,15 @@ ical_vevent_summary(VCALENDAR_S *vcal)
VEVENT_S *vevent;
GEN_ICLINE_S *gicl;
ICLINE_S *icl;
+ static int offset = 1000000; /* impossible value */
+ static int dst;
+ time_t ourtime;
if(vcal == NULL) return NULL;
+ if(offset == 1000000)
+ offset = timezone_offset_to_gmt(&dst);
+
method = vcal->method;
vevent = (VEVENT_S *) vcal->comp[VEvent];
@@ -2251,18 +2258,27 @@ ical_vevent_summary(VCALENDAR_S *vcal)
int icd; /* ical date return value */
memset((void *)&ic_date, 0, sizeof(struct tm));
- icd = ical_parse_date(icl->value, &ic_date);
+ icd = ical_parse_date(icl->value, &ic_date) & 0x00fff;
tzid = ical_get_tzid(icl->param);
if(icd >= 0){
ic_date.tm_wday = ical_day_of_week(ic_date);
+ if(ic_date.tm_isdst & ICAL_DATE_TIME_GMT){ /* GMT time */
+ ic_date.tm_isdst = dst;
+ ourtime = mktime(&ic_date);
+ if(ourtime != (time_t) -1){
+ ourtime += offset;
+ ic_date = *localtime(&ourtime);
+ }
+ }
+ ic_date.tm_isdst = dst;
switch(icd){
- case 0: /* DATE-TIME */
+ case ICAL_DATE_TIME: /* DATE-TIME */
ical_date_time(tmp, sizeof(tmp), &ic_date);
break;
- case 1: /* DATE */
+ case ICAL_DATE: /* DATE */
our_strftime(tmp, sizeof(tmp), "%a %x", &ic_date);
break;
- case 2: /* DATE-TIME in GMT, Bug: add adjust to time zone */
+ case ICAL_DATE_TIME_GMT: /* DATE-TIME in GMT */
our_strftime(tmp, sizeof(tmp), "%a %x %I:%M %p", &ic_date);
break;
default: alpine_panic("Unhandled ical date format");
@@ -2339,23 +2355,32 @@ ical_vevent_summary(VCALENDAR_S *vcal)
int icd;
memset((void *)&ic_date, 0, sizeof(struct tm));
- icd = ical_parse_date(icl->value, &ic_date);
+ icd = ical_parse_date(icl->value, &ic_date) & 0x00fff;
tzid = ical_get_tzid(icl->param);
if(icd >= 0){
ic_date.tm_wday = ical_day_of_week(ic_date);
- switch(icd){
- case 0: /* DATE-TIME */
+ if(ic_date.tm_isdst & ICAL_DATE_TIME_GMT){ /* GMT time */
+ ic_date.tm_isdst = dst;
+ ourtime = mktime(&ic_date);
+ if(ourtime != (time_t) -1){
+ ourtime += offset;
+ ic_date = *localtime(&ourtime);
+ }
+ }
+ ic_date.tm_isdst = dst;
+ switch(icd){
+ case ICAL_DATE_TIME: /* DATE-TIME */
ical_date_time(tmp, sizeof(tmp), &ic_date);
break;
- case 1: /* DATE */
+ case ICAL_DATE: /* DATE */
our_strftime(tmp, sizeof(tmp), "%a %x", &ic_date);
break;
- case 2: /* DATE-TIME in GMT, Bug: add adjust to time zone */
+ case ICAL_DATE_TIME_GMT: /* DATE-TIME in GMT */
our_strftime(tmp, sizeof(tmp), "%a %x %I:%M %p", &ic_date);
break;
default: alpine_panic("Unhandled ical date format");
break;
- }
+ }
}
else{
strncpy(tmp, _("Error while parsing event date"), sizeof(tmp));
@@ -2387,18 +2412,27 @@ ical_vevent_summary(VCALENDAR_S *vcal)
int icd;
memset((void *)&ic_date, 0, sizeof(struct tm));
- icd = ical_parse_date(icl->value, &ic_date);
+ icd = ical_parse_date(icl->value, &ic_date) & 0x00fff;
tzid = ical_get_tzid(icl->param);
if(icd >= 0){
ic_date.tm_wday = ical_day_of_week(ic_date);
+ if(ic_date.tm_isdst & ICAL_DATE_TIME_GMT){ /* GMT time */
+ ic_date.tm_isdst = dst;
+ ourtime = mktime(&ic_date);
+ if(ourtime != (time_t) -1){
+ ourtime += offset;
+ ic_date = *localtime(&ourtime);
+ }
+ }
+ ic_date.tm_isdst = dst;
switch(icd){
- case 0: /* DATE-TIME */
+ case ICAL_DATE_TIME: /* DATE-TIME */
ical_date_time(tmp, sizeof(tmp), &ic_date);
break;
- case 1: /* DATE */
+ case ICAL_DATE: /* DATE */
our_strftime(tmp, sizeof(tmp), "%a %x", &ic_date);
break;
- case 2: /* DATE-TIME in GMT, Bug: add adjust to time zone */
+ case ICAL_DATE_TIME_GMT: /* DATE-TIME in GMT */
our_strftime(tmp, sizeof(tmp), "%a %x %I:%M %p", &ic_date);
break;
default: alpine_panic("Unhandled ical date format");
diff --git a/pith/icaltype.h b/pith/icaltype.h
index 77ca3079..c50a409c 100644
--- a/pith/icaltype.h
+++ b/pith/icaltype.h
@@ -12,8 +12,12 @@
* to a different value, ICAL_DST_SET which means we know the date
* is DST
*/
-#define ICAL_DST_UNKNOWN (1)
-#define ICAL_DST_SET (ICAL_DST_UNKNOWN + 1)
+#define ICAL_DATE_TIME (0x00001)
+#define ICAL_DATE (0x00010)
+#define ICAL_DATE_TIME_GMT (0x00100)
+#define ICAL_DST_UNKNOWN (0x01000)
+#define ICAL_DST_SET (0x10000)
+
/* this is the PARAMETER struct from mail.h, but with possibility of
* extension */
diff --git a/pith/imap.c b/pith/imap.c
index 869de9ad..4c1d7f39 100644
--- a/pith/imap.c
+++ b/pith/imap.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: imap.c 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -450,6 +446,8 @@ mm_list(MAILSTREAM *stream, int delimiter, char *mailbox, long int attributes)
(attributes & LATT_HASNOCHILDREN) ? ", has no children" : ""));
#endif
+ if(!mm_list_info || !mm_list_info->filter) return;
+
if(!mm_list_info->stream || stream == mm_list_info->stream)
(*mm_list_info->filter)(stream, mailbox, delimiter,
attributes, mm_list_info->data,
@@ -472,6 +470,8 @@ mm_lsub(MAILSTREAM *stream, int delimiter, char *mailbox, long int attributes)
(attributes & LATT_HASNOCHILDREN) ? ", has no children" : ""));
#endif
+ if(!mm_list_info || !mm_list_info->filter) return;
+
if(!mm_list_info->stream || stream == mm_list_info->stream)
(*mm_list_info->filter)(stream, mailbox, delimiter,
attributes, mm_list_info->data,
@@ -1121,6 +1121,10 @@ imap_flush_passwd_cache(int dumpcache)
if(l->user)
fs_give((void **) &l->user);
+ if(!(l->passwd >= (char *) private_store
+ && l->passwd <= p))
+ fs_give((void **) &l->passwd);
+
free_strlist(&l->hosts);
fs_give((void **) &l);
@@ -1130,6 +1134,9 @@ imap_flush_passwd_cache(int dumpcache)
cert_failure_list = cert_failure_list->next;
if(l->user)
fs_give((void **) &l->user);
+ if(!(l->passwd >= (char *) private_store
+ && l->passwd <= p))
+ fs_give((void **) &l->passwd);
free_strlist(&l->hosts);
@@ -1138,6 +1145,66 @@ imap_flush_passwd_cache(int dumpcache)
}
}
+void
+imap_delete_passwd(MMLOGIN_S **m_list, char *user, STRLIST_S *hostlist, int altflag)
+{
+ if(m_list == NULL || *m_list == NULL) return;
+ imap_delete_passwd_auth(m_list, user, hostlist, altflag,
+ strchr((*m_list)->user, PWDAUTHSEP) != NULL ? OA2NAME : NULL);
+}
+
+void
+imap_delete_passwd_auth(MMLOGIN_S **m_list, char *user,
+ STRLIST_S *hostlist, int altflag, char *authtype)
+{
+ MMLOGIN_S *l, *p, *q;
+ int len, offset;
+
+ if(m_list == NULL || *m_list == NULL) return;
+
+ dprint((9, "imap_delete_password: user=%s, host=%s, authtype=%s.",
+ user ? user : "no user!?",
+ hostlist && hostlist->name ? hostlist->name : "unknown host",
+ authtype ? authtype : "password authentication"));
+
+ len = authtype ? strlen(authtype) : 0;
+ offset = authtype ? 1 : 0;
+ for(p = *m_list; p; p = p->next){
+ if(imap_same_host_auth(p->hosts, hostlist, authtype)
+ && *user
+ && (len == 0 || (!struncmp(p->user, authtype, len)
+ && p->user[len] == PWDAUTHSEP))
+ && !strcmp(user, p->user + len + offset)
+ && p->altflag == altflag)
+ break;
+ }
+
+ dprint((9, "imap_delete_password: %s",
+ p ? "found a match!" : "did not find a match!"));
+
+ if(!p) return;
+
+ /* relink *mlist */
+ if(p == *m_list)
+ q = (*m_list)->next;
+ else{
+ q = *m_list;
+ for(l = *m_list; l && l->next != p; l = l->next);
+ l->next = p->next;
+ }
+ /* so now p is out of the list. Free it */
+ p->next = NULL;
+ if(p->user) fs_give((void **) &p->user);
+
+ if(!(p->passwd >= (char *) private_store
+ && p->passwd <= (char *) private_store + sizeof(private_store)))
+ fs_give((void **) &p->passwd);
+
+ free_strlist(&p->hosts);
+ fs_give((void **) &p);
+ *m_list = q;
+ dprint((9, "imap_delete_password: done with deletion."));
+}
/*
* Mimics fs_get except it only works for char * (no alignment hacks), it
diff --git a/pith/imap.h b/pith/imap.h
index b6575565..d1c928d4 100644
--- a/pith/imap.h
+++ b/pith/imap.h
@@ -2,7 +2,7 @@
* $Id: imap.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -131,6 +131,8 @@ int imap_get_passwd_auth (MMLOGIN_S *, char **, char *, STRLIST_S *, int, char *
void imap_set_passwd(MMLOGIN_S **, char *, char *, STRLIST_S *, int, int, int);
void imap_set_passwd_auth(MMLOGIN_S **, char *, char *, STRLIST_S *, int, int, int, char *);
void imap_flush_passwd_cache(int);
+void imap_delete_passwd_auth (MMLOGIN_S **, char *, STRLIST_S *, int, char *);
+void imap_delete_passwd (MMLOGIN_S **, char *, STRLIST_S *, int);
/* currently mandatory to implement stubs */
diff --git a/pith/indxtype.h b/pith/indxtype.h
index cf435b8f..bb6ac755 100644
--- a/pith/indxtype.h
+++ b/pith/indxtype.h
@@ -2,7 +2,7 @@
* $Id: indxtype.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/init.c b/pith/init.c
index 4180f45d..c38ae41a 100644
--- a/pith/init.c
+++ b/pith/init.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: init.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/init.h b/pith/init.h
index 3ea042bd..b2d722ce 100644
--- a/pith/init.h
+++ b/pith/init.h
@@ -2,7 +2,7 @@
* $Id: init.h 900 2008-01-05 01:13:26Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/keyword.c b/pith/keyword.c
index a8d9a429..3af9e13f 100644
--- a/pith/keyword.c
+++ b/pith/keyword.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: keyword.c 807 2007-11-09 01:21:33Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -151,7 +147,7 @@ initial_to_keyword(char *initial)
KEYWORD_S *kw;
char *ret;
int init;
- int kwinit;
+ int kwinit = 0;
ret = initial;
if(initial[0] && initial[1] == '\0'){
diff --git a/pith/keyword.h b/pith/keyword.h
index cfae3575..a6ee9d6f 100644
--- a/pith/keyword.h
+++ b/pith/keyword.h
@@ -2,7 +2,7 @@
* $Id: keyword.h 807 2007-11-09 01:21:33Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/ldap.c b/pith/ldap.c
index 8a351bc1..cee3f9f1 100644
--- a/pith/ldap.c
+++ b/pith/ldap.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: ldap.c 1204 2009-02-02 19:54:23Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -654,13 +650,14 @@ try_password_again:
if(!tlsmustbail){
snprintf(pmt, sizeof(pmt), " %s", (info->nick && *info->nick) ? info->nick : serv);
mm_login_work(&mb, user, &pwd, pwdtrial, pmt, info->binddn);
- if(pwd && pwd[0])
+ if(pwd && pwd[0]){
#ifdef _WINDOWS
passwd = pwd;
#else
passwd.bv_len = strlen(pwd);
passwd.bv_val = pwd;
#endif
+ }
}
}
@@ -709,7 +706,7 @@ try_password_again:
dprint((2, "%s\n", ebuf));
}
else if(!ps_global->intr_pending){
- int srch_res, args, slen, flen;
+ int srch_res = LDAP_SUCCESS, args, slen, flen;
#define TEMPLATELEN 512
char filt_template[TEMPLATELEN + 1];
char filt_format[2*TEMPLATELEN + 1];
@@ -1906,26 +1903,32 @@ static struct tl_table ldap_trans_table[]={
{"officePhone", N_("Office Telephone")},
{"facsimileTelephoneNumber", N_("FAX Telephone")},
{"mobile", N_("Mobile Telephone")},
+ {"voiceMailTelephoneNumber", N_("Voice Mail")},
{"pager", N_("Pager")},
{"roomNumber", N_("Room Number")},
{"uid", N_("User ID")},
+ {"userCertificate", N_("User Certificate")},
{NULL, NULL}
};
char *
ldap_translate(char *a, LDAP_SERV_S *info_used)
{
+ char *s, *ret_a = a;
int i;
+ if((s = strchr(a, ';')) != NULL)
+ *s = '\0';
+
if(info_used){
if(info_used->mailattr && strucmp(info_used->mailattr, a) == 0)
- return(_(ldap_trans_table[LDAP_MAIL_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_MAIL_ATTR].translated);
else if(info_used->snattr && strucmp(info_used->snattr, a) == 0)
- return(_(ldap_trans_table[LDAP_SN_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_SN_ATTR].translated);
else if(info_used->gnattr && strucmp(info_used->gnattr, a) == 0)
- return(_(ldap_trans_table[LDAP_GN_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_GN_ATTR].translated);
else if(info_used->cnattr && strucmp(info_used->cnattr, a) == 0)
- return(_(ldap_trans_table[LDAP_CN_ATTR].translated));
+ ret_a = _(ldap_trans_table[LDAP_CN_ATTR].translated);
}
for(i = 0; ldap_trans_table[i].ldap_ese; i++){
@@ -1940,10 +1943,13 @@ ldap_translate(char *a, LDAP_SERV_S *info_used)
}
if(strucmp(ldap_trans_table[i].ldap_ese, a) == 0)
- return(_(ldap_trans_table[i].translated));
+ ret_a = _(ldap_trans_table[i].translated);
}
-
- return(a);
+
+ if(s)
+ *s = ';';
+
+ return ret_a;
}
char **
diff --git a/pith/ldap.h b/pith/ldap.h
index a552798a..04aa5c3e 100644
--- a/pith/ldap.h
+++ b/pith/ldap.h
@@ -2,7 +2,7 @@
* $Id: ldap.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/list.c b/pith/list.c
index e93ae256..de0dae00 100644
--- a/pith/list.c
+++ b/pith/list.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: list.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/list.h b/pith/list.h
index 402e599d..946867a1 100644
--- a/pith/list.h
+++ b/pith/list.h
@@ -2,7 +2,7 @@
* $Id: list.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mailcap.c b/pith/mailcap.c
index 486bd578..1e5b16c9 100644
--- a/pith/mailcap.c
+++ b/pith/mailcap.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mailcap.c 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mailcap.h b/pith/mailcap.h
index b7b7f178..2350f064 100644
--- a/pith/mailcap.h
+++ b/pith/mailcap.h
@@ -2,7 +2,7 @@
* $Id: mailcap.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mailcmd.c b/pith/mailcmd.c
index 098dd8ad..f1f34180 100644
--- a/pith/mailcmd.c
+++ b/pith/mailcmd.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mailcmd.c 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -650,7 +646,7 @@ do_broach_folder(char *newfolder, CONTEXT_S *new_context, MAILSTREAM **streamp,
ps_global->context_last = ps_global->context_current;
snprintf(ps_global->context_current->last_folder,
sizeof(ps_global->context_current->last_folder),
- "%s", ps_global->cur_folder);
+ "%.*s", (int) sizeof(ps_global->context_current->last_folder) - 1,ps_global->cur_folder);
ps_global->last_unambig_folder[0] = '\0';
}
else{
@@ -790,12 +786,26 @@ do_broach_folder(char *newfolder, CONTEXT_S *new_context, MAILSTREAM **streamp,
openmode | (open_inbox ? SP_INBOX : 0),
&rflags);
+ if(m == NULL
+ && ps_global->in_xoauth2_auth
+ && ps_global->preserve_password){
+ ps_global->in_xoauth2_auth = ps_global->user_says_cancel = ps_global->preserve_password = 0;
+ m = context_open((new_context && !open_inbox) ? new_context : NULL,
+ stream,
+ open_inbox ? ps_global->VAR_INBOX_PATH : expanded_file,
+ openmode | (open_inbox ? SP_INBOX : 0),
+ &rflags);
+ }
+
/*
* We aren't in a situation where we want a single cancel to
* apply to multiple opens.
*/
ps_global->user_says_cancel = 0;
+ /* we are not in authentication mode anymore */
+ ps_global->preserve_password = ps_global->in_xoauth2_auth = 0;
+
if(streamp)
*streamp = m;
@@ -821,7 +831,7 @@ do_broach_folder(char *newfolder, CONTEXT_S *new_context, MAILSTREAM **streamp,
dprint((8, "Old folder: \"%s\"\n",
old_folder == NULL ? "" : old_folder));
if(old_folder != NULL){
- if(strcmp(old_folder, ps_global->inbox_name) == 0){
+ if(strucmp(old_folder, ps_global->inbox_name) == 0){
ps_global->mail_stream = sp_inbox_stream();
ps_global->msgmap = sp_msgmap(ps_global->mail_stream);
@@ -958,7 +968,7 @@ do_broach_folder(char *newfolder, CONTEXT_S *new_context, MAILSTREAM **streamp,
ps_global->context_last = ps_global->context_current;
snprintf(ps_global->context_current->last_folder,
sizeof(ps_global->context_current->last_folder),
- "%s", ps_global->cur_folder);
+ "%.*s", (int) sizeof(ps_global->context_current->last_folder) - 1, ps_global->cur_folder);
ps_global->last_unambig_folder[0] = '\0';
}
else{
@@ -2340,7 +2350,7 @@ agg_text_select(MAILSTREAM *stream, MSGNO_S *msgmap, char type, char *namehdr,
}
}
- if(!mepgm)
+ if(!mepgm){
switch(type){
case 'g' : /* X-GM-EXT-1 */
pgm->x_gm_ext1 = mail_newstringlist();
@@ -2449,7 +2459,7 @@ agg_text_select(MAILSTREAM *stream, MSGNO_S *msgmap, char type, char *namehdr,
dprint((1,"\n - BOTCH: select_text unrecognized type\n"));
return(1);
}
-
+ }
/*
* If we happen to have any messages excluded, make sure we
* don't waste time searching their text...
@@ -2502,11 +2512,10 @@ agg_text_select(MAILSTREAM *stream, MSGNO_S *msgmap, char type, char *namehdr,
* bits.
*/
for(msgno = 1L; msgno <= mn_get_total(msgmap); msgno++)
- if(stream && msgno <= stream->nmsgs
- && (mc=mail_elt(stream, msgno)) && mc->searched)
- mc->searched = NIL;
- else
- mc->searched = T;
+ if(stream && msgno <= stream->nmsgs){
+ if((mc = mail_elt(stream, msgno)) != NULL)
+ mc->searched = mc->searched ? NIL : T;
+ }
}
if(we_cancel)
diff --git a/pith/mailcmd.h b/pith/mailcmd.h
index 7e0d344b..b816c8d9 100644
--- a/pith/mailcmd.h
+++ b/pith/mailcmd.h
@@ -2,7 +2,7 @@
* $Id: mailcmd.h 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mailindx.c b/pith/mailindx.c
index 87cab265..27e1b298 100644
--- a/pith/mailindx.c
+++ b/pith/mailindx.c
@@ -1,9 +1,5 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mailindx.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -2009,7 +2005,7 @@ format_index_index_line(INDEXDATA_S *idata)
int i, collapsed = 0, start, fromfield;
long l, score;
BODY *body = NULL;
- MESSAGECACHE *mc;
+ MESSAGECACHE *mc = NULL;
ADDRESS *addr, *toaddr, *ccaddr, *last_to;
PINETHRD_S *thrd = NULL;
INDEX_COL_S *cdesc = NULL;
@@ -3741,7 +3737,7 @@ fetch_firsttext(INDEXDATA_S *idata, int delete_quotes)
long partial_fetch_len = 0L;
SEARCHSET *ss, **sset;
MESSAGECACHE *mc;
- PINELT_S *pelt;
+ PINELT_S *pelt = NULL;
/* we cache the result we get from this function, so that we do not have to
* refetch the text in case there is a change. We could cache in the envelope
diff --git a/pith/mailindx.h b/pith/mailindx.h
index a9b25e6d..d73f0bad 100644
--- a/pith/mailindx.h
+++ b/pith/mailindx.h
@@ -2,7 +2,7 @@
* $Id: mailindx.h 925 2008-02-06 02:03:01Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/maillist.c b/pith/maillist.c
index c8b7f728..07912cba 100644
--- a/pith/maillist.c
+++ b/pith/maillist.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: maillist.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/maillist.h b/pith/maillist.h
index d3d0b679..bfaa6bc3 100644
--- a/pith/maillist.h
+++ b/pith/maillist.h
@@ -2,7 +2,7 @@
* $Id: maillist.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mailpart.h b/pith/mailpart.h
index 0bef7a1c..eba917e5 100644
--- a/pith/mailpart.h
+++ b/pith/mailpart.h
@@ -2,7 +2,7 @@
* $Id: mailpart.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mailview.c b/pith/mailview.c
index 97f65587..a3763329 100644
--- a/pith/mailview.c
+++ b/pith/mailview.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mailview.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2009 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -156,7 +152,7 @@ format_message(long int msgno, ENVELOPE *env, struct mail_bodystruct *body,
{
char *decode_err = NULL;
HEADER_S h;
- int width, rv;
+ int width, rv = 0;
clear_cur_embedded_color();
@@ -2911,7 +2907,7 @@ 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)
{
- char *ptmp, *mtmp;
+ char *ptmp, *mtmp = NULL;
int trailing = 0, group = 0;
ADDRESS *atmp;
diff --git a/pith/mailview.h b/pith/mailview.h
index 85bfa4a5..8ffb53c1 100644
--- a/pith/mailview.h
+++ b/pith/mailview.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/margin.c b/pith/margin.c
index d49b8801..3bc5dbe5 100644
--- a/pith/margin.c
+++ b/pith/margin.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: margin.c 1032 2008-04-11 00:30:04Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/margin.h b/pith/margin.h
index aa308540..16a5ee03 100644
--- a/pith/margin.h
+++ b/pith/margin.h
@@ -2,7 +2,7 @@
* $Id: margin.h 1032 2008-04-11 00:30:04Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mimedesc.c b/pith/mimedesc.c
index 95b5712e..d79d9765 100644
--- a/pith/mimedesc.c
+++ b/pith/mimedesc.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mimedesc.c 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mimedesc.h b/pith/mimedesc.h
index c243e5aa..85d41121 100644
--- a/pith/mimedesc.h
+++ b/pith/mimedesc.h
@@ -2,7 +2,7 @@
* $Id: mimedesc.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/mimetype.c b/pith/mimetype.c
index 65ca946a..9f688133 100644
--- a/pith/mimetype.c
+++ b/pith/mimetype.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mimetype.c 955 2008-03-06 23:52:36Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/mimetype.h b/pith/mimetype.h
index 55e9c7a6..5d3e4491 100644
--- a/pith/mimetype.h
+++ b/pith/mimetype.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/msgno.c b/pith/msgno.c
index 3d9b8719..3b27462f 100644
--- a/pith/msgno.c
+++ b/pith/msgno.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: msgno.c 854 2007-12-07 17:44:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -617,8 +613,8 @@ msgno_in_select(MSGNO_S *msgs, long int n)
int
msgno_exceptions(MAILSTREAM *stream, long int rawno, char *part, int *bits, int set)
{
- PINELT_S **peltp;
- PARTEX_S **partp;
+ PINELT_S **peltp = NULL;
+ PARTEX_S **partp = NULL;
MESSAGECACHE *mc;
if(!stream || rawno < 1L || rawno > stream->nmsgs)
diff --git a/pith/msgno.h b/pith/msgno.h
index e6599375..b44e1d06 100644
--- a/pith/msgno.h
+++ b/pith/msgno.h
@@ -2,7 +2,7 @@
* $Id: msgno.h 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/newmail.c b/pith/newmail.c
index ca29df89..b17f4c4f 100644
--- a/pith/newmail.c
+++ b/pith/newmail.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: newmail.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/newmail.h b/pith/newmail.h
index 5b749fec..136ae967 100644
--- a/pith/newmail.h
+++ b/pith/newmail.h
@@ -2,7 +2,7 @@
* $Id: newmail.h 807 2007-11-09 01:21:33Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/news.c b/pith/news.c
index 06dfddf6..d92ec383 100644
--- a/pith/news.c
+++ b/pith/news.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: news.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -116,7 +112,7 @@ news_grouper(char *given_group, char **expanded_group, char **error,
{
char ng_error[90], *p1, *p2, *name, *end, *ep, **server,
ng_ref[MAILTMPLEN];
- int expanded_len = 0, num_in_error = 0, cnt_errs;
+ int expanded_len = 0, num_in_error = 0, cnt_errs = 0;
MAILSTREAM *stream = NULL;
struct ng_list {
diff --git a/pith/news.h b/pith/news.h
index 5f91c0f1..83a778be 100644
--- a/pith/news.h
+++ b/pith/news.h
@@ -2,7 +2,7 @@
* $Id: news.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/options.h b/pith/options.h
index 04590b73..ac45aca3 100644
--- a/pith/options.h
+++ b/pith/options.h
@@ -2,7 +2,7 @@
* $Id: options.h 101 2006-08-10 22:53:04Z mikes@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/Makefile.in b/pith/osdep/Makefile.in
index e8470f9c..61358ac7 100644
--- a/pith/osdep/Makefile.in
+++ b/pith/osdep/Makefile.in
@@ -108,6 +108,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/m4/m4_ax_prog_cc_for_build.m4 \
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -213,12 +214,18 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
+BUILD_EXEEXT = @BUILD_EXEEXT@
+BUILD_OBJEXT = @BUILD_OBJEXT@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
+CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
CP = @CP@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+CPP_FOR_BUILD = @CPP_FOR_BUILD@
CYGPATH_W = @CYGPATH_W@
C_CLIENT_AUTHS = @C_CLIENT_AUTHS@
C_CLIENT_BUNDLED = @C_CLIENT_BUNDLED@
@@ -252,6 +259,7 @@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
ISPELLPROG = @ISPELLPROG@
LD = @LD@
LDFLAGS = @LDFLAGS@
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
@@ -318,6 +326,7 @@ abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_CC_FOR_BUILD = @ac_ct_CC_FOR_BUILD@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
acx_pthread_config = @acx_pthread_config@
alpine_interactive_spellcheck = @alpine_interactive_spellcheck@
diff --git a/pith/osdep/bldpath.c b/pith/osdep/bldpath.c
index 1f4ed6af..5a976472 100644
--- a/pith/osdep/bldpath.c
+++ b/pith/osdep/bldpath.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: bldpath.c 934 2008-02-23 00:44:29Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/bldpath.h b/pith/osdep/bldpath.h
index 4fafc7d3..b18c09fd 100644
--- a/pith/osdep/bldpath.h
+++ b/pith/osdep/bldpath.h
@@ -2,7 +2,7 @@
* $Id: bldpath.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/canaccess.c b/pith/osdep/canaccess.c
index 2b10d58a..853e5b4c 100644
--- a/pith/osdep/canaccess.c
+++ b/pith/osdep/canaccess.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: canaccess.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/canaccess.h b/pith/osdep/canaccess.h
index 55cda338..fc23ef12 100644
--- a/pith/osdep/canaccess.h
+++ b/pith/osdep/canaccess.h
@@ -2,7 +2,7 @@
* $Id: canaccess.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/canonicl.c b/pith/osdep/canonicl.c
index bad655cf..187f398d 100644
--- a/pith/osdep/canonicl.c
+++ b/pith/osdep/canonicl.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: canonicl.c 764 2007-10-23 23:44:49Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/canonicl.h b/pith/osdep/canonicl.h
index c6f994c5..1e284b86 100644
--- a/pith/osdep/canonicl.h
+++ b/pith/osdep/canonicl.h
@@ -2,7 +2,7 @@
* $Id: canonicl.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/collate.c b/pith/osdep/collate.c
index fc631d65..e8a90d21 100644
--- a/pith/osdep/collate.c
+++ b/pith/osdep/collate.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: collate.c 766 2007-10-23 23:59:00Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/collate.h b/pith/osdep/collate.h
index deccacae..182d0fde 100644
--- a/pith/osdep/collate.h
+++ b/pith/osdep/collate.h
@@ -2,7 +2,7 @@
* $Id: collate.h 925 2008-02-06 02:03:01Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/color.c b/pith/osdep/color.c
index fe65898d..6e8dbd31 100644
--- a/pith/osdep/color.c
+++ b/pith/osdep/color.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: color.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/color.h b/pith/osdep/color.h
index c173d391..7362aff8 100644
--- a/pith/osdep/color.h
+++ b/pith/osdep/color.h
@@ -2,7 +2,7 @@
* $Id: color.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/coredump.c b/pith/osdep/coredump.c
index c668ffad..5702df26 100644
--- a/pith/osdep/coredump.c
+++ b/pith/osdep/coredump.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: coredump.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/coredump.h b/pith/osdep/coredump.h
index 792c0996..d8448622 100644
--- a/pith/osdep/coredump.h
+++ b/pith/osdep/coredump.h
@@ -2,7 +2,7 @@
* $Id: coredump.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/creatdir.c b/pith/osdep/creatdir.c
index 4d0f6d9b..ccddbcb3 100644
--- a/pith/osdep/creatdir.c
+++ b/pith/osdep/creatdir.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: creatdir.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -93,7 +89,7 @@ create_random_dir(char *dir, size_t len)
{ int i;
char *s = &dir[strlen(dir) - 6];
for(i = 0; i < 10; i++){
- sprintf(s, "%x%x%x", (unsigned int)(random() % 256), (unsigned int)(random() % 256),
+ sprintf(s, "%02x%02x%02x", (unsigned int)(random() % 256), (unsigned int)(random() % 256),
(unsigned int)(random() % 256));
if(our_mkdir(dir, 0700) == 0) return dir;
}
diff --git a/pith/osdep/creatdir.h b/pith/osdep/creatdir.h
index 20f5da4f..b3d6b615 100644
--- a/pith/osdep/creatdir.h
+++ b/pith/osdep/creatdir.h
@@ -2,7 +2,7 @@
* $Id: creatdir.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/debugtime.c b/pith/osdep/debugtime.c
index 0cd3123f..be1e3b33 100644
--- a/pith/osdep/debugtime.c
+++ b/pith/osdep/debugtime.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: debugtime.c 770 2007-10-24 00:23:09Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/debugtime.h b/pith/osdep/debugtime.h
index 48425bbb..ab87b545 100644
--- a/pith/osdep/debugtime.h
+++ b/pith/osdep/debugtime.h
@@ -2,7 +2,7 @@
* $Id: debugtime.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/domnames.c b/pith/osdep/domnames.c
index aa2d917f..c7ea177e 100644
--- a/pith/osdep/domnames.c
+++ b/pith/osdep/domnames.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: domnames.c 1176 2008-09-29 21:16:42Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/domnames.h b/pith/osdep/domnames.h
index 76ce7c80..2cbea82f 100644
--- a/pith/osdep/domnames.h
+++ b/pith/osdep/domnames.h
@@ -2,7 +2,7 @@
* $Id: domnames.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/err_desc.c b/pith/osdep/err_desc.c
index 9f24720d..384e990b 100644
--- a/pith/osdep/err_desc.c
+++ b/pith/osdep/err_desc.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: err_desc.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/err_desc.h b/pith/osdep/err_desc.h
index 75364c2c..6dd5e328 100644
--- a/pith/osdep/err_desc.h
+++ b/pith/osdep/err_desc.h
@@ -2,7 +2,7 @@
* $Id: err_desc.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/fgetpos.c b/pith/osdep/fgetpos.c
index ba433e95..55c5d7cf 100644
--- a/pith/osdep/fgetpos.c
+++ b/pith/osdep/fgetpos.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: fgetpos.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/fgetpos.h b/pith/osdep/fgetpos.h
index 0ef7a518..a84ab7a3 100644
--- a/pith/osdep/fgetpos.h
+++ b/pith/osdep/fgetpos.h
@@ -2,7 +2,7 @@
* $Id: fgetpos.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/filesize.c b/pith/osdep/filesize.c
index abb747c6..231f903f 100644
--- a/pith/osdep/filesize.c
+++ b/pith/osdep/filesize.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: filesize.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/filesize.h b/pith/osdep/filesize.h
index 2580e8b0..646fb268 100644
--- a/pith/osdep/filesize.h
+++ b/pith/osdep/filesize.h
@@ -2,7 +2,7 @@
* $Id: filesize.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/fnexpand.c b/pith/osdep/fnexpand.c
index 8c5a52fd..09fbee1a 100644
--- a/pith/osdep/fnexpand.c
+++ b/pith/osdep/fnexpand.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: fnexpand.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/fnexpand.h b/pith/osdep/fnexpand.h
index 4326944c..a5b77400 100644
--- a/pith/osdep/fnexpand.h
+++ b/pith/osdep/fnexpand.h
@@ -2,7 +2,7 @@
* $Id: fnexpand.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/forkwait.h b/pith/osdep/forkwait.h
index 34f2973d..0fafbde6 100644
--- a/pith/osdep/forkwait.h
+++ b/pith/osdep/forkwait.h
@@ -2,7 +2,7 @@
* $Id: forkwait.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/hostname.c b/pith/osdep/hostname.c
index 3549932a..62f7c9a4 100644
--- a/pith/osdep/hostname.c
+++ b/pith/osdep/hostname.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: hostname.c 1176 2008-09-29 21:16:42Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/hostname.h b/pith/osdep/hostname.h
index 6bf01b6f..3a3abd27 100644
--- a/pith/osdep/hostname.h
+++ b/pith/osdep/hostname.h
@@ -2,7 +2,7 @@
* $Id: hostname.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/lstcmpnt.c b/pith/osdep/lstcmpnt.c
index a7297c5b..66152207 100644
--- a/pith/osdep/lstcmpnt.c
+++ b/pith/osdep/lstcmpnt.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: lstcmpnt.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/osdep/lstcmpnt.h b/pith/osdep/lstcmpnt.h
index c747d43a..9f1fbde3 100644
--- a/pith/osdep/lstcmpnt.h
+++ b/pith/osdep/lstcmpnt.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/osdep/mimedisp.c b/pith/osdep/mimedisp.c
index 8fec4eb6..7eab9923 100644
--- a/pith/osdep/mimedisp.c
+++ b/pith/osdep/mimedisp.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: mimedisp.c 942 2008-03-04 18:21:33Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/osdep/mimedisp.h b/pith/osdep/mimedisp.h
index ddd3dbc0..7ca16103 100644
--- a/pith/osdep/mimedisp.h
+++ b/pith/osdep/mimedisp.h
@@ -2,7 +2,7 @@
* $Id: mimedisp.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/pipe.c b/pith/osdep/pipe.c
index 47a00bdd..c1b46476 100644
--- a/pith/osdep/pipe.c
+++ b/pith/osdep/pipe.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: pipe.c 1204 2009-02-02 19:54:23Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -481,10 +477,11 @@ open_system_pipe(char *command, char **outfile, char **errfile, int mode,
char *
pipe_error_msg(char *cmd, char *op, char *res)
{
- static char ebuf[512];
+ static char ebuf[512 + 16 + 1];
- snprintf(ebuf, 256, "Pipe can't %.256s \"%.32sb\": %.223s",
+ snprintf(ebuf, sizeof(ebuf), "Pipe can't %.256s \"%.32sb\": %.223s",
op ? op : "?", cmd ? cmd : "?", res ? res : "?");
+ ebuf[sizeof(ebuf) - 1] = '\0';
return(ebuf);
}
diff --git a/pith/osdep/pipe.h b/pith/osdep/pipe.h
index 9b408e09..4f1b3c1c 100644
--- a/pith/osdep/pipe.h
+++ b/pith/osdep/pipe.h
@@ -2,7 +2,7 @@
* $Id: pipe.h 769 2007-10-24 00:15:40Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/pithosd.h b/pith/osdep/pithosd.h
index 5fbe207f..5833353e 100644
--- a/pith/osdep/pithosd.h
+++ b/pith/osdep/pithosd.h
@@ -2,7 +2,7 @@
* $Id: pithosd.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/pw_stuff.c b/pith/osdep/pw_stuff.c
index dfbfe3a5..ba42571b 100644
--- a/pith/osdep/pw_stuff.c
+++ b/pith/osdep/pw_stuff.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: pw_stuff.c 763 2007-10-23 23:37:34Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/pw_stuff.h b/pith/osdep/pw_stuff.h
index afa3979e..d0190523 100644
--- a/pith/osdep/pw_stuff.h
+++ b/pith/osdep/pw_stuff.h
@@ -2,7 +2,7 @@
* $Id: pw_stuff.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/rename.c b/pith/osdep/rename.c
index 74cfbb2f..1e771590 100644
--- a/pith/osdep/rename.c
+++ b/pith/osdep/rename.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: rename.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/rename.h b/pith/osdep/rename.h
index a451591e..abb21d36 100644
--- a/pith/osdep/rename.h
+++ b/pith/osdep/rename.h
@@ -2,7 +2,7 @@
* $Id: rename.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/temp_nam.c b/pith/osdep/temp_nam.c
index 2718f140..98d536a1 100644
--- a/pith/osdep/temp_nam.c
+++ b/pith/osdep/temp_nam.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: temp_nam.c 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -235,7 +231,7 @@ char *
temp_nam_ext(char *dir, char *prefix, char *ext)
{
struct stat buf;
- size_t l, ll;
+ size_t l = 0, ll;
char *f, *name;
if(ext == NULL)
diff --git a/pith/osdep/temp_nam.h b/pith/osdep/temp_nam.h
index cb09ba61..37435e30 100644
--- a/pith/osdep/temp_nam.h
+++ b/pith/osdep/temp_nam.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/osdep/tempfile.c b/pith/osdep/tempfile.c
index 1a4ab999..9c307420 100644
--- a/pith/osdep/tempfile.c
+++ b/pith/osdep/tempfile.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: tempfile.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/osdep/tempfile.h b/pith/osdep/tempfile.h
index bde7f4bb..fafdb213 100644
--- a/pith/osdep/tempfile.h
+++ b/pith/osdep/tempfile.h
@@ -2,7 +2,7 @@
* $Id: tempfile.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/writ_dir.c b/pith/osdep/writ_dir.c
index 0a2cd78b..4d759226 100644
--- a/pith/osdep/writ_dir.c
+++ b/pith/osdep/writ_dir.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: writ_dir.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/osdep/writ_dir.h b/pith/osdep/writ_dir.h
index 7b7a1191..a409f334 100644
--- a/pith/osdep/writ_dir.h
+++ b/pith/osdep/writ_dir.h
@@ -2,7 +2,7 @@
* $Id: writ_dir.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/pattern.c b/pith/pattern.c
index 1a02fd0a..ad8ad753 100644
--- a/pith/pattern.c
+++ b/pith/pattern.c
@@ -1,9 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: pattern.c 1204 2009-02-02 19:54:23Z hubert@u.washington.edu $";
-#endif
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2009 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -511,7 +508,7 @@ sub_open_any_patterns(long int rflags)
{
PAT_LINE_S *patline = NULL, *pl = NULL;
char **t = NULL;
- struct variable *var;
+ struct variable *var = NULL;
SET_PATTYPE(rflags);
@@ -1478,7 +1475,7 @@ parse_patgrp_slash(char *str, PATGRP_S *patgrp)
SET_STATUS(str,"/BOY=",patgrp->stat_boy);
}
else{
- char save;
+ char save = '\0';;
patgrp->bogus = 1;
@@ -1781,7 +1778,7 @@ parse_action_slash(char *str, ACTION_S *action)
}
}
else{
- char save;
+ char save = '\0';
action->bogus = 1;
@@ -1819,7 +1816,7 @@ parse_intvl(char *str)
{
char *q;
long left, right;
- INTVL_S *ret = NULL, **next;
+ INTVL_S *ret = NULL, **next = NULL;
if(!str)
return(ret);
@@ -3329,7 +3326,7 @@ sub_write_patterns(long int rflags)
free_list_array(&lvalue);
else{
char ***alval;
- struct variable *var;
+ struct variable *var = NULL;
if(rflags & ROLE_DO_ROLES)
var = &ps_global->vars[V_PAT_ROLES];
@@ -3557,7 +3554,7 @@ data_for_patline(PAT_S *pat)
*keyword_set = NULL, *keyword_clr = NULL;
int to_not = 0, news_not = 0, from_not = 0,
sender_not = 0, cc_not = 0, subj_not = 0,
- partic_not = 0, recip_not = 0, alltext_not, bodytext_not,
+ partic_not = 0, recip_not = 0, alltext_not = 0, bodytext_not = 0,
keyword_not = 0, charset_not = 0;
size_t l;
ACTION_S *action = NULL;
@@ -4833,11 +4830,14 @@ match_pattern(PATGRP_S *patgrp, MAILSTREAM *stream, SEARCHSET *searchset,
/* we searched without the not, reverse it */
if(not && is_imap_stream(stream) && !modern_imap_stream(stream)){
for(msgno = 1L; msgno < mn_get_total(sp_msgmap(stream)); msgno++)
- if(stream && msgno && msgno <= stream->nmsgs
- && (mc=mail_elt(stream,msgno)) && mc->searched)
- mc->searched = NIL;
- else
- mc->searched = T;
+ if(stream && msgno && msgno <= stream->nmsgs){
+ if((mc=mail_elt(stream,msgno)) != NULL){
+ if(mc->searched)
+ mc->searched = NIL;
+ else
+ mc->searched = T;
+ }
+ }
}
/* check scores */
@@ -7712,7 +7712,7 @@ process_filter_patterns(MAILSTREAM *stream, MSGNO_S *msgmap, long int recent)
}
/* New mail arrival means start over */
- if(mail_uid(stream, stream->nmsgs) == uid)
+ if(stream->nmsgs && mail_uid(stream, stream->nmsgs) == uid)
break;
/* else, go again */
diff --git a/pith/pattern.h b/pith/pattern.h
index f64e7769..da1f5f83 100644
--- a/pith/pattern.h
+++ b/pith/pattern.h
@@ -2,7 +2,7 @@
* $Id: pattern.h 942 2008-03-04 18:21:33Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/pine.hlp b/pith/pine.hlp
index d973a0ec..e5e1775f 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -3,7 +3,7 @@
# T H E A L P I N E M E S S A G E S Y S T E M
#
#/* ========================================================================
-# * Copyright 2013-2021 Eduardo Chappa
+# * Copyright 2013-2022 Eduardo Chappa
# * Copyright 2006-2008 University of Washington
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
@@ -71,6 +71,12 @@ screen's text:
WARNING ABOUT CHTML "if-else-endif" CLAUSES: They don't nest.
+1d) Other operating systems added to 1c) above are
+
+ os_unix_and_osx means all unices, incluing mac
+ os_unix means all unices except mac
+ os_osx means only mac
+
2a) Several "server side include" commented elements are supported:
<!--#include file="textfile"-->
@@ -97,6 +103,7 @@ Where "variable" is one of either:
_BUGS_ADDRESS_
CURRENT_DIR
HOME_DIR
+ PASSWORD_FILE
PINE_CONF_PATH
PINE_CONF_FIXED_PATH
PINE_INFO_PATH
@@ -140,7 +147,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 517 2020-11-27 10:32:54
+Alpine Commit 666 2022-10-09 10:37:24
============= h_news =================
<HTML>
<HEAD>
@@ -156,7 +163,7 @@ Version <!--#echo var="ALPINE_VERSION"--> (<!--#echo var="ALPINE_REVISION"-->)
<!--chtml endif-->
<BR>
-<BR>Copyright 2013-2021 Eduardo Chappa
+<BR>Copyright 2013-2022 Eduardo Chappa
<BR>Copyright 2006-2008 University of Washington
</DIV>
@@ -176,89 +183,287 @@ href="h_apache_license">Apache License 2.0</A>.
<P>
Alpine's privacy policy is a living, online only, document, which can be found at
-<A href="h_privacy_policy">http://alpine.x10host.com/privacy.html</A>.
+<A href="h_privacy_policy">https://alpineapp.email/privacy.html</A>.
By following the previous link, Alpine
will connect to an external server, and will download it and display
it for you. Please take some time to read it and understand it.
Since the Privacy Policy could be amended to take into consideration
new additions to Alpine, please check it periodically.
-<P> These changes were added after the release of version <!--#echo var="ALPINE_VERSION"-->.
+<P> Changes since the release of version 2.26 include:
+<!-- Changes since the release of version <!--#echo var="ALPINE_VERSION"-->
+<!-- include: -->
+<P> New features include:
+<UL>
+<LI> Microsoft servers do not deal well with a message that is forwarded
+ as an attachment by Alpine due to the way Alpine constructs the cookie
+ to separate parts of the message due to the presence of a colon. To
+ be safe, remove all non-numeric characters in the cookie. In addition,
+ lowercase values for the charset.
+<LI> When selecting messages based on either a previously defined rule or
+ based on a previously configured keyword, and when the feature
+ <a href="h_config_enable_tab_complete"><!--#echo var="FEAT_enable-tab-completion"--></a>
+ is enabled, add the ability of using the TAB command to complete
+ a partial match. Contributed by Peter Tirsek.
+</UL>
-<P>
-New features include:
+<P> Bugs addressed include:
<UL>
-<LI> Unix Alpine: New configuration variable <a href="h_config_ssl_ciphers"><!--#echo var="VAR_ssl-ciphers"--></a> that allows
-users to list the ciphers to use when connecting to a SSL server.
-Based on a collaboration with Professor Martin Trusler.
-<LI> New hidden feature <a href="h_config_delete_before_writing"><!--#echo var="FEAT_enable-delete-before-writing"--></a>
-to add support for terminals that need lines to be deleted before being written. Based
-on a collaboration with Professor Martin Trusler.
+<LI> When a user configures a mailbox without specifying the username, PC-Alpine
+does not allow a user to input their password. Reported by Michelle McPeek.
+<LI> Crash in PC-Alpine when postponing a message. Reported by Paolo Ienne.
+<LI> Crash in Alpine after a user tried to repaint the screen after failing
+ to select a rule from a menu. Reported by Peter Tirsek. Crash also
+ reproducible when selecting by keyword or charset.
+</UL>
+
+<P>Version 2.26 adds new features and addresses bugs found in previous
+releases.
+
+<P> New features include:
+<UL>
+<!--chtml if pinemode="os_unix"-->
+<LI> Unix version of Alpine (not including OSX). Alpine is built with password
+ file support by default. If Alpine is built with SMIME support and the
+ password file does not exist, then Alpine will create it by default and
+ encrypt it. For this version of Alpine, Alpine saves its passwords in the file
+ &quot;<!--#echo var="PASSWORD_FILE"-->&quot; which is in the same directory that
+ your .pinerc is located.
+<!--chtml endif-->
+
+<LI> In the past Alpine did not recognize images embedded
+ in an HTML file, so now it does and a link to open them is
+ given. Additionally, Alpine did not pass these images to an
+ external browser for display using the external command, and
+ now it will.
+
+<LI> Support for code_verifier and code_challenge when generating a
+ refresh token and access token in Gmail and Outlook using the
+ S256 method and plain method.
+
+<LI> Change the redirect_uri scheme for Gmail, as Google is deprecating the use
+ of oob. Changed to http://localhost. Users are supposed to enter the URL
+ they see in their browser in place of the code.
+
+<LI> Some servers do not allow the Drafts folder to be removed, even when
+ it is empty. Alpine, however, assumes that if the folder exists, it
+ must contain a draft message. This joint collaboration with Thomas
+ Uhle modifies alpine to not to attempt to continue a draft message if
+ the draft folder is empty.
+
+<LI> Contributions by Thomas Uhle:
+<UL>
+ <LI> Add support for the LDAP attribute "userCertificate";
+ <LI> Move voiceMailTelephoneNumber from the TCL side to ldap_translate;
+ <LI> XOAUTH2 state generator changes format specifier from %x to %02x;
+ <LI> Web Alpine will not attempt to continue a postponed message if the
+ postponed-msgs folder is empty.
+</UL>
+
+<LI> Improvements to the screen that allows a user to select the client-id when
+ a user attempts to login to a server and more than one client-id
+ is available for that server. In this case additional information is
+ given: The method to use (device or authorize), a user id that uses the
+ suggested client-id or a report that the client-id has not been used.
+
+<LI> To protect the privacy of a user, the message-id of a message will be
+ generated using the domain in the From field of the message.
+
+<LI> When saving to a folder in the unix format, Alpine parses the
+ destination folder to assign uids to all messages in the folder. When
+ the destination folder is large this could significantly slow down
+ alpine. Fix based on a patch submitted to the alpine-info list by
+ Chris Caputo.
+
+<LI> Add the LOGOUT command to the list of commands that can be
+ automatically interrupted in case the connection becomes unstable
+ during that command and Alpine times out its connection to the server.
+
+<LI> If new mail has arrived when a user is closing a mailbox, Alpine will
+ also announce how many new messages have arrived. Suggested by Chime Hart.
+
+<LI> When an invitation does not have a timezone in the date of the event,
+ but the date is in GMT, adjust the date to local time.
</UL>
<P>
Bugs addressed include:
<UL>
-<LI> Crash in the ntlm authenticator when the user name does not include
-a domain. Reported and fixed by Anders Skargren.
+<LI> Crash when invoking Alpine from the command line and an attempt to authorize
+ alpine to use XOAUTH2 is done. Alpine crashes because of a missing optional
+ parameter -xoauth2-flow and because no screen has been configured yet. Reported
+ by Baron Fujimoto.
+
+<LI> Alpine crashes when it cannot retrieve the privacy policy due to
+ failure connecting to the external server.
+
+<LI> Alpine might delete all passwords from the password file if the
+ password file is not unlocked by cancellation, or the authentication
+ for an XOAUTH2 server is cancelled, or the password of an account
+ is changed.
+
+<LI> When the personal name of an address is encoded, and the personal name
+ is surrounded by quotes, these are not removed by Alpine at the time
+ to offer to take an address from a message to the addressbook. Reported
+ by David Prager Branner.
+
+<LI> If a user configures the sendmail-path variable, and does not use a
+ global smtp-server, then Alpine will use the sendmail-path even when
+ the user configured a smtp-server for a role. Reported by Gregory
+ Heytings.
+
+<LI> Crash in PC-Alpine when creating a mail collection and no username is
+ indicated in the server path. Reported by Sandy Schuman.
+
+<LI> Crash in Alpine when running a filter that moves deleted messages the
+ INBOX in a Gmail account. Reported by Jyrki Voutilainen.
</UL>
-<P> The changes in version <!--#echo var="ALPINE_VERSION"--> are as follows:
+<P>Version 2.25 adds new features and addresses bugs found in previous
+releases.
-<P>
+<P>
New features include:
-
<UL>
+<LI> Unix Alpine: New configuration variable <a href="h_config_ssl_ciphers"><!--#echo var="VAR_ssl-ciphers"--></a> that allows
+ users to list the ciphers to use when connecting to a SSL server.
+ Based on a collaboration with Professor Martin Trusler.
+
+<LI> New hidden feature <a href="h_config_delete_before_writing"><!--#echo var="FEAT_enable-delete-before-writing"--></a>
+ to add support for terminals that need lines to be deleted
+ before being written. Based on a collaboration with Professor
+ Martin Trusler.
+
<LI> Experimental: The instruction to remove the double quotes from the processing of
customized headers existed in pine, but it was removed in alpine. Restoring
- old Alpine behavior. See
+ old Alpine behavior. See
<A href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981781">this</A>
report for more background information.
+
<LI> Add the capability to record http debug. This is necessary to debug XOAUTH2
authentication, and records sensitive login information. Do not share your
debug file if you use this form of debug.
+
<LI> Remove the ability to choose between the device and authorize methods
to login to outlook, since the original client-id can only be used
for the device method. One needs a special client-id and client-secret
to use the authorize method in Outlook.
+
<LI> PC-Alpine only: Some service providers produce access tokens that are
too long to save in the Windows Credentials, so the access tokens will
be split and saved as several pieces. This means that old versions of
Alpine will NOT be able to use saved passwords once this new version of
Alpine is used.
+
<LI> PC-Alpine: Debug files used to be created with extension .txt1, .txt2, etc.
Rename those files so that they have extension .txt.
+
<LI> Always follow ‘suppress-asterisks-in-password-prompt’ setting in the
various password prompts. Submitted by &Eacute;tienne Deparis.
+
<LI> Use 'alpine -F' instead of 'pine -F' as the browser default pager.
Submitted by &Eacute;tienne Deparis.
+
<LI> Introduction of OTHER CMDS menu for the browser/pilot to let
- people discover the two new commands: &quot;1&quot; is a toggle that
- switches between 1 column and multicolumn mode. The &quot;.&quot; command
- toggles between hiding or showing hidden files, and the &quot;G&quot;
- command to travel between directories. Contributed by &Eacute;tienne
+ people discover the two new commands: &quot;1&quot; is a toggle that
+ switches between 1 column and multicolumn mode. The &quot;.&quot; command
+ toggles between hiding or showing hidden files, and the &quot;G&quot;
+ command to travel between directories. Contributed by &Eacute;tienne
Deparis.
+
+<LI> Add option -xoauth2-flow to the command line, so that users can specify the
+ parameters to set up an xoauth2 connection through the command line.
+
+<LI> Alpine deletes, from its internal memory and external cache, passwords
+ that do not work, even if they were saved by the user.
+
+<LI> New format for saving passwords in the windows credential manager
+ for PC-Alpine. Upon starting this new version of Alpine the passwords
+ saved in the credential manager are converted to the new format and
+ they will not be recognized by old versions of Alpine, but only by
+ this and newer versions of Alpine.
+
+<LI> Enabled encryption protocols in PC-Alpine are based on those enabled
+ in the system, unless one is specified directly.
</UL>
<P>
-Bugs addressed:
+Bugs addressed include:
<UL>
+<LI> The c-client library parses information from an IMAP server during
+ non-authenticated state which could lead to denial of service.
+ Reported by Damian Poddebniak from M&uuml;nster University of Applied
+ Sciences.
+
+<LI> Memory corruption when alpine searches for a string that is
+ an incomplete utf8 string in a local folder. This could happen by
+ chopping a string to make it fit a buffer without regard to its content.
+ We fix the string so that chopping it does not damage it. Reported
+ by Andrew.
+
+<LI> Crash in the ntlm authenticator when the user name does not include
+ a domain. Reported and fixed by Anders Skargren.
+
<LI> When forwarding a message, replacing an attachment might make Alpine
re-attach the original attachment. Reported by Michael Traxler.
-<LI> When an attachment is deleted, the saved message with the deleted
-attachment contains extra null characters after the end of the
-attachment boundary.
+<LI> When an attachment is deleted, the saved message with the deleted
+ attachment contains extra null characters after the end of the
+ attachment boundary.
+
+<LI> Tcp and http debug information is not printed unless the default
+ debug level is set to 1. Print this if requested, regardless of what
+ the default debug level is.
+
+<LI> When trying to select a folder for saving a message, one can only enter
+ a subfolder by pressing the &quot;>&quot; command, rather than the normal
+ navigation by pressing &quot;Return&quot;. Reported by Ulf-Dietrich Braunmann.
+
+<LI> Crash when attempting to remove a configuration for a XOAUTH2 server
+ that has no usernames configured.
+
+<LI> Crash caused by saving (and resaving) XOAUTH2 refresh and access tokens
+ in PC-Alpine. Reported by Karl Lindauer.
</UL>
<P> Version 2.24 adds new features and addresses bugs found in previous
releases.
-<P> New features include:
+<P>
+New features include:
<UL>
+<LI> Experimental: The instruction to remove the double quotes from the processing of
+ customized headers existed in pine, but it was removed in alpine. Restoring
+ old Alpine behavior. See
+ <A href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981781">this</A>
+ report for more background information.
+<LI> Add the capability to record http debug. This is necessary to debug XOAUTH2
+ authentication, and records sensitive login information. Do not share your
+ debug file if you use this form of debug.
+<LI> Remove the ability to choose between the device and authorize methods
+ to login to outlook, since the original client-id can only be used
+ for the device method. One needs a special client-id and client-secret
+ to use the authorize method in Outlook.
+<LI> PC-Alpine only: Some service providers produce access tokens that are
+ too long to save in the Windows Credentials, so the access tokens will
+ be split and saved as several pieces. This means that old versions of
+ Alpine will NOT be able to use saved passwords once this new version of
+ Alpine is used.
+<LI> PC-Alpine: Debug files used to be created with extension .txt1, .txt2, etc.
+ Rename those files so that they have extension .txt.
+<LI> Always follow ‘suppress-asterisks-in-password-prompt’ setting in the
+ various password prompts. Submitted by &Eacute;tienne Deparis.
+<LI> Use 'alpine -F' instead of 'pine -F' as the browser default pager.
+ Submitted by &Eacute;tienne Deparis.
+<LI> Introduction of OTHER CMDS menu for the browser/pilot to let
+ people discover the two new commands: &quot;1&quot; is a toggle that
+ switches between 1 column and multicolumn mode. The &quot;.&quot; command
+ toggles between hiding or showing hidden files, and the &quot;G&quot;
+ command to travel between directories. Contributed by &Eacute;tienne
+ Deparis.
<LI> Implementation of XOAUTH2 for Yahoo! Mail. <A href="h_yahoo_configuration">Learn More</A>
<LI> Expansion of the configuration screen for XOAUTH2 to include
@@ -292,10 +497,8 @@ releases.
of the message-id from this header. This information is
replaced by a random string.
</UL>
-
<LI> Unix Alpine displays configure options and flags when
invoked as &quot;alpine -v&quot;. Suggested by Matt Ackeret.
-
<LI> Alpine will ding the terminal bell when asking about quitting
when new mail arrives. This is consistent with Alpine dinging the
bell when new mail arrives. The bell will not ding if it is disabled
@@ -2186,19 +2389,57 @@ You are trying to connect to a server that uses the XOAUTH2 method of
authentication.
<P>
-In order to set this up, you need to authenticate in the target server
-and authorize Alpine to access your email account.
+In order to complete this process use a browser in the same computer
+that you are using Alpine to open the given URL.
<P>
-After you have authorized Alpine, the server will generate an
-&quot;access code.&quot; In order to use this code, press 'C'
-and copy and paste this code back into Alpine.
+You will be sent to authenticate and later to authorize Alpine access to
+your email. Once you have completed the authorization process you will get
+a code. Input this code into Alpine by pressing 'C'. If you do not see a
+code, but see an error message in your browser, copy and paste the URL of
+the error page and paste into alpine after pressing the 'C' key.
<P>
After you have input the code, Alpine will conclude logging you into your
account.
<P>
+If your version of Alpine was compiled to save passwords, then Alpine will save
+the refresh and access tokens securely, otherwise you will have to repeat this
+process every time you login to this server.
+
+<P>
+&lt;End of setting up XOAUTH2 Authentication help&gt;
+</BODY>
+</HTML>
+====== h_oauth2_start_device ======
+<HTML>
+<HEAD>
+<TITLE>Setting up XOAUTH2 Authentication Using the Device Flow</TITLE>
+</HEAD>
+<BODY>
+<H1>Setting up XOAUTH2 Authentication Using the Device Flow</H1>
+
+You are trying to connect to a server that uses the XOAUTH2 method of
+authentication.
+
+<P>
+In order to complete this process use a browser in the same computer
+that you are using Alpine to open the given URL and enter the code that you
+were given by Alpine in that screen.
+
+<P>
+You will be sent to authenticate and later to authorize Alpine access to
+your email. Once you have completed the authorization process Alpine will
+get the refresh and access tokens from the service servers and the authentication
+process will be completed by Alpine.
+
+<P>
+If your version of Alpine was compiled to save passwords, then Alpine will save
+the refresh and access tokens securely, otherwise you will have to repeat this
+process every time you login to this server.
+
+<P>
&lt;End of setting up XOAUTH2 Authentication help&gt;
</BODY>
</HTML>
@@ -2749,7 +2990,7 @@ on Alpine configuration.<P>
<LI> The main site for Alpine contains information on configuring and solving problems
with Alpine, it can be found at
-<CENTER><A HREF="http://alpine.x10host.com/alpine/">http://alpine.x10host.com/alpine/</A></CENTER>
+<CENTER><A HREF="https://alpineapp.email">https://alpineapp.email</A></CENTER>
<LI> Archives of the Alpine-info mailing list, at <A
href="http://mailman13.u.washington.edu/pipermail/alpine-info/">http://mailman13.u.washington.edu/pipermail/alpine-info/</A>
@@ -2859,7 +3100,7 @@ href="h_apache_license">Apache License 2.0</A>.
<P>
Alpine's privacy policy is a living, online only, document, which can be found at
-<A href="h_privacy_policy">http://alpine.x10host.com/privacy.html</A>.
+<A href="h_privacy_policy">https://alpineapp.email/privacy.html</A>.
By following the previous link, Alpine
will connect to an external server, and will download it and display
it for you. Please take some time to read it and understand it.
@@ -2894,7 +3135,7 @@ href="h_apache_license">Apache License 2.0</A>.
<P>
Alpine's privacy policy is a living, online only, document, which can be found at
-<A href="h_privacy_policy">http://alpine.x10host.com/privacy.html</A>.
+<A href="h_privacy_policy">https://alpineapp.email/privacy.html</A>.
By following the previous link, Alpine
will connect to an external server, and will download it and display
it for you. Please take some time to read it and understand it.
@@ -2927,7 +3168,7 @@ href="h_apache_license">Apache License 2.0</A>.
<P>
Alpine's privacy policy is a living, online only, document, which can be found at
-<A href="h_privacy_policy">http://alpine.x10host.com/privacy.html</A>.
+<A href="h_privacy_policy">https://alpineapp.email/privacy.html</A>.
By following the previous link, Alpine
will connect to an external server, and will download it and display
it for you. Please take some time to read it and understand it.
@@ -2984,36 +3225,64 @@ The &quot;NextLink&quot; and &quot;PrevLink&quot; commands
<H2>TABLE OF CONTENTS</H2>
<OL>
- <LI> <A HREF="h_mainhelp_intro">Introduction</A>
- <LI> <A HREF="h_mainhelp_pinehelp">Alpine Help</A>
-<!--chtml if [ -r PINE_INFO_PATH ]-->
- <LI> <A HREF="h_mainhelp_localsupport">Local Support Contacts</A>
-<!--chtml endif-->
- <LI> <A HREF="h_mainhelp_cmds">Giving Commands in Alpine</A>
- <LI> <A HREF="h_mainhelp_config">Alpine Configuration</A>
- <LI> <A HREF="h_mainhelp_status">Titlebar Line</A>
- <LI> <A HREF="h_mainhelp_mainmenu">Main Menu</A>
- <LI> <A HREF="h_mainhelp_index">Index of Messages</A>
- <LI> <A HREF="h_mainhelp_reading">Reading Messages</A>
- <LI> <A HREF="h_mainhelp_composing">Composing Messages</A>
- <LI> <A HREF="h_mainhelp_readingnews">Reading News</A>
- <LI> <A HREF="h_mainhelp_abooks">Address Books</A>
- <LI> <A HREF="h_mainhelp_ldap">LDAP Directories</A>
- <LI> <A HREF="h_mainhelp_folders">Folders</A>
- <LI> <A HREF="h_mainhelp_collections">Collection Lists</A>
- <LI> <A HREF="h_mainhelp_aggops">Aggregate Operations</A>
- <LI> <A HREF="h_mainhelp_color">Color Setup</A>
- <LI> <A HREF="h_mainhelp_filtering">Filtering</A>
- <LI> <A HREF="h_mainhelp_roles">Roles</A>
- <LI> <A HREF="h_mainhelp_patterns">Patterns</A>
- <LI> <A HREF="h_mainhelp_keywords">Keywords (or Flags, or Labels)</A>
- <LI> <A HREF="h_mainhelp_mouse">Using a Mouse</A>
- <LI> <A HREF="h_mainhelp_cmdlineopts">Command Line Options</A>
- <LI> <A HREF="h_mainhelp_securing">Securing Your Alpine Session</A>
- <LI> <A HREF="h_mainhelp_smime">S/MIME</A>
- <LI> <A HREF="h_mainhelp_problems">Reporting Problems</A>
- <LI> <A HREF="X-Alpine-Config:">Show Supported Options in this Alpine</A>
- <LI> <A HREF="h_help_index">Index to Alpine's Online Help</A>
+ <LI> The Basics of Alpine
+ <UL>
+ <LI> <A HREF="h_mainhelp_intro">Introduction</A>
+ <LI> <A HREF="h_mainhelp_pinehelp">Alpine Help</A>
+ <LI> <A HREF="h_help_index">Index to Alpine's Online Help</A>
+ <LI> <A HREF="h_mainhelp_cmds">Giving Commands in Alpine</A>
+ <LI> <A HREF="h_mainhelp_config">Alpine Configuration</A>
+ <LI> <A HREF="h_mainhelp_cmdlineopts">Command Line Options</A>
+ <LI> <A HREF="X-Alpine-Config:">Show Supported Options in this Alpine</A>
+ <!--chtml if [ -r PINE_INFO_PATH ]-->
+ <LI> <A HREF="h_mainhelp_localsupport">Local Support Contacts</A>
+ <!--chtml endif-->
+ <LI> <A HREF="h_mainhelp_problems">Reporting Problems</A>
+ </UL>
+
+ <LI> Description of Alpine Screens
+ <UL>
+ <LI> <A HREF="h_mainhelp_mainmenu">Main Menu</A>
+ <LI> <A HREF="h_mainhelp_index">Index of Messages</A>
+ <LI> <A HREF="h_mainhelp_reading">Reading Messages</A>
+ <LI> <A HREF="h_mainhelp_composing">Composing Messages</A>
+ <LI> <A HREF="h_mainhelp_readingnews">Reading News</A>
+ <LI> <A HREF="h_mainhelp_status">Titlebar Line</A>
+ </UL>
+
+ <LI> Email Processing
+ <UL>
+ <LI> <A HREF="h_mainhelp_aggops">Aggregate Operations</A>
+ <LI> <A HREF="h_mainhelp_filtering">Filtering</A>
+ <LI> <A HREF="h_mainhelp_patterns">Patterns</A>
+ </UL>
+
+ <LI> Configuring Additional Accounts
+ <UL>
+ <LI> <A HREF="h_mainhelp_folders">Folders</A>
+ <LI> <A HREF="h_mainhelp_collections">Collection Lists</A>
+ <LI> <A href="h_config_incoming_folders">OPTION: <!--#echo var="VAR_incoming-folders"--></a>
+ <LI> <A HREF="h_mainhelp_roles">Incoming and Outgoing Settings for other Accounts</A> (a.k.a Roles)
+ </UL>
+
+ <LI> Finding and Saving your Contacts
+ <UL>
+ <LI> <A HREF="h_mainhelp_abooks">Address Books</A>
+ <LI> <A HREF="h_mainhelp_ldap">LDAP Directories</A>
+ </UL>
+
+ <LI> Security
+ <UL>
+ <LI> <A HREF="h_mainhelp_securing">Securing Your Alpine Session</A>
+ <LI> <A HREF="h_mainhelp_smime">S/MIME</A>
+ </UL>
+
+ <LI> Miscelaneous Configurations
+ <UL>
+ <LI> <A HREF="h_mainhelp_color">Color Setup</A>
+ <LI> <A HREF="h_mainhelp_keywords">Keywords (or Flags, or Labels)</A>
+ <LI> <A HREF="h_mainhelp_mouse">Using a Mouse</A>
+ </UL>
</OL>
<P>
@@ -4022,7 +4291,7 @@ get assistance.
<P>
<ADDRESS>
- Eduardo Chappa &lt;chappa@gmx.com&gt;
+ Eduardo Chappa &lt;chappa@washington.edu&gt;
</ADDRESS>
<P>
@@ -15854,7 +16123,7 @@ If an address doesn't look like a fully-qualified address, it will be looked
up in your address books, and if it doesn't match a nickname there, then it
will be looked up on the LDAP servers that have this feature set.
The lookups will also be done when using the address completion feature
-(TAB command) in the composer if any of the serves have this feature set.
+(TAB command) in the composer if any of the servers have this feature set.
Also see the LDAP feature
<A HREF="h_config_ldap_opts_rhs">&quot;Lookup-Addrbook-Contents&quot;</A>
and the Setup/Config feature
@@ -16447,18 +16716,16 @@ source code of this project is located at
<BODY>
<H1>Tenant Explained</H1>
-The tenant is a way in which a service can either restrict an app to access
-only certain portions of its service. For example, a service may allow
-an app to have access to your work data, or school data, and not every app
-is allowed to access this data, or the access is not allowed for all accounts,
-but only those restructed in the tenant.
+The tenant is a way in which an app can be restricted. Alpine by default
+has no restrictions, which means that it can be used to access any service;
+however, a system administrator might register their own app and make it
+available only to those in their organization.
+
+<P>
+This setting allows a system administrator to register Alpine with a different
+client-id and client-secret and further restrict access to only authorized
+users.
-<P> When Alpine registers with an email service provider, it does so with the
-intention that you can use Alpine for any of your needs (work, school or
-personal), and the client-id and tenant that it uses would allow you access to
-only your work email, say, and not your personal email, because the app is
-trusted only at work, and so the client-id and tenant are good for that
-organization only.
<P>
&lt;End of help on this topic&gt;
</BODY>
@@ -25317,7 +25584,7 @@ is somewhat related to this option.
<P>
In addition to a list of actual addresses,
-you may use regular expressions (as used with egrep with the ignore case flag)
+you may use regular expressions (as used with grep -E with the ignore case flag)
to describe the addresses you want to match.
Alpine will somewhat arbitrarily interpret your entry as a regular
expression if it contains any of the characters
@@ -28671,19 +28938,19 @@ argument (see the &quot;lynx&quot; example below).
<P>
So, here are some example entries:
<PRE>
-url-viewers = _TEST(&quot;test -n '$&#123;DISPLAY}'&quot;)_ /usr/local/bin/netscape
- &quot;/usr/local/bin/lynx _URL_&quot;
- C:&#92;BIN&#92;NETSCAPE.BAT
+url-viewers = _TEST(&quot;test -n '$&#123;DISPLAY}'&quot;)_ /usr/bin/firefox
+ &quot;/usr/bin/lynx _URL_&quot;
+ C:&#92;BIN&#92;FIREFOX.BAT
</PRE>
<P>
This example shows that for the first viewer in the list to be used
the environment variable &quot;DISPLAY&quot; must be defined. If it
-is, then the path and file &quot;/usr/local/bin/netscape&quot; must exist.
+is, then the path and file &quot;/usr/bin/firefox&quot; must exist.
If neither condition is met,
-then the path and file &quot;/usr/local/bin/lynx&quot; must exist.
-If it does, then the &quot;_URL_&quot; token is replaced by the selected URL.
+then the path and file &quot;/usr/bin/lynx&quot; must exist.
+If it does, then the &quot;_URL_&quot; token is replaced by the selected URL.
If the path to &quot;lynx&quot; is invalid,
-then the final path and file C:&#92;BIN&#92;NETSCAPE.BAT must exist.
+then the final path and file C:&#92;BIN&#92;FIREFOX.BAT must exist.
Note that the last
entry is a DOS/Windows path. This is one way to support Alpine running
on more than one architecture with the same configuration file.<P>
@@ -28779,31 +29046,15 @@ How exactly you define your <!--#echo var="VAR_url-viewers"--> entries to do thi
the command shell, the URL-viewer application(s), and possibly the specific
version of the latter, you are using.
<P>
-Relevant command
-line options for the Netscape browser for showing URLs (selected from Alpine)
-when Netscape is already running are discussed in the document
-&quot;Remote Control of UNIX Netscape&quot;
-found at the URL (as of 12 Aug. 1998):
+Relevant command line options for firefox can be found at
<P>
-<CENTER><A HREF="http://home.netscape.com/newsref/std/x-remote.html">http://home.netscape.com/newsref/std/x-remote.html</A></CENTER>
+<CENTER><A HREF="https://wiki.mozilla.org/Firefox/CommandLineOptions">https://wiki.mozilla.org/Firefox/CommandLineOptions</A></CENTER>
<P>(If the URL-viewer application is
<B>not</B> running on the same host as Alpine, but being launched from an
applications server, you may not be able to use the command line options for
using an existing invocation of the application in Alpine's <!--#echo var="VAR_url-viewers"--> entry.)
-<P>
-<!--chtml if this-method="shown-to-work"-->
-An example using the Korn shell and the Netscape browser (first entry wrapped
-because of its length, but should all appear on one line):
-<P>
-url-viewers = _TEST("test -L /myhomedir/.netscape/lock")_ &quot;/usr/local/bin/netscape -remote 'openURL(_URL_, new-window)' &amp;&quot;<BR>
-
-_TEST(&quot;test -n '$&#123;DISPLAY}'&quot;)_ &quot;/usr/local/bin/netscape &amp;&quot;<BR>
- &quot;/usr/local/bin/lynx '_URL_'&quot;
-<P>
-<!--chtml endif-->
-<P>
<UL>
<LI><A HREF="h_finding_help">Finding more information and requesting help</A>
</UL><P>
@@ -28939,7 +29190,8 @@ This feature is on by default.
<P>
Similarly, this feature also enables TAB completion of address book
nicknames when at a prompt for a nickname,
-or when typing in an address field in the composer.
+when typing in an address field in the composer,
+or when selecting messages based on <A HREF="h_select_rule">rules</A> or <A HREF="h_mainhelp_keywords">keywords</A>.
<P>
&lt;End of help on this topic&gt;
</BODY>
@@ -34586,7 +34838,7 @@ but must be deleted, as a way to start inverse video again.
<P>
When this feature is enabled, Alpine will delete a line before writing it,
therefore deleting the end of reverse video. Modern terminals do not require
-enabling of this feature, but some old terminals might require it.
+enabling this feature, but some old terminals might require it.
<P>
<UL>
<LI><A HREF="h_finding_help">Finding more information and requesting help</A>
@@ -38525,7 +38777,7 @@ in size will be selected. Examples: 2176, 1.53K (1530), or 3M (3000000).
Use 'p' to toggle between preserving or not preserving the original To:
and Cc: fields of the message. Enter ^C to cancel message.
========== h_privacy_policy ==========
-x-alpine-http:http://alpine.x10host.com/privacy.html
+x-alpine-http:https://alpineapp.email/legal/privacy.html
========== h_apache_license ==========
-x-alpine-http:http://alpine.x10host.com/legal/apache_license.html
+x-alpine-http:https://alpineapp.email/legal/apache_license.html
diff --git a/pith/pineelt.h b/pith/pineelt.h
index 6eeb77f2..bc989e33 100644
--- a/pith/pineelt.h
+++ b/pith/pineelt.h
@@ -2,7 +2,7 @@
* $Id: pineelt.h 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/pipe.c b/pith/pipe.c
index 4d7e6149..501ef28a 100644
--- a/pith/pipe.c
+++ b/pith/pipe.c
@@ -1,9 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: pipe.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/pipe.h b/pith/pipe.h
index a74217e8..486acdc8 100644
--- a/pith/pipe.h
+++ b/pith/pipe.h
@@ -2,7 +2,7 @@
* $Id: pipe.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/readfile.c b/pith/readfile.c
index 443953d4..02ba54aa 100644
--- a/pith/readfile.c
+++ b/pith/readfile.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: readfile.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/readfile.h b/pith/readfile.h
index 3949213b..757542d9 100644
--- a/pith/readfile.h
+++ b/pith/readfile.h
@@ -2,7 +2,7 @@
* $Id: readfile.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/remote.c b/pith/remote.c
index 3345e84a..feddf1c2 100644
--- a/pith/remote.c
+++ b/pith/remote.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: remote.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/remote.h b/pith/remote.h
index 29fcfcf3..01a5eb65 100644
--- a/pith/remote.h
+++ b/pith/remote.h
@@ -2,7 +2,7 @@
* $Id: remote.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/remtype.h b/pith/remtype.h
index 5f757b0b..882fdd36 100644
--- a/pith/remtype.h
+++ b/pith/remtype.h
@@ -2,7 +2,7 @@
* $Id: remtype.h 764 2007-10-23 23:44:49Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/repltype.h b/pith/repltype.h
index c72949d7..cfcc63c9 100644
--- a/pith/repltype.h
+++ b/pith/repltype.h
@@ -2,7 +2,7 @@
* $Id: repltype.h 769 2007-10-24 00:15:40Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/reply.c b/pith/reply.c
index 49aaf33c..41ae9fe6 100644
--- a/pith/reply.c
+++ b/pith/reply.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: reply.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -945,7 +941,7 @@ reply_body(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruct *orig_body,
int impl, template_len = 0, leave_cursor_at_top = 0, reply_raw_body = 0;
if(sect_prefix) /* SECTBUFLEN = sizeof(sect_buf) */
- snprintf(section = sect_buf, sizeof(sect_buf), "%.*s.1", SECTBUFLEN-1, sect_prefix);
+ snprintf(section = sect_buf, sizeof(sect_buf), "%.*s.1", SECTBUFLEN-3, sect_prefix);
else
section = "1";
@@ -2329,12 +2325,12 @@ forward_subject(ENVELOPE *env, int flags)
tmp_20k_buf[SIZEOF_20KBUF-1] = '\0';
removing_trailing_white_space(tmp_20k_buf);
- if((l = strlen(tmp_20k_buf)) < 1000 &&
- (l < 5 || strcmp(tmp_20k_buf+l-5,"(fwd)"))){
- snprintf(tmp_20k_buf+2000, SIZEOF_20KBUF-2000, "%s (fwd)", tmp_20k_buf);
- tmp_20k_buf[SIZEOF_20KBUF-2000-1] = '\0';
- memmove(tmp_20k_buf, tmp_20k_buf+2000, strlen(tmp_20k_buf+2000));
- tmp_20k_buf[strlen(tmp_20k_buf+2000)] = '\0';
+ l = strlen(tmp_20k_buf);
+ if(l < 5 || strcmp(tmp_20k_buf+l-5,"(fwd)")){
+ char *s = cpystr(tmp_20k_buf);
+ snprintf(tmp_20k_buf, SIZEOF_20KBUF, "%.1000s (fwd)", s);
+ tmp_20k_buf[SIZEOF_20KBUF-1] = '\0';
+ fs_give((void **) &s);
}
/*
@@ -3064,7 +3060,7 @@ partno(struct mail_bodystruct *body, struct mail_bodystruct *end_body)
num++; /* PARTTMPLEN = sizeof(tmp) */
if(&part->body == end_body || (p = partno(&part->body, end_body))){
snprintf(tmp, sizeof(tmp), "%d%s%.*s", num, (p) ? "." : "",
- PARTTMPLEN-10, (p) ? p : "");
+ PARTTMPLEN-12, (p) ? p : "");
tmp[sizeof(tmp)-1] = '\0';
if(p)
fs_give((void **)&p);
@@ -3701,7 +3697,6 @@ forward_multi_alt_mixed(MAILSTREAM *stream, ENVELOPE *env, struct mail_bodystruc
BODY *body = NULL, *text_body = NULL;
PART *part = NULL;
char prefix_buf[FWDTMPLEN];
- char *new_charset = NULL;
int partnum;
char *section, sect_buf[256];
int forward_raw_body = 0;
diff --git a/pith/reply.h b/pith/reply.h
index 6f7fe5d7..97c8f131 100644
--- a/pith/reply.h
+++ b/pith/reply.h
@@ -2,7 +2,7 @@
* $Id: reply.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/rfc2231.c b/pith/rfc2231.c
index 29806039..af62acd9 100644
--- a/pith/rfc2231.c
+++ b/pith/rfc2231.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: rfc2231.c 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/rfc2231.h b/pith/rfc2231.h
index b19c07fa..50c440de 100644
--- a/pith/rfc2231.h
+++ b/pith/rfc2231.h
@@ -2,7 +2,7 @@
* $Id: rfc2231.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/save.c b/pith/save.c
index 5f2c14d6..e1c13f7f 100644
--- a/pith/save.c
+++ b/pith/save.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: save.c 1204 2009-02-02 19:54:23Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2009 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -132,7 +128,7 @@ save_get_fldr_from_env(char *fbuf, int nfbuf, ENVELOPE *e, struct pine *state,
char fakedomain[2];
ADDRESS *tmp_adr = NULL;
char buf[MAX(MAXFOLDER,MAX_NICKNAME) + 1];
- char *bufp;
+ char *bufp = NULL;
char *folder_name = NULL;
static char botch[] = "programmer botch, unknown message save rule";
unsigned save_msg_rule;
@@ -425,7 +421,7 @@ save(struct pine *state, MAILSTREAM *stream, CONTEXT_S *context, char *folder,
int delete, filter, k, worry_about_keywords = 0;
char *save_folder, *seq, *flags = NULL, date[64], tmp[MAILTMPLEN];
long i, nmsgs, rawno;
- size_t len;
+ size_t len = 0;
STORE_S *so = NULL;
MAILSTREAM *save_stream = NULL;
MESSAGECACHE *mc;
@@ -504,7 +500,7 @@ save(struct pine *state, MAILSTREAM *stream, CONTEXT_S *context, char *folder,
if(dstn_stream && dstn_stream->kwd_create){
imapuid_t dummy_uid = 0L;
- long dummy_msgno, delete_count;
+ long dummy_msgno = 0L, delete_count;
int expbits, set;
char *flags = NULL;
char *user_flag_name, *duser_flag_name;
@@ -564,7 +560,7 @@ save(struct pine *state, MAILSTREAM *stream, CONTEXT_S *context, char *folder,
char dummymsg[1000];
char *id = NULL;
char *idused;
- appenduid_t *au;
+ appenduid_t *au = NULL;
newlen = strlen("\\DELETED");
len += newlen;
diff --git a/pith/save.h b/pith/save.h
index 3d8b63ed..9ae75d76 100644
--- a/pith/save.h
+++ b/pith/save.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/savetype.h b/pith/savetype.h
index b32df3fc..b18737e4 100644
--- a/pith/savetype.h
+++ b/pith/savetype.h
@@ -2,7 +2,7 @@
* $Id: savetype.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/search.c b/pith/search.c
index 617f4bce..840dc2bf 100644
--- a/pith/search.c
+++ b/pith/search.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: search.c 854 2007-12-07 17:44:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/search.h b/pith/search.h
index 65806a68..06e0e01b 100644
--- a/pith/search.h
+++ b/pith/search.h
@@ -2,7 +2,7 @@
* $Id: search.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/send.c b/pith/send.c
index 1ce74fd8..d2bbdf43 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: send.c 1204 2009-02-02 19:54:23Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -116,7 +112,7 @@ int pwbh_finish(int, STORE_S *);
int sent_percent(void);
unsigned short *setup_avoid_table(void);
#ifndef _WINDOWS
-int mta_handoff(METAENV *, BODY *, char *, size_t, void (*)(char *, int),
+int mta_handoff(METAENV *, BODY *, char *, size_t, char **, void (*)(char *, int),
void (*)(PIPE_S *, int, void *));
char *post_handoff(METAENV *, BODY *, char *, size_t, void (*)(char *, int),
void (*)(PIPE_S *, int, void *));
@@ -1741,7 +1737,7 @@ call_mailer(METAENV *header, struct mail_bodystruct *body, char **alt_smtp_serve
#ifndef _WINDOWS
/* try posting via local "<mta> <-t>" if specified */
- if(mta_handoff(header, body, error_buf, sizeof(error_buf), bigresult_f, pipecb_f)){
+ if(mta_handoff(header, body, error_buf, sizeof(error_buf), alt_smtp_servers, bigresult_f, pipecb_f)){
if(error_buf[0])
error_mess = error_buf;
@@ -1876,7 +1872,7 @@ call_mailer(METAENV *header, struct mail_bodystruct *body, char **alt_smtp_serve
TIME_STAMP("smtp open", 1);
if(sending_stream){
- unsigned short save_encoding, added_encoding;
+ unsigned short save_encoding = 0, added_encoding = 0;
dprint((1, "Opened SMTP server \"%s\"\n",
net_host(sending_stream->netstream)
@@ -2846,7 +2842,7 @@ pine_encode_body (struct mail_bodystruct *body)
if(!(freethis=parameter_val(body->parameter, "BOUNDARY"))){
char tmp[MAILTMPLEN]; /* make cookie not in BASE64 or QUOTEPRINT*/
- snprintf (tmp,sizeof(tmp),"%ld-%ld-%ld=:%ld",gethostid (),random (),(long) time (0),
+ snprintf (tmp,sizeof(tmp),"%ld%ld%ld%ld",gethostid (),random (),(long) time (0),
(long) getpid ());
tmp[sizeof(tmp)-1] = '\0';
set_parameter(&body->parameter, "boundary", tmp);
@@ -3625,8 +3621,8 @@ posting_characterset(void *data, char *preferred_charset, MsgPart mp)
{
unsigned long *charsetmap = NULL;
unsigned long validbitmap;
- static char *ascii = "US-ASCII";
- static char *utf8 = "UTF-8";
+ static char *ascii = "us-ascii";
+ static char *utf8 = "utf-8";
int notcjk = 0;
if(!ps_global->post_utf8){
@@ -3634,7 +3630,7 @@ posting_characterset(void *data, char *preferred_charset, MsgPart mp)
if(mp == HdrText){
char *text = NULL;
- UCS *ucs = NULL, *ucsp;
+ UCS *ucs = NULL, *ucsp = NULL;
text = (char *) data;
@@ -5507,6 +5503,7 @@ smtp_command(char *errbuf, size_t errbuflen)
int
mta_handoff(METAENV *header, struct mail_bodystruct *body,
char *errbuf, size_t len,
+ char **alt_smtp_servers,
void (*bigresult_f) (char *, int),
void (*pipecb_f)(PIPE_S *, int, void *))
{
@@ -5539,7 +5536,10 @@ mta_handoff(METAENV *header, struct mail_bodystruct *body,
cmd = ps_global->COM_SENDMAIL_PATH;
}
else if(!(ps_global->COM_SMTP_SERVER
- && ps_global->COM_SMTP_SERVER[0])){
+ && ps_global->COM_SMTP_SERVER[0])
+ && !(alt_smtp_servers
+ && alt_smtp_servers[0]
+ && alt_smtp_servers[0][0])){
if((ps_global->vars[V_SENDMAIL_PATH].post_user_val.p
&& ps_global->vars[V_SENDMAIL_PATH].post_user_val.p[0]) ||
(ps_global->vars[V_SENDMAIL_PATH].main_user_val.p
@@ -5609,10 +5609,10 @@ post_handoff(METAENV *header, struct mail_bodystruct *body, char *errbuf,
char *s;
char tmp[200];
- if(s = strstr(header->env->date," (")) /* fix the date format for news */
+ if((s = strstr(header->env->date," (")) != NULL) /* fix the date format for news */
*s = '\0';
- if(err = mta_parse_post(header, body, SENDNEWS, errbuf, errbuflen, bigresult_f, pipecb_f)){
+ if((err = mta_parse_post(header, body, SENDNEWS, errbuf, errbuflen, bigresult_f, pipecb_f))){
strncpy(tmp, err, sizeof(tmp)-1);
tmp[sizeof(tmp)-1] = '\0';
snprintf(err = errbuf, errbuflen, _("News not posted: \"%s\": %s"),
diff --git a/pith/send.h b/pith/send.h
index fabc04c9..4f680bba 100644
--- a/pith/send.h
+++ b/pith/send.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2008 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/sequence.c b/pith/sequence.c
index b0e4d290..6112ed95 100644
--- a/pith/sequence.c
+++ b/pith/sequence.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: sequence.c 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/sequence.h b/pith/sequence.h
index b88440a3..99ce1d72 100644
--- a/pith/sequence.h
+++ b/pith/sequence.h
@@ -2,7 +2,7 @@
* $Id: sequence.h 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/signal.h b/pith/signal.h
index cfd2cca0..061162fd 100644
--- a/pith/signal.h
+++ b/pith/signal.h
@@ -2,7 +2,7 @@
* $Id: signal.h 1025 2008-04-08 22:59:38Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/smime.c b/pith/smime.c
index 07e22919..e330d1c9 100644
--- a/pith/smime.c
+++ b/pith/smime.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: smime.c 1176 2008-09-29 21:16:42Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -203,7 +199,7 @@ setup_pwdcert(void **pwdcert)
struct stat sbuf;
char pathdir[MAXPATH+1], pathkey[MAXPATH+1], fpath[MAXPATH+1], pathcert[MAXPATH+1];
char fpath2[MAXPATH+1], prompt[MAILTMPLEN];
- char *keyfile, *certfile, *text;
+ char *keyfile, *certfile, *text = NULL;
EVP_PKEY *pkey = NULL;
X509 *pcert = NULL;
PERSONAL_CERT *pc, *pc2 = NULL;
@@ -445,7 +441,7 @@ setup_pwdcert(void **pwdcert)
int
smime_expunge_cert(WhichCerts ctype)
{
- int count, removed;
+ int count = 0, removed;
CertList *cl, *dummy, *data;
char *path, buf[MAXPATH+1];
char *contents;
@@ -640,7 +636,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
if(ctype == Password){
char PrivateKeyPath[MAXPATH+1], PublicCertPath[MAXPATH+1], s[MAXPATH+1];
char full_name_key[MAXPATH+1], full_name_cert[MAXPATH+1];
- char *use_this_file;
+ char *use_this_file = NULL;
char prompt[500];
EVP_PKEY *key = p_cert ? p_cert->key : NULL;
@@ -664,7 +660,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
if(key != NULL
|| (key = load_pkey_with_prompt(full_filename, NULL, prompt, NULL)) != NULL){
BIO *ins = NULL;
- X509 *cert = p_cert ? p_cert->cert : NULL, *cert2;
+ X509 *cert = p_cert ? p_cert->cert : NULL;
strncpy(full_name_key, full_filename, sizeof(full_filename));
full_name_key[sizeof(full_name_key)-1] = '\0';
@@ -782,15 +778,16 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
text = decrypt_file((char *)tmp, NULL, pwdcert);
if(text != NULL){
if(pc == NULL){
- pc = fs_get(sizeof(PERSONAL_CERT));
- memset((void *)pc, 0, sizeof(PERSONAL_CERT));
filename[strlen(filename)-strlen(EXTCERT(Private))] = '\0';
- pc->name = cpystr(filename);
- snprintf(buf, sizeof(buf), "%s%s", filename, EXTCERT(Public));
- buf[sizeof(buf)-1] = '\0';
- pc->cname = cpystr(buf);
- pc->key = key;
- pc->cert = cert;
+ if(strlen(filename) + strlen(EXTCERT(Public)) < MAXPATH){
+ pc = fs_get(sizeof(PERSONAL_CERT));
+ memset((void *)pc, 0, sizeof(PERSONAL_CERT));
+ pc->name = cpystr(filename);
+ pc->cname = fs_get(strlen(filename) + strlen(EXTCERT(Public)) + 1);
+ sprintf(pc->cname, "%s%s", filename, EXTCERT(Public));
+ pc->key = key;
+ pc->cert = cert;
+ }
}
if(encrypt_file((char *)tmp, text, pc)){ /* we did it! */
@@ -855,7 +852,7 @@ import_certificate(WhichCerts ctype, PERSONAL_CERT *p_cert, char *fname)
if(!ps_global->smime->privatecertlist){
ps_global->smime->privatecertlist = fs_get(sizeof(CertList));
- memset((void *)DATACERT(ctype), 0, sizeof(CertList));
+ memset((void *) ps_global->smime->privatecertlist, 0, sizeof(CertList));
}
for(s = t = filename; (t = strstr(s, ".key")) != NULL; s = t + 1);
@@ -1151,15 +1148,16 @@ app_RAND_write_file(const char *file)
CertList *
certlist_from_personal_certs(PERSONAL_CERT *pc)
{
- CertList *cl;
+ CertList *cl = NULL;
X509 *x;
if(pc == NULL)
return NULL;
- if((x = get_cert_for(pc->name, Public, 1)) != NULL)
+ if((x = get_cert_for(pc->name, Public, 1)) != NULL){
cl = smime_X509_to_cert_info(x, pc->name);
- cl->next = certlist_from_personal_certs(pc->next);
+ cl->next = certlist_from_personal_certs(pc->next);
+ }
return cl;
}
@@ -1929,9 +1927,11 @@ copy_dir_to_container(WhichCerts which, char *contents)
fpath[sizeof(fpath) - 1] = '\0';
}
else if(ret_dir){
- if(strlen(dstpath) + strlen(configcontainer) - strlen(ret_dir) + 1 < sizeof(dstpath))
- snprintf(fpath, sizeof(fpath), "%s%c%s",
- dstpath, tempfile[strlen(ret_dir)], configcontainer);
+ if(strlen(dstpath) + strlen(configcontainer) + 2 < sizeof(dstpath))
+ snprintf(fpath, sizeof(fpath), "%.*s%c%.*s",
+ (int) strlen(dstpath), dstpath,
+ tempfile[strlen(ret_dir)],
+ (int) (sizeof(fpath) - strlen(dstpath) - 1), configcontainer);
else
ret = -1;
}
@@ -3067,6 +3067,7 @@ do_detached_signature_verify(BODY *b, long msgno, char *section)
dprint((9, "do_detached_signature_verify(msgno=%ld type=%d subtype=%s section=%s)", msgno, b->type, b->subtype ? b->subtype : "NULL", (section && *section) ? section : (section != NULL) ? "Top" : "NULL"));
smime_init();
+ mimetext = bodytext = NULL;
/* if it was signed and then encrypted, use the decrypted text
* to check the validity of the signature
@@ -3265,6 +3266,7 @@ decrypt_file(char *fp, int *rv, PERSONAL_CERT *pc)
long unsigned int len;
void *ret;
+ if(rv) *rv = -1; /* assume failure */
if(pc == NULL || (text = read_file(fp, 0)) == NULL || *text == '\0')
return NULL;
diff --git a/pith/smime.h b/pith/smime.h
index 2dd52287..fe20cf17 100644
--- a/pith/smime.h
+++ b/pith/smime.h
@@ -2,7 +2,7 @@
* $Id: smime.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/smkeys.c b/pith/smkeys.c
index 495f0a53..64b10565 100644
--- a/pith/smkeys.c
+++ b/pith/smkeys.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: smkeys.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -1053,8 +1049,11 @@ save_cert_for(char *email, X509 *cert, WhichCerts ctype)
}
else{
if(strlen(path) + strlen(tempfile) - strlen(ret_dir) + 1 < sizeof(path))
- snprintf(fpath, sizeof(fpath), "%s%c%s",
- path, tempfile[strlen(ret_dir)], tempfile + strlen(ret_dir) + 1);
+ snprintf(fpath, sizeof(fpath), "%.*s%c%.*s",
+ (int) strlen(path), path,
+ tempfile[strlen(ret_dir)],
+ (int) (sizeof(fpath) - strlen(fpath) - 1),
+ tempfile + strlen(ret_dir) + 1);
else
err++;
}
diff --git a/pith/smkeys.h b/pith/smkeys.h
index 3286a2e7..3655f98c 100644
--- a/pith/smkeys.h
+++ b/pith/smkeys.h
@@ -2,7 +2,7 @@
* $Id: smkeys.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/sort.c b/pith/sort.c
index 8ac6aa25..4783b682 100644
--- a/pith/sort.c
+++ b/pith/sort.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: sort.c 1142 2008-08-13 17:22:21Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/sort.h b/pith/sort.h
index 7ea59321..4c936984 100644
--- a/pith/sort.h
+++ b/pith/sort.h
@@ -2,7 +2,7 @@
* $Id: sort.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/sorttype.h b/pith/sorttype.h
index 133c9c99..bd1477ee 100644
--- a/pith/sorttype.h
+++ b/pith/sorttype.h
@@ -2,7 +2,7 @@
* $Id: sorttype.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/state.c b/pith/state.c
index 2918116a..0c687d6a 100644
--- a/pith/state.c
+++ b/pith/state.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: state.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/state.h b/pith/state.h
index 9c6e66d1..5339f069 100644
--- a/pith/state.h
+++ b/pith/state.h
@@ -2,7 +2,7 @@
* $Id: state.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -145,6 +145,8 @@ struct pine {
unsigned fix_fixed_warning:1; /* offer to fix it */
unsigned user_says_cancel:1; /* user typed ^C to abort open */
+ unsigned in_xoauth2_auth:1; /* user is attempting xoauth2 authentication */
+ unsigned preserve_password:1; /* user is saving the password */
unsigned unseen_in_view:1;
unsigned start_in_context:1; /* start fldr_scrn in current cntxt */
diff --git a/pith/status.c b/pith/status.c
index b0927be3..d012aeb0 100644
--- a/pith/status.c
+++ b/pith/status.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: status.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/status.h b/pith/status.h
index 3067a673..693b3325 100644
--- a/pith/status.h
+++ b/pith/status.h
@@ -2,7 +2,7 @@
* $Id: status.h 770 2007-10-24 00:23:09Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/store.c b/pith/store.c
index 9051b8a4..a7ce38dc 100644
--- a/pith/store.c
+++ b/pith/store.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: store.c 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/store.h b/pith/store.h
index 235daa21..4b079c07 100644
--- a/pith/store.h
+++ b/pith/store.h
@@ -2,7 +2,7 @@
* $Id: store.h 1074 2008-06-04 00:08:43Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/stream.c b/pith/stream.c
index 16dfedd0..301c3037 100644
--- a/pith/stream.c
+++ b/pith/stream.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: stream.c 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -2295,8 +2291,8 @@ pine_imap_cmd_happened(MAILSTREAM *stream, char *cmd, long int flags)
sp_set_last_activity(stream, now);
if(!(flags & SC_EXPUNGEDEFERRED))
sp_set_last_expunged_reaper(stream, now);
-
- if(cmd && !strucmp(cmd, "NOOP")) /* but can interrupt this one */
+ /* but can interrupt these ones */
+ if(cmd && (!strucmp(cmd, "NOOP") || !strucmp(cmd, "LOGOUT")))
ps_global->can_interrupt = 1;
}
}
diff --git a/pith/stream.h b/pith/stream.h
index 898509fd..3604de09 100644
--- a/pith/stream.h
+++ b/pith/stream.h
@@ -2,7 +2,7 @@
* $Id: stream.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/string.c b/pith/string.c
index 8b793471..2ee82be0 100644
--- a/pith/string.c
+++ b/pith/string.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: string.c 910 2008-01-14 22:28:38Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -392,7 +388,7 @@ char *
short_str(char *src, char *buf, size_t buflen, int wid, WhereDots where)
{
char *ans;
- unsigned alen, first, second;
+ unsigned alen, first = 0, second = 0;
if(wid <= 0){
ans = buf;
@@ -1063,14 +1059,27 @@ static struct {
{"CDT", 3, -5, 0}, /* Central Daylight */
{"EST", 3, -5, 0}, /* Eastern Standard */
{"EDT", 3, -4, 0}, /* Eastern Daylight */
- {"JST", 3, 9, 0}, /* Japan Standard */
{"GMT", 3, 0, 0}, /* Universal Time */
{"UT", 2, 0, 0}, /* Universal Time */
-#ifdef IST_MEANS_ISREAL
+ {"WET", 3, 0, 0}, /* Western Europe Standard */
+ {"WEST", 4, 1, 0}, /* Western Europe Daylight */
+ {"CET", 3, 1, 0}, /* Central Europe Standard */
+ {"CEST", 4, 2, 0}, /* Central Europe Daylight */
+ {"EET", 3, 2, 0}, /* Eastern Europe Standard */
+ {"EEST", 4, 3, 0}, /* Eastern Europe Daylight */
+ {"FET", 3, 3, 0}, /* Further Eastern Europe Standard */
+ {"MSK", 3, 3, 0}, /* Moscow Standard Time */
+ {"BST", 3, 1, 0}, /* Brittish Summer Time */
+ {"JST", 3, 9, 0}, /* Japan Standard */
+#ifdef IST_MEANS_ISRAEL
{"IST", 3, 2, 0}, /* Israel Standard */
#else
#ifdef IST_MEANS_INDIA
{"IST", 3, 5, 30}, /* India Standard */
+#else
+#ifdef IST_MEANS_IRISH
+ {"IST", 3, 1, 0}, /* Irish Standard */
+#endif
#endif
#endif
{NULL, 0, 0},
@@ -1309,7 +1318,7 @@ convert_date_to_local(char *date)
{
struct tm *tm;
time_t ltime;
- static char datebuf[26];
+ static char datebuf[30];
ltime = date_to_local_time_t(date);
if(ltime == (time_t) -1)
@@ -1328,6 +1337,35 @@ convert_date_to_local(char *date)
}
+int
+timezone_offset_to_gmt(int *dst)
+{
+ int julian, offset;
+ struct tm *tm;
+ time_t now;
+
+ offset = 0;
+ /* find difference between gmtime and localtime, from c-client do_date */
+ now = time((time_t *) 0);
+ if(now != (time_t) -1){
+ tm = gmtime(&now);
+ if(tm != NULL){
+ offset = tm->tm_hour * 60 + tm->tm_min; /* minutes */
+ julian = tm->tm_yday;
+
+ tm = localtime(&now);
+ *dst = tm->tm_isdst; /* for converting back to our time */
+
+ offset = tm->tm_hour * 60 + tm->tm_min - offset;
+ if((julian = tm->tm_yday - julian) != 0)
+ offset += ((julian < 0) == (abs(julian) == 1)) ? -24*60 : 24*60;
+
+ offset *= 60; /* change to seconds */
+ }
+ }
+ return offset;
+}
+
time_t
date_to_local_time_t(char *date)
{
@@ -1337,31 +1375,8 @@ date_to_local_time_t(char *date)
static int zone = 1000000; /* initialize timezone offset */
static int dst;
- if(zone == 1000000){
- int julian;
- struct tm *tm;
- time_t now;
-
- zone = 0;
- /* find difference between gmtime and localtime, from c-client do_date */
- now = time((time_t *) 0);
- if(now != (time_t) -1){
- tm = gmtime(&now);
- if(tm != NULL){
- zone = tm->tm_hour * 60 + tm->tm_min; /* minutes */
- julian = tm->tm_yday;
-
- tm = localtime(&now);
- dst = tm->tm_isdst; /* for converting back to our time */
-
- zone = tm->tm_hour * 60 + tm->tm_min - zone;
- if((julian = tm->tm_yday - julian) != 0)
- zone += ((julian < 0) == (abs(julian) == 1)) ? -24*60 : 24*60;
-
- zone *= 60; /* change to seconds */
- }
- }
- }
+ if(zone == 1000000)
+ zone = timezone_offset_to_gmt(&dst);
parse_date(date, &d);
@@ -1425,7 +1440,7 @@ byte_string(long int bytes)
char *a, aa[5];
char *abbrevs = "GMK";
long i, ones, tenths;
- static char string[10];
+ static char string[50];
ones = 0L;
tenths = 0L;
@@ -1589,7 +1604,7 @@ fold(char *src, int width, int maxwidth, char *first_indent, char *indent, unsig
}
if(winner == -1 && (flags & FLD_NEXTSPC)){
- for(i = starting_point; winner == -1 && i <= strlen(next_piece) != '\0' && i < 512; i++){
+ for(i = starting_point; winner == -1 && (i <= strlen(next_piece)) != '\0' && i < 512; i++){
endptr = utf8_count_forw_width(next_piece, i, &got_width);
if(endptr && got_width == i && isspace((unsigned char) *endptr))
winner = (int) i;
@@ -2997,3 +3012,32 @@ convert_decimal_to_alpha (char *rn, size_t len, long n, char l)
if(i < len) rn[i] = '\0';
rn[len-1] = '\0';
}
+
+void
+remove_quotes(unsigned char *name)
+{
+ unsigned char *s, *bos, *eos;
+ int startquote, endquote;
+
+ startquote = endquote = 0;
+
+ for(s = name; s && *s; s++){
+ endquote = startquote && (*s == '"') ? 1 : 0;
+ if(endquote)
+ eos = s;
+ if(startquote == 0){
+ if(*s == '"')
+ startquote = 1;
+ if(startquote)
+ bos = s;
+ }
+ if(startquote && endquote){
+ if(bos == name && eos[1] == '\0'){
+ for(s = name + 1; *s && s < eos; s++)
+ *(s-1) = *s;
+ *(s-1) = '\0';
+ }
+ startquote = endquote = 0;
+ }
+ }
+}
diff --git a/pith/string.h b/pith/string.h
index 36440ea6..f9fc85c2 100644
--- a/pith/string.h
+++ b/pith/string.h
@@ -2,7 +2,7 @@
* $Id: string.h 769 2007-10-24 00:15:40Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -152,5 +152,7 @@ int read_octal(char **);
time_t date_to_local_time_t(char *);
void convert_decimal_to_roman (char *, size_t, long, char);
void convert_decimal_to_alpha (char *, size_t, long, char);
+int timezone_offset_to_gmt(int *);
+void remove_quotes(unsigned char *);
#endif /* PITH_STRING_INCLUDED */
diff --git a/pith/strlst.c b/pith/strlst.c
index 789b045a..b56b150c 100644
--- a/pith/strlst.c
+++ b/pith/strlst.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: strlst.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/strlst.h b/pith/strlst.h
index aa577c79..391b5e68 100644
--- a/pith/strlst.h
+++ b/pith/strlst.h
@@ -2,7 +2,7 @@
* $Id: strlst.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/takeaddr.c b/pith/takeaddr.c
index 64338ff7..95d67945 100644
--- a/pith/takeaddr.c
+++ b/pith/takeaddr.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: takeaddr.c 1012 2008-03-26 00:44:22Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -529,7 +525,7 @@ set_up_takeaddr(int cmd, struct pine *ps, MSGNO_S *msgmap, TA_S **ta_ret,
int *selected_num, int flags, int (*att_addr_f)(TA_S *, int))
{
long i;
- ENVELOPE *env;
+ ENVELOPE *env = NULL;
int how_many_selected = 0,
added, rtype = 0,
we_cancel = 0,
@@ -2098,6 +2094,8 @@ fill_in_ta(TA_S **old_current, struct mail_address *addr, int checked, char *pri
new_current->checked = checked != 0;
new_current->addr = copyaddr(addr);
decode_addr_names_to_utf8(new_current->addr);
+ if(new_current->addr && new_current->addr->personal)
+ remove_quotes(new_current->addr->personal);
if(addr->host[0] == '.')
new_current->strvalue = cpystr("Error in address (ok to try Take anyway)");
else{
diff --git a/pith/takeaddr.h b/pith/takeaddr.h
index 079116a4..575187c1 100644
--- a/pith/takeaddr.h
+++ b/pith/takeaddr.h
@@ -2,7 +2,7 @@
* $Id: takeaddr.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/tempfile.c b/pith/tempfile.c
index 96cf8256..2834cbd2 100644
--- a/pith/tempfile.c
+++ b/pith/tempfile.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: tempfile.c 770 2007-10-24 00:23:09Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/tempfile.h b/pith/tempfile.h
index 910f4d2a..f7c02a1a 100644
--- a/pith/tempfile.h
+++ b/pith/tempfile.h
@@ -3,7 +3,7 @@
*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/text.c b/pith/text.c
index 6d256420..679a7be7 100644
--- a/pith/text.c
+++ b/pith/text.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: text.c 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -570,7 +566,7 @@ delete_quotes(long int linenum, char *line, LT_INS_S **ins, void *local)
DELQ_S *dq;
char *lp;
int i, lines, not_a_quote = 0;
- size_t len;
+ size_t len = 0;
dq = (DELQ_S *) local;
if(!dq)
@@ -800,7 +796,7 @@ int
replace_quotes(long int linenum, char *line, LT_INS_S **ins, void *local)
{
char *lp = line, *prefix = NULL, *last_prefix = NULL;
- int no_more_quotes = 0, len, saw_quote = 0;
+ int no_more_quotes = 0, len = 0, saw_quote = 0;
if(ps_global->VAR_QUOTE_REPLACE_STRING){
get_pair(ps_global->VAR_QUOTE_REPLACE_STRING, &prefix, &last_prefix, 0, 0);
diff --git a/pith/text.h b/pith/text.h
index d9616787..1982ea8d 100644
--- a/pith/text.h
+++ b/pith/text.h
@@ -2,7 +2,7 @@
* $Id: text.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2007 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/thread.c b/pith/thread.c
index a4e4c3ff..7a96adde 100644
--- a/pith/thread.c
+++ b/pith/thread.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: thread.c 942 2008-03-04 18:21:33Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006-2008 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -720,7 +716,7 @@ PINETHRD_S *
msgno_thread_info(MAILSTREAM *stream, long unsigned int rawno,
PINETHRD_S *attached_to_thrd, unsigned int flags)
{
- PINELT_S **peltp;
+ PINELT_S **peltp = NULL;
MESSAGECACHE *mc;
if(!stream || rawno < 1L || rawno > stream->nmsgs)
diff --git a/pith/thread.h b/pith/thread.h
index d6d093b6..f4858ded 100644
--- a/pith/thread.h
+++ b/pith/thread.h
@@ -2,7 +2,7 @@
* $Id: thread.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/url.c b/pith/url.c
index 41405b0b..d7c34fda 100644
--- a/pith/url.c
+++ b/pith/url.c
@@ -1,11 +1,7 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: url.c 769 2007-10-24 00:15:40Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
* Copyright 2006-2007 University of Washington
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/pith/url.h b/pith/url.h
index e2833858..7fde2ee1 100644
--- a/pith/url.h
+++ b/pith/url.h
@@ -2,7 +2,7 @@
* $Id: url.h 764 2007-10-23 23:44:49Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/user.h b/pith/user.h
index a67a7511..ebde9145 100644
--- a/pith/user.h
+++ b/pith/user.h
@@ -2,7 +2,7 @@
* $Id: user.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/util.c b/pith/util.c
index 2f097591..1aa96266 100644
--- a/pith/util.c
+++ b/pith/util.c
@@ -1,10 +1,6 @@
-#if !defined(lint) && !defined(DOS)
-static char rcsid[] = "$Id: util.c 761 2007-10-23 22:35:18Z hubert@u.washington.edu $";
-#endif
-
/*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/pith/util.h b/pith/util.h
index 771f9ef4..850022b0 100644
--- a/pith/util.h
+++ b/pith/util.h
@@ -2,7 +2,7 @@
* $Id: util.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
*
* ========================================================================
- * Copyright 2013-2021 Eduardo Chappa
+ * Copyright 2013-2022 Eduardo Chappa
* Copyright 2006 University of Washington
*
* Licensed under the Apache License, Version 2.0 (the "License");