diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-03 16:29:47 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-07-03 16:29:47 +0000 |
commit | 405db57092c0b7c543f0e965f57ba5b6c2f96aa4 (patch) | |
tree | 19224b15257e4abe46837d8aa796c1465b522715 /usr.bin/less | |
parent | c6e3f5dd2325ffc008f8594e5147feec37ccc543 (diff) |
use SMALL_PROGRAM to knock out some code
Diffstat (limited to 'usr.bin/less')
-rw-r--r-- | usr.bin/less/edit.c | 4 | ||||
-rw-r--r-- | usr.bin/less/filename.c | 2 | ||||
-rw-r--r-- | usr.bin/less/ifile.c | 2 | ||||
-rw-r--r-- | usr.bin/less/main.c | 2 | ||||
-rw-r--r-- | usr.bin/less/mark.c | 4 | ||||
-rw-r--r-- | usr.bin/less/optfunc.c | 2 | ||||
-rw-r--r-- | usr.bin/less/opttbl.c | 2 |
7 files changed, 18 insertions, 0 deletions
diff --git a/usr.bin/less/edit.c b/usr.bin/less/edit.c index 564ad5e9398..38d0f6ac399 100644 --- a/usr.bin/less/edit.c +++ b/usr.bin/less/edit.c @@ -115,6 +115,7 @@ forw_textlist(tlist, prev) return (s); } +#ifndef SMALL_PROGRAM public char * back_textlist(tlist, prev) struct textlist *tlist; @@ -140,6 +141,7 @@ back_textlist(tlist, prev) s--; return (s); } +#endif /* SMALL_PROGRAM */ /* * Close the current input file. @@ -401,6 +403,7 @@ edit_ifile(ifile) return (0); } +#ifndef SMALL_PROGRAM /* * Edit a space-separated list of files. * For each filename in the list, enter it into the ifile list. @@ -460,6 +463,7 @@ edit_list(filelist) reedit_ifile(save_ifile); return (edit(good_filename)); } +#endif /* SMALL_PROGRAM */ /* * Edit the first file in the command line (ifile) list. diff --git a/usr.bin/less/filename.c b/usr.bin/less/filename.c index 1c499e99411..761f92996ef 100644 --- a/usr.bin/less/filename.c +++ b/usr.bin/less/filename.c @@ -256,6 +256,7 @@ dirfile(dirname, filename) return (pathname); } +#ifndef SMALL_PROGRAM /* * Return the full pathname of the given file in the "home directory". */ @@ -301,6 +302,7 @@ homefile(filename) #endif return (NULL); } +#endif /* SMALL_PROGRAM */ #ifdef HELPFILE /* diff --git a/usr.bin/less/ifile.c b/usr.bin/less/ifile.c index 694621eaf41..bc3d7f1c437 100644 --- a/usr.bin/less/ifile.c +++ b/usr.bin/less/ifile.c @@ -307,12 +307,14 @@ hold_ifile(ifile, incr) int_ifile(ifile)->h_hold += incr; } +#ifndef SMALL_PROGRAM public int held_ifile(ifile) IFILE ifile; { return (int_ifile(ifile)->h_hold); } +#endif /* SMALL_PROGRAM */ public void * get_filestate(ifile) diff --git a/usr.bin/less/main.c b/usr.bin/less/main.c index 09cbb9d9665..f0fff189f24 100644 --- a/usr.bin/less/main.c +++ b/usr.bin/less/main.c @@ -324,6 +324,7 @@ skipsp(s) return (s); } +#ifndef SMALL_PROGRAM /* * See how many characters of two strings are identical. * If uppercase is true, the first string must begin with an uppercase @@ -358,6 +359,7 @@ sprefix(ps, s, uppercase) } return (len); } +#endif /* SMALL_PROGRAM */ /* * Exit the program. diff --git a/usr.bin/less/mark.c b/usr.bin/less/mark.c index bf6350735d1..9063c93848c 100644 --- a/usr.bin/less/mark.c +++ b/usr.bin/less/mark.c @@ -129,6 +129,7 @@ getmark(c) return (m); } +#ifndef SMALL_PROGRAM /* * Is a mark letter is invalid? */ @@ -138,6 +139,7 @@ badmark(c) { return (getmark(c) == NULL); } +#endif /* SMALL_PROGRAM */ /* * Set a user-defined mark. @@ -216,6 +218,7 @@ gomark(c) jump_loc(scrpos.pos, scrpos.ln); } +#ifndef SMALL_PROGRAM /* * Return the position associated with a given mark letter. * @@ -240,6 +243,7 @@ markpos(c) } return (m->m_scrpos.pos); } +#endif /* SMALL_PROGRAM */ /* * Clear the marks associated with a specified ifile. diff --git a/usr.bin/less/optfunc.c b/usr.bin/less/optfunc.c index 8f6e89c787c..06a12b2403f 100644 --- a/usr.bin/less/optfunc.c +++ b/usr.bin/less/optfunc.c @@ -28,7 +28,9 @@ #include "less.h" #include "option.h" +#ifndef SMALL_PROGRAM extern int nbufs; +#endif extern int bufspace; extern int pr_type; extern int nohelp; diff --git a/usr.bin/less/opttbl.c b/usr.bin/less/opttbl.c index 71471b81e3b..ae66df1f997 100644 --- a/usr.bin/less/opttbl.c +++ b/usr.bin/less/opttbl.c @@ -30,7 +30,9 @@ public int quit_at_eof; /* Quit after hitting end of file twice */ public int quit_if_one_screen; /* Quit if EOF on first screen */ public int squeeze; /* Squeeze multiple blank lines into one */ public int be_helpful; /* more(1) style -d */ +#ifndef SMALL_PROGRAM public int tabstop; /* Tab settings */ +#endif public int back_scroll; /* Repaint screen on backwards movement */ public int forw_scroll; /* Repaint screen on forward movement */ public int caseless; /* Do "caseless" searches */ |