home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Professional
/
OS2PRO194.ISO
/
os2
/
editor
/
me
/
helpme.m
< prev
next >
Wrap
Text File
|
1994-01-31
|
796b
|
47 lines
#include menu
#define PGUP 201
#define PGDN 209
#define ALT_H 163
#define ESC 27
init()
{
assign_key("helpme", ALT_H);
}
helpme()
{
do_menu("help");
}
show_file(fname)
string fname;
{
int filecolor;
filecolor = 0x3E;
old_buf = currbuf();
new_buf = setcurrbuf(create_buffer(fname));
win_id = create_window(3, 30, 10, 70, filecolor);
attach_window(win_id, new_buf);
DrawBox(1, 29, 10, 71, filecolor);
display(10, 38, 65, filecolor, " Press PGUP, PGDN or ESC ");
while ((c = get_tty_char()) != ESC)
if (c == PGUP)
prevscreen();
else if (c == PGDN)
nextscreen();
else if (c == DOWN)
down();
else if (c == UP)
up();
delete_buffer(new_buf);
show_buffer(old_buf);
}