home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
CSAPE32.ARJ
/
SOURCE
/
FUNCS
/
FNALPHA.C
next >
Wrap
C/C++ Source or Header
|
1990-03-28
|
1KB
|
64 lines
/*
fnalpha.c
% alpha_funcs
String editing functions (letters only).
Supports insert mode (with big cursor).
The field variable should be a char *.
C-scape 3.2
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)
10/17/89 jdc fixed filter (no extended ascii)
3/28/90 jmd ansi-fied
*/
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "cscape.h"
#include "fnfunc.h"
#include "scancode.h"
OSTATIC sfilter_func (alpha_filter);
OGLOBAL field_funcs_struct alpha_funcs = {
stdBigCur_fenter,
string_fexit,
alpha_fkey,
string_senter,
string_sexit,
VAR_STRING
};
void alpha_fkey(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);
}
static boolean alpha_filter(int key)
/*
Filter function for alpha_funcs
for use with StrCommon_fkey
*/
{
return(isprint(key) && (isalpha(key) || key == ' '));
}