# 2.11BSD#431 - /usr/src/games/hack/hack.shknam.c

##### Functions

    findname          X

##### Variables

    shk_nx            X
    shkarmors         X
    shkbooks          X
    shkfoods          X
    shkgeneral        X
    shkliquors        X
    shkrings          X
    shkwands          X
    shkweapons        X

##### struct's

    shk_nx            X

       1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
       2: /* hack.shknam.c - version 1.0.2 */
       3:
       4: #include "hack.h"
       5:
       6: char *shkliquors[] = {
       7: #ifdef  VERSION7
       8:     "Nj", "Ts", "Go", "Os", "Gr", "Ko", "We", "Sy", "Sa", "Na", "Ky",
       9:     "Wa", "Sw", "Kl", "Ra", "Gl", "Bz", "Kr", "Hr", "Le", "Br", "Bi",
      10:     "Th", "Sr", "Bu", "El", "Fl", "Va", "Sc", "Zu",
      11: #else   VERSION7
      12:     /* Ukraine */
      13:     "Njezjin", "Tsjernigof", "Gomel", "Ossipewsk", "Gorlowka",
      14:     /* N. Russia */
      15:     "Konosja", "Weliki Oestjoeg", "Syktywkar", "Sablja",
      16:     "Narodnaja", "Kyzyl",
      17:     /* Silezie */
      18:     "Walbrzych", "Swidnica", "Klodzko", "Raciborz", "Gliwice",
      19:     "Brzeg", "Krnov", "Hradec Kralove",
      20:     /* Schweiz */
      21:     "Leuk", "Brig", "Brienz", "Thun", "Sarnen", "Burglen", "Elm",
      22:     "Flims", "Vals", "Schuls", "Zum Loch",
      23: #endif	VERSION7
      24:     0
      25: };
      26:
      27: char *shkbooks[] = {
      28: #ifdef  VERSION7
      29:     "Sk", "Ka", "Rh", "En", "La", "Lo", "Cr", "Ma", "Ba", "Ki", "Lu",
      30:     "Ei", "Gw", "Kt", "Ne", "Sn", "By", "Kv", "Ca", "Gb", "Km", "Kg",
      31:     "Dr", "In", "Cl", "Li", "Cu", "Du", "Ib", "Ks",
      32: #else   VERSION7
      33:     /* Eire */
      34:     "Skibbereen", "Kanturk", "Rath Luirc", "Ennistymon", "Lahinch",
      35:     "Loughrea", "Croagh", "Maumakeogh", "Ballyjamesduff",
      36:     "Kinnegad", "Lugnaquillia", "Enniscorthy", "Gweebarra",
      37:     "Kittamagh", "Nenagh", "Sneem", "Ballingeary", "Kilgarvan",
      38:     "Cahersiveen", "Glenbeigh", "Kilmihil", "Kiltamagh",
      39:     "Droichead Atha", "Inniscrone", "Clonegal", "Lisnaskea",
      40:     "Culdaff", "Dunfanaghy", "Inishbofin", "Kesh",
      41: #endif	VERSION7
      42:     0
      43: };
      44:
      45: char *shkarmors[] = {
      46: #ifdef  VERSION7
      47:     "De", "Kc", "Bo", "Yi", "Gz", "Sr", "Ak", "Ti", "Ar", "Er", "Ik",
      48:     "Kd", "Sv", "Pe", "Ml", "Bt", "Ay", "Zo", "Bb", "Tf", "Av", "Ks",
      49:     "Mk", "Mg", "Mi", "Bc", "Kk", "Al", "Po", "Nh",
      50: #else   VERSION7
      51:     /* Turquie */
      52:     "Demirci", "Kalecik", "Boyabai", "Yildizeli", "Gaziantep",
      53:     "Siirt", "Akhalataki", "Tirebolu", "Aksaray", "Ermenak",
      54:     "Iskenderun", "Kadirli", "Siverek", "Pervari", "Malasgirt",
      55:     "Bayburt", "Ayancik", "Zonguldak", "Balya", "Tefenni",
      56:     "Artvin", "Kars", "Makharadze", "Malazgirt", "Midyat",
      57:     "Birecik", "Kirikkale", "Alaca", "Polatli", "Nallihan",
      58: #endif	VERSION7
      59:     0
      60: };
      61:
      62: char *shkwands[] = {
      63: #ifdef  VERSION7
      64:     "Yr", "Tr", "Mw", "Pn", "Rd", "Ll", "Lf", "YF", "Me", "Ry", "Bd",
      65:     "Cg", "Lw", "Ln", "Cb", "Nn", "Tu", "Iv", "Bm", "Lc", "Kh", "Bn",
      66:     "Dn", "Mv", "Ui", "St", "Sg", "Ch", "Gh", "Kn", "Dv",
      67: #else   VERSION7
      68:     /* Wales */
      69:     "Yr Wyddgrug", "Trallwng", "Mallwyd", "Pontarfynach",
      70:     "Rhaeader", "Llandrindod", "Llanfair-ym-muallt",
      71:     "Y-Fenni", "Measteg", "Rhydaman", "Beddgelert",
      72:     "Curig", "Llanrwst", "Llanerchymedd", "Caergybi",
      73:     /* Scotland */
      74:     "Nairn", "Turriff", "Inverurie", "Braemar", "Lochnagar",
      75:     "Kerloch", "Beinn a Ghlo", "Drumnadrochit", "Morven",
      76:     "Uist", "Storr", "Sgurr na Ciche", "Cannich", "Gairloch",
      77:     "Kyleakin", "Dunvegan",
      78: #endif	VERSION7
      79:     0
      80: };
      81:
      82: char *shkrings[] = {
      83: #ifdef  VERSION7
      84:     "Fe", "Fl", "Gl", "Ha", "Hy", "Hb", "Im", "Ju", "Kj", "Ms", "Mj",
      85:     "Mc", "Ol", "Sd", "Ss", "Sn", "Ta", "Tw", "Wi", "Yp", "Rj", "Va",
      86:     "Kx", "Ab", "Ek", "Rv", "Av", "Hp", "Ly", "Ge", "Oe", "Kb", "Fa",
      87: #else   VERSION7
      88:     /* Hollandse familienamen */
      89:     "Feyfer", "Flugi", "Gheel", "Havic", "Haynin", "Hoboken",
      90:     "Imbyze", "Juyn", "Kinsky", "Massis", "Matray", "Moy",
      91:     "Olycan", "Sadelin", "Svaving", "Tapper", "Terwen", "Wirix",
      92:     "Ypey",
      93:     /* Skandinaviske navne */
      94:     "Rastegaisa", "Varjag Njarga", "Kautekeino", "Abisko",
      95:     "Enontekis", "Rovaniemi", "Avasaksa", "Haparanda",
      96:     "Lulea", "Gellivare", "Oeloe", "Kajaani", "Fauske",
      97: #endif	VERSION7
      98:     0
      99: };
     100:
     101: char *shkfoods[] = {
     102: #ifdef  VERSION7
     103:     "Dj", "Tb", "Td", "Pn", "Bd", "Pr", "Bo", "Sq", "Nb", "Dm", "Au",
     104:     "Bx", "Pp", "Bf", "Tl", "Se", "Bp", "Tz", "Kq", "Nz", "Pc", "Pm",
     105:     "Pj", "Ku", "Pb", "Tc", "Mn", "Tp", "Sm", "Bs", "Tg", "Su",
     106: #else   VERSION7
     107:     /* Indonesia */
     108:     "Djasinga", "Tjibarusa", "Tjiwidej", "Pengalengan",
     109:     "Bandjar", "Parbalingga", "Bojolali", "Sarangan",
     110:     "Ngebel", "Djombang", "Ardjawinangun", "Berbek",
     111:     "Papar", "Baliga", "Tjisolok", "Siboga", "Banjoewangi",
     112:     "Trenggalek", "Karangkobar", "Njalindoeng", "Pasawahan",
     113:     "Pameunpeuk", "Patjitan", "Kediri", "Pemboeang", "Tringanoe",
     114:     "Makin", "Tipor", "Semai", "Berhala", "Tegal", "Samoe",
     115: #endif	VERSION7
     116:     0
     117: };
     118:
     119: char *shkweapons[] = {
     120: #ifdef  VERSION7
     121:     "Vo", "Ro", "Lq", "Tv", "Gu", "Mq", "Nv", "Vz", "Pq", "Ur", "Cn",
     122:     "Fc", "Lz", "Vr", "Qu", "Lr", "Ec", "Cz", "Ey", "Cc", "Mo", "Jo",
     123:     "Ps", "Jm", "Fu", "Lo", "Sm", "Em", "Eg", "Ez", "Lh",
     124: #else   VERSION7
     125:     /* Perigord */
     126:     "Voulgezac", "Rouffiac", "Lerignac", "Touverac", "Guizengeard",
     127:     "Melac", "Neuvicq", "Vanzac", "Picq", "Urignac", "Corignac",
     128:     "Fleac", "Lonzac", "Vergt", "Queyssac", "Liorac", "Echourgnac",
     129:     "Cazelon", "Eypau", "Carignan", "Monbazillac", "Jonzac",
     130:     "Pons", "Jumilhac", "Fenouilledes", "Laguiolet", "Saujon",
     131:     "Eymoutiers", "Eygurande", "Eauze", "Labouheyre",
     132: #endif	VERSION7
     133:     0
     134: };
     135:
     136: char *shkgeneral[] = {
     137: #ifdef  VERSION7
     138:     "He", "Pf", "As", "Mb", "Aa", "Pk", "Kb", "Wt", "Ap", "Sc", "At",
     139:     "Uk", "Ai", "Ab", "Uv", "Gs", "Lk", "Vn", "Yk", "Uh", "Ot", "Ug",
     140:     "Tm", "Wp", "Ji", "Qc", "Xi", "Yr", "Xy", "Yb", "Hv",
     141: #else   VERSION7
     142:     /* Suriname */
     143:     "Hebiwerie", "Possogroenoe", "Asidonhopo", "Manlobbi",
     144:     "Adjama", "Pakka Pakka", "Kabalebo", "Wonotobo",
     145:     "Akalapi", "Sipaliwini",
     146:     /* Greenland */
     147:     "Annootok", "Upernavik", "Angmagssalik",
     148:     /* N. Canada */
     149:     "Aklavik", "Inuvik", "Tuktoyaktuk",
     150:     "Chicoutimi", "Ouiatchouane", "Chibougamau",
     151:     "Matagami", "Kipawa", "Kinojevis",
     152:     "Abitibi", "Maganasipi",
     153:     /* Iceland */
     154:     "Akureyri", "Kopasker", "Budereyri", "Akranes", "Bordeyri",
     155:     "Holmavik",
     156: #endif	VERSION7
     157:     0
     158: };
     159:
     160: struct shk_nx {
     161:     char x;
     162:     char **xn;
     163: } shk_nx[] = {
     164:     { POTION_SYM,   shkliquors },
     165:     { SCROLL_SYM,   shkbooks },
     166:     { ARMOR_SYM,    shkarmors },
     167:     { WAND_SYM, shkwands },
     168:     { RING_SYM, shkrings },
     169:     { FOOD_SYM, shkfoods },
     170:     { WEAPON_SYM,   shkweapons },
     171:     { 0,        shkgeneral }
     172: };
     173:
     174: findname(nampt, let) char *nampt; char let; {
     175: register struct shk_nx *p = shk_nx;
     176: register char **q;
     177: register int i;
     178:     while(p->x && p->x != let) p++;
     179:     q = p->xn;
     180:     for(i=0; i<dlevel; i++) if(!q[i]){
     181:         /* Not enough names, try general name */
     182:         if(let) findname(nampt, 0);
     183:         else (void) strcpy(nampt, "Dirk");
     184:         return;
     185:     }
     186:     (void) strncpy(nampt, q[i], PL_NSIZ);
     187:     nampt[PL_NSIZ-1] = 0;
     188: }

#### Defined functions

findname defined in line 174; used 2 times

- in line 182
- in /usr/src/games/hack/hack.mkshop.c line 117

#### Defined variables

shk_nx defined in line 163; used 1 times

- in line 175

shkarmors defined in line 45; used 1 times

- in line 166

shkbooks defined in line 27; used 1 times

- in line 165

shkfoods defined in line 101; used 1 times

- in line 169

shkgeneral defined in line 136; used 1 times

- in line 171

shkliquors defined in line 6; used 1 times

- in line 164

shkrings defined in line 82; used 1 times

- in line 168

shkwands defined in line 62; used 1 times

- in line 167

shkweapons defined in line 119; used 1 times

- in line 170

#### Defined struct's

shk_nx defined in line 160; used 2 times

- in line 175(2)

Last modified: 1985-12-16 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 758 |