1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
/*##############################################################################
FUNNNELWEB COPYRIGHT
====================
FunnelWeb is a literate-programming macro preprocessor.
The FunnelWeb web is at http://www.ross.net/funnelweb/
Copyright (c) Ross N. Williams 1992. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of Version 2 of the GNU General Public License as
published by the Free Software Foundation (http://www.gnu.org/).
This program is distributed WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See Version 2 of the GNU General Public License for more details.
You should have received a copy of Version 2 of the GNU General Public
License along with this program. If not, you can obtain a copy as follows:
ftp://prep.ai.mit.edu/pub/gnu/COPYING-2.0
or write to:
Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
Section 2a of the license requires that all changes to this file be
recorded prominently in this file. Please record all changes here.
Programmers:
RNW Ross N. Williams (ross@ross.net)
Changes:
07-May-1992 RNW Program prepared for release under GNU GPL V2.
##############################################################################*/
/******************************************************************************/
/* HELP_GNU.C */
/******************************************************************************/
/* */
/* REPRESENTING MESSAGES AS C CODE */
/* =============================== */
/* Experience has shown that it is much more reliable to code text messages */
/* into a program than to expect the program to track down text files */
/* containing the messages at run time. Worthwhile for smallish files (such */
/* as these help messages) at least. For this reason, all the messages in */
/* this module are represented by code (e.g. as in printf statements). */
/* */
/* There is no difficulty turning a short message into code; simply place it */
/* in output statements. However, large messages (e.g. the GNU license) are */
/* more tedious, and also present more of a problem if it is necessary to */
/* change them substantially at a later date. This problem has been solved in */
/* FunnelWeb by writing a small program that reads a text file and writes out */
/* C code that writes the text file. The files involved are: */
/* */
/* help_gnu.mes - The original message. */
/* help_gnu.c - C code to write out the original message. */
/* */
/* To turn help_gnu.mes into help_gnu.c, give the following command in */
/* FunnelWeb interactive mode: codify help_gnu.txt help_gnu.c */
/* */
/******************************************************************************/
#include "style.h"
#include "help_gnu.h"
/******************************************************************************/
/* This module contains many many output statements that call an output */
/* function. To neaten up all these calls, we define a global variable to */
/* hold a pointer to the function and simple macro to write output using */
/* the function. */
LOCVAR void (*pf) P_((char *));
#define WX(STR) (*pf)(STR);(*pf)("\n")
#define WY(STR) (*pf)(STR)
/******************************************************************************/
EXPORT void hel_gnu (p_outf)
void (*p_outf) P_((char *));
{
pf=p_outf;
WY("\n");
WY("FunnelWeb License\n");
WY("-----------------\n");
WY("FunnelWeb is distributed under the following license.\n");
WY("\n");
WY("--<Start of GNU License>--\n");
#include "help_gnu.ctx"
WY("--<End of GNU License>--\n");
WY("\n");
WY("If all that scrolled off your screen too quickly, don't worry. You can\n");
WY("capture this message (or any other FunnelWeb output) in a file by\n");
WY("specifying the +J option when you invoke FunnelWeb. For example:\n");
WY("\n");
WY(" fw +hlicense +jresult.txt\n");
WY("\n");
}
/******************************************************************************/
/* End of HELP_GNU.C */
/******************************************************************************/
|