commit a735eb47649b72c346283694d3900cb8a57b9135eb339c4f88c5f380223b6844 Author: OBS User unknown Date: Mon Oct 1 02:26:09 2007 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alpine?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/adhere-to-prototypes.diff b/adhere-to-prototypes.diff new file mode 100644 index 0000000..a0ca51b --- /dev/null +++ b/adhere-to-prototypes.diff @@ -0,0 +1,11 @@ +--- alpine-0.999/imap/src/mlock/mlock.c 2006-08-31 02:21:48.000000000 +0000 ++++ alpine-0.999.fixed/imap/src/mlock/mlock.c 2007-07-31 23:30:08.000000000 +0000 +@@ -40,6 +40,8 @@ + #include + #include + #include ++#include ++#include + + #define LOCKTIMEOUT 5 /* lock timeout in minutes */ + #define LOCKPROTECTION 0775 diff --git a/all.patch.bz2 b/all.patch.bz2 new file mode 100644 index 0000000..ae2bf15 --- /dev/null +++ b/all.patch.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be1701721b410421e8cc69c9f21f2e234e8dc8a782fb6e0e317fe8caa064f842 +size 134906 diff --git a/alpine-0.9999.tar.bz2 b/alpine-0.9999.tar.bz2 new file mode 100644 index 0000000..dad0fbf --- /dev/null +++ b/alpine-0.9999.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a63e7ee0fd371c728c1a1cf769276be3913a12b0d6fe2f30d7a826604ac6533c +size 4957096 diff --git a/alpine-upstream-postponed-sendcharset.diff b/alpine-upstream-postponed-sendcharset.diff new file mode 100644 index 0000000..d5973b8 --- /dev/null +++ b/alpine-upstream-postponed-sendcharset.diff @@ -0,0 +1,50 @@ +This is a patch from upstream which is likely included in the next +version (likely to be named 1.0): + +From: Steve Hubert +To: Alpine Alpha List +Date: Thu, 6 Sep 2007 09:58:58 -0700 (PDT) +Subject: Re: Content-Type different after postponing + +I believe the attached patch should fix this. Thanks. + +From: Andreas Schamanek +Date: Thu, 6 Sep 2007 20:13:47 +0200 (CEST) +I have just tested it, and it works perfectly. + +From: Gerald Pfeifer + +Sorry, it doesn't. Also with this patch I am still getting + + Content-Type: TEXT/PLAIN; charset=ISO-8859-15 + +when sending mail directly that contains an Umlaut, and + + Content-Type: TEXT/PLAIN; CHARSET=UTF-8 + +after posting and resuming the same message. + +From: Steve Hubert + +The first patch only worked if Downgrade Multipart to Text was turned on. +This should fix the other case. + +Index: pith/send.c +=================================================================== +--- pith/send.c (revision 709) ++++ pith/send.c (working copy) +@@ -843,6 +843,14 @@ + return(redraft_cleanup(streamp, TRUE, flags)); + } + ++ if((charset = rfc2231_get_param(part->body.parameter,"charset",NULL,NULL)) != NULL){ ++ /* let outgoing routines decide on charset */ ++ if(!strucmp(charset, "US-ASCII") || !strucmp(charset, "UTF-8")) ++ set_parameter(&part->body.parameter, "charset", NULL); ++ ++ fs_give((void **) &charset); ++ } ++ + ps_global->postpone_no_flow = 1; + get_body_part_text(stream, &b->nested.part->body, + cont_msg, "1", 0L, pc, NULL, NULL, GBPT_NONE); diff --git a/alpine.changes b/alpine.changes new file mode 100644 index 0000000..06fa262 --- /dev/null +++ b/alpine.changes @@ -0,0 +1,22 @@ +------------------------------------------------------------------- +Wed Sep 19 14:32:24 CEST 2007 - bk@suse.de + +- Remove files with unclear license from packaged sources (#308533) +- Add small bug fix: Postponed messages which were labelled as UTF-8 +- Spec file cleanup: Comments improved, obsoleted some warning flags + +------------------------------------------------------------------- +Tue Sep 4 17:15:02 CEST 2007 - bk@suse.de + +- Update to final prerelease 0.9999 with updates from Eduardo Chappa + +------------------------------------------------------------------- +Thu Aug 9 12:42:41 CEST 2007 - bk@suse.de + +- add a number of critcally needed fixes for some crashes (and more) + +------------------------------------------------------------------- +Thu Aug 2 18:14:38 CEST 2007 - bk@suse.de + +- initial version 0.999 + assorted feature patches and some fixes + diff --git a/alpine.desktop b/alpine.desktop new file mode 100644 index 0000000..b4f2466 --- /dev/null +++ b/alpine.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Categories=ConsoleOnly;Email +Encoding=UTF-8 +Exec=alpine +Icon=alpine +Type=Application +Name=Alpine +GenericName=Mail Client +Terminal=true diff --git a/alpine.png b/alpine.png new file mode 100644 index 0000000..255e17d --- /dev/null +++ b/alpine.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b623cb2197d6f07d4b8d13a0c38636c089631851c4adf450167a1b6e92414e51 +size 2460 diff --git a/alpine.spec b/alpine.spec new file mode 100644 index 0000000..df79124 --- /dev/null +++ b/alpine.spec @@ -0,0 +1,384 @@ +# +# spec file for package alpine (Version 0.9999) +# +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: alpine + +# +# Package configuration: +# +%define obsolete_pine 0 +%define provide_pico_and_pilot 0 +%define build_alpined 0 +# For debugging only: +%define use_mudflap 0 +%define build_vanilla 0 +%define apply_all_in_one_patch 1 +# +Summary: Alpine mail user agent +BuildRequires: imap-devel krb5-devel libgssapi ncurses-devel openldap2-devel openssl-devel pam-devel update-desktop-files +%if %build_alpined +BuildRequires: blt tcl-devel +%endif +%if %{use_mudflap} +BuildRequires: libmudflap +%endif +# pgp4pine requires pine: +Provides: pine +%if %obsolete_pine +Obsoletes: pine4 +Provides: pine4 +%else +Conflicts: pine4 +%endif +Version: 0.9999 +Release: 6 +License: The Apache Software License +Group: Productivity/Networking/Email/Clients +AutoReqProv: on +Url: http://www.washington.edu/alpine/ +# +# Fix for #308533: Remove files with unclear license, which are not needed +# from the distributed source tarball: +# +%define USE_CLEANED_UP_TARBALL_FORBUILD 1 +%if %USE_CLEANED_UP_TARBALL_FORBUILD != 1 +Source: ftp://ftp.cac.washington.edu/alpine/%{name}-%{version}.tar.bz2 +%else +#This caret is only here to prevent confusing spec file checking tools: +#%( + cd %{_sourcedir};cp %{name}-%{version}{,-build}.tar.bz2 + bunzip2 %{name}-%{version}-build.tar.bz2 + tar --delete --file=%{name}-%{version}-build.tar \ + ./alpine-0.9999/pico/msmem.c ./alpine-0.9999/imap/docs + echo >%{name}-%{version}.README.SUSE <compile-warnings-allowed.log +fi +# Upstream patches: +%patch200 +# +# Show that this is the openSUSE build of alpine and which version: +# +%patch103 -p1 +echo %{version}-openSUSE-%{release} >VERSION +# +# Apply Eduardo Chappa's patch set as one patch (501 documents his patch): +# +%if %{apply_all_in_one_patch} +%patch500 -p1 +%patch501 -p1 +%endif +# +# This simply adds a colon if it's missing in the all.patch: +# +[ $(grep -c "including creation date of the patch is$" pith/pine.hlp) = 1 ] && +sed -i 's/including creation date of the patch is$/&:/' pith/pine.hlp +# +# SuSE patches - warning fixes, etc: +# +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch10 -p1 +%patch20 -p1 +%patch40 -p1 +%patch60 -p1 +%patch90 -p1 +%endif +# +# End of non-vanilla-patch section +# + +%build +%if %{suse_version} <= 1010 +%define _host_os %{_os}%{?_gnu} +%define _host %{_host_cpu}-%{_host_vendor}-%{_host_os} +%endif +autoreconf -fi +export CFLAGS="${RPM_OPT_FLAGS/-O2/-Os}" +# +# Comments on disabled warnings: The disabled warnings are rather harmless +# (If they were not, alpine would not work at all, they are trigged in mass, +# because until recently developers did use gcc-3.x exclusivley) +# and disabling them allows one to focus on the warnings which could indicate +# real bugs. By alpine-0.9999, several warnings have been eliminated however: +# +export CFLAGS="$CFLAGS \ +%if %{suse_version} >= 1010 +-Wno-strict-aliasing -Wno-pointer-sign -Wno-unused \ +%endif +%if %{suse_version} == 1030 +-Wno-address \ +%endif +%if %{use_mudflap} +-fmudflap -fmudflapir \ +%endif +" +# +# On -Waddress: +# +# Added with gcc-4.2: It warns when the address of a variable (not a pointer) +# is used in an expression. Since addresses of variables are # always non-zero, +# they are always true and can be safely removed from the expression, +# but the code is safe nontheless. +# +# -Waddress generates >100 warnings in alpine and we disabled them to +# concentrate on the really important warnings which could be real bugs better. +# +# +# Used in conjunction with signal-and-panic-improvements.diff: +# +export LDFLAGS="-rdynamic" # -rdynamic is used for backtrace_symbols: +# +# In case one wants to compile alpine with libmudflap to instrument all risky +# pointer/array dereferencing operations, some standard library string/heap +# functions, and some other associated constructs with range/validity tests. +# Modules so instrumented should be immune to buffer overflows, invalid heap +# use, and some other classes of C/C++ programming errors. Disabled by default, +# but may be used for debugging issues which are otherwise hard to catch: +# +%if %{use_mudflap} +export EXTRALDFLAGS="-lmudflap" +LDFLAGS="$LDFLAGS $EXTRALDFLAGS" +%endif +%configure --with-tcl-lib=tcl8.4 \ +%if %{use_mudflap} + --without-pthread \ +%endif + --with-smtp-msa=/usr/sbin/sendmail \ + --with-password-prog=/usr/bin/passwd \ + --with-npa=/usr/bin/inews \ + --with-spellcheck-prog="please set Speller to eg. 'aspell -c' in SETUP/Configuration"\ + --with-system-pinerc=/etc/pine.conf \ + --with-system-fixed-pinerc=/etc/pine.conf.fixed \ + --with-debug-level=0 \ + --with-debug-files=2 \ + --with-file=.alpine-debug \ + --with-default-mail-directory=Mail \ + --with-passfile=.pinepw || { + grep -B9 -A20 'failed program was' config.log | grep -A24 checking + exit 5 +} +# +# imap does not use CFLAGS from configure, needs EXTRAFCLAGS: +# +make EXTRACFLAGS="$CFLAGS" EXTRALDFLAGS="$EXTRALDFLAGS" 2>&1 | tee make.log | + grep -v -e '^mv ' -e '/usr/bin/[a-z]*' -e '^echo ' -e ' -l' | + sed 's/.*gcc .* -o .*\.o /-----> /;/^-----/s/;.*//;/^then/d' + +%install +install -D -m755 alpine/alpine $RPM_BUILD_ROOT%{_bindir}/alpine +# +# When called as alpinef, alpine uses function keys instead of Control keys: +# +ln $RPM_BUILD_ROOT%{_bindir}/alpine $RPM_BUILD_ROOT%{_bindir}/alpinef +install -m755 alpine/{rpload,rpdump} $RPM_BUILD_ROOT%{_bindir} +install -m755 imap/mailutil/mailutil $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1 +install -m644 doc/{alpine.1,rpdump.1,rpload.1} $RPM_BUILD_ROOT%{_mandir}/man1/ +install -m644 imap/src/mailutil/mailutil.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT/usr/share/pixmaps/%name.png +install -D -m644 %{SOURCE2} $RPM_BUILD_ROOT/usr/share/applications/%name.desktop +%suse_update_desktop_file %name +%if %obsolete_pine +ln -sf alpine $RPM_BUILD_ROOT%{_bindir}/pine +%endif +%if %provide_pico_and_pilot +install -m755 pico/{pico,pilot} $RPM_BUILD_ROOT%{_bindir} +install -m644 doc/{pico.1,pilot.1} $RPM_BUILD_ROOT%{_mandir}/man1/ +%endif + +%check +#since where are no logs in the package at the moment, there are no checks, +#but the warning logs can be recreated for regresstion tracking in warnings: +if [ -s %{_sourcedir}/compile-warnings-%{suse_version}-%{_arch}.log ]; then + grep -e '^[a-z0-9_]*.[cho]:' -e 'Entering directory' make.log | + sed "s/^make\[.\]: //;/Entering directory/s/[\`']//g;" \ + >compile-warnings-%{suse_version}-%{_arch}.log + # Sort the combined allowed warnings: + grep -v -e 'In function' -e 'Entering directory' \ + compile-warnings-allowed.log | + sort -u > compile-warnings-%{suse_version}-%{_arch}-reference.sort + # Sort the warnings which occured now: + grep -v -e 'In function' -e 'Entering directory' \ + compile-warnings-%{suse_version}-%{_arch}.log | + sed 's/:[0-9]*//' | sort -u \ + >compile-warnings-%{suse_version}-%{_arch}-thisbuild.sort + # diff them: + diff compile-warnings-%{suse_version}-%{_arch}-{reference,thisbuild}.sort | + tee compile-warnings-%{suse_version}-%{_arch}-sorted.diff + if test -s compile-warnings-%{suse_version}-%{_arch}-sorted.diff; then + grep '^>' compile-warnings-%{suse_version}-%{_arch}-sorted.diff >new-warnings ||: + if [ -s new-warnings ]; then + diff -u %{_sourcedir}/compile-warnings-%{suse_version}-%{_arch}.log \ + compile-warnings-%{suse_version}-%{_arch}.log || + echo "New warnings:" + cat new-warnings + sed 's/> //;s/:/:[0-9]*:/' new-warnings >new-warnings.pattern + : diff: %_builddir}/compile-warnings-%{suse_version}-%{_arch}-sorted.diff + grep -B1 -f new-warnings.pattern compile-warnings-%{suse_version}-%{_arch}.log + grep -e 'Entering directory' -f new-warnings.pattern \ + compile-warnings-%{suse_version}-%{_arch}.log | + grep -B1 -f new-warnings.pattern | + tee warnings.where + while IFS='[: ]' read file line message; do + if [ "$file" = Entering ]; then + dir="${message#%_builddir/%buildsubdir/}" + else + path="$dir/$file" + echo "$path:$line: $message" >>warnings-with-code + head -"$line" "$path"|tail -1 >>warnings-with-code + fi + done ++#include + + + static char locale_charmap[50]; diff --git a/operation-may-be-undefined-warning.diff b/operation-may-be-undefined-warning.diff new file mode 100644 index 0000000..eb5358f --- /dev/null +++ b/operation-may-be-undefined-warning.diff @@ -0,0 +1,15 @@ +--- alpine-0.999/imap/src/c-client/mail.c ++++ alpine-0.999/imap/src/c-client/mail.c +@@ -2795,8 +2795,10 @@ + /* parse time */ + d = strtoul (s+1,(char **) &s,10); + if (*s != ':') return NIL; +- m = strtoul (++s,(char **) &s,10); +- y = (*s == ':') ? strtoul (++s,(char **) &s,10) : 0; ++ s++; ++ m = strtoul (s,(char **) &s,10); ++ s++; ++ y = (*s == ':') ? strtoul (s,(char **) &s,10) : 0; + /* validity check time */ + if ((d > 23) || (m > 59) || (y > 60)) return NIL; + /* set values in elt */ diff --git a/patches.diff b/patches.diff new file mode 100644 index 0000000..d1fcd46 --- /dev/null +++ b/patches.diff @@ -0,0 +1,36 @@ +--- alpine-0.999/pith/pine.hlp ++++ alpine-0.999/pith/pine.hlp +@@ -163,6 +163,33 @@ + is available as is a world wide web based version designed to run under the + Apache web server. + ++

