From 7fe712882b909931088a318c08041b0e7974a000 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sat, 2 Nov 2013 02:51:18 -0600 Subject: * Update to version 2.19.1 * Upgrade UW-IMAP to Panda IMAP from https://github.com/jonabbey/panda-imap. * Replace tabs by spaces in From and Subject fields to control for size in screen of these fields. Change only in index screen display. --- imap/src/osdep/dos/dummydos.c | 36 +++++++++++++++++------------------- imap/src/osdep/dos/env_dos.h | 32 +++++++++++++++----------------- imap/src/osdep/dos/tcp_dos.c | 30 +++++++++++++----------------- imap/src/osdep/dos/tcp_dwa.c | 32 ++++++++++++++------------------ imap/src/osdep/dos/tcp_wsk.c | 40 +++++++++++++++++----------------------- 5 files changed, 76 insertions(+), 94 deletions(-) (limited to 'imap/src/osdep/dos') diff --git a/imap/src/osdep/dos/dummydos.c b/imap/src/osdep/dos/dummydos.c index 4bf147b8..29f38d29 100644 --- a/imap/src/osdep/dos/dummydos.c +++ b/imap/src/osdep/dos/dummydos.c @@ -1,13 +1,5 @@ /* ======================================================================== - * Copyright 1988-2006 University of Washington - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * + * Copyright 2008-2011 Mark Crispin * ======================================================================== */ @@ -15,15 +7,20 @@ * Program: Dummy routines for DOS * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications - * University of Washington - * Administration Building, AG-44 - * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU * * Date: 24 May 1993 - * Last Edited: 30 August 2006 + * Last Edited: 8 April 2011 + * + * Previous versions of this file were + * + * Copyright 1988-2006 University of Washington + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * */ @@ -205,10 +202,10 @@ void dummy_list (MAILSTREAM *stream,char *ref,char *pat) void dummy_lsub (MAILSTREAM *stream,char *ref,char *pat) { void *sdb = NIL; - char *s,*t,test[MAILTMPLEN]; + char *s,*t,test[MAILTMPLEN],tmp[MAILTMPLEN]; int showuppers = pat[strlen (pat) - 1] == '%'; /* get canonical form of name */ - if (dummy_canonicalize (test,ref,pat) && (s = sm_read (&sdb))) do + if (dummy_canonicalize (test,ref,pat) && (s = sm_read (tmp,&sdb))) do if (*s != '{') { if (pmatch_full (s,test,'\\')) { if (pmatch (s,"INBOX")) mm_lsub (stream,NIL,s,LATT_NOINFERIORS); @@ -219,7 +216,8 @@ void dummy_lsub (MAILSTREAM *stream,char *ref,char *pat) if (pmatch_full (s,test,'\\')) mm_lsub (stream,'\\',s,LATT_NOSELECT); } } - while (s = sm_read (&sdb)); /* until no more subscriptions */ + /* until no more subscriptions */ + while (s = sm_read (tmp,&sdb)); } diff --git a/imap/src/osdep/dos/env_dos.h b/imap/src/osdep/dos/env_dos.h index bb0e8c0a..c24cbbb5 100644 --- a/imap/src/osdep/dos/env_dos.h +++ b/imap/src/osdep/dos/env_dos.h @@ -1,13 +1,5 @@ /* ======================================================================== - * Copyright 1988-2006 University of Washington - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * + * Copyright 2008-2010 Mark Crispin * ======================================================================== */ @@ -15,15 +7,21 @@ * Program: DOS environment routines * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications - * University of Washington - * Administration Building, AG-44 - * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU * * Date: 1 August 1988 - * Last Edited: 30 August 2006 + * Last Edited: 15 November 2010 + * + * Previous versions of this file were: + * + * Copyright 1988-2006 University of Washington + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * */ @@ -39,7 +37,7 @@ char *dos_default_gets (readfn_t f,void *stream,unsigned long size, GETS_DATA *md); long safe_write (int fd,char *buf,long nbytes); -long random (); +long random (void); #if _MSC_VER < 700 #define getpid random #endif diff --git a/imap/src/osdep/dos/tcp_dos.c b/imap/src/osdep/dos/tcp_dos.c index 062f260c..d5787be6 100644 --- a/imap/src/osdep/dos/tcp_dos.c +++ b/imap/src/osdep/dos/tcp_dos.c @@ -1,13 +1,5 @@ /* ======================================================================== - * Copyright 1988-2008 University of Washington - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * + * Copyright 2008-2010 Mark Crispin * ======================================================================== */ @@ -15,15 +7,19 @@ * Program: MS-DOS TCP/IP routines * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications - * University of Washington - * Administration Building, AG-44 - * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU * * Date: 11 April 1989 - * Last Edited: 13 January 2008 + * Last Edited: 3 April 2010 + * + * Previous versions of this file were: + * + * Copyright 1988-2008 University of Washington + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 */ static tcptimeout_t tmoh = NIL; /* TCP timeout handler routine */ @@ -420,7 +416,7 @@ char *tcp_localhost (TCPSTREAM *stream) char *tcp_canonical (char *name) { - return name; + return cpystr (name); } diff --git a/imap/src/osdep/dos/tcp_dwa.c b/imap/src/osdep/dos/tcp_dwa.c index 4275f27c..3d68c483 100644 --- a/imap/src/osdep/dos/tcp_dwa.c +++ b/imap/src/osdep/dos/tcp_dwa.c @@ -1,29 +1,25 @@ /* ======================================================================== - * Copyright 1988-2008 University of Washington - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * + * Copyright 2008-2010 Mark Crispin * ======================================================================== */ /* - * Program: Waterloo DOS TCP/IP routines + * Program: MS-DOS TCP/IP routines * * Author: Mark Crispin - * Networks and Distributed Computing - * Computing & Communications - * University of Washington - * Administration Building, AG-44 - * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU * * Date: 11 April 1989 - * Last Edited: 13 January 2008 + * Last Edited: 3 April 2010 + * + * Previous versions of this file were: + * + * Copyright 1988-2008 University of Washington + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 */ @@ -330,7 +326,7 @@ char *tcp_localhost (TCPSTREAM *stream) char *tcp_canonical (char *name) { - return name; + return cpystr (name); } diff --git a/imap/src/osdep/dos/tcp_wsk.c b/imap/src/osdep/dos/tcp_wsk.c index 90e206a9..226750cb 100644 --- a/imap/src/osdep/dos/tcp_wsk.c +++ b/imap/src/osdep/dos/tcp_wsk.c @@ -1,13 +1,5 @@ /* ======================================================================== - * Copyright 1988-2008 University of Washington - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * + * Copyright 2008-2010 Mark Crispin * ======================================================================== */ @@ -15,15 +7,19 @@ * Program: Winsock TCP/IP routines * * Author: Mark Crispin from Mike Seibel's Winsock code - * Networks and Distributed Computing - * Computing & Communications - * University of Washington - * Administration Building, AG-44 - * Seattle, WA 98195 - * Internet: MRC@CAC.Washington.EDU * * Date: 11 April 1989 - * Last Edited: 13 January 2008 + * Last Edited: 3 April 2010 + * + * Previous versions of this file were: + * + * Copyright 1988-2008 University of Washington + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 */ @@ -735,7 +731,7 @@ char *tcp_canonical (char *name) ret = (he = gethostbyname (lcase (strcpy (host,name)))) ? he->h_name : name; (*bn) (BLOCK_NONE,NIL); if (tcpdebug) mm_log ("DNS canonicalization done",TCPDEBUG); - return ret; + return cpystr(ret); } @@ -785,15 +781,13 @@ char *mylocalhost (void) char tmp[MAILTMPLEN]; if (!wsa_initted++) { /* init Windows Sockets */ WSADATA wsock; - if (WSAStartup (WSA_VERSION,&wsock)) { + if (WSAStartup (WSA_VERSION,&wsock)) wsa_initted = 0; - return "random-pc"; /* try again later? */ - } } - myLocalHost = cpystr ((gethostname (tmp,MAILTMPLEN-1) == SOCKET_ERROR) ? - "random-pc" : tcp_canonical (tmp)); + if (wsa_initted && gethostname (tmp,MAILTMPLEN-1) != SOCKET_ERROR) + myLocalHost = tcp_canonical (tmp)); } - return myLocalHost; + return myLocalHost ? myLocalHost : "random-pc"; } -- cgit v1.2.3-54-g00ecf