Article View: comp.sys.ibm.pc.rt
Article #603Patch for more
From: brunner
Date: Mon, 04 Dec 1989 18:26
Date: Mon, 04 Dec 1989 18:26
62 lines
1856 bytes
1856 bytes
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
Technical Details
Message-ID:
<3171@ibmpa.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!ibmpa!bullhead!brunnerShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!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