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)  

gdkanji.c
Go to the documentation of this file.
1 /* gdkanji.c (Kanji code converter) */
2 /* written by Masahito Yamaga (ma@yama-ga.com) */
3 
4 #ifdef HAVE_CONFIG_H
5 #include "config.h"
6 #endif
7 
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <string.h>
11 #include "gd.h"
12 #include "gdhelpers.h"
13 #include "gd_errors.h"
14 #include <errno.h>
15 #include <stdarg.h>
16 #if defined(HAVE_ICONV_H)
17 #include <iconv.h>
18 #endif
19 
20 #ifndef HAVE_ICONV_T_DEF
21 typedef void *iconv_t;
22 #endif
23 
24 #ifndef HAVE_ICONV
25 #define ICONV_CONST /**/
26 iconv_t iconv_open (const char *, const char *);
27 size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *);
28 int iconv_close (iconv_t);
29 
30 iconv_t
31 iconv_open (const char *tocode, const char *fromcode)
32 {
33  (void)tocode;
34  (void)fromcode;
35  return (iconv_t) (-1);
36 }
37 
38 size_t
39 iconv (iconv_t cd, ICONV_CONST char **inbuf, size_t * inbytesleft,
40  char **outbuf, size_t * outbytesleft)
41 {
42  (void)cd;
43  (void)inbuf;
44  (void)inbytesleft;
45  (void)outbuf;
46  (void)outbytesleft;
47  return 0;
48 }
49 
50 int
52 {
53  (void)cd;
54  return 0;
55 }
56 
57 #endif /* !HAVE_ICONV */
58 
59 #define LIBNAME "any2eucjp()"
60 
61 #if defined(__MSC__) || defined(__BORLANDC__) || defined(__TURBOC__) || defined(_Windows) || defined(MSDOS)
62 #ifndef SJISPRE
63 #define SJISPRE 1
64 #endif
65 #endif
66 
67 #ifdef TRUE
68 #undef TRUE
69 #endif
70 #ifdef FALSE
71 #undef FALSE
72 #endif
73 
74 #define TRUE 1
75 #define FALSE 0
76 
77 #define NEW 1
78 #define OLD 2
79 #define ESCI 3
80 #define NEC 4
81 #define EUC 5
82 #define SJIS 6
83 #define EUCORSJIS 7
84 #define ASCII 8
85 
86 #define NEWJISSTR "JIS7"
87 #define OLDJISSTR "jis"
88 #define EUCSTR "eucJP"
89 #define SJISSTR "SJIS"
90 
91 #define ESC 27
92 #define SS2 142
93 
94 /* DetectKanjiCode() derived from DetectCodeType() by Ken Lunde. */
95 
96 static int
97 DetectKanjiCode (const unsigned char *str)
98 {
99  static int whatcode = ASCII;
100  int oldcode = ASCII;
101  int c, i;
102  char *lang = NULL;
103 
104  c = '\1';
105  i = 0;
106 
107  if (whatcode != EUCORSJIS && whatcode != ASCII) {
108  oldcode = whatcode;
109  whatcode = ASCII;
110  }
111 
112  while ((whatcode == EUCORSJIS || whatcode == ASCII) && c != '\0') {
113  if ((c = str[i++]) != '\0') {
114  if (c == ESC) {
115  c = str[i++];
116  if (c == '$') {
117  c = str[i++];
118  if (c == 'B')
119  whatcode = NEW;
120  else if (c == '@')
121  whatcode = OLD;
122  } else if (c == '(') {
123  c = str[i++];
124  if (c == 'I')
125  whatcode = ESCI;
126  } else if (c == 'K')
127  whatcode = NEC;
128  } else if ((c >= 129 && c <= 141) || (c >= 143 && c <= 159))
129  whatcode = SJIS;
130  else if (c == SS2) {
131  c = str[i++];
132  if ((c >= 64 && c <= 126) || (c >= 128 && c <= 160)
133  || (c >= 224 && c <= 252))
134  whatcode = SJIS;
135  else if (c >= 161 && c <= 223)
136  whatcode = EUCORSJIS;
137  } else if (c >= 161 && c <= 223) {
138  c = str[i++];
139  if (c >= 240 && c <= 254)
140  whatcode = EUC;
141  else if (c >= 161 && c <= 223)
142  whatcode = EUCORSJIS;
143  else if (c >= 224 && c <= 239) {
144  whatcode = EUCORSJIS;
145  while (c >= 64 && whatcode == EUCORSJIS) {
146  if (c >= 129) {
147  if (c <= 141 || (c >= 143 && c <= 159))
148  whatcode = SJIS;
149  else if (c >= 253 && c <= 254)
150  whatcode = EUC;
151  }
152  c = str[i++];
153  }
154  } else if (c <= 159)
155  whatcode = SJIS;
156  } else if (c >= 240 && c <= 254)
157  whatcode = EUC;
158  else if (c >= 224 && c <= 239) {
159  c = str[i++];
160  if ((c >= 64 && c <= 126) || (c >= 128 && c <= 160))
161  whatcode = SJIS;
162  else if (c >= 253 && c <= 254)
163  whatcode = EUC;
164  else if (c >= 161 && c <= 252)
165  whatcode = EUCORSJIS;
166  }
167  }
168  }
169 
170 #ifdef DEBUG
171  if (whatcode == ASCII)
172  gd_error_ex(GD_DEBUG, "Kanji code not included.");
173  else if (whatcode == EUCORSJIS)
174  gd_error_ex(GD_DEBUG, "Kanji code not detected.");
175  else
176  gd_error_ex(GD_DEBUG, "Kanji code detected at %d byte.", i);
177 #endif
178 
179  if (whatcode == EUCORSJIS && oldcode != ASCII)
180  whatcode = oldcode;
181 
182  if (whatcode == EUCORSJIS) {
183  if (getenv ("LC_ALL"))
184  lang = getenv ("LC_ALL");
185  else if (getenv ("LC_CTYPE"))
186  lang = getenv ("LC_CTYPE");
187  else if (getenv ("LANG"))
188  lang = getenv ("LANG");
189 
190  if (lang) {
191  if (strcmp (lang, "ja_JP.SJIS") == 0 ||
192 #ifdef hpux
193  strcmp (lang, "japanese") == 0 ||
194 #endif
195  strcmp (lang, "ja_JP.mscode") == 0 ||
196  strcmp (lang, "ja_JP.PCK") == 0)
197  whatcode = SJIS;
198  else if (strncmp (lang, "ja", 2) == 0)
199 #ifdef SJISPRE
200  whatcode = SJIS;
201 #else
202  whatcode = EUC;
203 #endif
204  }
205  }
206 
207  if (whatcode == EUCORSJIS)
208 #ifdef SJISPRE
209  whatcode = SJIS;
210 #else
211  whatcode = EUC;
212 #endif
213 
214  return whatcode;
215 }
216 
217 /* SJIStoJIS() is sjis2jis() by Ken Lunde. */
218 
219 static void
220 SJIStoJIS (int *p1, int *p2)
221 {
222  register unsigned char c1 = *p1;
223  register unsigned char c2 = *p2;
224  register int adjust = c2 < 159;
225  register int rowOffset = c1 < 160 ? 112 : 176;
226  register int cellOffset = adjust ? (31 + (c2 > 127)) : 126;
227 
228  *p1 = ((c1 - rowOffset) << 1) - adjust;
229  *p2 -= cellOffset;
230 }
231 
232 /* han2zen() was derived from han2zen() written by Ken Lunde. */
233 
234 #define IS_DAKU(c) ((c >= 182 && c <= 196) || (c >= 202 && c <= 206) || (c == 179))
235 #define IS_HANDAKU(c) (c >= 202 && c <= 206)
236 
237 static void
238 han2zen (int *p1, int *p2)
239 {
240  int c = *p1;
241  int daku = FALSE;
242  int handaku = FALSE;
243  int mtable[][2] = {
244  {129, 66},
245  {129, 117},
246  {129, 118},
247  {129, 65},
248  {129, 69},
249  {131, 146},
250  {131, 64},
251  {131, 66},
252  {131, 68},
253  {131, 70},
254  {131, 72},
255  {131, 131},
256  {131, 133},
257  {131, 135},
258  {131, 98},
259  {129, 91},
260  {131, 65},
261  {131, 67},
262  {131, 69},
263  {131, 71},
264  {131, 73},
265  {131, 74},
266  {131, 76},
267  {131, 78},
268  {131, 80},
269  {131, 82},
270  {131, 84},
271  {131, 86},
272  {131, 88},
273  {131, 90},
274  {131, 92},
275  {131, 94},
276  {131, 96},
277  {131, 99},
278  {131, 101},
279  {131, 103},
280  {131, 105},
281  {131, 106},
282  {131, 107},
283  {131, 108},
284  {131, 109},
285  {131, 110},
286  {131, 113},
287  {131, 116},
288  {131, 119},
289  {131, 122},
290  {131, 125},
291  {131, 126},
292  {131, 128},
293  {131, 129},
294  {131, 130},
295  {131, 132},
296  {131, 134},
297  {131, 136},
298  {131, 137},
299  {131, 138},
300  {131, 139},
301  {131, 140},
302  {131, 141},
303  {131, 143},
304  {131, 147},
305  {129, 74},
306  {129, 75}
307  };
308 
309  if (*p2 == 222 && IS_DAKU (*p1))
310  daku = TRUE; /* Daku-ten */
311  else if (*p2 == 223 && IS_HANDAKU (*p1))
312  handaku = TRUE; /* Han-daku-ten */
313 
314  *p1 = mtable[c - 161][0];
315  *p2 = mtable[c - 161][1];
316 
317  if (daku) {
318  if ((*p2 >= 74 && *p2 <= 103) || (*p2 >= 110 && *p2 <= 122))
319  (*p2)++;
320  else if (*p2 == 131 || *p2 == 69)
321  *p2 = 148;
322  } else if (handaku && *p2 >= 110 && *p2 <= 122)
323  (*p2) += 2;
324 }
325 
326 /* Recast strcpy to handle unsigned chars used below. */
327 
328 #define ustrcpy(A,B) (strcpy((char*)(A),(const char*)(B)))
329 
330 #define ustrncpy(A,B, maxsize) (strncpy((char*)(A),(const char*)(B), maxsize))
331 
332 static void
333 do_convert (unsigned char **to_p, const unsigned char **from_p, const char *code)
334 {
335  unsigned char *to = *to_p;
336  const unsigned char *from = *from_p;
337 #ifdef HAVE_ICONV
338  iconv_t cd;
339  size_t from_len, to_len;
340 
341  if ((cd = iconv_open (EUCSTR, code)) == (iconv_t) - 1) {
342  gd_error ("iconv_open() error");
343 
344  if (errno == EINVAL)
345  gd_error ("invalid code specification: \"%s\" or \"%s\"", EUCSTR, code);
346 
347  ustrcpy (to, from);
348  return;
349  }
350 
351  from_len = strlen ((const char *)from) + 1;
352  to_len = BUFSIZ;
353 
354  if ((int) (iconv (cd, (char **)from_p, &from_len, (char **)to_p, &to_len))
355  == -1) {
356 
357  if (errno == EINVAL)
358  gd_error ("invalid end of input string");
359  else if (errno == EILSEQ)
360  gd_error ("invalid code in input string");
361  else if (errno == E2BIG)
362  gd_error ("output buffer overflow at do_convert()");
363  else
364 
365  gd_error ("something happen");
366  ustrcpy (to, from);
367  return;
368  }
369 
370  if (iconv_close (cd) != 0) {
371  gd_error ("iconv_close() error");
372  }
373 #else
374  int p1, p2, i, j;
375  int jisx0208 = FALSE;
376  int hankaku = FALSE;
377 
378  j = 0;
379  if (strcmp (code, NEWJISSTR) == 0 || strcmp (code, OLDJISSTR) == 0) {
380  for (i = 0; from[i] != '\0' && j < BUFSIZ; i++) {
381  if (from[i] == ESC) {
382  i++;
383  if (from[i] == '$') {
384  jisx0208 = TRUE;
385  hankaku = FALSE;
386  i++;
387  } else if (from[i] == '(') {
388  jisx0208 = FALSE;
389  i++;
390  if (from[i] == 'I') /* Hankaku Kana */
391  hankaku = TRUE;
392  else
393  hankaku = FALSE;
394  }
395  } else {
396  if (jisx0208)
397  to[j++] = from[i] + 128;
398  else if (hankaku) {
399  to[j++] = SS2;
400  to[j++] = from[i] + 128;
401  } else
402  to[j++] = from[i];
403  }
404  }
405  } else if (strcmp (code, SJISSTR) == 0) {
406  for (i = 0; from[i] != '\0' && j < BUFSIZ; i++) {
407  p1 = from[i];
408  if (p1 < 127)
409  to[j++] = p1;
410  else if ((p1 >= 161) && (p1 <= 223)) {
411  /* Hankaku Kana */
412  to[j++] = SS2;
413  to[j++] = p1;
414  } else {
415  p2 = from[++i];
416  SJIStoJIS (&p1, &p2);
417  to[j++] = p1 + 128;
418  to[j++] = p2 + 128;
419  }
420  }
421  } else {
422  gd_error ("invalid code specification: \"%s\"", code);
423  return;
424  }
425 
426  if (j >= BUFSIZ) {
427  gd_error ("output buffer overflow at do_convert()");
428  ustrcpy (to, from);
429  } else
430  to[j] = '\0';
431 #endif /* HAVE_ICONV */
432 }
433 
434 static int
435 do_check_and_conv (unsigned char *to, const unsigned char *from)
436 {
437  static unsigned char tmp[BUFSIZ];
438  unsigned char *tmp_p = &tmp[0];
439  int p1, p2, i, j;
440  int kanji = TRUE;
441  int copy_string = FALSE;
442 
443  switch (DetectKanjiCode (from)) {
444  case NEW:
445  gd_error_ex(GD_DEBUG, "Kanji code is New JIS.");
446  do_convert (&tmp_p, &from, NEWJISSTR);
447  break;
448  case OLD:
449  gd_error_ex(GD_DEBUG, "Kanji code is Old JIS.");
450  do_convert (&tmp_p, &from, OLDJISSTR);
451  break;
452  case ESCI:
453  gd_error_ex(GD_DEBUG, "This string includes Hankaku-Kana (jisx0201) escape sequence [ESC] + ( + I.");
454  do_convert (&tmp_p, &from, NEWJISSTR);
455  break;
456  case NEC:
457  gd_error_ex(GD_DEBUG, "Kanji code is NEC Kanji.");
458  gd_error("cannot convert NEC Kanji.");
459  copy_string = TRUE;
460  kanji = FALSE;
461  break;
462  case EUC:
463  gd_error_ex(GD_DEBUG, "Kanji code is EUC.");
464  copy_string = TRUE;
465  break;
466  case SJIS:
467  gd_error_ex(GD_DEBUG, "Kanji code is SJIS.");
468  do_convert (&tmp_p, &from, SJISSTR);
469  break;
470  case EUCORSJIS:
471  gd_error_ex(GD_DEBUG, "Kanji code is EUC or SJIS.");
472  copy_string = TRUE;
473  kanji = FALSE;
474  break;
475  case ASCII:
476  gd_error_ex(GD_DEBUG, "This is ASCII string.");
477  copy_string = TRUE;
478  kanji = FALSE;
479  break;
480  default:
481  gd_error_ex(GD_DEBUG, "This string includes unknown code.");
482  copy_string = TRUE;
483  kanji = FALSE;
484  break;
485  }
486 
487  if (copy_string) {
488  ustrncpy (tmp, from, BUFSIZ);
489  tmp[BUFSIZ-1] = '\0';
490  }
491 
492  /* Hankaku Kana ---> Zenkaku Kana */
493  if (kanji) {
494  j = 0;
495  for (i = 0; tmp[i] != '\0' && j < BUFSIZ; i++) {
496  if (tmp[i] == SS2) {
497  p1 = tmp[++i];
498  if (tmp[i + 1] == SS2) {
499  p2 = tmp[i + 2];
500  if (p2 == 222 || p2 == 223)
501  i += 2;
502  else
503  p2 = 0;
504  } else
505  p2 = 0;
506  han2zen (&p1, &p2);
507  SJIStoJIS (&p1, &p2);
508  to[j++] = p1 + 128;
509  to[j++] = p2 + 128;
510  } else
511  to[j++] = tmp[i];
512  }
513 
514  if (j >= BUFSIZ) {
515  gd_error("output buffer overflow at Hankaku --> Zenkaku");
516  ustrcpy (to, tmp);
517  } else
518  to[j] = '\0';
519  } else
520  ustrcpy (to, tmp);
521 
522  return kanji;
523 }
524 
525 int
526 any2eucjp (unsigned char *dest, const unsigned char *src, unsigned int dest_max)
527 {
528  static unsigned char tmp_dest[BUFSIZ];
529  int ret;
530 
531  if (strlen ((const char *) src) >= BUFSIZ) {
532  gd_error("input string too large");
533  return -1;
534  }
535  if (dest_max > BUFSIZ) {
536  gd_error
537  ("invalid maximum size of destination\nit should be less than %d.",
538  BUFSIZ);
539  return -1;
540  }
541  ret = do_check_and_conv (tmp_dest, src);
542  if (strlen ((const char *) tmp_dest) >= dest_max) {
543  gd_error("output buffer overflow");
544  ustrcpy (dest, src);
545  return -1;
546  }
547  ustrcpy (dest, tmp_dest);
548  return ret;
549 }
550 
551 #if 0
552 unsigned int
553 strwidth (unsigned char *s)
554 {
555  unsigned char *t;
556  unsigned int i;
557 
558  t = (unsigned char *) gdMalloc (BUFSIZ);
559  any2eucjp (t, s, BUFSIZ);
560  i = strlen (t);
561  gdFree (t);
562  return i;
563 }
564 
565 #ifdef DEBUG
566 int
567 main ()
568 {
569  unsigned char input[BUFSIZ];
570  unsigned char *output;
571  unsigned char *str;
572  int c, i = 0;
573 
574  while ((c = fgetc (stdin)) != '\n' && i < BUFSIZ)
575  input[i++] = c;
576  input[i] = '\0';
577 
578  printf ("input : %d bytes\n", strlen ((const char *) input));
579  printf ("output: %d bytes\n", strwidth (input));
580 
581  output = (unsigned char *) gdMalloc (BUFSIZ);
583  str = output;
584  while (*str != '\0')
585  putchar (*(str++));
586  putchar ('\n');
587  gdFree (output);
588 
589  return 0;
590 }
591 #endif
592 #endif
#define adjust(a)
#define kanji
Definition: aptex-macros.h:366
char * p2
Definition: bmpfont.h:62
char * p1
Definition: bmpfont.h:62
#define fgetc
Definition: xxstdio.h:26
int strcmp()
Definition: coll.cpp:143
int printf()
#define EILSEQ
Definition: errno.in.h:274
const FcChar8 lang[6]
Definition: fcfreetype.c:56
static void
Definition: fpif.c:118
#define s
Definition: afcover.h:80
#define t
Definition: afcover.h:96
#define c(n)
Definition: gpos-common.c:150
uchar inbuf[1000000]
Definition: unzcrash.c:40
uchar outbuf[(1000000+1000000)]
Definition: unzcrash.c:41
#define NULL
Definition: ftobjs.h:61
small capitals from c petite p scientific i
Definition: afcover.h:80
void gd_error(const char *format,...)
Definition: gd.c:108
void gd_error_ex(int priority, const char *format,...)
Definition: gd.c:116
void gdFree(void *m)
Definition: gdhelpers.c:113
#define GD_DEBUG
Definition: gd_errors.h:41
void * gdMalloc(size_t size)
Definition: gdhelpers.c:73
#define SJIS
Definition: gdkanji.c:82
#define OLD
Definition: gdkanji.c:78
#define IS_DAKU(c)
Definition: gdkanji.c:234
#define IS_HANDAKU(c)
Definition: gdkanji.c:235
#define ESC
Definition: gdkanji.c:91
#define SJISSTR
Definition: gdkanji.c:89
#define SS2
Definition: gdkanji.c:92
#define ustrncpy(A, B, maxsize)
Definition: gdkanji.c:330
#define ASCII
Definition: gdkanji.c:84
static void han2zen(int *p1, int *p2)
Definition: gdkanji.c:238
#define ICONV_CONST
Definition: gdkanji.c:25
void * iconv_t
Definition: gdkanji.c:21
static void do_convert(unsigned char **to_p, const unsigned char **from_p, const char *code)
Definition: gdkanji.c:333
#define OLDJISSTR
Definition: gdkanji.c:87
#define EUCSTR
Definition: gdkanji.c:88
int any2eucjp(unsigned char *dest, const unsigned char *src, unsigned int dest_max)
Definition: gdkanji.c:526
static int DetectKanjiCode(const unsigned char *str)
Definition: gdkanji.c:97
#define NEC
Definition: gdkanji.c:80
int iconv_close(iconv_t)
Definition: gdkanji.c:51
iconv_t iconv_open(const char *, const char *)
Definition: gdkanji.c:31
#define TRUE
Definition: gdkanji.c:74
#define FALSE
Definition: gdkanji.c:75
#define EUC
Definition: gdkanji.c:81
#define NEW
Definition: gdkanji.c:77
size_t iconv(iconv_t, char **, size_t *, char **, size_t *)
Definition: gdkanji.c:39
#define ESCI
Definition: gdkanji.c:79
#define NEWJISSTR
Definition: gdkanji.c:86
static int do_check_and_conv(unsigned char *to, const unsigned char *from)
Definition: gdkanji.c:435
#define ustrcpy(A, B)
Definition: gdkanji.c:328
#define EUCORSJIS
Definition: gdkanji.c:83
static void SJIStoJIS(int *p1, int *p2)
Definition: gdkanji.c:220
char * getenv()
int errno
static int ret
Definition: convert.c:72
#define output
Definition: cpascal.h:54
#define dest
int strncmp()
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 endif[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 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub src_basereg pixdeinterleave mask_basereg pixdeinterleave dst_r_basereg process_pixblock_head pixblock_size cache_preload_simple process_pixblock_tail pixinterleave dst_w_basereg irp beq endif process_pixblock_tail_head tst beq irp if pixblock_size chunk_size tst beq pixld_src SRC pixld MASK if DST_R else pixld DST_R endif if
real to[600]
Definition: pmxab.c:87
#define str(s)
Definition: sh6.c:399
#define E2BIG
Definition: sh.h:371
static char * copy_string(struct strcache *sp, char *str, sc_buflen_t len)
Definition: strcache.c:75
Definition: inftrees.h:24
Definition: execute.c:108
Definition: output.h:18
Definition: dvips.h:235
#define c2
Definition: t1io.c:53
#define c1
Definition: t1io.c:52
int j
Definition: t4ht.c:1589
*job_name strlen((char *) job_name) - 4)
#define BUFSIZ
Definition: ps.c:61
#define main
Definition: xmain.c:31