summaryrefslogtreecommitdiffstats
path: root/contrib/less/less.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/less/less.h')
-rw-r--r--contrib/less/less.h26
1 files changed, 6 insertions, 20 deletions
diff --git a/contrib/less/less.h b/contrib/less/less.h
index 333e70a..ca307d3 100644
--- a/contrib/less/less.h
+++ b/contrib/less/less.h
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (C) 1984-2000 Mark Nudelman
*
@@ -70,9 +71,6 @@
#if HAVE_CTYPE_H
#include <ctype.h>
#endif
-#if HAVE_LIMITS_H
-#include <limits.h>
-#endif
#if HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@ -83,7 +81,7 @@
#include <modes.h>
#include <strings.h>
#endif
-#if MSDOS_COMPILER==WIN32C || OS2
+#if MSDOS_COMPILER==WIN32C
#include <io.h>
#endif
#if MSDOS_COMPILER==DJGPPC
@@ -139,21 +137,13 @@ void free();
#define BAD_LSEEK ((off_t)-1)
-#ifndef CHAR_BIT
-#define CHAR_BIT 8
-#endif
-
-/*
- * Upper bound on the string length of an integer converted to string.
- * 302 / 1000 is ceil (log10 (2.0)). Subtract 1 for the sign bit;
- * add 1 for integer division truncation; add 1 more for a minus sign.
- */
-#define INT_STRLEN_BOUND(t) ((sizeof(t) * CHAR_BIT - 1) * 302 / 1000 + 1 + 1)
-
/*
* Special types and constants.
*/
typedef off_t POSITION;
+#define PR_POSITION "%lld"
+#define MAX_PRINT_POSITION 20
+#define MAX_PRINT_INT 10
#define NULL_POSITION ((POSITION)(-1))
@@ -190,7 +180,7 @@ typedef off_t POSITION;
#if MSDOS_COMPILER==MSOFTC
#define SET_BINARY(f) _setmode(f, _O_BINARY);
#else
-#if MSDOS_COMPILER || OS2
+#if MSDOS_COMPILER
#define SET_BINARY(f) setmode(f, O_BINARY)
#else
#define SET_BINARY(f)
@@ -294,10 +284,6 @@ struct textlist
#define AT_INVIS (4)
#define AT_STANDOUT (5)
-#if '0' == 240
-#define IS_EBCDIC_HOST 1
-#endif
-
#if IS_EBCDIC_HOST
/*
* Long definition for EBCDIC.
OpenPOWER on IntegriCloud