Menu

[40d7ca]: / joe / unused / cmap.h  Maximize  Restore  History

Download this file

35 lines (25 with data), 741 Bytes

 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
/*
* Character maps
* Copyright
* (C) 1992 Joseph H. Allen
*
* This file is part of JOE (Joe's Own Editor)
*/
/* An interval map item */
struct interval_map {
struct interval interval;
void *map;
};
/* A character map */
struct cmap {
void *direct_map[128]; /* Direct mapping for ASCII range */
ptrdiff_t size; /* No. items in range_map */
struct interval_map *range_map; /* Sorted range map */
void *dflt_map;
};
/* Build character map from interval list */
void cmap_build(struct cmap *cmap, struct interval_list *list, void *dflt_map);
/* Clear a cmap */
void clr_cmap(struct cmap *cmap);
/* Look up single character in a character map, return what it's mapped to */
void *cmap_lookup(struct cmap *cmap, int ch);
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.