summaryrefslogtreecommitdiff
path: root/usr.bin/less/ch.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2003-04-14 14:33:58 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2003-04-14 14:33:58 +0000
commitea522e21eac177af59e43049f56f453b837606b7 (patch)
tree27ff45643e9e0c47a8e114cb5c4de5930bf76aa8 /usr.bin/less/ch.c
parentb6983e22ce2ae5a86257c287e78e56c37831bf73 (diff)
o go back to using a help file instead of embedding it in the binary
o deal with HELPFILE not being defined o add a SMALL definition to make a smaller less for the boot floppies This still needs to be pared down a bit for the SMALL case
Diffstat (limited to 'usr.bin/less/ch.c')
-rw-r--r--usr.bin/less/ch.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/usr.bin/less/ch.c b/usr.bin/less/ch.c
index 0446a2c2292..ca54da967cf 100644
--- a/usr.bin/less/ch.c
+++ b/usr.bin/less/ch.c
@@ -98,8 +98,6 @@ static int maxbufs = -1;
extern int autobuf;
extern int sigs;
extern int secure;
-extern constant char helpdata[];
-extern constant int size_helpdata;
extern IFILE curr_ifile;
#if LOGFILE
extern int logfile;
@@ -211,10 +209,6 @@ fch_get()
bp->data[bp->datasize] = ch_ungotchar;
n = 1;
ch_ungotchar = -1;
- } else if (ch_flags & CH_HELPFILE)
- {
- bp->data[bp->datasize] = helpdata[ch_fpos];
- n = 1;
} else
{
n = iread(ch_file, &bp->data[bp->datasize],
@@ -505,8 +499,6 @@ ch_length()
{
if (ignore_eoi)
return (NULL_POSITION);
- if (ch_flags & CH_HELPFILE)
- return (size_helpdata);
return (ch_fsize);
}
@@ -769,7 +761,7 @@ ch_close()
{
int keepstate = FALSE;
- if (ch_flags & (CH_CANSEEK|CH_POPENED|CH_HELPFILE))
+ if (ch_flags & (CH_CANSEEK|CH_POPENED))
{
/*
* We can seek or re-open, so we don't need to keep buffers.
@@ -785,7 +777,7 @@ ch_close()
* But don't really close it if it was opened via popen(),
* because pclose() wants to close it.
*/
- if (!(ch_flags & (CH_POPENED|CH_HELPFILE)))
+ if (!(ch_flags & CH_POPENED))
close(ch_file);
ch_file = -1;
} else