2
* Copyright (C) 1984-2000 Mark Nudelman
4
* You may distribute under the terms of either the GNU General Public
5
* License or the Less License, as specified in the README file.
7
* For more information about less, or for information on how to
8
* contact the author, see the README file.
13
* Silly little program to generate the help.c source file
14
* from the less.hlp text file.
15
* help.c just contains a char array whose contents are
16
* the contents of less.hlp.
29
printf("/* This file was generated by mkhelp from less.hlp */\n");
30
printf("#include \"less.h\"\n");
31
printf("constant char helpdata[] = {\n");
33
while (prevch = ch, (ch = getchar()) != EOF)
58
if (ch >= ' ' && ch < 0x7f)
61
printf("0x%02x,", ch);
65
/* Add an extra null char to avoid having a trailing comma. */
67
printf("constant int size_helpdata = sizeof(helpdata) - 1;\n");