blob: f14e600d8ca6a87bb4057acc6c1131e48f0c0ff1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/* This file is part of the Project Athena Zephyr Notification System.
* It is one of the source files comprising zwgc, the Zephyr WindowGram
* client.
*
* Created by: Marc Horowitz <marc@athena.mit.edu>
*
* $Id$
*
* Copyright (c) 1989 by the Massachusetts Institute of Technology.
* For copying and distribution information, see the file
* "mit-copyright.h".
*/
#include <sysdep.h>
#if (!defined(lint) && !defined(SABER))
static const char rcsid_character_class_c[] = "$Id$";
#endif
#include <zephyr/mit-copyright.h>
#include <zephyr/zephyr.h>
#include "character_class.h"
/*
* It may look like we are passing the cache by value, but since it's
* really an array we are passing by reference. C strikes again....
*/
static character_class cache;
/* character_class */
char * string_to_character_class(str)
string str;
{
int i;
(void) memset(cache, 0, sizeof(cache));
for (i=0; i<strlen(str); i++)
cache[str[i]] = 1;
return(cache);
}
|