home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
SOURCE
/
FUNCS
/
FNMSYS.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-08
|
2KB
|
82 lines
/*
fnmsys.c
% msys_funcs
like slug_funcs, but sed is not popped before bob gets painted.
C-scape 3.2
Copyright (c) 1988-1989, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
12/14/89 ted Re-created.
3/28/90 jmd ansi-fied
12/08/90 pmcm changed std_fenter to stdNoCur_fenter
*/
#include <stdio.h>
#include <ctype.h>
#include "cscape.h"
#include "scancode.h"
#include "oaktag.h" /* For IDs in msys.h */
#include "msys.h"
#include "helpdecl.h"
OSTATIC void msys_fkey(sed_type sed);
/* -------------------------------------------------------------------------- */
OGLOBAL field_funcs_struct msys_funcs = {
stdNoCur_fenter,
std_fexit,
msys_fkey,
FNULL,
FNULL,
0
};
/* -------------------------------------------------------------------------- */
static void msys_fkey(sed_type sed)
/*
modifies: sed.
effects: Standard menu functions.
Up and down keys change choices.
Baton contains field number + 1 when ENTER is pressed
or 0 if ESC pressed.
*/
{
unsigned scancode;
scancode = kb_Read();
if (sed_DoSpecial(sed, scancode))
return;
if (special_key(sed, scancode))
return;
switch(scancode) {
case MOU_CLICK:
case ENTER:
{
int ret;
ret = msys_bobgo(sed, ENTER); /* 'ENTER' because no mouse suck needed */
if (ret != 0) {
sed_ToggleExit(sed);
sed_SetBaton(sed, ret);
}
break;
}
default:
slug_dokey(sed, scancode);
}
}
/* -------------------------------------------------------------------------- */