+ Minor changes to Smakefile (REL)
+ Use localtime over gmtime for speed (MLT)
+ Change default printer on Amiga (REL/MLT)
* New "sigdashes" tinrc variable (REL)
* New metamail tinrc variables (REL)
+ Obsolete amiga: target removed from Makefile (MLT)
+ time() written to replace slow library routine (MLT)
+ pipes improved to used named pipes (REL)
* art.c made header parsing case insensitive (MLT)
* art.c don't call str_dup with a blank string (MLT)
* attrib.c speed up reading attribute file (MLT)
* config.c speed up reading tinrc file (MLT)
+ curses.c patched for amiga profiler (MLT)
* filter.c speed up reading filter file (MLT)
* hashstr.c speed up hash function and reduce mallocs (MLT)
* memory.c change calloc() to malloc() for speed (MLT)
* misc.c change copy_fp() to be quicker copying files (MLT)
* stricmp() and str_lwr() speed improved (MLT)
* newsrc.c small bug fixed (showed up after changing malloc call!) (MLT)
* page.c asking for metamail now configurable (REL)
* match_header speed improved (MLT)
* pgp.c one too many "void"s removed. (MLT)
* sigfile.c changed to configure sigdashes (REL)

diff -cr 950726/amiga/smakefile 950726.new/amiga/smakefile
*** 950726/amiga/smakefile	Fri Jul 28 05:20:18 1995
--- 950726.new/amiga/smakefile	Fri Jul 28 07:20:01 1995
***************
*** 1,5 ****
  #
! # $VER: tin_makefile 1.3B950419
  #
  # This is especially for use with the SAS/C developing system
  # version 6.50 and above
--- 1,5 ----
  #
! # $VER: tin_makefile 1.3 (17.7.95)
  #
  # This is especially for use with the SAS/C developing system
  # version 6.50 and above
***************
*** 15,23 ****
  # Include the next two lines to enable an NNTP version of TIN.
  # To use AS225 rather than AmiTCP, also include "def AS225".
  
! # NNTPINC  = idir=netinclude:
! # NNTPDEF  = def NNTP_ABLE def INEWS_MAIL_DOMAIN="$$DOMAIN" \
! # 	def INEWS_MAIL_GATEWAY=""
  
  # Next line enables tind to be created
  # NB: change PROJECT and GSTFILE to tind also!
--- 15,23 ----
  # Include the next two lines to enable an NNTP version of TIN.
  # To use AS225 rather than AmiTCP, also include "def AS225".
  
! NNTPINC  = idir=netinclude:
! NNTPDEF  = def NNTP_ABLE def INEWS_MAIL_DOMAIN="$$DOMAIN" \
! 	def INEWS_MAIL_GATEWAY=""
  
  # Next line enables tind to be created
  # NB: change PROJECT and GSTFILE to tind also!
***************
*** 37,43 ****
  #
  
  SCOPTIONS = strmer data=near parms=register nover errrexx ignore=93,104,105 \
! 			nostkchk idir=$(INCDIR) $(NNTPINC) gst=$(GSTFILE) cpu=$(CPU)
  
  # comment the next two lines, for the final release
  
--- 37,43 ----
  #
  
  SCOPTIONS = strmer data=near parms=register nover errrexx ignore=93,104,105 \
! 			idir=$(INCDIR) $(NNTPINC) gst=$(GSTFILE) cpu=$(CPU)
  
  # comment the next two lines, for the final release
  
diff -cr 950726/include/amiga.h 950726.new/include/amiga.h
*** 950726/include/amiga.h	Fri Jul 28 05:20:22 1995
--- 950726.new/include/amiga.h	Fri Jul 28 07:21:18 1995
***************
*** 58,63 ****
--- 58,65 ----
  /* There are two currently unused signals we can define */
  #define SIGWINCH	_SIG_MAX
  
+ #define localtime gmtime
+ 
  extern DIR *opendir (char *name);
  extern struct dirent *readdir (DIR *di);
  extern void closedir (DIR *di);
***************
*** 71,77 ****
  extern int getpid(void);
  extern int setenv(char *, char *);
  extern char *mktemp(char *);
! extern int umask(int);
  
  extern int optind;
  extern char *optarg;
--- 73,79 ----
  extern int getpid(void);
  extern int setenv(char *, char *);
  extern char *mktemp(char *);
! extern unsigned short umask(unsigned short);
  
  extern int optind;
  extern char *optarg;
diff -cr 950726/include/extern.h 950726.new/include/extern.h
*** 950726/include/extern.h	Tue Jun 20 05:38:24 1995
--- 950726.new/include/extern.h	Fri Jul 28 05:45:36 1995
***************
*** 855,860 ****
--- 855,861 ----
  extern int show_description;
  extern int show_last_line_prev_page;
  extern int show_only_unread_groups;
+ extern int sigdashes;
  extern int space_mode;
  extern int start_editor_offset;
  extern int start_line_offset;
***************
*** 874,879 ****
--- 875,884 ----
  extern int verbose;
  extern int update_fork;
  extern int use_keypad;
+ #ifdef HAVE_METAMAIL
+ extern int use_metamail;
+ extern int ask_for_metamail;
+ #endif
  extern int use_mouse;
  extern int check_any_unread;
  extern int start_any_unread;
***************
*** 885,891 ****
  extern int xcol;
  extern int xrow;
  extern int reread_active_file_secs;
- extern int use_metamail;
  
  extern long *base;
  extern time_t new_newnews_time;
--- 890,895 ----
diff -cr 950726/include/proto.h 950726.new/include/proto.h
*** 950726/include/proto.h	Fri Jul 28 05:20:24 1995
--- 950726.new/include/proto.h	Fri Jul 28 08:09:19 1995
***************
*** 161,167 ****
  extern void show_group_title P_((int clear_title));
  /* ./hashstr.c */
  extern char *hash_str P_((char *s));
- extern struct t_hashnode *add_string P_((char *s));
  extern void hash_init P_((void));
  extern void hash_reclaim P_((void));
  /* ./help.c */
--- 161,166 ----
***************
*** 254,259 ****
--- 253,259 ----
  extern void parse_from P_((char *from_line, char *eaddr, char *fname));
  extern long my_atol P_((char *s, int n));
  extern int my_stricmp P_((char *p, char *q));
+ extern int my_strnicmp P_((char *p, char *q, size_t n));
  extern char *eat_re P_((char *s));
  extern long hash_s P_((char *s));
  extern void my_strncpy P_((char *p, char *q, int n));
diff -cr 950726/include/tin.h 950726.new/include/tin.h
*** 950726/include/tin.h	Fri Jul 28 05:20:26 1995
--- 950726.new/include/tin.h	Fri Jul 28 11:31:47 1995
***************
*** 360,366 ****
  #		define	DEFAULT_MAILBOX 	"uumail:"
  #		define	DEFAULT_MAILER		"uucp:c/sendmail"
  #		define	DEFAULT_POSTER		"uucp:c/postnews %s"
! #		define	DEFAULT_PRINTER 	"c:copy PIPE: NIL:"
  #		define	DEFAULT_SHELL		"c:newshell"	/* Not Yet Implemented */
  #		define	DEFAULT_UUDECODE	"uudecode %s"
  #		define	DEFAULT_UNSHAR		"unshar %s"
--- 360,367 ----
  #		define	DEFAULT_MAILBOX 	"uumail:"
  #		define	DEFAULT_MAILER		"uucp:c/sendmail"
  #		define	DEFAULT_POSTER		"uucp:c/postnews %s"
! #		define	DEFAULT_PRINTER 	"c:copy to PRT:"
! #		define	DEFAULT_BBS_PRINTER	"c:copy to NIL:"
  #		define	DEFAULT_SHELL		"c:newshell"	/* Not Yet Implemented */
  #		define	DEFAULT_UUDECODE	"uudecode %s"
  #		define	DEFAULT_UNSHAR		"unshar %s"
***************
*** 1283,1290 ****
  #	define	ENV_VAR_SHELL		"SHELL"
  #	define	EDITOR_FORMAT_ON	"%E %F"
  #	define	MAILER_FORMAT		"%M <%F -f %U"
! #	define	METAMAIL_CMD		"metamail -e -p -m \"tin\" PIPE:"
! #	define	TMPDIR "T:"
  #	ifdef	HAVE_KEY_PREFIX
  #		define	KEY_PREFIX	0x9b
  #	endif
--- 1284,1291 ----
  #	define	ENV_VAR_SHELL		"SHELL"
  #	define	EDITOR_FORMAT_ON	"%E %F"
  #	define	MAILER_FORMAT		"%M <%F -f %U"
! #	define	METAMAIL_CMD		"metamail -e -p -m \"tin\""
! #	define	TMPDIR			"T:"
  #	ifdef	HAVE_KEY_PREFIX
  #		define	KEY_PREFIX	0x9b
  #	endif
diff -cr 950726/src/Makefile 950726.new/src/Makefile
*** 950726/src/Makefile	Fri Jul 28 05:20:30 1995
--- 950726.new/src/Makefile	Fri Jul 28 05:48:45 1995
***************
*** 40,49 ****
  # Use INN clientlibs config functions (add -DUSE_INN_NNTPLIB to COPTS line)
  INN_NNTPLIB=
  
- AMIGA_COPTS=-so -wc -m0s -DM_AMIGA -DSYSV -DSLOW_SCREEN_UPDATE \
- 		-DNO_PIPING -DNO_SHELL_ESCAPE -DAMIGA_BBS -DLIBDIR=""uulib:"" \
- 		-DSPOOLDIR=""uunews:""
- 
  # Project
  PROJECT	= tin
  EXE		= tin
--- 40,45 ----
***************
*** 244,254 ****
  			-DNOVROOTDIR=\"$(NOVROOTDIR)\"' \
  			LIBS="-lcurses -ltermcap $(INN_NNTPLIB)" \
  			EXE=tin linkit
- 
- # For Commodore AmigaOS
- amiga:
- 	@$(ECHO) "Compiling $(EXE) v$(VER) for AmigaDOS (Manx-C 5.2)..."
- 	$(MAKE) CC=$(CC) "CFLAGS=$(AMIGA_COPTS)" LIBS=-lc EXE=tin linkit
  
  # For Apollo 
  apollo:
--- 240,245 ----
diff -cr 950726/src/amiga.c 950726.new/src/amiga.c
*** 950726/src/amiga.c	Fri Jul 28 05:20:28 1995
--- 950726.new/src/amiga.c	Fri Jul 28 05:58:51 1995
***************
*** 3,9 ****
   *  Module    : amiga.c
   *  Author    : M.Tomlinson, R.Luebke & I.Lea
   *  Created   : 01-04-91
!  *  Updated   : 09-08-94
   *  Notes     : Extra functions for Amiga port
   *  Copyright : (c) Copyright 1991-94 by Mark Tomlinson & Iain Lea
   *              You may  freely  copy or  redistribute  this software,
