From edith!cmcl2!rutgers!usc!wuarchive!uunet!ibmpa!bullhead!brunner Tue Dec  5 15:00:19 EST 1989
Article 2007 of comp.sys.ibm.pc.rt:
Path: edith!cmcl2!rutgers!usc!wuarchive!uunet!ibmpa!bullhead!brunner
>From: brunner@bullhead.uucp
Newsgroups: comp.sys.ibm.pc.rt
Subject: Patch for more
Summary: replaces 0x7fffffffffffffffL with LONG_MAX
Keywords: V1.23 more hc2.any
Message-ID: <3171@ibmpa.UUCP>
Date: 4 Dec 89 18:26:45 GMT
Sender: news@ibmpa.UUCP
Reply-To: brunner@ibmsupt.UUCP ()
Organization: IBM AWD Palo Alto
Lines: 62

Subject: Patch for more
Index: /usr/src/ucb/more.c IBM/4.3

Description:
	The 2.1 series of C compilers from MetaWare return an error
	when an integer constant exceeds the largest unsigned number.

Fix:	Apply the following patch.


*** more.c	Fri Dec  9 12:11:17 1988
--- more.c.fix	Wed Nov 15 16:28:09 1989
***************
*** 51,56 ****
--- 51,59 ----
  #define ESC	'\033'
  #define QUIT	'\034'
  
+ #define       LONG_MAX        0x7fffffff
+ 
+ 
  struct sgttyb	otty, savetty;
  long		file_pos, file_size;
  int		fnum, no_intty, no_tty, slow_tty;
***************
*** 239,245 ****
  		left = command (fnames[fnum], f);
  	    }
  	    if (left != 0) {
! 		if ((noscroll || clearit) && (file_size != 0x7fffffffffffffffL))
  		    if (clreol)
  			home ();
  		    else
--- 242,248 ----
  		left = command (fnames[fnum], f);
  	    }
  	    if (left != 0) {
! 		if ((noscroll || clearit) && (file_size != LONG_MAX))
  		    if (clreol)
  			home ();
  		    else
***************
*** 378,384 ****
      }
      }
      if ((file_size = stbuf.st_size) == 0)
! 	file_size = 0x7fffffffffffffffL;
      return (f);
  }
  
--- 381,387 ----
      }
      }
      if ((file_size = stbuf.st_size) == 0)
! 	file_size = LONG_MAX;
      return (f);
  }
  

Eric Brunner, Consultant, IBM AWD Palo Alto	(415) 855-4486
inet: brunner@monet.berkeley.edu
uucp: uunet!ibmsupt!brunner	


