home *** CD-ROM | disk | FTP | other *** search
- /*
- fnalpha.c
-
- % alpha_funcs
-
- String editting functions (letters only).
- Supports insert mode (with big cursor).
- The field variable should be a char *.
-
- C-scape 3.1
- Copyright (c) 1986, 1987, 1988 by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 4/06/88 jmd added call to sed_DoSpecial
- 9/15/88 jmd removed vid_Cursor calls
- 9/17/88 jmd added std_ funcs
- 10/14/88 jdc added var_size element to field_funcs_struct
-
- 6/07/89 jmd added test for mouse code (later removed)
- */
-
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
-
- #include "cscape.h"
- #include "fnfunc.h"
- #include "scancode.h"
-
- boolean alpha_filter(_arg1(int));
-
- OGLOBAL field_funcs_struct alpha_funcs = {
- stdBigCur_fenter,
- string_fexit,
- alpha_fkey,
- string_senter,
- string_sexit,
- VAR_STRING
- };
-
- void alpha_fkey(sed)
- sed_type sed;
- /*
- Hands its work to StrCommon_fkey (fnstrcom.c)
- Passes a filter function (below) to decide which
- characters can be typed in.
- */
- {
- StrCommon_fkey(sed, alpha_filter);
- }
-
-
- boolean alpha_filter(key)
- int key;
- /*
- Filter function for alpha_funcs
- for use with StrCommon_fkey
- */
- {
- return(isalpha(key) || key == ' ');
- }
-