Category : C Source Code
Archive   : HIM100.ZIP
Filename : HELPDEMO.C

 
Output of file : HELPDEMO.C contained in archive : HIM100.ZIP
/*
Demo program to demonstrate the HIM Window, Help, and Keyboard Manager
routines.
*/
/*
*
* Copyright 1988 Allsoft (tm)
* 100 Calle Playa Del Sol NE
* Albuquerque, NM 87109
*
* ALL RIGHTS RESERVED.
*
* Unauthorized distribution, adaptation or use may be
* subject to civil and criminal penalties.
*
*/

#include "stdio.h" /* standard include file */
#include "malloc.h" /* used in lminit and wninit call */
#include "lm.h" /* list manager include file */
#include "wn.h" /* window manager include file */
#include "km.h" /* keyboard manager include file */
#include "hm.h" /* help manager include file */

main()
{
int kbhit(),getch(); /* used in kminit call */
int wide(), narrow(), multi(), quit();

lminit(malloc,free,0); /* init the list manager */
kminit(kbhit,getch); /* init the keyboard manager */
wninit(0,0,NULL,0,malloc,free); /* init the window manager */
hminit("HELPFILE.HLP",0,
0,0,WNBLUE,WNCYAN); /* init the help manager */

kmsir(KF1,wide); /* register our function key routines */
kmsir(KF2,narrow);
kmsir(KF3,multi);
kmsir(KF10,quit);

explain(); /* tell user how program works */
for (;;)
kmgetch(); /* get keys */

}

explain()
/********/
{
int wnum;

wnum = wncreate(2,0,80,22,WNBLACK,WNCYAN,WNBLACK,WNBLUE);
wnttitle(wnum,"[ Helpdemo V1.00 4/4/88 ]");
wnprintf(wnum,"\nA program to demonstrate capabilities of the Window, Keyboard, and ");
wnprintf(wnum,"\nHelp Manager routines contained in the Human Interface Manager (HIM)");
wnprintf(wnum,"\nlibrary.");
wnprintf(wnum,"\n\nThe text in this window is displayed via the Window Manager routine");
wnprintf(wnum,"\nwnprintf().");
wnprintf(wnum,"\n\nThe help text presented by this routine (via F1-F3) is contained");
wnprintf(wnum,"\nin the file HELPFILE.HLP which was built by HFBILDER.EXE from ");
wnprintf(wnum,"\nthe text file HELPFILE.TXT.");
wnprintf(wnum,"\n\nThe 3 routines wide(), narrow(), and multi() have been attached");
wnprintf(wnum,"\nto the f1-f3 keys via the Keyboard Manager. When these keys");
wnprintf(wnum,"\nare pressed the appropriate routine is called by the Keyboard");
wnprintf(wnum,"\nManager, no switch statement is neccessary.");
wnprintf(wnum,"\n\nF1 to demonstrate wide help text..");
wnprintf(wnum,"\nF2 to demonstrate narrow help text..");
wnprintf(wnum,"\nF3 to demonstrate multi-page help text..");
wnprintf(wnum,"\nF10 to quit program");
}

wide()
/*****/
{
hmscontext("wide_help"); /* tells what help to give */
hmhelp(); /* gives the help */
}

narrow()
/*****/
{
hmscontext("narrow_help"); /* tells what help to give */
hmhelp(); /* gives the help */
}

multi()
/*****/
{
hmscontext("multipage_help"); /* tells what help to give */
hmhelp(); /* gives the help */
}

quit()
/*****/
{
wndestroy(-1); /* take down all windows */
exit(0); /* quit program */
}



  3 Responses to “Category : C Source Code
Archive   : HIM100.ZIP
Filename : HELPDEMO.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/