home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / intercal.zip / src / numerals.c < prev    next >
C/C++ Source or Header  |  1996-06-09  |  4KB  |  138 lines

  1. /*
  2.  * numeral.c -- internationalization support for INTERCAL input.
  3.  *
  4.  * After release 0.5, I wrote:
  5.  *
  6.  * 2. (ESR) Input format internationalization -- allow WRITE IN input digits in
  7.  *   major languages such as Nahuatl, Tagalog, Sanskrit, and Basque.
  8.  *
  9.  * The twisted loons in the alt.folklore.computers crowd loved this
  10.  * idea, and I actually got sent digit lists for Nahuatl, Tagalog,
  11.  * Sanskrit, and Basque -- also, Kwakiutl, Georgian, Ojibwe. Albanian,
  12.  * and Volap\"uk.  I've left out Albanian (didn't want to keep track
  13.  * of the dipthong diacritical) and Ojibwe (no zero digit).  So:
  14.  * Nahuatl, Tagalog, Sanskrit, Basque, Georgian, Kwakiutl, and
  15.  * Volap\"uk are now supported in addition to English.
  16.  *
  17. LICENSE TERMS
  18.     Copyright (C) 1996 Eric S. Raymond 
  19.  
  20.     This program is free software; you can redistribute it and/or modify
  21.     it under the terms of the GNU General Public License as published by
  22.     the Free Software Foundation; either version 2 of the License, or
  23.     (at your option) any later version.
  24.  
  25.     This program is distributed in the hope that it will be useful,
  26.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  27.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  28.     GNU General Public License for more details.
  29.  
  30.     You should have received a copy of the GNU General Public License
  31.     along with this program; if not, write to the Free Software
  32.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  33.  */
  34.  
  35. typedef struct
  36. {
  37.     char *name;
  38.     int    value;
  39. }
  40. numeral;
  41.  
  42. static numeral numerals[] =
  43. {
  44. /* English */
  45.     { "OH",        0 },
  46.     { "ZERO",        0 },
  47.     { "ONE",        1 },
  48.     { "TWO",        2 },
  49.     { "THREE",        3 },
  50.     { "FOUR",        4 },
  51.     { "FIVE",        5 },
  52.     { "SIX",        6 },
  53.     { "SEVEN",        7 },
  54.     { "EIGHT",        8 },
  55.     { "NINE",        9 },
  56.     { "NINER",        9 },    /* For all you junior birdmen */
  57. /* Sanskrit */
  58.     { "SUTYA",        0 },    /* Retroflex s, pronounced halfway to sh */
  59.     { "SHUTYA",        0 },
  60.     { "EKA",        1 },
  61.     { "DVI",        2 },
  62.     { "TRI",        3 },
  63.     { "CHATUR",        4 },
  64.     { "PANCHAN",    5 },
  65.     { "SHASH",        6 },
  66.     { "SAPTAM",        7 },
  67.     { "ASHTAN",        8 },
  68.     { "NAVAN",        9 },
  69. /* Basque */
  70.     { "ZEROA",        0 },
  71.     { "BAT",        1 },
  72.     { "BI",        2 },
  73.     { "HIRO",        3 },
  74.     { "LAU",        4 },
  75.     { "BORTZ",        5 },
  76.     { "SEI",        6 },
  77.     { "ZAZPI",        7 },
  78.     { "ZORTZI",        8 },
  79.     { "BEDERATZI",    9 },
  80. /* Tagalog */
  81.     { "WALA",        0 },
  82.     { "ISA",        1 },
  83.     { "DALAWA",        2 },
  84.     { "TATLO",        3 },
  85.     { "APAT",        4 },
  86.     { "LIMA",        5 },
  87.     { "ANIM",        6 },
  88.     { "PITO",        7 },
  89.     { "WALO",        8 },
  90.     { "SIYAM",        9 },
  91. /* Classical Nahuatl */
  92.     { "AHTLE",        0 },    /* Actually `nothing'; no separate zero word is known */
  93.     { "CE",        1 },
  94.     { "OME",        2 },
  95.     { "IEI",        3 },
  96.     { "NAUI",        4 },
  97.     { "NACUILI",    5 },
  98.     { "CHIQUACE",    6 },
  99.     { "CHICOME",    7 },
  100.     { "CHICUE",        8 },
  101.     { "CHICUNAUI",    9 },
  102. /* Georgian */
  103.     { "NULI",        0 },
  104.     { "ERTI",        1 },
  105.     { "ORI",        2 },
  106.     { "SAMI",        3 },
  107.     { "OTXI",        4 },
  108.     { "XUTI",        5 },
  109.     { "EKSVI",        6 },
  110.     { "SHVIDI",        7 },
  111.     { "RVA",        8 },
  112.     { "CXRA",        9 },
  113. /* Kwakiutl (technically, Kwak'wala) */
  114.     { "KE'YOS",        0 },    /* Actually `nothing'; no separate zero word is known */
  115.     { "'NEM",        1 },
  116.     { "MAL'H",        2 },
  117.     { "YUDEXW",        3 },
  118.     { "MU",        4 },
  119.     { "SEK'A",        5 },
  120.     { "Q'ETL'A",    6 },
  121.     { "ETLEBU",        7 },
  122.     { "MALHGWENALH",    8 },
  123.     { "'NA'NE'MA",    9 },
  124. /* Volap\"uk */
  125.     { "NOS",        0 },
  126.     { "BAL",        1 },
  127.     { "TEL",        2 },
  128.     { "KIL",        3 },
  129.     { "FOL",        4 },
  130.     { "LUL",        5 },
  131.     { "M\\\"AL",    6 },
  132.     { "VEL",        7 },
  133.     { "J\\\"OL",    8 },
  134.     { "Z\\\"UL",    9 },
  135. };
  136.  
  137. /* numeral.c ends here */
  138.