summaryrefslogtreecommitdiffstats
path: root/contrib/less/mkhelp.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2009-05-08 23:34:35 +0000
committerdelphij <delphij@FreeBSD.org>2009-05-08 23:34:35 +0000
commitd069efd47cacc3156036ed37d5532d6a1d4f55c3 (patch)
tree2526f6b109843b646672c1537476dc51e56c0454 /contrib/less/mkhelp.c
parent6aa3e25391d160482339ee072c010bcd22dfbbd1 (diff)
downloadFreeBSD-src-d069efd47cacc3156036ed37d5532d6a1d4f55c3.zip
FreeBSD-src-d069efd47cacc3156036ed37d5532d6a1d4f55c3.tar.gz
Flatten all tags of the dist tree of less.
Diffstat (limited to 'contrib/less/mkhelp.c')
-rw-r--r--contrib/less/mkhelp.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/contrib/less/mkhelp.c b/contrib/less/mkhelp.c
deleted file mode 100644
index f4a7ea7..0000000
--- a/contrib/less/mkhelp.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 1984-2007 Mark Nudelman
- *
- * You may distribute under the terms of either the GNU General Public
- * License or the Less License, as specified in the README file.
- *
- * For more information about less, or for information on how to
- * contact the author, see the README file.
- */
-
-
-/*
- * Silly little program to generate the help.c source file
- * from the less.hlp text file.
- * help.c just contains a char array whose contents are
- * the contents of less.hlp.
- */
-
-#include <stdio.h>
-
- int
-main(argc, argv)
- int argc;
- char *argv[];
-{
- int ch;
- int prevch;
-
- printf("/* This file was generated by mkhelp from less.hlp */\n");
- printf("#include \"less.h\"\n");
- printf("constant char helpdata[] = {\n");
- ch = 0;
- while (prevch = ch, (ch = getchar()) != EOF)
- {
- switch (ch)
- {
- case '\'':
- printf("'\\'',");
- break;
- case '\\':
- printf("'\\\\',");
- break;
- case '\b':
- printf("'\\b',");
- break;
- case '\t':
- printf("'\\t',");
- break;
- case '\n':
- if (prevch != '\r')
- printf("'\\n',\n");
- break;
- case '\r':
- if (prevch != '\n')
- printf("'\\n',\n");
- break;
- default:
- if (ch >= ' ' && ch < 0x7f)
- printf("'%c',", ch);
- else
- printf("0x%02x,", ch);
- break;
- }
- }
- /* Add an extra null char to avoid having a trailing comma. */
- printf(" 0 };\n");
- printf("constant int size_helpdata = sizeof(helpdata) - 1;\n");
- return (0);
-}
OpenPOWER on IntegriCloud