w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

mmfont.c
Go to the documentation of this file.
1 /*
2  * map-font with marking
3  */
4 #include "defs.h"
5 #include "global.h"
6 #include "bifont.h"
7 
8 #define NJISCHARS (94*94)
9 
10 static struct biinitfontinfo *
11 alloc_bi(bi, nchars, s)
12 struct bifont *bi;
13 int nchars;
14 char *s;
15 {
16  int i;
17  struct biinitfontinfo *bii;
18 
19  bii = (struct biinitfontinfo *)
20  alloc_check(malloc((unsigned)sizeof(struct biinitfontinfo)+
21  (nchars-1)*sizeof(Boolean)),
22  s);
23  for (i = 0; i < nchars; i++)
24  bii->mark[i] = FALSE;
25  bii->maxc = 0;
26  bii->bf = bi;
27  return bii;
28 }
29 
30 struct biinitfontinfo *
32 struct bifont *bi;
33 {
34  return alloc_bi(bi, NTFMCHARS, "biinitfontinfo");
35 }
36 
37 struct biinitfontinfo *
39 struct bifont *bi;
40 {
41  return alloc_bi(bi, NJISCHARS, "j-biinitfontinfo");
42 }
43 
45 int c;
46 {
47  c = jis_to_idx94(c);
48  biinifinfo(curfontent)->mark[c] = TRUE;
49  if (c > biinifinfo(curfontent)->maxc)
50  biinifinfo(curfontent)->maxc = c;
51 }
52 
54 int c;
55 {
56  biinifinfo(curfontent)->mark[c] = TRUE;
57  if (c > biinifinfo(curfontent)->maxc)
58  biinifinfo(curfontent)->maxc = c;
59 }
60 
62 int c;
63 {
64  struct jstfmfntinfo *jsfi = jstfmfinfo(curfontent);
65  struct biinitfontinfo *bii;
66 
67  c = jsub_to_idx94(jsfi->jsubfont, c);
68  bii = (struct biinitfontinfo *)jsfi->js_info;
69  bii->mark[c] = TRUE;
70  if (c > bii->maxc)
71  bii->maxc = c;
72 }
@ FALSE
Definition: dd.h:101
@ TRUE
Definition: dd.h:102
#define biinifinfo(fe)
Definition: bifont.h:173
#define NTFMCHARS
Definition: bifont.h:2
#define jstfmfinfo(fe)
Definition: bifont.h:40
struct font_entry * curfontent
Definition: fontcom.c:7
char * alloc_check()
jis_to_idx94(unsigned int jis)
Definition: kanji.c:252
jsub_to_idx94(short f, short c)
Definition: kanji.c:282
#define s
Definition: afcover.h:80
#define c(n)
Definition: gpos-common.c:150
small capitals from c petite p scientific i
Definition: afcover.h:80
#define malloc
Definition: alloca.c:91
static struct biinitfontinfo * alloc_bi(struct bifont *bi, int nchars, char *s)
Definition: mmfont.c:11
struct biinitfontinfo * alloc_jbiinif(struct bifont *bi)
Definition: mmfont.c:38
jsmm_markchar(int c)
Definition: mmfont.c:61
mm_markchar(int c)
Definition: mmfont.c:53
#define NJISCHARS
Definition: mmfont.c:8
jmm_markchar(int c)
Definition: mmfont.c:44
struct biinitfontinfo * alloc_biinif(struct bifont *bi)
Definition: mmfont.c:31
int Boolean
Definition: pgmcrater.c:64
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld if[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1(dst_w_bpp<=(lowbit *8)) &&((lowbit *8)<(pixblock_size *dst_w_bpp)) .if lowbit< 16 tst DST_R
Definition: psbi.c:77
struct bifont * bf
Definition: bifont.h:162
Boolean mark[1]
Definition: bifont.h:164
short jsubfont
Definition: bifont.h:31
struct jssinfo * js_info
Definition: bifont.h:33