--- 3,9 ----
   *  Module    : amiga.c
   *  Author    : M.Tomlinson, R.Luebke & I.Lea
   *  Created   : 01-04-91
!  *  Updated   : 17-07-95
   *  Notes     : Extra functions for Amiga port
   *  Copyright : (c) Copyright 1991-94 by Mark Tomlinson & Iain Lea
   *              You may  freely  copy or  redistribute  this software,
***************
*** 42,48 ****
  /*
  ** something for the AmigaDOS Version command
  ** AMIVER is defined in ../include/patchlev.h
! ** __AMIGADATE__ is defined by the SC 6.51 preprocessor
  */
  static const char verstag[] = "$VER: tin " AMIVER " " __AMIGADATE__ "\0";
  
--- 42,48 ----
  /*
  ** something for the AmigaDOS Version command
  ** AMIVER is defined in ../include/patchlev.h
! ** __AMIGADATE__ is defined by the SC 6.55 preprocessor
  */
  static const char verstag[] = "$VER: tin " AMIVER " " __AMIGADATE__ "\0";
  
***************
*** 99,114 ****
  chmod (file, mode)
  	const char *file;
  	int mode;
! {	
  	return 0;
  }
  
! int umask (mask)
! 	int mask;
  {
  	return mask;
  }
  
  /*
   * use the task address for pid which is unique.
   */
--- 99,127 ----
  chmod (file, mode)
  	const char *file;
  	int mode;
! {
  	return 0;
  }
  
! unsigned short umask (mask)
! 	unsigned short mask;
  {
  	return mask;
  }
  
+ time_t time(pt)
+ 	time_t *pt;
+ {
+ 	time_t t;
+ 	struct DateStamp ds;
+ 
+ 	DateStamp(&ds);
+ 	t = ((ds.ds_Days + (365 * 8 + 2)) * (24*60) + ds.ds_Minute) * 60
+ 		+ ds.ds_Tick / TICKS_PER_SECOND;
+ 	if (pt) *pt = t;
+ 	return t;
+ }
+ 
  /*
   * use the task address for pid which is unique.
   */
***************
*** 115,121 ****
  
  int
  getpid (void)
! {	
  	return ((long) FindTask(0L) >> 2);
  }
  
--- 128,134 ----
  
  int
  getpid (void)
! {
  	return ((long) FindTask(0L) >> 2);
  }
  
***************
*** 185,191 ****
  			ACTION_SCREEN_MODE,args,1) == DOSTRUE) ?
  		0 : -1;
  }
! 	
  /* 
   * stub for tputs 
   */
--- 198,204 ----
  			ACTION_SCREEN_MODE,args,1) == DOSTRUE) ?
  		0 : -1;
  }
! 
  /* 
   * stub for tputs 
   */
***************
*** 200,206 ****
  	if (! str) {
  		return 0;
  	}
