Subject: PATCH: Packing the addresses

From: "Denis N. Antonioli" <[email-masked]>
Date: Tue, 18 Aug 1998 17:24:00 +0200 (MET DST)

-----BEGIN PGP SIGNED MESSAGE-----

Hi,

There was a request to restore the old, more space-efficient way to
way to display e-mails.

This patch adds a new configuration option, 'pack-address-headers'.
when the option is unset, pine writes one address pro line,
when the option is   set, pine packs as many addresses as possible
                           pro line.

This option comes in handy when the correspondents neglected to use
a mailing list manager :-)

Please consider including this patch in the next revision of pine.

Best thanks for all the work,
	Denis N. Antonioli

- -- 
  If you want to program in C, program in C. It's a nice language. I
  use it occasionally...   :-)
      -- Larry Wall in <[email-masked]>

*** pine/helptext.c.org	Tue Aug 18 16:17:13 1998
--- pine/helptext.c	Tue Aug 18 16:20:38 1998
***************
*** 12173,12178 ****
--- 12173,12183 ----
  NULL
  };
  
+ char *h_config_pack_addr_headers[] = {
+  "Packs addresses when displaying mails.",
+ NULL
+ };
+ 
  struct _help_texts h_texts[] = {
  {h_news,"h_news"},
  {h_info_on_locking,"h_info_on_locking"},
***************
*** 12430,12435 ****
--- 12435,12441 ----
  {h_config_add_ldap,"h_config_add_ldap"},
  {h_config_lame_list_mode,"h_config_lame_list_mode"},
  {h_config_undo,"h_config_undo"},
+ {h_config_pack_addr_headers,"h_config_pack_addr_headers"},
  {h_os_index_whereis,"h_os_index_whereis"},
  {h_os_index_whereis_agg,"h_os_index_whereis_agg"},
  {h_oe_add_full,"h_oe_add_full"},
*** pine/helptext.h.org	Tue Aug 18 16:17:08 1998
--- pine/helptext.h	Tue Aug 18 16:17:56 1998
***************
*** 719,725 ****
  
  extern char *h_custom_print[] ; 
  
! 
  
  extern struct _help_texts h_texts[];
  
--- 719,725 ----
  
  extern char *h_custom_print[] ; 
  
! extern char *h_config_pack_addr_headers[];
  
  extern struct _help_texts h_texts[];
  
*** pine/init.c.org	Tue Aug 18 15:52:24 1998
--- pine/init.c	Tue Aug 18 16:44:55 1998
***************
*** 1464,1469 ****
--- 1464,1470 ----
  	{"news-deletes-across-groups",		F_NEWS_CROSS_DELETE},
  	{"news-post-without-validation",	F_NO_NEWS_VALIDATION},
  	{"news-read-in-newsrc-order",		F_READ_IN_NEWSRC_ORDER},
+ 	{"pack-address-header",             F_PACK_ADDR_HEADERS},
  	{"pass-control-characters-as-is",	F_PASS_CONTROL_CHARS},
  	{"preserve-start-stop-characters",	F_PRESERVE_START_STOP},
  	{"print-offers-custom-cmd-prompt",	F_CUSTOM_PRINT},
*** pine/mailview.c.org	Tue Aug 18 14:28:20 1998
--- pine/mailview.c	Tue Aug 18 16:34:50 1998
***************
*** 3920,3927 ****
  	    if(!((group == 2 && addr->host)	/* 1st addr in group, */
  	       || (!addr->host && !addr->mailbox))){ /* or end of group */
  		gf_puts(",", pc);
! 		gf_puts(NEWLINE, pc);		/* ONE address/line please */
  		gf_puts("   ", pc);
  	    }
  
  	    gf_puts(" ", pc);
--- 3920,3929 ----
  	    if(!((group == 2 && addr->host)	/* 1st addr in group, */
  	       || (!addr->host && !addr->mailbox))){ /* or end of group */
  		gf_puts(",", pc);
! 		if (F_OFF(F_PACK_ADDR_HEADERS, ps_global)){   /* ONE address/line please */
! 		  gf_puts(NEWLINE, pc);
  		  gf_puts("   ", pc);
+ 		  }
  	    }
  
  	    gf_puts(" ", pc);
*** pine/other.c.org	Tue Aug 18 16:13:45 1998
--- pine/other.c	Tue Aug 18 16:14:30 1998
***************
*** 5180,5185 ****
--- 5180,5187 ----
  	    return(h_config_fast_recent);
  	  case F_FIX_BROKEN_LIST :
  	    return(h_config_lame_list_mode);
+ 	  case F_PACK_ADDR_HEADERS :
+ 		return(h_config_pack_addr_headers);
  #ifdef	ENABLE_LDAP
  	  case F_ADD_LDAP_TO_ABOOK :
  	    return(h_config_add_ldap);
*** pine/pine.h.org	Tue Aug 18 16:01:45 1998
--- pine/pine.h	Tue Aug 18 16:04:41 1998
***************
*** 848,853 ****
--- 848,854 ----
  #ifdef	ENABLE_LDAP
  	F_ADD_LDAP_TO_ABOOK,
  #endif
+ 	F_PACK_ADDR_HEADERS,
  	F_FEATURE_LIST_COUNT	/* Number of features */
  } FeatureList;