home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / D / CLISP / CLISPSRC.TAR / clisp-1995-01-01 / utils / charset / cv-fr-hp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-23  |  3.7 KB  |  132 lines

  1. /* Konversionsprogramm HPUX-Zeichensatz -> SUN4-Zeichensatz */
  2. /* Bruno Haible 4.9.1991 */
  3.  
  4. #include <stdio.h>
  5.  
  6. main ()
  7. { static int tabelle[256];
  8.   /* Tabelle initialisieren: */
  9.   int hp, sun4;
  10. #define HP(x) hp=x;
  11. #define SUN4(y) sun4=y;
  12. #define _ tabelle[hp]=sun4;
  13.   { int i;
  14.     for (i=0;i<128;i++) { SUN4(i) HP(i) _ }
  15.   }
  16.   { int i;
  17.     for (i=0;i<32;i++) { SUN4(128+i) HP(128+i) _ }
  18.   }
  19.   SUN4(160) HP(160) _ /* á */
  20.   SUN4(192) HP(161) _ /* └ */
  21.   SUN4(194) HP(162) _ /* ┬ */
  22.   SUN4(200) HP(163) _ /* ╚ */
  23.   SUN4(202) HP(164) _ /* ╩ */
  24.   SUN4(203) HP(165) _ /* ╦ */
  25.   SUN4(206) HP(166) _ /* ╬ */
  26.   SUN4(207) HP(167) _ /* ╧ */
  27.   SUN4(180) HP(168) _ /* ┤ */
  28.   SUN4(-1) HP(169) _ /* accent grave */
  29.   SUN4(-1) HP(170) _ /* circumflex */
  30.   SUN4(168) HP(171) _ /* ¿ */
  31.   SUN4(-1) HP(172) _ /* tilde accent */
  32.   SUN4(217) HP(173) _ /* ┘ */
  33.   SUN4(219) HP(174) _ /* █ */
  34.   SUN4(163) HP(175) _ /* Italian lira = ú */
  35.   SUN4(175) HP(176) _ /* over line */
  36.   SUN4(221) HP(177) _ /* ▌ */
  37.   SUN4(253) HP(178) _ /* ² */
  38.   SUN4(176) HP(179) _ /* ░ */
  39.   SUN4(199) HP(180) _ /* ╟ */
  40.   SUN4(231) HP(181) _ /* τ */
  41.   SUN4(209) HP(182) _ /* ╤ */
  42.   SUN4(241) HP(183) _ /* ± */
  43.   SUN4(161) HP(184) _ /* í */
  44.   SUN4(191) HP(185) _ /* ┐ */
  45.   SUN4(164) HP(186) _ /* ñ */
  46.   SUN4(163) HP(187) _ /* ú */
  47.   SUN4(165) HP(188) _ /* Ñ */
  48.   SUN4(167) HP(189) _ /* º */
  49.   SUN4(-1) HP(190) _ /* Dutch guilder */
  50.   SUN4(162) HP(191) _ /* ó */
  51.   SUN4(226) HP(192) _ /* Γ */
  52.   SUN4(234) HP(193) _ /* Ω */
  53.   SUN4(244) HP(194) _ /* ⌠ */
  54.   SUN4(251) HP(195) _ /* √ */
  55.   SUN4(225) HP(196) _ /* ß */
  56.   SUN4(233) HP(197) _ /* Θ */
  57.   SUN4(243) HP(198) _ /* ≤ */
  58.   SUN4(250) HP(199) _ /* · */
  59.   SUN4(224) HP(200) _ /* α */
  60.   SUN4(232) HP(201) _ /* Φ */
  61.   SUN4(242) HP(202) _ /* ≥ */
  62.   SUN4(249) HP(203) _ /* ∙ */
  63.   SUN4(228) HP(204) _ /* Σ */
  64.   SUN4(235) HP(205) _ /* δ */
  65.   SUN4(246) HP(206) _ /* ÷ */
  66.   SUN4(252) HP(207) _ /* ⁿ */
  67.   SUN4(197) HP(208) _ /* ┼ */
  68.   SUN4(238) HP(209) _ /* ε */
  69.   SUN4(216) HP(210) _ /* ╪ */
  70.   SUN4(198) HP(211) _ /* ╞ */
  71.   SUN4(229) HP(212) _ /* σ */
  72.   SUN4(237) HP(213) _ /* φ */
  73.   SUN4(248) HP(214) _ /* ° */
  74.   SUN4(230) HP(215) _ /* µ */
  75.   SUN4(196) HP(216) _ /* ─ */
  76.   SUN4(236) HP(217) _ /* ∞ */
  77.   SUN4(214) HP(218) _ /* ╓ */
  78.   SUN4(220) HP(219) _ /* ▄ */
  79.   SUN4(201) HP(220) _ /* ╔ */
  80.   SUN4(239) HP(221) _ /* ∩ */
  81.   SUN4(223) HP(222) _ /* ▀ */
  82.   SUN4(212) HP(223) _ /* ╘ */
  83.   SUN4(193) HP(224) _ /* ┴ */
  84.   SUN4(195) HP(225) _ /* ├ */
  85.   SUN4(227) HP(226) _ /* π */
  86.   SUN4(208) HP(227) _ /* ╨ */
  87.   SUN4(240) HP(228) _ /* ≡ */
  88.   SUN4(205) HP(229) _ /* ═ */
  89.   SUN4(204) HP(230) _ /* ╠ */
  90.   SUN4(211) HP(231) _ /* ╙ */
  91.   SUN4(210) HP(232) _ /* ╥ */
  92.   SUN4(213) HP(233) _ /* ╒ */
  93.   SUN4(245) HP(234) _ /* ⌡ */
  94.   SUN4(-1) HP(235) _ /* S caron */
  95.   SUN4(-1) HP(236) _ /* s caron */
  96.   SUN4(218) HP(237) _ /* ┌ */
  97.   SUN4(-1) HP(238) _ /* Y umlaut */
  98.   SUN4(255) HP(239) _ /*   */
  99.   SUN4(222) HP(240) _ /* ▐ */
  100.   SUN4(254) HP(241) _ /* ■ */
  101.   SUN4(183) HP(242) _ /* ╖ */
  102.   SUN4(181) HP(243) _ /* ╡ */
  103.   SUN4(182) HP(244) _ /* pilcrow, paragraph */
  104.   SUN4(190) HP(245) _ /* ╛ */
  105.   SUN4(173) HP(246) _ /* long dash */
  106.   SUN4(188) HP(247) _ /* ╝ */
  107.   SUN4(189) HP(248) _ /* ╜ */
  108.   SUN4(170) HP(249) _ /* ¬ */
  109.   SUN4(186) HP(250) _ /* ║ */
  110.   SUN4(171) HP(251) _ /* ½ */
  111.   SUN4(-1) HP(252) _ /* solid */
  112.   SUN4(187) HP(253) _ /* ╗ */
  113.   SUN4(177) HP(254) _ /* ▒ */
  114.   SUN4(-1) HP(255) _ /* inv. K */
  115. #undef _
  116. #undef SUN4
  117. #undef HP
  118.   { int fehler = 0;
  119.     int c;
  120.     while (!((c = getchar()) == EOF))
  121.       { c = tabelle[c];
  122.         if (c < 0) { fehler++; } else putchar(c);
  123.       }
  124.     if (!(fehler == 0))
  125.       { fprintf(stderr,"%d illegal characters\n",fehler); exit(1); }
  126.       else
  127.       if (ferror(stdin) || ferror(stdout))
  128.         { exit(1); }
  129.         else
  130.         { exit(0); }
  131. } }
  132.