[net.sources.bugs] mcp 1.0 patch #3

kyle@xanth.UUCP (03/05/87)

This patch makes the following changes in the MCP 1.0 distribution.

1)	The unbind- commands no longer erroneously report that
	classes, sigs, and groups are not bound to aliases.
2)	Some cosmetic changes in the date routines (no period after
	"May" for one thing...)

This patch will not work if patches #1 and #2 have not been applied.

To apply this patch from readnews, vnews or rn, type "s|patch -d -p0 DIR",
with DIR being the directory where the mcp sources and documentation are kept.
Alternately you can save this article and later cd to DIR and "patch -p0 <
thisarticle".  Don't leave off the "-p0".  If you don't have patch (alas!),
you'll have to apply the context diffs below by hand.

Prereq: (#2)
Index: src/version.c
*** src/version.c.old	Thu Feb 12 09:45:53 1987
--- src/version.c	Thu Feb 12 09:36:23 1987
***************
*** 3,9 ****
  	char	*n_copyright;
  };
  static	struct notice Note = {
! "mcp version 1.0 (#2) ",
  "(c) 1986 by Kyle E. Jones\n\n\
  All sources and documentation of this mcp distribution are\n\
  included in this copyright, but permission is granted to\n\
--- 3,9 ----
  	char	*n_copyright;
  };
  static	struct notice Note = {
! "mcp version 1.0 (#3) ",
  "(c) 1986 by Kyle E. Jones\n\n\
  All sources and documentation of this mcp distribution are\n\
  included in this copyright, but permission is granted to\n\

Index: src/bind.c
*** src/bind.c.old	Thu Feb 12 09:52:09 1987
--- src/bind.c	Thu Feb 12 09:51:56 1987
***************
*** 258,264 ****
  	    err1("%s: no such group", (char *)v[1]);
  	    return;
  	}
! 	if (gm->gm_aliases.l_count) {
  	    err1("%s: not bound to any aliases", gm->gm_name);
  	    return;
  	}
--- 258,264 ----
  	    err1("%s: no such group", (char *)v[1]);
  	    return;
  	}
! 	if (gm->gm_aliases.l_count == 0) {
  	    err1("%s: not bound to any aliases", gm->gm_name);
  	    return;
  	}
***************
*** 327,333 ****
  	    err1("%s: no such class", (char *)v[1]);
  	    return;
  	}
! 	if (cs->cs_aliases.l_count) {
  	    err1("%s: not bound to any aliases", cs->cs_name);
  	    return;
  	}
--- 327,333 ----
  	    err1("%s: no such class", (char *)v[1]);
  	    return;
  	}
! 	if (cs->cs_aliases.l_count == 0) {
  	    err1("%s: not bound to any aliases", cs->cs_name);
  	    return;
  	}
***************
*** 398,404 ****
  	    err1("%s: no such sig", (char *)v[1]);
  	    return;
  	}
! 	if (sg->sg_aliases.l_count) {
  	    err1("%s: not bound to any aliases", sg->sg_name);
  	    return;
  	}
--- 398,404 ----
  	    err1("%s: no such sig", (char *)v[1]);
  	    return;
  	}
! 	if (sg->sg_aliases.l_count == 0) {
  	    err1("%s: not bound to any aliases", sg->sg_name);
  	    return;
  	}

Index: src/date.c
*** src/date.c.old	Tue Feb 17 13:38:43 1987
--- src/date.c	Tue Feb 17 13:55:37 1987
***************
*** 39,47 ****
  };
  
  static	char *Months[12] = {
! 	"January", "February", "March", "April",
! 	"May", "June", "July", "August",
! 	"September", "October", "November", "December"
  };
  
  static	int DaysInMonths[12] = {
--- 39,47 ----
  };
  
  static	char *Months[12] = {
! 	"Jan.", "Feb.", "Mar.", "Apr.",
! 	"May", "June", "July", "Aug.",
! 	"Sep.", "Oct.", "Nov.", "Dec."
  };
  
  static	int DaysInMonths[12] = {
***************
*** 89,95 ****
  		switch (c) {
  		case ' ':
  			indx = (indx+1) % 12;
! 			(void) sprintf(line, "%-9s", Months[indx]);
  			redraw(prompt, line);
  			break;
  		case '\b':
--- 89,95 ----
  		switch (c) {
  		case ' ':
  			indx = (indx+1) % 12;
! 			(void) sprintf(line, "%-4s", Months[indx]);
  			redraw(prompt, line);
  			break;
  		case '\b':
***************
*** 96,102 ****
  		case '\177':
  			if (--indx < 0)
  				indx = 11;
! 			(void) sprintf(line, "%-9s", Months[indx]);
  			redraw(prompt, line);
  			break;
  		default:
--- 96,102 ----
  		case '\177':
  			if (--indx < 0)
  				indx = 11;
! 			(void) sprintf(line, "%-4s", Months[indx]);
  			redraw(prompt, line);
  			break;
  		default:
***************
*** 357,365 ****
  	else if (tt->tm_hour == 0)
  		tt->tm_hour = 12;
  
! 	(void) sprintf(tstr, "%d:%02d%s  %.3s. %d, %.4s (%s)",
  				tt->tm_hour, tt->tm_min, ampm,
! 				cp+4, tt->tm_mday, 
  				cp+20, description);
  	return tstr;
  }
--- 357,365 ----
  	else if (tt->tm_hour == 0)
  		tt->tm_hour = 12;
  
! 	(void) sprintf(tstr, "%d:%02d%s, %s %d, %.4s (%s)",
  				tt->tm_hour, tt->tm_min, ampm,
! 				Months[tt->tm_mon], tt->tm_mday, 
  				cp+20, description);
  	return tstr;
  }
-- 
kyle jones, odu computer science
ARPA: kyle@xanth.cs.odu.edu		CSNET: kyle@odu.csnet
UUCP: kyle@xanth.uucp