Note: This version of Alpine has been built for openSUSE with ++patches of Eduardo Chappa for latest bugfixes and enhanced functionality. ++Press the ENTER key while the link above is hightlighted for more information. ++ ++

If you have any problems with this release of Pine, please search ++the Novell bugzilla using the advanced search form at ++ ++http://bugzilla.novell.com/query.cgi and enter "alpine" ++into the search field for "Summary" and in the Impact Section, unselect ++all preselections in the Status list by holding the Control key ++while clicking on NEW, ASSIGNED, NEEDINFO an REOPENED. Click one ++of the Search buttons in the form then. You should get a list of all ++bugs ever reported for alpine, including their their status and get ++full information on them. ++ ++

If your issue is not found in the Novell Bugzilla, please sign in ++to the Novell Bugzilla and report the issue. ++ ++Please also have a look at the ++ ++Alpine-alpha mailing list archiveand you can also report and discuss ++the issue directly on the ++ ++Alpine-alpha mailing list. Be sure to include the full openSUSE version ++of alpine (found at the top of this release notes page) in your first mail. ++ +

New in Alpine

+ + Version diff --git a/pico-fix-spurious-undef-warnings.diff b/pico-fix-spurious-undef-warnings.diff new file mode 100644 index 0000000..dc19091 --- /dev/null +++ b/pico-fix-spurious-undef-warnings.diff @@ -0,0 +1,63 @@ +--- alpine-0.999/pico/osdep/shell.c 2007/08/02 12:09:33 1.1 ++++ alpine-0.999/pico/osdep/shell.c 2007/08/02 12:10:03 +@@ -90,7 +90,6 @@ bktoshell(void) /* suspend MicroEMACS a + + if(gmode&MDSPWN){ + char *shell; +- int dummy; + + vttidy(); + movecursor(0, 0); +@@ -98,7 +97,7 @@ bktoshell(void) /* suspend MicroEMACS a + printf("\n\n\nUse \"exit\" to return to Pi%s\n", + (gmode & MDBRONLY) ? "lot" : "co"); + system((shell = (char *)getenv("SHELL")) ? shell : "/bin/csh"); +- rtfrmshell(dummy); /* fixup tty */ ++ rtfrmshell(0); /* fixup tty */ + } + else { + movecursor(term.t_nrow-1, 0); +// Those may be obsolete now: +--- alpine-0.999/include/system.h 2007/08/03 13:16:15 1.1 ++++ alpine-0.999/include/system.h 2007/08/03 13:19:03 +@@ -381,4 +381,12 @@ + # define LOCAL_PASSWD_CACHE + #endif + ++/* ++ * Shuts up spurious ++ * "warning: suggest parentheses around assignment used as truth value" ++ * which occurs ing gcc4.2.1 and older when an assigment is used in a ++ * if, which works just fine and is not iterpreted as always true: ++ */ ++#define if(x) if((x)) ++#define while(x) while((x)) + #endif /* _SYSTEM_INCLUDED */ +--- alpine-0.999/imap/src/c-client/mail.h 2007/08/03 13:42:06 1.1 ++++ alpine-0.999/imap/src/c-client/mail.h 2007/08/03 13:42:57 +@@ -1829,3 +1829,11 @@ + int PSOUT (char *s); + int PSOUTR (SIZEDTEXT *s); + int PFLUSH (void); ++/* ++ * Shuts up spurious ++ * "warning: suggest parentheses around assignment used as truth value" ++ * which occurs ing gcc4.2.1 and older when an assigment is used in a ++ * if, which works just fine and is not iterpreted as always true: ++ */ ++#define if(x) if((x)) ++#define while(x) while((x)) +--- alpine-0.999/imap/src/osdep/unix/os_slx.h 2007/08/03 13:54:41 1.1 ++++ alpine-0.999/imap/src/osdep/unix/os_slx.h 2007/08/03 13:55:38 +@@ -65,3 +65,11 @@ + #include "ftl.h" + #include "nl.h" + #include "tcp.h" ++/* ++ * Shuts up spurious ++ * "warning: suggest parentheses around assignment used as truth value" ++ * which occurs ing gcc4.2.1 and older when an assigment is used in a ++ * if, which works just fine and is not iterpreted as always true: ++ */ ++#define if(x) if((x)) ++#define while(x) while((x)) diff --git a/pico-stripwhitespace.diff b/pico-stripwhitespace.diff new file mode 100644 index 0000000..f5732ed --- /dev/null +++ b/pico-stripwhitespace.diff @@ -0,0 +1,33 @@ +--- pine4.61/pico/pico.c 2004/08/12 15:24:12 1.1 ++++ pine4.61/pico/pico.c 2004/08/12 15:24:42 +@@ -898,30 +898,6 @@ + } + + /* +- * Remove all trailing white space from the text +- */ +-int +-stripwhitespace(void) +-{ +- int i; +- LINE *cur_line = lforw(curbp->b_linep); +- +- do{ +- /* we gotta test for the sigdash case here */ +- if(!(cur_line->l_used == 3 && +- lgetc(cur_line, 0).c == '-' && +- lgetc(cur_line, 1).c == '-' && +- lgetc(cur_line, 2).c == ' ')) +- for(i = cur_line->l_used - 1; i >= 0; i--) +- if(ucs4_isspace(lgetc(cur_line, i).c)) +- cur_line->l_used--; +- else +- break; +- }while((cur_line = lforw(cur_line)) != curbp->b_linep); +- return 0; +-} +- +-/* + * Abort. + * Beep the beeper. Kill off any keyboard macro, etc., that is in progress. + * Sometimes called as a routine, to do general aborting of stuff. diff --git a/pine-expression-warnings.diff b/pine-expression-warnings.diff new file mode 100644 index 0000000..61f1ea8 --- /dev/null +++ b/pine-expression-warnings.diff @@ -0,0 +1,29 @@ +--- ./alpine.c 2007-06-28 17:39:01.000000000 +0000 ++++ alpine-0.999/alpine/alpine.c 2007-08-02 01:48:23.000000000 +0000 +@@ -2161,7 +2162,7 @@ do_menu(int quick_draw, Pos *cursor_pos, + utf8_to_width(buf2, LEGAL_NOTICE, sizeof(buf2), + ps->ttyo->screen_cols-3, NULL); + PutLine0(ps->ttyo->screen_rows - (FOOTER_ROWS(ps)+1), +- MAX(0, ((ps->ttyo->screen_cols-utf8_width(buf2))/2)), ++ MAX(0, ((ps->ttyo->screen_cols-(int)utf8_width(buf2))/2)), + buf2); + } + +--- ./filter.c 2007-06-01 22:42:27.000000000 +0000 ++++ alpine-0.999/pith/filter.c 2007-08-02 01:10:21.000000000 +0000 +@@ -178,12 +178,12 @@ static jmp_buf gf_error_state; + + #define GF_END(FI, FO) (GF_OP_END(FI), GF_IP_END(FO)) + +-#define GF_FLUSH(F) ((GF_IP_END(F), (*(F)->f)((F), GF_DATA), \ +- GF_IP_INIT(F), GF_EIB_INIT(F)) ? 1 : 0) ++#define GF_FLUSH(F) (GF_IP_END(F), (*(F)->f)((F), GF_DATA), \ ++ GF_IP_INIT(F), GF_EIB_INIT(F)) + #define GF_FLUSH_GLO(F) ((GF_IP_END_GLO(F), (*(F)->f)((F), GF_DATA), \ + GF_IP_INIT_GLO(F), GF_EIB_INIT_GLO(F)) ? 1 : 0) + +-#define GF_PUTC(F, C) ((int)(*ip++ = (C), (ip >= eib) ? GF_FLUSH(F) : 1)) ++#define GF_PUTC(F, C) ((int)(*ip++ = (C), (ip >= eib) ? (GF_FLUSH(F) ? 1 : 0) : 1)) + #define GF_PUTC_GLO(F, C) ((int)(*(*ipp)++ = (C), ((*ipp) >= (*eibp)) ? GF_FLUSH_GLO(F) : 1)) + + /* diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4 diff --git a/signal-and-panic-improvements.diff b/signal-and-panic-improvements.diff new file mode 100644 index 0000000..3c8ce8e --- /dev/null +++ b/signal-and-panic-improvements.diff @@ -0,0 +1,84 @@ +########################################################################## +# This patch generates a backtrace on abort and if core file dumping is +# enabled, it also write the backtrace to a temporary file. +########################################################################## + +# +# Manual page of the used glibc backtrace function: +# +http://www.gnu.org/software/libc/manual/html_node/Backtraces.html + +--- signal.c ++++ alpine-0.999/alpine/signal.c +@@ -181,13 +181,7 @@ auger_in_signal(int sig) + end_signals(1); /* don't catch any more signals */ + imap_flush_passwd_cache(FALSE); + +-#if defined(SIGNALHASARG) +- s = comatose(sig); +-#else +- s = "?"; +-#endif +- +- snprintf(buf, sizeof(buf), "Received abort signal(sig=%s)", s); ++ snprintf(buf, sizeof(buf), "Received abort signal(sig=%d)", sig); + buf[sizeof(buf)-1] = '\0'; + + panic(buf); /* clean up and get out */ +--- alpine-0.999/alpine/alpine.c ++++ alpine-0.999/alpine/alpine.c +@@ -15,6 +15,7 @@ static char rcsid[] = "$Id: alpine.c 615 + * ======================================================================== + */ + ++#include + #include "headers.h" + + #include "../pith/newmail.h" +@@ -3274,6 +3275,46 @@ panic(char *message) + fprintf(stderr, "\n\n%s\n", buf); + #endif + ++ { ++ void *array[40]; ++ size_t size, i; ++ char **strings; ++ struct rlimit rlim; ++ ++ size = backtrace (array, sizeof(array)); ++ strings = backtrace_symbols (array, size); ++ ++ fprintf(stderr, "Backtrace (%zd stack frames):\n", size); ++ for (i = 0; i < size; i++) ++ fprintf(stderr, "%s\n", strings[i]); ++ ++ if (getrlimit(RLIMIT_CORE, &rlim)) ++ perror("getrlimit(RLIMIT_CORE)"); ++ else { ++ if (rlim.rlim_cur != 0) { ++ umask(S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); ++ char filename[] = "/tmp/alpine-backtrace.XXXXXX"; ++ int fd = mkstemp(filename); ++ if (fd == -1) ++ perror("mkstemp for backtrace"); ++ else { ++ FILE* btf = fdopen(fd, "w"); ++ if (!btf) ++ perror("fdopen for backtrace"); ++ else { ++ fprintf(btf, "%s\n", buf); ++ fprintf(btf, "Backtrace (%zd stack frames):\n", size); ++ for (i = 0; i < size; i++) ++ fprintf(btf, "%s\n", strings[i]); ++ fclose(btf); ++ fprintf(stderr, "Saved backtrace in: %s\n", filename); ++ } ++ close(fd); ++ } ++ } ++ } ++ } ++ + #ifdef DEBUG + if(debugfile){ + save_debug_on_crash(debugfile, recent_keystroke); diff --git a/support-long-version.diff b/support-long-version.diff new file mode 100644 index 0000000..ef1b968 --- /dev/null +++ b/support-long-version.diff @@ -0,0 +1,32 @@ +--- alpine-0.999/pith/state.h 2007/08/08 18:35:37 1.1 ++++ alpine-0.999/pith/state.h 2007/08/08 18:36:06 +@@ -98,8 +98,8 @@ + SP_S s_pool; /* stream pool */ + + char inbox_name[MAXFOLDER+1]; +- char pine_pre_vers[10]; /* highest version previously run */ +- char vers_internal[10]; ++ char pine_pre_vers[20]; /* highest version previously run */ ++ char vers_internal[20]; + + MAILSTREAM *mail_stream; /* ptr to current folder stream */ + MSGNO_S *msgmap; /* ptr to current message map */ +--- alpine-0.999/pith/conf.c 2007/08/08 18:27:29 1.1 ++++ alpine-0.999/pith/conf.c 2007/08/08 18:34:59 +@@ -2330,9 +2330,14 @@ + && ps->vers_internal[1] == '.' + && isdigit((unsigned char)ps->vers_internal[2]) + && isdigit((unsigned char)ps->vers_internal[3]) +- && isalpha((unsigned char)ps->vers_internal[4]) +- && strncmp(VAR_LAST_VERS_USED, ps->vers_internal, 4) >= 0)){ ++ && isdigit((unsigned char)ps->vers_internal[4]) ++ && ps->vers_internal[5] == '-' ++ && strncmp(VAR_LAST_VERS_USED, ps->vers_internal, 5) >= 0)){ + ps->show_new_version = 0; ++ /* But if the version string changed at all, update config */ ++ if (strcmp(VAR_LAST_VERS_USED, ps->vers_internal)) ++ set_variable(V_LAST_VERS_USED, ps->vers_internal, 1, 1, ++ ps_global->ew_for_except_vars); + } + /* Otherwise just do lexicographic comparision... */ + else if(VAR_LAST_VERS_USED