! 	
  	while (*str) {
  		if (*str == '\n') 
  			func('\r'); 
--- 213,219 ----
  	if (! str) {
  		return 0;
  	}
! 
  	while (*str) {
  		if (*str == '\n') 
  			func('\r'); 
***************
*** 223,229 ****
  	char *str;
  	char *dir;
  	char *file;
! {	
  	char c, *p;
  
  	if (tin_bbs_mode) {
--- 236,242 ----
  	char *str;
  	char *dir;
  	char *file;
! {
  	char c, *p;
  
  	if (tin_bbs_mode) {
***************
*** 252,258 ****
  unsigned int
  sleep (seconds)
  	unsigned int seconds;
! {	
  	if (seconds) Delay (50*seconds);
  	return seconds;
  }
--- 265,271 ----
  unsigned int
  sleep (seconds)
  	unsigned int seconds;
! {
  	if (seconds) Delay (50*seconds);
  	return seconds;
  }
***************
*** 267,282 ****
  	char *mode;
  {
  	char cmd[256];
  
  	if (mode[0] == 'w') {
! 		sprintf (cmd, "run >NIL: %s", command);
! 		Execute (cmd, 0L, 0L);
! 		return fopen ("PIPE:", mode);
  	} else {
  		FILE *rp;
! 		rp = fopen ("PIPE:", mode);
! 		sprintf (cmd,"run %s >PIPE:",command);
! 		Execute (cmd, 0L, 0L);
  		return rp;
  	}
  }
--- 280,298 ----
  	char *mode;
  {
  	char cmd[256];
+ 	char pname[16];
  
+ 	sprintf(pname, "PIPE:%08X", FindTask(NULL));
+ 
  	if (mode[0] == 'w') {
! 		sprintf (cmd, "run >NIL: %s %s", command, pname);
! 		system (cmd);
! 		return fopen (pname, mode);
  	} else {
  		FILE *rp;
! 		rp = fopen (pname, mode);
! 		sprintf (cmd,"run %s >%s",command, pname);
! 		system (cmd);
  		return rp;
  	}
  }
***************
*** 285,291 ****
  int
  pclose (pipe)
  	FILE *pipe;
! {	
  	return fclose (pipe);
  }
  
--- 301,307 ----
  int
  pclose (pipe)
  	FILE *pipe;
! {
  	return fclose (pipe);
  }
  
***************
*** 300,336 ****
  	DIR *di;
  
  	di = calloc (1, sizeof (DIR));
!  	if (di == 0) {
!  		return 0;
!  	}
  	di->Lock = Lock (name,ACCESS_READ);
  	if (di->Lock == 0) {
  		free (di); 
  		return 0;
  	}
!  	if (DOSBase->dl_lib.lib_Version >= 37) {
!  		di->buffer = (struct ExAllData *)malloc(BUFSIZE);
!  		if (di->buffer == 0) {
!  			UnLock(di->Lock);
!  			free(di);
!  			return 0;
!  		}
!  		di->eac = AllocDosObject(DOS_EXALLCONTROL,NULL);
!  		if ((di->eac) == 0) {
!  			free(di->buffer);
!  			UnLock(di->Lock);
!  			free(di);
!  			return 0;
!  		}
!  		di->eac->eac_LastKey = 0;
!  		di->more = 1;
!  	} else {
!  		if (Examine(di->Lock,&di->fib)==0) {
!  			UnLock(di->Lock); 
!  			free (di); 
!  			return 0;
!  		}
!  	}
  	return di;
  }
  
--- 316,352 ----
  	DIR *di;
  
  	di = calloc (1, sizeof (DIR));
! 	if (di == 0) {
! 		return 0;
! 	}
  	di->Lock = Lock (name,ACCESS_READ);
  	if (di->Lock == 0) {
  		free (di); 
  		return 0;
  	}
! 	if (DOSBase->dl_lib.lib_Version >= 37) {
! 		di->buffer = (struct ExAllData *)malloc(BUFSIZE);
! 		if (di->buffer == 0) {
! 			UnLock(di->Lock);
! 			free(di);
! 			return 0;
! 		}
! 		di->eac = AllocDosObject(DOS_EXALLCONTROL,NULL);
! 		if ((di->eac) == 0) {
! 			free(di->buffer);
! 			UnLock(di->Lock);
! 			free(di);
! 			return 0;
! 		}
! 		di->eac->eac_LastKey = 0;
! 		di->more = 1;
! 	} else {
! 		if (Examine(di->Lock,&di->fib)==0) {
! 			UnLock(di->Lock); 
! 			free (di); 
! 			return 0;
! 		}
! 	}
  	return di;
  }
  
***************
*** 341,366 ****
  {
  	static struct dirent de;
  
!  	if (DOSBase->dl_lib.lib_Version >= 37) {
!  		while (! di->bufp) {
!  			if (! di->more) {
!  				return 0;
!  			}
!  			di->more = ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac);
!  			if (di->eac->eac_Entries) {
!  				di->bufp = di->buffer;
!  			}
!  		}
!  		de.d_name = di->bufp->ed_Name;
!  		de.d_reclen = strlen (de.d_name);
!  		di->bufp = di->bufp->ed_Next;
!  	} else {
!  		if (ExNext (di->Lock, &di->fib) == 0) {
!  			return 0;
!  		}
!  		de.d_name = di->fib.fib_FileName;
!  		de.d_reclen = strlen (de.d_name);
!   	}
  
  	return &de;
  }
--- 357,382 ----
  {
  	static struct dirent de;
  
! 	if (DOSBase->dl_lib.lib_Version >= 37) {
! 		while (! di->bufp) {
! 			if (! di->more) {
! 				return 0;
! 			}
! 			di->more = ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac);
! 			if (di->eac->eac_Entries) {
! 				di->bufp = di->buffer;
! 			}
! 		}
! 		de.d_name = di->bufp->ed_Name;
! 		de.d_reclen = strlen (de.d_name);
! 		di->bufp = di->bufp->ed_Next;
! 	} else {
! 		if (ExNext (di->Lock, &di->fib) == 0) {
! 			return 0;
! 		}
! 		de.d_name = di->fib.fib_FileName;
! 		de.d_reclen = strlen (de.d_name);
! 	}
  
  	return &de;
  }
***************
*** 369,383 ****
  void 
  closedir (di)
  	DIR *di;
! {	
!  	if (DOSBase->dl_lib.lib_Version >= 37) {
!  		if (di->more)
!  			while (ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac))
!  				/* do nothing */ ;
!  		free(di->buffer);
!  		FreeDosObject(DOS_EXALLCONTROL,di->eac);
!  	}
! 	
  	UnLock (di->Lock);
  	free (di);
  }
--- 385,399 ----
  void 
  closedir (di)
  	DIR *di;
! {
! 	if (DOSBase->dl_lib.lib_Version >= 37) {
! 		if (di->more)
! 			while (ExAll(di->Lock, di->buffer, BUFSIZE, ED_NAME, di->eac))
! 				/* do nothing */ ;
! 		free(di->buffer);
! 		FreeDosObject(DOS_EXALLCONTROL,di->eac);
! 	}
! 
  	UnLock (di->Lock);
  	free (di);
  }
***************
*** 569,575 ****
  
  #ifdef NNTP_ABLE
  
! #define NUM_TEMP_FP 6
  static struct {
  	FILE *fp;
  	char name[PATH_LEN];
--- 585,591 ----
  
  #ifdef NNTP_ABLE
  
! #define NUM_TEMP_FP 4
  static struct {
  	FILE *fp;
  	char name[PATH_LEN];
diff -cr 950726/src/art.c 950726.new/src/art.c
*** 950726/src/art.c	Mon Jun 19 03:35:00 1995
--- 950726.new/src/art.c	Fri Jul 28 06:07:02 1995
***************
*** 552,558 ****
  		*ptr++ = '\0';
  		lineno++;
  
! 		switch (*ptrline) {
  			case 'F':	/* From:  mandatory */
  			case 'T':	/* To:    mandatory (mailbox) */
  				if (! got_from) {
--- 552,558 ----
  		*ptr++ = '\0';
  		lineno++;
  
! 		switch (toupper(*ptrline)) {
  			case 'F':	/* From:  mandatory */
  			case 'T':	/* To:    mandatory (mailbox) */
  				if (! got_from) {
***************
*** 604,611 ****
  				break;
  			case 'X':	/* Xref:  optional */
  				if (! got_xref) {
! 					if (match_header (ptrline, "Xref", buf2, HEADER_LEN) ||
! 					    match_header (ptrline, "xref", buf2, HEADER_LEN)) {
  						s = buf2;
  						while (*s && *s == ' ') {
  							s++;
--- 604,610 ----
  				break;
  			case 'X':	/* Xref:  optional */
  				if (! got_xref) {
! 					if (match_header (ptrline, "Xref", buf2, HEADER_LEN)) {
  						s = buf2;
  						while (*s && *s == ' ') {
  							s++;
***************
*** 617,624 ****
  				break;
  			case 'M':	/* Message-ID: */
  				if (! got_msgid) {
! 					if (match_header (ptrline, "Message-ID", buf2, HEADER_LEN) ||
! 					    match_header (ptrline, "Message-Id", buf2, HEADER_LEN)) {
  						s = buf2;
  						while (*s && *s == ' ') {
  							s++;
--- 616,622 ----
  				break;
  			case 'M':	/* Message-ID: */
  				if (! got_msgid) {
! 					if (match_header (ptrline, "Message-ID", buf2, HEADER_LEN)) {
  						s = buf2;
  						while (*s && *s == ' ') {
  							s++;
***************
*** 637,644 ****
  				}
  				break;
  			case 'A':	/* Archive-name:  optional */
! 				if (match_header (ptrline, "Archive-name", buf2, HEADER_LEN) ||
! 				    match_header (ptrline, "Archive-Name", buf2, HEADER_LEN)) {
  					if ((s = (char *) strchr (buf2, '/')) != (char *) 0) {
  						if (STRNCMPEQ(s+1, "part", 4) || 
  						    STRNCMPEQ(s+1, "Part", 4)) {
--- 635,641 ----
  				}
  				break;
  			case 'A':	/* Archive-name:  optional */
! 				if (match_header (ptrline, "Archive-name", buf2, HEADER_LEN)) {
  					if ((s = (char *) strchr (buf2, '/')) != (char *) 0) {
  						if (STRNCMPEQ(s+1, "part", 4) || 
  						    STRNCMPEQ(s+1, "Part", 4)) {
***************
*** 827,833 ****
  		} else {
  			*q = '\0';
  		}
! 		arts[top].msgid = str_dup (p);
  		p = q + 1;
   
  		/* 
--- 824,834 ----
  		} else {
  			*q = '\0';
  		}
! 		if (*p) {
! 			arts[top].msgid = str_dup (p);
! 		} else {
! 			arts[top].msgid = (char *) 0;
! 		}
  		p = q + 1;
   
  		/* 
***************
*** 841,847 ****
  		} else {
  			*q = '\0';
  		}
! 		arts[top].refs = str_dup (p);
  		p = q + 1;
   
  		/* 
--- 842,852 ----
  		} else {
  			*q = '\0';
  		}
! 		if (*p) {
! 			arts[top].refs = str_dup (p);
! 		} else {
! 			arts[top].refs = 0;
! 		}
  		p = q + 1;
   
  		/* 
diff -cr 950726/src/attrib.c 950726.new/src/attrib.c
*** 950726/src/attrib.c	Tue Jun 20 05:38:26 1995
--- 950726.new/src/attrib.c	Fri Jul 28 06:09:04 1995
***************
*** 179,298 ****
  			if (line[0] == '#' || line[0] == '\n') {
  				continue;
  			}
! 			if (match_string (line, "scope=", scope, sizeof (scope))) {
! 				continue;
! 			}
! 			if (match_string (line, "maildir=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_MAILDIR, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "savedir=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_SAVEDIR, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "savefile=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_SAVEFILE, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "sigfile=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_SIGFILE, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "organization=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_ORGANIZATION, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "followup_to=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_FOLLOWUP_TO, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "printer=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_PRINTER, scope, buf);
! 				continue;
! 			}
! 			if (match_boolean (line, "show_only_unread=", &num)) {
! 				set_attrib_num (ATTRIB_SHOW_ONLY_UNREAD, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "thread_arts=", &num)) {
! 				set_attrib_num (ATTRIB_THREAD_ARTS, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "auto_select=", &num)) {
! 				set_attrib_num (ATTRIB_AUTO_SELECT, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "auto_save=", &num)) {
! 				set_attrib_num (ATTRIB_AUTO_SAVE, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "auto_save_msg=", &num)) {
! 				set_attrib_num (ATTRIB_AUTO_SAVE_MSG, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "batch_save=", &num)) {
! 				set_attrib_num (ATTRIB_BATCH_SAVE, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "delete_tmp_files=", &num)) {
! 				set_attrib_num (ATTRIB_DELETE_TMP_FILES, scope, num);
! 				continue;
! 			}
! 			if (match_integer (line, "sort_art_type=", &num)) {
! 				set_attrib_num (ATTRIB_SORT_ART_TYPE, scope, num);
! 				continue;
! 			}
! 			if (match_integer (line, "show_author=", &num)) {
! 				set_attrib_num (ATTRIB_SHOW_AUTHOR, scope, num);
! 				continue;
! 			}
! 			if (match_integer (line, "post_proc_type=", &num)) {
! 				set_attrib_num (ATTRIB_POST_PROC_TYPE, scope, num);
! 				continue;
! 			}
! 			if (match_integer (line, "quick_kill_header=", &num)) {
! 				set_attrib_num (ATTRIB_QUICK_KILL_HEADER, scope, num);
! 				continue;
! 			}
! 			if (match_string (line, "quick_kill_scope=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_QUICK_KILL_SCOPE, scope, buf);
! 				continue;
! 			}
! 			if (match_boolean (line, "quick_kill_case=", &num)) {
! 				set_attrib_num (ATTRIB_QUICK_KILL_CASE, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "quick_kill_expire=", &num)) {
! 				set_attrib_num (ATTRIB_QUICK_KILL_EXPIRE, scope, num);
! 				continue;
! 			}
! 			if (match_integer (line, "quick_select_header=", &num)) {
! 				set_attrib_num (ATTRIB_QUICK_SELECT_HEADER, scope, num);
! 				continue;
! 			}
! 			if (match_string (line, "quick_select_scope=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_QUICK_SELECT_SCOPE, scope, buf);
! 				continue;
! 			}
! 			if (match_boolean (line, "quick_select_case=", &num)) {
! 				set_attrib_num (ATTRIB_QUICK_SELECT_CASE, scope, num);
! 				continue;
! 			}
! 			if (match_boolean (line, "quick_select_expire=", &num)) {
! 				set_attrib_num (ATTRIB_QUICK_SELECT_EXPIRE, scope, num);
! 				continue;
! 			}
! 			if (match_string (line, "mailing_list=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_MAILING_LIST, scope, buf);
! 				continue;
! 		}
! 			if (match_string (line, "x_headers=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_X_HEADERS, scope, buf);
! 				continue;
! 			}
! 			if (match_string (line, "x_body=", buf, sizeof (buf))) {
! 				set_attrib_str (ATTRIB_X_BODY, scope, buf);
! 				continue;
  			}
  		}
  		fclose (fp);
--- 179,322 ----
  			if (line[0] == '#' || line[0] == '\n') {
  				continue;
  			}
! 			switch(tolower(line[0])) {
! 			case 'a':
! 				if (match_boolean (line, "auto_select=", &num)) {
! 					set_attrib_num (ATTRIB_AUTO_SELECT, scope, num);
! 					break;
! 				}
! 				if (match_boolean (line, "auto_save=", &num)) {
! 					set_attrib_num (ATTRIB_AUTO_SAVE, scope, num);
! 					break;
! 				}
! 				if (match_boolean (line, "auto_save_msg=", &num)) {
! 					set_attrib_num (ATTRIB_AUTO_SAVE_MSG, scope, num);
! 					break;
! 				}
! 				break;
! 			case 'b':
! 				if (match_boolean (line, "batch_save=", &num)) {
! 					set_attrib_num (ATTRIB_BATCH_SAVE, scope, num);
! 					break;
! 				}
! 				break;
! 			case 'd':
! 				if (match_boolean (line, "delete_tmp_files=", &num)) {
! 					set_attrib_num (ATTRIB_DELETE_TMP_FILES, scope, num);
! 					break;
! 				}
! 				break;
! 			case 'f':
! 				if (match_string (line, "followup_to=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_FOLLOWUP_TO, scope, buf);
! 					break;
! 				}
! 				break;
! 			case 'm':
! 				if (match_string (line, "maildir=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_MAILDIR, scope, buf);
! 					break;
! 				}
! 				if (match_string (line, "mailing_list=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_MAILING_LIST, scope, buf);
! 					break;
! 				}
! 				break;
! 			case 'o':
! 				if (match_string (line, "organization=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_ORGANIZATION, scope, buf);
! 					break;
! 				}
! 				break;
! 			case 'p':
! 				if (match_string (line, "printer=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_PRINTER, scope, buf);
! 					break;
! 				}
! 				if (match_integer (line, "post_proc_type=", &num)) {
! 					set_attrib_num (ATTRIB_POST_PROC_TYPE, scope, num);
! 					break;
! 				}
! 				break;
! 			case 'q':
! 				if (match_integer (line, "quick_kill_header=", &num)) {
! 					set_attrib_num (ATTRIB_QUICK_KILL_HEADER, scope, num);
! 					break;
! 					}
! 				if (match_string (line, "quick_kill_scope=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_QUICK_KILL_SCOPE, scope, buf);
! 					break;
! 				}
! 				if (match_boolean (line, "quick_kill_case=", &num)) {
! 					set_attrib_num (ATTRIB_QUICK_KILL_CASE, scope, num);
! 					break;
! 				}
! 				if (match_boolean (line, "quick_kill_expire=", &num)) {
! 					set_attrib_num (ATTRIB_QUICK_KILL_EXPIRE, scope, num);
! 					break;
! 				}
! 				if (match_integer (line, "quick_select_header=", &num)) {
! 					set_attrib_num (ATTRIB_QUICK_SELECT_HEADER, scope, num);
! 					break;
! 				}
! 				if (match_string (line, "quick_select_scope=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_QUICK_SELECT_SCOPE, scope, buf);
! 					break;
! 				}
! 				if (match_boolean (line, "quick_select_case=", &num)) {
! 					set_attrib_num (ATTRIB_QUICK_SELECT_CASE, scope, num);
! 					break;
! 				}
! 				if (match_boolean (line, "quick_select_expire=", &num)) {
! 					set_attrib_num (ATTRIB_QUICK_SELECT_EXPIRE, scope, num);
! 					break;
! 				}
! 				break;
! 			case 's':
! 				if (match_string (line, "savedir=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_SAVEDIR, scope, buf);
! 					break;
! 				}
! 				if (match_string (line, "savefile=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_SAVEFILE, scope, buf);
! 					break;
! 				}
! 				if (match_string (line, "sigfile=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_SIGFILE, scope, buf);
! 					break;
! 				}
! 				if (match_string (line, "scope=", scope, sizeof (scope))) {
! 					break;
! 				}
! 				if (match_boolean (line, "show_only_unread=", &num)) {
! 					set_attrib_num (ATTRIB_SHOW_ONLY_UNREAD, scope, num);
! 					break;
! 				}
! 				if (match_integer (line, "sort_art_type=", &num)) {
! 					set_attrib_num (ATTRIB_SORT_ART_TYPE, scope, num);
! 					break;
! 				}
! 				if (match_integer (line, "show_author=", &num)) {
! 					set_attrib_num (ATTRIB_SHOW_AUTHOR, scope, num);
! 					break;
! 				}
! 				break;
! 			case 't':
! 				if (match_boolean (line, "thread_arts=", &num)) {
! 					set_attrib_num (ATTRIB_THREAD_ARTS, scope, num);
! 					break;
! 				}
! 				break;
! 			case 'x':
! 				if (match_string (line, "x_headers=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_X_HEADERS, scope, buf);
! 					break;
! 				}
! 				if (match_string (line, "x_body=", buf, sizeof (buf))) {
! 					set_attrib_str (ATTRIB_X_BODY, scope, buf);
! 					break;
! 				}
! 				break;
  			}
  		}
  		fclose (fp);
diff -cr 950726/src/config.c 950726.new/src/config.c
*** 950726/src/config.c	Mon Jun 19 03:35:00 1995
--- 950726.new/src/config.c	Fri Jul 28 06:19:49 1995
***************
*** 48,317 ****
  	while (fgets (buf, sizeof (buf), fp) != (char *) 0) {
  		if (buf[0] == '#' || buf[0] == '\n') { 
  			continue;
- 		}	
- 		if (match_boolean (buf, "auto_save=", &default_auto_save)) {
- 			continue;
  		}
! 		if (match_boolean (buf, "batch_save=", &default_batch_save)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "start_editor_offset=", &start_editor_offset)) {
! 			continue;
! 		}	
! 		if (match_string (buf, "default_editor_format=", default_editor_format, sizeof (default_editor_format))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_mailer_format=", default_mailer_format, sizeof (default_mailer_format))) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "mark_saved_read=", &mark_saved_read)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "inverse_okay=", &inverse_okay)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "draw_arrow=", &draw_arrow_mark)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "print_header=", &print_header)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "pos_first_unread=", &pos_first_unread)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "full_page_scroll=", &full_page_scroll)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "catchup_read_groups=", &catchup_read_groups)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "thread_articles=", &default_thread_arts)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "unlink_article=", &unlink_article)) {
! 			continue;
! 		}	
! 		if (match_boolean (buf, "show_only_unread_groups=", &show_only_unread_groups)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "show_only_unread=", &default_show_only_unread)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "confirm_action=", &confirm_action)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "confirm_to_quit=", &confirm_to_quit)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "show_description=", &show_description)) {
! 			continue;
! 		}
! 		if (match_integer (buf, "show_author=", &default_show_author)) {
! 			continue;
! 		}	
! 		if (match_integer (buf, "post_process_type=", &default_post_proc_type)) {
! 			proc_ch_default = get_post_proc_type (default_post_proc_type);
! 			continue;
! 		}	
! 		if (match_integer (buf, "sort_article_type=", &default_sort_art_type)) {
! 			continue;
! 		}	
! 		if (match_string (buf, "default_savedir=", default_savedir, sizeof (default_savedir))) {
! 			if (default_savedir[0] == '.' && strlen (default_savedir) == 1) {
! 				get_cwd (buf);
! 				my_strncpy (default_savedir, buf, sizeof (default_savedir));
  			}
! 			continue;
! 		}	
! 		if (match_string (buf, "default_maildir=", default_maildir, sizeof (default_maildir))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_printer=", default_printer, sizeof (default_printer))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_sigfile=", default_sigfile, sizeof (default_sigfile))) {
! 			continue;
! 		}
! 		if (match_string (buf, "quote_chars=", quote_chars, sizeof (quote_chars))) {
! 			quote_dash_to_space (quote_chars);
! 			continue;
! 		}
! 		if (match_string (buf, "art_marked_deleted=", buf, sizeof (buf))) {
! 			art_marked_deleted = buf[0];
! 			continue;
! 		}
! 		if (match_string (buf, "art_marked_inrange=", buf, sizeof (buf))) {
! 			art_marked_inrange = buf[0];
! 			continue;
! 		}
! 		if (match_string (buf, "art_marked_return=", buf, sizeof (buf))) {
! 			art_marked_return = buf[0];
! 			continue;
! 		}
! 		if (match_string (buf, "art_marked_selected=", buf, sizeof (buf))) {
! 			art_marked_selected = buf[0];
! 			continue;
! 		}
! 		if (match_string (buf, "art_marked_unread=", buf, sizeof (buf))) {
! 			art_marked_unread = buf[0];
! 			continue;
! 		}
! 		if (match_integer (buf, "reread_active_file_secs=", &reread_active_file_secs)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "show_last_line_prev_page=", &show_last_line_prev_page)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "tab_after_X_selection=", &tab_after_X_selection)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "tab_goto_next_unread=", &tab_goto_next_unread)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "force_screen_redraw=", &force_screen_redraw)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "save_to_mmdf_mailbox=", &save_to_mmdf_mailbox)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "use_builtin_inews=", &use_builtin_inews)) {
! 			continue;
! 		}
! 		if (match_string (buf, "news_quote_format=", news_quote_format, sizeof (news_quote_format))) {
! 			continue;
! 		}
! 		if (match_string (buf, "mail_quote_format=", mail_quote_format, sizeof (mail_quote_format))) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "use_mouse=", &use_mouse)) {
! 			continue;
! 		}
  #ifdef HAVE_KEYPAD
! 		if (match_boolean (buf, "use_keypad=", &use_keypad)) {
! 			continue;
! 		}
  #endif
! 		if (match_boolean (buf, "strip_blanks=", &strip_blanks)) {
! 			continue;
! 		}
! 		if (match_integer (buf, "groupname_max_length=", &groupname_max_length)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "beginner_level=", &beginner_level)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "auto_cc=", &auto_cc)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "xcut_and_paste=", &xcut_and_paste)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "group_catchup_on_exit=", &group_catchup_on_exit)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "thread_catchup_on_exit=", &thread_catchup_on_exit)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "auto_list_thread=", &auto_list_thread)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "process_only_unread=", &process_only_unread)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "use_metamail=", &use_metamail)) {
! 			continue;
! 		}
! 		if (match_integer (buf, "default_filter_days=", &default_filter_days)) {
! 			continue;
! 		}
! 		if (match_integer (buf, "default_filter_kill_header=", &default_filter_kill_header)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "default_filter_kill_global=", &default_filter_kill_global)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "default_filter_kill_case=", &default_filter_kill_case)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "default_filter_kill_expire=", &default_filter_kill_expire)) {
! 			continue;
! 		}
! 		if (match_integer (buf, "default_filter_select_header=", &default_filter_select_header)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "default_filter_select_global=", &default_filter_select_global)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "default_filter_select_case=", &default_filter_select_case)) {
! 			continue;
! 		}
! 		if (match_boolean (buf, "default_filter_select_expire=", &default_filter_select_expire)) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_save_mode=", buf, sizeof (buf))) {
! 			default_save_mode = buf[0];
! 			continue;
! 		}
! 		if (match_string (buf, "default_author_search=", default_author_search, sizeof (default_author_search))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_goto_group=", default_goto_group, sizeof (default_goto_group))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_group_search=", default_group_search, sizeof (default_group_search))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_subject_search=", default_subject_search, sizeof (default_subject_search))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_art_search=", default_art_search, sizeof (default_art_search))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_repost_group=", default_repost_group, sizeof (default_repost_group))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_mail_address=", default_mail_address, sizeof (default_mail_address))) {
! 			continue;
! 		}
! 		if (match_integer (buf, "default_move_group=", &default_move_group)) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_pipe_command=", default_pipe_command, sizeof (default_pipe_command))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_post_newsgroups=", default_post_newsgroups, sizeof (default_post_newsgroups))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_post_subject=", default_post_subject, sizeof (default_post_subject))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_regex_pattern=", default_regex_pattern, sizeof (default_regex_pattern))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_range_group=", default_range_group, sizeof (default_range_group))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_range_select=", default_range_select, sizeof (default_range_select))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_range_thread=", default_range_thread, sizeof (default_range_thread))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_save_file=", default_save_file, sizeof (default_save_file))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_select_pattern=", default_select_pattern, sizeof (default_select_pattern))) {
! 			continue;
! 		}
! 		if (match_string (buf, "default_shell_command=", default_shell_command, sizeof (default_shell_command))) {
! 			continue;
! 		}
! 		if (match_string (buf, "motd_file_info=", motd_file_info, sizeof (motd_file_info))) {
! 			continue;
! 		}
! 		if (match_string (buf, "newnews=", newnews_info, sizeof (newnews_info))) {
! 			load_newnews_info (newnews_info);
! 			continue;
  		}
  	}
  	fclose (fp);
--- 48,361 ----
  	while (fgets (buf, sizeof (buf), fp) != (char *) 0) {
  		if (buf[0] == '#' || buf[0] == '\n') { 
  			continue;
  		}
! 		switch(tolower(buf[0])) {
! 		case 'a':
! 			if (match_boolean (buf, "auto_save=", &default_auto_save)) {
! 				break;
  			}
! 			if (match_string (buf, "art_marked_deleted=", buf, sizeof (buf))) {
! 				art_marked_deleted = buf[0];
! 				break;
! 			}
! 			if (match_string (buf, "art_marked_inrange=", buf, sizeof (buf))) {
! 				art_marked_inrange = buf[0];
! 				break;
! 			}
! 			if (match_string (buf, "art_marked_return=", buf, sizeof (buf))) {
! 				art_marked_return = buf[0];
! 				break;
! 			}
! 			if (match_string (buf, "art_marked_selected=", buf, sizeof (buf))) {
! 				art_marked_selected = buf[0];
! 				break;
! 			}
! 			if (match_string (buf, "art_marked_unread=", buf, sizeof (buf))) {
! 				art_marked_unread = buf[0];
! 				break;
! 			}
! #ifdef HAVE_METAMAIL
! 			if (match_boolean (buf, "ask_for_metamail=", &ask_for_metamail)) {
! 				break;
! 			}
! #endif
! 			if (match_boolean (buf, "auto_cc=", &auto_cc)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "auto_list_thread=", &auto_list_thread)) {
! 				break;
! 			}
! 			break;
! 		case 'b':
! 			if (match_boolean (buf, "batch_save=", &default_batch_save)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "beginner_level=", &beginner_level)) {
! 				break;
! 			}
! 			break;
! 		case 'c':
! 			if (match_boolean (buf, "catchup_read_groups=", &catchup_read_groups)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "confirm_action=", &confirm_action)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "confirm_to_quit=", &confirm_to_quit)) {
! 				break;
! 			}
! 			break;
! 		case 'd':
! 			if (match_string (buf, "default_editor_format=", default_editor_format, sizeof (default_editor_format))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_mailer_format=", default_mailer_format, sizeof (default_mailer_format))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_savedir=", default_savedir, sizeof (default_savedir))) {
! 				if (default_savedir[0] == '.' && strlen (default_savedir) == 1) {
! 					get_cwd (buf);
! 					my_strncpy (default_savedir, buf, sizeof (default_savedir));
! 				}
! 				break;
! 			}	
! 			if (match_string (buf, "default_maildir=", default_maildir, sizeof (default_maildir))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_printer=", default_printer, sizeof (default_printer))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_sigfile=", default_sigfile, sizeof (default_sigfile))) {
! 				break;
! 			}
! 			if (match_integer (buf, "default_filter_days=", &default_filter_days)) {
! 				break;
! 			}
! 			if (match_integer (buf, "default_filter_kill_header=", &default_filter_kill_header)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "default_filter_kill_global=", &default_filter_kill_global)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "default_filter_kill_case=", &default_filter_kill_case)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "default_filter_kill_expire=", &default_filter_kill_expire)) {
! 				break;
! 			}
! 			if (match_integer (buf, "default_filter_select_header=", &default_filter_select_header)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "default_filter_select_global=", &default_filter_select_global)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "default_filter_select_case=", &default_filter_select_case)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "default_filter_select_expire=", &default_filter_select_expire)) {
! 				break;
! 			}
! 			if (match_string (buf, "default_save_mode=", buf, sizeof (buf))) {
! 				default_save_mode = buf[0];
! 				break;
! 			}
! 			if (match_string (buf, "default_author_search=", default_author_search, sizeof (default_author_search))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_goto_group=", default_goto_group, sizeof (default_goto_group))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_group_search=", default_group_search, sizeof (default_group_search))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_subject_search=", default_subject_search, sizeof (default_subject_search))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_art_search=", default_art_search, sizeof (default_art_search))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_repost_group=", default_repost_group, sizeof (default_repost_group))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_mail_address=", default_mail_address, sizeof (default_mail_address))) {
! 				break;
! 			}
! 			if (match_integer (buf, "default_move_group=", &default_move_group)) {
! 				break;
! 			}
! 			if (match_string (buf, "default_pipe_command=", default_pipe_command, sizeof (default_pipe_command))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_post_newsgroups=", default_post_newsgroups, sizeof (default_post_newsgroups))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_post_subject=", default_post_subject, sizeof (default_post_subject))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_regex_pattern=", default_regex_pattern, sizeof (default_regex_pattern))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_range_group=", default_range_group, sizeof (default_range_group))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_range_select=", default_range_select, sizeof (default_range_select))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_range_thread=", default_range_thread, sizeof (default_range_thread))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_save_file=", default_save_file, sizeof (default_save_file))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_select_pattern=", default_select_pattern, sizeof (default_select_pattern))) {
! 				break;
! 			}
! 			if (match_string (buf, "default_shell_command=", default_shell_command, sizeof (default_shell_command))) {
! 				break;
! 			}
! 			if (match_boolean (buf, "draw_arrow=", &draw_arrow_mark)) {
! 				break;
! 			}
! 			break;
! 		case 'f':
! 			if (match_boolean (buf, "full_page_scroll=", &full_page_scroll)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "force_screen_redraw=", &force_screen_redraw)) {
! 				break;
! 			}
! 			break;
! 		case 'g':
! 			if (match_integer (buf, "groupname_max_length=", &groupname_max_length)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "group_catchup_on_exit=", &group_catchup_on_exit)) {
! 				break;
! 			}
! 			break;
! 		case 'i':
! 			if (match_boolean (buf, "inverse_okay=", &inverse_okay)) {
! 				break;
! 			}
! 			break;
! 		case 'm':
! 			if (match_string (buf, "motd_file_info=", motd_file_info, sizeof (motd_file_info))) {
! 				break;
! 			}
! 			if (match_boolean (buf, "mark_saved_read=", &mark_saved_read)) {
! 				break;
! 			}
! 			if (match_string (buf, "mail_quote_format=", mail_quote_format, sizeof (mail_quote_format))) {
! 				break;
! 			}
! 			break;
! 		case 'n':
! 			if (match_string (buf, "newnews=", newnews_info, sizeof (newnews_info))) {
! 				load_newnews_info (newnews_info);
! 				break;
! 			}
! 			if (match_string (buf, "news_quote_format=", news_quote_format, sizeof (news_quote_format))) {
! 				break;
! 			}
! 			break;
! 		case 'p':
! 			if (match_boolean (buf, "print_header=", &print_header)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "pos_first_unread=", &pos_first_unread)) {
! 				break;
! 			}	
! 			if (match_integer (buf, "post_process_type=", &default_post_proc_type)) {
! 				proc_ch_default = get_post_proc_type (default_post_proc_type);
! 				break;
! 			}	
! 			if (match_boolean (buf, "process_only_unread=", &process_only_unread)) {
! 				break;
! 			}
! 			break;
! 		case 'q':
! 			if (match_string (buf, "quote_chars=", quote_chars, sizeof (quote_chars))) {
! 				quote_dash_to_space (quote_chars);
! 				break;
! 			}
! 			break;
! 		case 'r':
! 			if (match_integer (buf, "reread_active_file_secs=", &reread_active_file_secs)) {
! 				break;
! 			}
! 			break;
! 		case 's':
! 			if (match_boolean (buf, "sigdashes=", &sigdashes)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "start_editor_offset=", &start_editor_offset)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "show_only_unread_groups=", &show_only_unread_groups)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "show_only_unread=", &default_show_only_unread)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "show_description=", &show_description)) {
! 				break;
! 			}
! 			if (match_integer (buf, "show_author=", &default_show_author)) {
! 				break;
! 			}	
! 			if (match_integer (buf, "sort_article_type=", &default_sort_art_type)) {
! 				break;
! 			}	
! 			if (match_boolean (buf, "show_last_line_prev_page=", &show_last_line_prev_page)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "save_to_mmdf_mailbox=", &save_to_mmdf_mailbox)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "strip_blanks=", &strip_blanks)) {
! 				break;
! 			}
! 			break;
! 		case 't':
! 			if (match_boolean (buf, "thread_articles=", &default_thread_arts)) {
! 				break;
! 			}	
! 			if (match_boolean (buf, "tab_after_X_selection=", &tab_after_X_selection)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "tab_goto_next_unread=", &tab_goto_next_unread)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "thread_catchup_on_exit=", &thread_catchup_on_exit)) {
! 				break;
! 			}
! 			break;
! 		case 'u':
! 			if (match_boolean (buf, "unlink_article=", &unlink_article)) {
! 				break;
! 			}	
! 			if (match_boolean (buf, "use_builtin_inews=", &use_builtin_inews)) {
! 				break;
! 			}
! 			if (match_boolean (buf, "use_mouse=", &use_mouse)) {
! 				break;
! 			}
  #ifdef HAVE_KEYPAD
! 			if (match_boolean (buf, "use_keypad=", &use_keypad)) {
! 				break;
! 			}
  #endif
! #ifdef HAVE_METAMAIL
! 			if (match_boolean (buf, "use_metamail=", &use_metamail)) {
! 				break;
! 			}
! 			break;
! #endif
! 		case 'x':
! 			if (match_boolean (buf, "xcut_and_paste=", &xcut_and_paste)) {
! 				break;
! 			}
! 			break;
  		}
  	}
  	fclose (fp);
***************
*** 375,380 ****
--- 419,431 ----
  	fprintf (fp, "pos_first_unread=%s\n\n", print_boolean (pos_first_unread));
  	fprintf (fp, "# if ON scroll full page of groups/articles otherwise half a page\n");
  	fprintf (fp, "full_page_scroll=%s\n\n", print_boolean (full_page_scroll));
+ #ifdef HAVE_METAMAIL
+  	fprintf (fp, "# if ON metamail can/will be used to display MIME articles\n");
+  	fprintf (fp, "use_metamail=%s\n\n", print_boolean (use_metamail));
+  	fprintf (fp, "# if ON tin will ask before using metamail to display MIME messages\n");
+  	fprintf (fp, "# this only occurs, if use_metamail is also switched ON\n");
+  	fprintf (fp, "ask_for_metamail=%s\n\n", print_boolean (ask_for_metamail));
+ #endif
  	fprintf (fp, "# if ON ask user if read groups should all be marked read\n");
  	fprintf (fp, "catchup_read_groups=%s\n\n", print_boolean (catchup_read_groups));
  	fprintf (fp, "# if ON confirm certain commands with y/n before executing\n");
***************
*** 414,419 ****
--- 465,472 ----
  	fprintf (fp, "default_printer=%s\n\n", default_printer);
  	fprintf (fp, "# Signature path (random sigs)/file to be used when posting/replying to messages\n");
  	fprintf (fp, "default_sigfile=%s\n\n", default_sigfile);
+ 	fprintf (fp, "# if ON prepend the signature with dashes '\\n-- \\n'\n");
+ 	fprintf (fp, "sigdashes=%s\n\n", print_boolean (sigdashes));
  	fprintf (fp, "# time interval in seconds between rereading the active file\n");
  	fprintf (fp, "reread_active_file_secs=%d\n\n", reread_active_file_secs);
  	fprintf (fp, "# characters used in quoting to followups and replys. '_' replaced by ' '\n");
***************
*** 470,477 ****
  	fprintf (fp, "process_only_unread=%s\n\n", print_boolean (process_only_unread));
  	fprintf (fp, "# Num of days a short term filter will be active\n");
  	fprintf (fp, "default_filter_days=%d\n\n", default_filter_days);
- 	fprintf (fp, "# If OFF never ask if you want to use MetaMail\n");
- 	fprintf (fp, "use_metamail=%s\n\n", print_boolean (use_metamail));
  
  	fprintf (fp, "# Defaults for quick (1 key) kill & auto-selection filters\n");
  	fprintf (fp, "# header=NUM  0=Subject: 1=From: 2=Message-Id:\n");
--- 523,528 ----
diff -cr 950726/src/curses.c 950726.new/src/curses.c
*** 950726/src/curses.c	Fri Jul 28 05:20:28 1995
--- 950726.new/src/curses.c	Fri Jul 28 06:37:44 1995
***************
*** 817,822 ****
--- 817,823 ----
  #endif /* M_OS2 */
  
  #ifdef M_AMIGA
+ #include <sprof.h>
  
  static int new_lines, new_columns;
  
***************
*** 831,837 ****
--- 832,840 ----
  	unsigned char ch;
  
  	while (getscrsize || buflen == 0) {
+ PROFILE_OFF();
  		result = read (0, (char *)&buf[buflen], 1);
+ PROFILE_ON();
  		if (result <= 0) return EOF;
  		buflen++;
  		if (buf[bufp] == KEY_PREFIX) {
diff -cr 950726/src/filter.c 950726.new/src/filter.c
*** 950726/src/filter.c	Thu Dec 22 02:19:12 1994
--- 950726.new/src/filter.c	Fri Jul 28 06:41:34 1995
***************
*** 203,308 ****
  		if (*buf == '#' || *buf == '\n') {
  			continue;
  		}
! 		if (match_string (buf, "scope=", scope, sizeof (scope))) {
! if (debug) {
! 	printf ("scope=[%s] num=[%d]\n", scope, glob_filter.num);
! 	fflush (stdout);
! }
! 			global = TRUE;
! 			arr_num = &glob_filter.num;
! 			arr_max = &glob_filter.max;
! 			if (*arr_num >= (*arr_max - 1)) {
! 				glob_filter.filter = psExpandFilterArray (
! 					glob_filter.filter, arr_max);
! 			}
! 			arr_ptr = glob_filter.filter;
! 			i = *arr_num;
! 			(*arr_num)++;
! 			vSetFilter (&arr_ptr[i]);
! 			expired_time = FALSE;
! 			arr_ptr[i].scope = str_dup (scope);
! 			subj[0] = '\0';
! 			from[0] = '\0';
! 			msgid[0] = '\0';
! 			lines[0] = '\0';
! 			icase = 0;
! 			secs = 0L;
! 			psGrp = (struct t_group *) 0;	/* fudge for out of order rules */
! 			continue;
! 		}
! 		if (match_string (buf, "group=", group, sizeof (group))) {
  if (debug) {
  	printf ("group=[%s]\n", group);
  	fflush (stdout);
  }
! 			psGrp = psGrpFind (group);
! 			if (psGrp != (struct t_group *) 0) {	/* switch to group filter */
! 				global = FALSE;
! 				if (psGrp->grps_filter == (struct t_filters *) 0) {
  if (debug) {
  	printf ("Allocating grp_filter for group=[%s]\n", psGrp->name);
  	fflush (stdout);
  }
! 					psGrp->grps_filter = 
! 						(struct t_filters *) my_malloc (sizeof (struct t_filters));
! 					psGrp->grps_filter->num = 0;
! 					psGrp->grps_filter->max = 0;
! 					psGrp->grps_filter->filter = (struct t_filter *) 0;
! 				}
! 			}
! 			subj[0] = '\0';
! 			from[0] = '\0';
! 			msgid[0] = '\0';
! 			lines[0] = '\0';
! 			secs = 0L;
! 			continue;
! 		}
! 
! 		if (match_integer (buf, "type=", &type)) {
  if (debug) {
! 	printf ("type=[%d][%s]\n", type, (type == 0 ? "KILL" : "SELECT"));
  	fflush (stdout);
  }
! 			if (psGrp && ! global) {
! 				arr_num = &psGrp->grps_filter->num;
! 				arr_max = &psGrp->grps_filter->max;
  				if (*arr_num >= (*arr_max - 1)) {
! 					psGrp->grps_filter->filter = psExpandFilterArray (
! 						psGrp->grps_filter->filter, arr_max);
  				}
! 				arr_ptr = psGrp->grps_filter->filter;
  				i = *arr_num;
  				(*arr_num)++;
  				vSetFilter (&arr_ptr[i]);
  				expired_time = FALSE;
! if (debug) {
! 	printf ("grp_filter num=[%d] max=[%d]\n", *arr_num, *arr_max);
! 	fflush (stdout);
! }
  				subj[0] = '\0';
  				from[0] = '\0';
  				msgid[0] = '\0';
  				lines[0] = '\0';
  				secs = 0L;
  			}
! 			if (arr_ptr) {
! 				arr_ptr[i].type = type;
! 			}
! 			continue;
! 		}
! 		if (match_integer (buf, "case=", &icase)) {
! 			if (arr_ptr && ! expired_time) {
! 				arr_ptr[i].icase = icase;
! 			}
! 			continue;
! 		}
! 		if (match_string (buf, "subj=", subj, sizeof (subj))) {
! 			if (arr_ptr && ! expired_time) {
! 				if (arr_ptr[i].icase) {
! 					str_lwr (subj, subj);
! 				} 
! 				arr_ptr[i].subj = str_dup (subj);
! 			}
  if (debug) {
  	if (global) {
  		printf ("6. buf=[%s]  Gsubj=[%s]\n", arr_ptr[i].subj, glob_filter.filter[i].subj);
--- 203,317 ----
  		if (*buf == '#' || *buf == '\n') {
  			continue;
  		}
! 		switch(tolower(buf[0])) {
! 		case 'c':
! 			if (match_integer (buf, "case=", &icase)) {
! 				if (arr_ptr && ! expired_time) {
! 					arr_ptr[i].icase = icase;
! 				}
! 				break;
! 			}
! 			break;
! 		case 'f':
! 			if (match_string (buf, "from=", from, sizeof (from))) {
! 				if (arr_ptr && ! expired_time) {
! 					if (arr_ptr[i].icase) {
! 						str_lwr (from, from);
! 					} 
! 					arr_ptr[i].from = str_dup (from);
! 				}
! 				break;
! 			}
! 			break;
! 		case 'g':
! 			if (match_string (buf, "group=", group, sizeof (group))) {
  if (debug) {
  	printf ("group=[%s]\n", group);
  	fflush (stdout);
  }
! 				psGrp = psGrpFind (group);
! 				if (psGrp != (struct t_group *) 0) {	/* switch to group filter */
! 					global = FALSE;
! 					if (psGrp->grps_filter == (struct t_filters *) 0) {
  if (debug) {
  	printf ("Allocating grp_filter for group=[%s]\n", psGrp->name);
  	fflush (stdout);
  }
! 						psGrp->grps_filter = 
! 							(struct t_filters *) my_malloc (sizeof (struct t_filters));
! 						psGrp->grps_filter->num = 0;
! 						psGrp->grps_filter->max = 0;
! 						psGrp->grps_filter->filter = (struct t_filter *) 0;
! 					}
! 				}
! 				subj[0] = '\0';
! 				from[0] = '\0';
! 				msgid[0] = '\0';
! 				lines[0] = '\0';
! 				secs = 0L;
! 				break;
! 			}
! 			break;
! 		case 'l':
! 			if (match_string (buf, "lines=", lines, sizeof (lines))) {
! 				if (arr_ptr && ! expired_time) {
! 					if (lines[0] == '<') {
! 						arr_ptr[i].lines_cmp = FILTER_LINES_LT;
! 						arr_ptr[i].lines_num = atoi (&lines[1]);
! 					} else if (lines[0] == '>') {
! 						arr_ptr[i].lines_cmp = FILTER_LINES_GT;
! 						arr_ptr[i].lines_num = atoi (&lines[1]);
! 					} else {
! 						arr_ptr[i].lines_cmp = FILTER_LINES_EQ;
! 						arr_ptr[i].lines_num = atoi (lines);
! 					}
! 				}
! 				break;
! 			}
! 			break;
! 		case 'm':
! 			if (match_string (buf, "msgid=", msgid, sizeof (msgid))) {
! 				if (arr_ptr) {
! 					arr_ptr[i].msgid = str_dup (msgid);
! 				}
! 				break;
! 			}
! 			break;
! 		case 's':
! 			if (match_string (buf, "scope=", scope, sizeof (scope))) {
  if (debug) {
! 	printf ("scope=[%s] num=[%d]\n", scope, glob_filter.num);
  	fflush (stdout);
  }
! 				global = TRUE;
! 				arr_num = &glob_filter.num;
! 				arr_max = &glob_filter.max;
  				if (*arr_num >= (*arr_max - 1)) {
! 					glob_filter.filter = psExpandFilterArray (
! 						glob_filter.filter, arr_max);
  				}
! 				arr_ptr = glob_filter.filter;
  				i = *arr_num;
  				(*arr_num)++;
  				vSetFilter (&arr_ptr[i]);
  				expired_time = FALSE;
! 				arr_ptr[i].scope = str_dup (scope);
  				subj[0] = '\0';
  				from[0] = '\0';
  				msgid[0] = '\0';
  				lines[0] = '\0';
+ 				icase = 0;
  				secs = 0L;
+ 				psGrp = (struct t_group *) 0;	/* fudge for out of order rules */
+ 				break;
  			}
! 			if (match_string (buf, "subj=", subj, sizeof (subj))) {
! 				if (arr_ptr && ! expired_time) {
! 					if (arr_ptr[i].icase) {
! 						str_lwr (subj, subj);
! 					} 
! 					arr_ptr[i].subj = str_dup (subj);
! 				}
  if (debug) {
  	if (global) {
  		printf ("6. buf=[%s]  Gsubj=[%s]\n", arr_ptr[i].subj, glob_filter.filter[i].subj);
***************
*** 312,363 ****
  		fflush (stdout);
  	}
  }
! 			continue;
! 		}
! 		if (match_string (buf, "from=", from, sizeof (from))) {
! 			if (arr_ptr && ! expired_time) {
! 				if (arr_ptr[i].icase) {
! 					str_lwr (from, from);
! 				} 
! 				arr_ptr[i].from = str_dup (from);
! 			}
! 			continue;
! 		}
! 		if (match_string (buf, "msgid=", msgid, sizeof (msgid))) {
! 			if (arr_ptr) {
! 				arr_ptr[i].msgid = str_dup (msgid);
! 			}
! 			continue;
! 		}
! 		if (match_string (buf, "lines=", lines, sizeof (lines))) {
! 			if (arr_ptr && ! expired_time) {
! 				if (lines[0] == '<') {
! 					arr_ptr[i].lines_cmp = FILTER_LINES_LT;
! 					arr_ptr[i].lines_num = atoi (&lines[1]);
! 				} else if (lines[0] == '>') {
! 					arr_ptr[i].lines_cmp = FILTER_LINES_GT;
! 					arr_ptr[i].lines_num = atoi (&lines[1]);
! 				} else {
! 					arr_ptr[i].lines_cmp = FILTER_LINES_EQ;
! 					arr_ptr[i].lines_num = atoi (lines);
! 				}
! 			}
! 			continue;
! 		}
!  		if (match_long (buf, "time=", &secs)) {
! 			if (arr_ptr && ! expired_time) {
! 				arr_ptr[i].time = secs;
! 				if (secs && current_secs > secs) {
  if (debug) {
  	printf ("EXPIRED  secs=[%ld]  current_secs=[%ld]\n", secs, current_secs);
  	fflush (stdout);
  }
! 					(*arr_num)--;
! 					expired_time = TRUE;
! 					expired = TRUE;
  				}
  			}
! 			continue;
  		}
  	}
  	fclose (fp);
--- 321,378 ----
  		fflush (stdout);
  	}
  }
! 				break;
! 			}
! 			break;
! 		case 't':
! 			if (match_integer (buf, "type=", &type)) {
! if (debug) {
! 	printf ("type=[%d][%s]\n", type, (type == 0 ? "KILL" : "SELECT"));
! 	fflush (stdout);
! }
! 				if (psGrp && ! global) {
! 					arr_num = &psGrp->grps_filter->num;
! 					arr_max = &psGrp->grps_filter->max;
! 					if (*arr_num >= (*arr_max - 1)) {
! 						psGrp->grps_filter->filter = psExpandFilterArray (
! 							psGrp->grps_filter->filter, arr_max);
! 					}
! 					arr_ptr = psGrp->grps_filter->filter;
! 					i = *arr_num;
! 					(*arr_num)++;
! 					vSetFilter (&arr_ptr[i]);
! 					expired_time = FALSE;
! if (debug) {
! 	printf ("grp_filter num=[%d] max=[%d]\n", *arr_num, *arr_max);
! 	fflush (stdout);
! }
! 					subj[0] = '\0';
! 					from[0] = '\0';
! 					msgid[0] = '\0';
! 					lines[0] = '\0';
! 					secs = 0L;
! 				}
! 				if (arr_ptr) {
! 					arr_ptr[i].type = type;
! 				}
! 				break;
! 			}
! 	 		if (match_long (buf, "time=", &secs)) {
! 				if (arr_ptr && ! expired_time) {
! 					arr_ptr[i].time = secs;
! 					if (secs && current_secs > secs) {
  if (debug) {
  	printf ("EXPIRED  secs=[%ld]  current_secs=[%ld]\n", secs, current_secs);
  	fflush (stdout);
  }
! 						(*arr_num)--;
! 						expired_time = TRUE;
! 						expired = TRUE;
! 					}
  				}
+ 				break;
  			}
! 			break;
  		}
  	}
  	fclose (fp);
diff -cr 950726/src/hashstr.c 950726.new/src/hashstr.c
*** 950726/src/hashstr.c	Thu Dec 01 17:00:42 1994
--- 950726.new/src/hashstr.c	Fri Jul 28 07:45:48 1995
***************
*** 36,47 ****
  struct t_hashnode *table[HASHNODE_TABLE_SIZE];
  #endif
  
  char *
  hash_str (s)
  	char *s;
  {
  	long h;				/* result of hash:  index into hash table */
! 	struct t_hashnode *p;	/* used to descend the spillover structs */
  
  	if (s == (char *) 0) {
  		return ((char *) 0);
--- 36,49 ----
  struct t_hashnode *table[HASHNODE_TABLE_SIZE];
  #endif
  
+ static struct t_hashnode *add_string (char *s);
+ 
  char *
  hash_str (s)
  	char *s;
  {
  	long h;				/* result of hash:  index into hash table */
! 	struct t_hashnode **p;	/* used to descend the spillover structs */
  
  	if (s == (char *) 0) {
  		return ((char *) 0);
***************
*** 49,84 ****
  
  	{
  		unsigned char *t = (unsigned char *) s;
! 
! 		h = *t++;
! 		while (*t)
! 			h = ((h << 1) ^ *t++) % (long) HASHNODE_TABLE_SIZE;
! 	}
  
! 	p = table[h];
! 
! 	if (p == (struct t_hashnode *) 0) {
! 		table[h] = add_string (s);
! 		return table[h]->s;
  	}
  
! 	while (TRUE) {
! 		if (STRCMPEQ(s, p->s)) {
! 			return (p->s);
! 		}
  
! 		if (p->next == (struct t_hashnode *) 0) {
! 			p->next = add_string (s);
! 			return p->next->s;
! 		} else {
! 			p = p->next;
  		}
  	}
! 	/* NOTREACHED */
  }
  
  
! struct t_hashnode *
  add_string (s)
  	char *s;
  {
--- 51,82 ----
  
  	{
  		unsigned char *t = (unsigned char *) s;
! 		int len;
  
! 		h = 0; len = 0;
! 		while (*t) {
! 			h = (h << 1) ^ *t++;
! 			if (++len & 7) continue;
! 			h %= (long) HASHNODE_TABLE_SIZE;
! 		}
! 		h %= (long) HASHNODE_TABLE_SIZE;
  	}
  
! 	p = &table[h];
  
! 	while (*p) {
! 		if (STRCMPEQ(s, (*p)->s)) {
! 			return (*p)->s;
  		}
+ 		p = &(*p)->next;
  	}
! 
! 	*p = add_string (s);
! 	return (*p)->s;
  }
  
  
! static struct t_hashnode *
  add_string (s)
  	char *s;
  {
***************
*** 85,99 ****
  	int *iptr;
  	struct t_hashnode *p;
  
! 	p = (struct t_hashnode *) my_malloc (sizeof (struct t_hashnode));
  
  	p->next = (struct t_hashnode *) 0;
  #ifndef OLD_THREADING
- 	iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int)*2 + 1);
  	*iptr++ = -1;
  	*iptr++ = -1;
  #else
- 	iptr = (int *) my_malloc ((unsigned) strlen (s) + sizeof (int) + 1);
  	*iptr++ = -1;
  #endif
  	p->s = (char *) iptr;
--- 83,97 ----
  	int *iptr;
  	struct t_hashnode *p;
  
! 	p = (struct t_hashnode *) my_malloc (sizeof (struct t_hashnode)
! 		+ sizeof (int) * 2 + strlen(s) + 1);
  
  	p->next = (struct t_hashnode *) 0;
+ 	iptr = (int *) &p[1];
  #ifndef OLD_THREADING
  	*iptr++ = -1;
  	*iptr++ = -1;
  #else
  	*iptr++ = -1;
  #endif
  	p->s = (char *) iptr;
***************
*** 124,130 ****
  hash_reclaim ()
  {
  	int i;
- 	int *iptr;
  	struct t_hashnode *p, *next;
  
  #ifdef M_AMIGA
--- 122,127 ----
***************
*** 138,152 ****
  			p = table[i];
  			while (p != (struct t_hashnode *) 0) {
  				next = p->next;
- 				if (p->s != (char *) 0) {
- 					iptr = (int *) p->s;
- #ifndef OLD_THREADING
- 					iptr-=2;
- #else
- 					iptr--;
- #endif
- 					free ((char *) iptr);
- 				}
  				free ((char *) p);
  				p = next;
  			}
--- 135,140 ----
diff -cr 950726/src/init.c 950726.new/src/init.c
*** 950726/src/init.c	Fri Jul 28 05:20:28 1995
--- 950726.new/src/init.c	Fri Jul 28 11:30:48 1995
***************
*** 112,117 ****
--- 112,118 ----
  int real_umask;
  int show_description;
  int strip_blanks;
+ int sigdashes;				/* set TRUE to prepend every signature with dashes */
  int start_editor_offset;
  int tin_uid;
  int tin_gid;
***************
*** 143,148 ****
--- 144,153 ----
  int thread_catchup_on_exit;	/* catchup thread with left arrow key or not */
  int groupname_max_length;	/* max len of group names to display on screen */
  int use_keypad;				/* enables/disables scroll keys on supported terminals */
+ #ifdef HAVE_METAMAIL
+ int use_metamail;			/* enables/disables metamail on MIME messages */
+ int ask_for_metamail;		/* enables/disables the metamail query if a MIME message is going to be displayed */
+ #endif
  int use_mouse;				/* enables/disables mouse support under xterm */
  int auto_cc;				/* add your name to cc automatically */
  int global_filtered_articles;	/* globally killed / auto-selected articles */
***************
*** 187,193 ****
  int xcut_and_paste;				/* xterm button cut & paste at article level */
  int xmouse, xrow, xcol;			/* xterm button pressing information */
  int reread_active_file_secs;	/* reread active file interval in seconds */
- int use_metamail = TRUE;
  
  #ifndef M_AMIGA
  struct passwd *myentry;
--- 192,197 ----
***************
*** 368,373 ****
--- 372,378 ----
  	show_last_line_prev_page = FALSE;
  	show_description = TRUE;
  	show_only_unread_groups = FALSE;
+ 	sigdashes = TRUE;
  	strip_blanks = TRUE;
  #ifdef M_UNIX
  	start_editor_offset = TRUE;
***************
*** 388,393 ****
--- 393,407 ----
  	use_builtin_inews = TRUE;
  	use_keypad = FALSE;
  	use_mouse = TRUE;
+ #ifdef HAVE_METAMAIL
+ #	ifdef M_AMIGA
+ 		/* for all those AmigaElm users ... ;-) */
+ 		use_metamail = (getenv ("NoMetaMail") != NULL) ? TRUE : FALSE;
+ #	else
+ 		use_metamail = TRUE;
+ #	endif
+ 	ask_for_metamail = TRUE;
+ #endif
  	xcut_and_paste = FALSE;
  
  	index_maildir[0] = '\0';
***************
*** 458,463 ****
--- 472,484 ----
  	strcpy (default_mailer_format, mailer);
  #endif
  	strcpy (default_printer, DEFAULT_PRINTER);
+ #ifdef M_AMIGA
+ 	{	extern int tin_bbs_mode;
+ 		if (tin_bbs_mode) {
+ 			strcpy(default_printer, DEFAULT_BBS_PRINTER);
+ 		}
+ 	}
+ #endif
  	strcpy (mailer, get_val (ENV_VAR_MAILER, DEFAULT_MAILER));
  	strcpy (quote_chars, DEFAULT_COMMENT);
  
diff -cr 950726/src/memory.c 950726.new/src/memory.c
*** 950726/src/memory.c	Tue Nov 15 00:16:56 1994
--- 950726.new/src/memory.c	Fri Jul 28 06:53:01 1995
***************
*** 447,453 ****
  #ifdef DEBUG
  	vDbgPrintMalloc (TRUE, file, line, size);
  #endif
! 	if ((p = (char *) calloc (1, size)) == NULL) {
  		sprintf (buf, txt_out_of_memory, progname, size, file, line);
  		error_message (buf, "");
  /*		vPrintBugAddress (); */
--- 447,453 ----
  #ifdef DEBUG
  	vDbgPrintMalloc (TRUE, file, line, size);
  #endif
! 	if ((p = (char *) malloc (size)) == NULL) {
  		sprintf (buf, txt_out_of_memory, progname, size, file, line);
  		error_message (buf, "");
  /*		vPrintBugAddress (); */
diff -cr 950726/src/misc.c 950726.new/src/misc.c
*** 950726/src/misc.c	Fri Jul 28 05:20:30 1995
--- 950726.new/src/misc.c	Fri Jul 28 07:02:30 1995
***************
*** 60,65 ****
--- 60,77 ----
  	char buf[8192];
  	int retcode;
  
+ 	if (!prefix || !prefix[0]) {
+ 		int n;
+ 		while ((n = fread(buf,1,sizeof(buf),fp_ip)) > 0) {
+ 			if (n != fwrite(buf,1,n,fp_op)) {
+ 				sprintf (msg, "Failed copy_fp(). errno=%d", errno);
+ 				perror_message (msg, "");
+ 				return;
+ 			}
+ 		}
+ 		return;
+ 	}
+ 
  	while (fgets (buf, sizeof (buf), fp_ip) != (char *) 0) {
  		retcode = fprintf (fp_op, "%s%s", prefix, buf);
  /*
***************
*** 430,443 ****
  	return val;
  #else
  	unsigned long hash_value = 0L;
  	unsigned char *ptr = (unsigned char *) group;
  
! 	if (*ptr) {
! 		hash_value = *ptr++;
! 
! 		while (*ptr)
! 			hash_value = ((hash_value << 1) ^ *ptr++) % TABLE_SIZE;
  	}
  	return (hash_value);
  #endif
  }
--- 442,457 ----
  	return val;
  #else
  	unsigned long hash_value = 0L;
+ 	unsigned int len = 0;
  	unsigned char *ptr = (unsigned char *) group;
  
! 	while (*ptr) {
! 		hash_value = (hash_value << 1) ^ *ptr++;
! 		if (++len & 7) continue;
! 		hash_value %= TABLE_SIZE;
  	}
+ 	hash_value %= TABLE_SIZE;
+ 
  	return (hash_value);
  #endif
  }
***************
*** 979,985 ****
   *  strcmp that ignores case
   */
  
! #define FOLD_TO_UPPER(a)	(islower ((int) (a)) ? toupper ((int) (a)) : (a))
  
  int
  my_stricmp (p, q)
--- 993,999 ----
   *  strcmp that ignores case
   */
  
! #define FOLD_TO_UPPER(a)	(toupper ((int) (a)))
  
  int
  my_stricmp (p, q)
***************
*** 986,998 ****
  	char *p;
  	char *q;
  {
! 	for (; FOLD_TO_UPPER (*p) == FOLD_TO_UPPER (*q); ++p, ++q) {
  		if (*p == '\0') {
  			return (0);
  		}
  	}
  
! 	return (FOLD_TO_UPPER (*p) - FOLD_TO_UPPER (*q));
  }
  
  /*
--- 1000,1029 ----
  	char *p;
  	char *q;
  {
! 	int r;
! 	for (; (r = FOLD_TO_UPPER (*p) - FOLD_TO_UPPER (*q)) == 0; ++p, ++q) {
  		if (*p == '\0') {
  			return (0);
  		}
  	}
  
! 	return r;
! }
! 
! int
! my_strnicmp(p, q, n)
! 	char *p;
! 	char *q;
! 	size_t n;
! {
! 	int r;
! 	for (; n && (r = (FOLD_TO_UPPER (*p) - FOLD_TO_UPPER (*q))) == 0;
! 			++p, ++q, --n) {
! 		if (*p == '\0') {
! 			return (0);
! 		}
! 	}
! 	return n ? r : 0;
  }
  
  /*
diff -cr 950726/src/newsrc.c 950726.new/src/newsrc.c
*** 950726/src/newsrc.c	Fri Jul 28 05:20:32 1995
--- 950726.new/src/newsrc.c	Fri Jul 28 07:04:11 1995
***************
*** 1166,1176 ****
  
  		/* Mark earlier articles as read, updating num_unread */
  
! 		if (first < min) {
! 			long i;
! 			if (first < group->newsrc.xmin) {
! 				NSETRNG0 (newbitmap, 0, group->newsrc.xmin - first - 1);
! 			}
  			for (i = group->newsrc.xmin; i < min; i++) {
  				if (NTEST(newbitmap, i - first) != ART_READ) {
  					NSET0(newbitmap, i - first);
--- 1166,1175 ----
  
  		/* Mark earlier articles as read, updating num_unread */
  
! 		if (first < group->newsrc.xmin) {
! 			NSETRNG0 (newbitmap, 0, group->newsrc.xmin - first - 1);
! 		}
! 		{	long i;
  			for (i = group->newsrc.xmin; i < min; i++) {
  				if (NTEST(newbitmap, i - first) != ART_READ) {
  					NSET0(newbitmap, i - first);
diff -cr 950726/src/page.c 950726.new/src/page.c
*** 950726/src/page.c	Fri Jul 28 05:20:34 1995
--- 950726.new/src/page.c	Fri Jul 28 07:09:26 1995
***************
*** 768,783 ****
  	}
  	
  #ifdef HAVE_METAMAIL
! 	if (use_metamail == TRUE && note_page == 0 && *note_h_mimeversion &&
  		*note_h_contenttype && *note_h_contentenc &&
  		(!STRNCMPEQ("text/plain", note_h_contenttype, 10) 
  		/* || !STRCMPEQ("bit", note_h_contentenc + 1) */ )) {
! 		if (prompt_yn (cLINES, txt_use_mime, TRUE) == 1) {
  			show_mime_article (note_fp, &arts[respnum]);
  			return;
- 		} else {
- 			show_first_header (respnum, group);
  		}
  	}
  #endif
  
--- 768,783 ----
  	}
  	
  #ifdef HAVE_METAMAIL
! 	if (note_page == 0 && *note_h_mimeversion &&
  		*note_h_contenttype && *note_h_contentenc &&
  		(!STRNCMPEQ("text/plain", note_h_contenttype, 10) 
  		/* || !STRCMPEQ("bit", note_h_contentenc + 1) */ )) {
! 		if (use_metamail && (!ask_for_metamail ||
! 				prompt_yn (cLINES, txt_use_mime, TRUE) == 1)) {
  			show_mime_article (note_fp, &arts[respnum]);
  			return;
  		}
+ 		show_first_header (respnum, group);
  	}
  #endif
  
***************
*** 1366,1379 ****
  	size_t len;
  {
  	size_t	plen = strlen (pat);
- 	char buf_lwr[HEADER_LEN];
- 	char pat_lwr[LEN];
  
! 	str_lwr(buf, buf_lwr);
! 	buf_lwr[plen] = '\0';
! 	str_lwr(pat, pat_lwr);
  
! 	if(STRNCMPEQ(buf_lwr, pat_lwr, plen) && buf[plen] == ':' && buf[plen + 1] == ' ') {
  		plen += 2;
  		while (buf[plen] == ' ') {
  			plen++;
--- 1366,1378 ----
  	size_t len;
  {
  	size_t	plen = strlen (pat);
  
! 	/* A quick check on the length before calling strnicmp() etc. */
! 	if (buf[plen] != ':' || buf[plen+1] != ' ') {
! 		return FALSE;
! 	}
  
! 	if(my_strnicmp(buf, pat, plen) == 0) {
  		plen += 2;
  		while (buf[plen] == ' ') {
  			plen++;
diff -cr 950726/src/pgp.c 950726.new/src/pgp.c
*** 950726/src/pgp.c	Fri Jul 28 05:20:34 1995
--- 950726.new/src/pgp.c	Fri Jul 28 07:10:49 1995
***************
*** 43,49 ****
  static void split_file P_((char *file));
  static void do_pgp P_((int what, char *file, char *mail_to));
  static void pgp_append_public_key P_((char *file));
! static int pgp_available P_(());
  
  static void
  join_files (file)
--- 43,49 ----
  static void split_file P_((char *file));
  static void do_pgp P_((int what, char *file, char *mail_to));
  static void pgp_append_public_key P_((char *file));
! static int pgp_available P_((void));
  
  static void
  join_files (file)
diff -cr 950726/src/search.c 950726.new/src/search.c
*** 950726/src/search.c	Tue May 16 00:07:18 1995
--- 950726.new/src/search.c	Fri Jul 28 07:11:42 1995
***************
*** 549,563 ****
  	char *dst;
  {
  	while (*src) {
! 		if (isupper(*src)) {
! 			*dst = tolower(*src);
! 		} else {
! 			*dst = *src;
! 		}
  		src++;
- 		dst++;
  	}
  	*dst = '\0';
  }
- 
- 
--- 549,556 ----
  	char *dst;
  {
  	while (*src) {
! 		*dst++ = tolower(*src);
  		src++;
  	}
  	*dst = '\0';
  }
diff -cr 950726/src/sigfile.c 950726.new/src/sigfile.c
*** 950726/src/sigfile.c	Wed Jun 21 23:06:00 1995
--- 950726.new/src/sigfile.c	Fri Jul 28 07:13:13 1995
***************
*** 67,73 ****
  		if (debug == 2) {
  			error_message ("USING random sig=[%s]", sigfile);
  		}
! 		fprintf (fp, "\n-- \n");
  		joinpath (path, homedir, ".sigfixed");
  		if ((fixfp = fopen (path, "r")) != (FILE *) 0) {
  			copy_fp (fixfp, fp, "");
--- 67,73 ----
  		if (debug == 2) {
  			error_message ("USING random sig=[%s]", sigfile);
  		}
! 		fprintf (fp, "\n%s", sigdashes ? "-- \n" : "\n");
  		joinpath (path, homedir, ".sigfixed");
  		if ((fixfp = fopen (path, "r")) != (FILE *) 0) {
  			copy_fp (fixfp, fp, "");
***************
*** 84,90 ****
  	 */
  	if ((sigfp = fopen (default_signature, "r")) != (FILE *) 0) {
  		if (flag) {
! 			fprintf (fp, "\n-- \n");
  			copy_fp (sigfp, fp, "");
  		}
  		fclose (sigfp);
--- 84,90 ----
  	 */
  	if ((sigfp = fopen (default_signature, "r")) != (FILE *) 0) {
  		if (flag) {
! 			fprintf (fp, "\n%s", sigdashes ? "-- \n" : "\n");
  			copy_fp (sigfp, fp, "");
  		}
  		fclose (sigfp);
***************
*** 92,98 ****
  	}
  
  	if ((sigfp = fopen (path, "r")) != (FILE *) 0) {
! 		fprintf (fp, "\n-- \n");
  		copy_fp (sigfp, fp, "");
  		fclose (sigfp);
  	}
--- 92,98 ----
  	}
  
  	if ((sigfp = fopen (path, "r")) != (FILE *) 0) {
! 		fprintf (fp, "\n%s", sigdashes ? "-- \n" : "\n");
  		copy_fp (sigfp, fp, "");
  		fclose (sigfp);
  	}
