home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
INCLUDE
/
FNDECL.H
< prev
next >
Wrap
C/C++ Source or Header
|
1990-12-07
|
6KB
|
190 lines
/*
fndecl.h 10/15/86
% public header for field functions
This file contains field function struct definitions
and various misc. routines.
C-scape 3.2
Copyright (c) 1986-1989, by Oakland Group, Inc.
ALL RIGHTS RESERVED.
Revision History:
-----------------
9/01/87 jmd added NO_PROTO option
6/01/88 jmd removed anachronisms
7/27/88 jmd removed string tools
8/22/88 jmd added field_funcs_struct, special funcs
9/16/88 jmd added _arg
9/17/88 jmd added global error msg strings for easy changing
9/17/88 jmd added std_ funcs
10/06/88 jmd added snum_fenter
11/28/88 jmd split into two files
12/16/88 jmd added valid_Float
12/20/88 jmd added click_funcs
4/06/89 jmd Fixed std_fexit prototype
4/23/89 jdc added pulldown_funcs
6/01/89 gam added ocountry stuff
6/25/89 jmd added OEXTERNs
7/15/89 ted Converted '_func' prototypes from typedef to macro.
8/03/89 jmd added nowrite_funcs
8/07/89 jmd added time and date _funcs, std_NumValid
2/14/90 mla added radio funcs
3/19/90 jmd made valid_Format a boolean
3/28/90 jmd ansi-fied
4/12/90 pmcm added valid_Range
4/12/90 jmd added aux_Top, removed old error message strings
5/08/90 jmd added underscores to func macros for vms compiler
5/11/90 jmd removed reference to null_funcs
5/17/90 jmd moved idle_Clock prototype to kbidle.h
8/27/90 jmd removed errmsg global variable
9/21/90 pmcm changed extern to OEXTERN for fnmark_color
12/07/90 jmd changed names of variables to _min and _max
*/
/*** macros and #defines ***/
struct select_struct {
int number;
char **list;
};
#include "fncntry.h"
#define select_build(select, choice_list) \
struct select_struct select = {\
0,\
choice_list\
}
#define select_number(select) ((select).number)
#define select_choice(select) ((select).list[(select).number])
/*** filter func used by str funcs ***/
#define sfilter_func(fname) boolean fname(int _flag)
typedef sfilter_func ((*sfilter_fptr));
/* ticker funcs stuff (obsolete) */
#define tick_GetLen(t) ( *((int *) t))
#define tick_SetLen(t, len) ( *((int *) t) = len)
#define tick_GetOffset(t) ( *((int *) (t+sizeof(int))) )
#define tick_SetOffset(t, off) ( *((int *) (t+sizeof(int))) = off)
#define tick_GetString(t) (t + (2 * sizeof(int)))
/*** Color of marked field ***/
OEXTERN byte fnmark_color; /* used by mark_funcs (fnmark.c ) */
/*** Functions ***/
/*** auxiliary functions ***/
/* AUXTOP.C */
extern aux_func (aux_Top);
/*** special functions ***/
/* SPCABORT.C */
extern spc_func (spc_Abort);
/* SPCEMBED.C */
extern spc_func (spc_Embed);
/* SPCEMBTD.C */
extern spc_func (spc_EmbedTed);
/*** std funcs ***/
/* FNSTD.C */
extern void std_fenter(sed_type sed);
extern boolean std_fexit(sed_type sed);
extern void std_format(sed_type sed);
extern void stdNoCur_fenter(sed_type sed);
extern void stdBigCur_fenter(sed_type sed);
extern void std_senter(sed_type sed, int fieldno);
/* FNSTDVAL.C */
extern boolean std_NumValid(sed_type sed, double val);
/*** StrCommon funcs ***/
/* FNSTRCOM.C */
extern void StrCommon_fkey(sed_type sed, sfilter_fptr filter);
/*** Validation routines ***/
#define VALID_SLEN 80 /* max length of validation string component */
/* FNVALFMT.C */
extern boolean valid_Format(sed_type sed, int fieldno, char *fmt);
/* FNVALNUM.C */
extern boolean valid_Double(double num, char *vstr);
/* FNVALSTR.C */
extern boolean valid_String(char *string, char *vstr);
#define valid_Int(val, vstr) valid_Double((double) (val), vstr)
#define valid_Long(val, vstr) valid_Double((double) (val), vstr)
#define valid_Float(val, vstr) valid_Double((double) (val), vstr)
/* FNVALRNG.C */
extern boolean valid_Range(sed_type sed, long _min, long _max);
/*** movement funcs ***/
/* FNIFLD.C */
extern boolean inter_field(sed_type sed, int scancode);
/* FNIFLDG.C */
extern boolean inter_field_grid(sed_type sed, int scancode);
/* FNIPAGE.C */
extern boolean inter_page(sed_type sed, int scancode);
/* FNSPEC.C */
extern boolean special_key(sed_type sed, int scancode);
/*** field functions ***/
OEXTERN field_funcs_struct alpha_funcs;
OEXTERN field_funcs_struct bob_funcs;
OEXTERN field_funcs_struct char_funcs;
OEXTERN field_funcs_struct check_funcs;
OEXTERN field_funcs_struct click_funcs;
OEXTERN field_funcs_struct clong_funcs;
OEXTERN field_funcs_struct cmoney_funcs;
OEXTERN field_funcs_struct date_funcs;
OEXTERN field_funcs_struct digit_funcs;
OEXTERN field_funcs_struct double_funcs;
OEXTERN field_funcs_struct gmenu_funcs;
OEXTERN field_funcs_struct hex_funcs;
OEXTERN field_funcs_struct int_funcs;
OEXTERN field_funcs_struct list_funcs;
OEXTERN field_funcs_struct long_funcs;
OEXTERN field_funcs_struct mark_funcs;
OEXTERN field_funcs_struct menu_funcs;
OEXTERN field_funcs_struct money_funcs;
OEXTERN field_funcs_struct msys_funcs;
OEXTERN field_funcs_struct nowrite_funcs;
OEXTERN field_funcs_struct pint_funcs;
OEXTERN field_funcs_struct plong_funcs;
OEXTERN field_funcs_struct radio_funcs;
OEXTERN field_funcs_struct range_funcs;
OEXTERN field_funcs_struct sdouble_funcs;
OEXTERN field_funcs_struct secure_funcs;
OEXTERN field_funcs_struct select_funcs;
OEXTERN field_funcs_struct sfloat_funcs;
OEXTERN field_funcs_struct sint_funcs;
OEXTERN field_funcs_struct slong_funcs;
OEXTERN field_funcs_struct string_funcs;
OEXTERN field_funcs_struct ticker_funcs;
OEXTERN field_funcs_struct time_funcs;
OEXTERN field_funcs_struct toggle_funcs;
OEXTERN field_funcs_struct togint_funcs;
OEXTERN field_funcs_struct xstring_funcs;
OEXTERN field_funcs_struct yesno_funcs;