[3809] in Athena Bugs

home help back first fref pref prev next nref lref last post

No subject found in mail header

daemon@ATHENA.MIT.EDU (raeburn@ATHENA.MIT.EDU)
Mon Dec 11 23:44:12 1989

From: raeburn@ATHENA.MIT.EDU
Date: Mon, 11 Dec 89 23:43:52 -0500
To: bugs@ATHENA.MIT.EDU
Path: bloom-beacon!mit-eddie!mintaka!think!zaphod.mps.ohio-state.edu!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	

home help back first fref pref prev next nref lref last post