home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / gcom / part03 < prev    next >
Encoding:
Text File  |  1992-01-13  |  49.9 KB  |  1,216 lines

  1. Newsgroups: comp.sources.misc
  2. From: murf@oakhill.sps.mot.com (Steve Murphy)
  3. Subject:  v27i074:  gcom - GEDCOM genealogical database merge utility, v1, Part03/07
  4. Message-ID: <1992Jan13.145428.25466@sparky.imd.sterling.com>
  5. X-Md4-Signature: dc1d5c9c7fd531b6730e1513b49de13e
  6. Date: Mon, 13 Jan 1992 14:54:28 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: murf@oakhill.sps.mot.com (Steve Murphy)
  10. Posting-number: Volume 27, Issue 74
  11. Archive-name: gcom/part03
  12. Environment: SunOS
  13.  
  14. ---- Cut Here and unpack ----
  15. #!/bin/sh
  16. # This is part 03 of gcom
  17. if touch 2>&1 | fgrep 'amc' > /dev/null
  18.  then TOUCH=touch
  19.  else TOUCH=true
  20. fi
  21. # ============= gedcom.lex.big ==============
  22. echo "x - extracting gedcom.lex.big (Text)"
  23. sed 's/^X//' << 'SHAR_EOF' > gedcom.lex.big &&
  24. X%{
  25. X/*
  26. X# Copyright (C) 1992 Steven Michael Murphy
  27. X#
  28. X#
  29. X# This file is part of gcom, the GEDCOM file merging utility for UNIX,
  30. X# 
  31. X# 
  32. X# gcom is free software; you can redistribute it and/or modify
  33. X# it under the terms of the GNU General Public License as published by
  34. X# the Free Software Foundation; either version 2, or (at your option)
  35. X# any later version.
  36. X# 
  37. X# gcom is distributed in the hope that it will be useful,
  38. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  39. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  40. X# GNU General Public License for more details.
  41. X# 
  42. X# You should have received a copy of the GNU General Public License
  43. X# along with gcom; see the file COPYING.  If not, write to
  44. X# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  45. X*/
  46. X#include <stdio.h>
  47. X#include <string.h>
  48. X#include "gedcom.b.tab.h"
  49. Xextern int lineno;
  50. Xstatic char rcs_stuff[] = "$Id: gedcom.lex.big,v 1.2 1992/01/03 17:49:50 murf Exp $";
  51. X/* below follows a list of all the tokens allowed in GEDCOM files */
  52. X
  53. X%}
  54. Xoptfield        ([ ].+)?$
  55. X
  56. X%%
  57. XBIC        { return BIC; }
  58. XSTILLBORN    { return STILLBORN;}
  59. XCLEARED        { return CLEARED; }
  60. XUNCLEARED    { return UNCLEARED; }
  61. XDNS        { return DNS; }
  62. XSEENOTES    { return SEENOTES; }
  63. XSUBMITTED    { return SUBMITTED; }
  64. XCOMPLETED    { return COMPLETED; }
  65. XCHILD    { return CHILD; }
  66. XINFANT    { return INFANT; }
  67. XCANCELLED    { return CANCELLED; }
  68. XDNS/CAN    { return DNSCAN; }
  69. XABBR{optfield}    { setyystr(yytext); return ABBR;}
  70. XABY{optfield}    { setyystr(yytext); return ABY;}
  71. XACTI{optfield}    { setyystr(yytext); return ACTI;}
  72. XACTN{optfield}    { setyystr(yytext); return ACTN;}
  73. XADDI{optfield}    { setyystr(yytext); return ADDI;}
  74. XADDR[ ].+$        { setyystr(yytext); return ADDR;}
  75. XADMI{optfield}    { setyystr(yytext); return ADMI;}
  76. XADOP{optfield}    { setyystr(yytext); return ADOP;}
  77. XAENT{optfield}    { setyystr(yytext); return AENT;}
  78. XAFN[ ].+$        { setyystr(yytext); return AFN;}
  79. XAGE{optfield}    { setyystr(yytext); return AGE;}
  80. XAGEF{optfield}    { setyystr(yytext); return AGEF;}
  81. XAGEM{optfield}    { setyystr(yytext); return AGEM;}
  82. XALIA{optfield}    { setyystr(yytext); return ALIA;}
  83. XALPH{optfield}    { setyystr(yytext); return ALPH;}
  84. XALSO{optfield}    { setyystr(yytext); return ALSO;}
  85. XANCE{optfield}    { setyystr(yytext); return ANCE;}
  86. XANCI{optfield}    { setyystr(yytext); return ANCI;}
  87. XANUL{optfield}    { setyystr(yytext); return ANUL;}
  88. XAREA{optfield}    { setyystr(yytext); return AREA;}
  89. XASSD{optfield}    { setyystr(yytext); return ASSD;}
  90. XASSI{optfield}    { setyystr(yytext); return ASSI;}
  91. XASSO{optfield}    { setyystr(yytext); return ASSO;}
  92. XATLA{optfield}    { setyystr(yytext); return ATLA;}
  93. XAUTH{optfield}    { setyystr(yytext); return AUTH;}
  94. XBAPL([ ].+$)?        {setyystr(yytext);return BAPL;}
  95. XBAPM{optfield}    { setyystr(yytext); return BAPM;}
  96. XBARM{optfield}    { setyystr(yytext); return BARM;}
  97. XBASM{optfield}    { setyystr(yytext); return BASM;}
  98. XBATC{optfield}    { setyystr(yytext); return BATC;}
  99. XBEN{optfield}    { setyystr(yytext); return BEN;}
  100. XBENT{optfield}    { setyystr(yytext); return BENT;}
  101. XBIC{optfield}    { setyystr(yytext); return BIC;}
  102. XBIRT        {return BIRT;}
  103. XBLES{optfield}    { setyystr(yytext); return BLES;}
  104. XBLSL{optfield}    { setyystr(yytext); return BLSL;}
  105. XBOOK{optfield}    { setyystr(yytext); return BOOK;}
  106. XBRID{optfield}    { setyystr(yytext); return BRID;}
  107. XBURI        {return BURI;}
  108. XBYTE{optfield}    { setyystr(yytext); return BYTE;}
  109. XCALN{optfield}    { setyystr(yytext); return CALN;}
  110. XCANC[ ][YN]        {setyystr(yytext); return CANC;}
  111. XCAUS{optfield}    { setyystr(yytext); return CAUS;}
  112. XCDAT{optfield}    { setyystr(yytext); return CDAT;}
  113. XCEME{optfield}    { setyystr(yytext); return CEME;}
  114. XCENS{optfield}    { setyystr(yytext); return CENS;}
  115. XCHAN{optfield}    { setyystr(yytext); return CHAN;}
  116. XCHAR[ ].*$        {setyystr(yytext); return CHAR;}
  117. XCHEC{optfield}    { setyystr(yytext); return CHEC;}
  118. XCHEK{optfield}    { setyystr(yytext); return CHEK;}
  119. XCHIL        {return CHIL;}
  120. XCHR        {return CHR;}
  121. XCIFF{optfield}    { setyystr(yytext); return CIFF;}
  122. XCITA{optfield}    { setyystr(yytext); return CITA;}
  123. XCITY{optfield}    { setyystr(yytext); return CITY;}
  124. XCIVI{optfield}    { setyystr(yytext); return CIVI;}
  125. XCIVL{optfield}    { setyystr(yytext); return CIVL;}
  126. XCLEA{optfield}    { setyystr(yytext); return CLEA;}
  127. XCLRK{optfield}    { setyystr(yytext); return CLRK;}
  128. XCNTR{optfield}    { setyystr(yytext); return CNTR;}
  129. XCO{optfield}    { setyystr(yytext); return CO;}
  130. XCODE{optfield}    { setyystr(yytext); return CODE;}
  131. XCODI{optfield}    { setyystr(yytext); return CODI;}
  132. XCOFN{optfield}    { setyystr(yytext); return COFN;}
  133. XCOLO{optfield}    { setyystr(yytext); return COLO;}
  134. XCOMM[ ].*$        {setyystr(yytext); return COMM;}
  135. XCOMP{optfield}    { setyystr(yytext); return COMP;}
  136. XCOND{optfield}    { setyystr(yytext); return COND;}
  137. XCONE{optfield}    { setyystr(yytext); return CONE;}
  138. XCONF{optfield}    { setyystr(yytext); return CONF;}
  139. XCONL{optfield}    { setyystr(yytext); return CONL;}
  140. XCONT[ ].*$        {setyystr(yytext); return CONT;}
  141. XCOON{optfield}    { setyystr(yytext); return COON;}
  142. XCOOR{optfield}    { setyystr(yytext); return COOR;}
  143. XCORP{optfield}    { setyystr(yytext); return CORP;}
  144. XCORR{optfield}    { setyystr(yytext); return CORR;}
  145. XCOST{optfield}    { setyystr(yytext); return COST;}
  146. XCOUN{optfield}    { setyystr(yytext); return COUN;}
  147. XCOUP{optfield}    { setyystr(yytext); return COUP;}
  148. XCOUR{optfield}    { setyystr(yytext); return COUR;}
  149. XCOVE{optfield}    { setyystr(yytext); return COVE;}
  150. XCREA{optfield}    { setyystr(yytext); return CREA;}
  151. XCRFN{optfield}    { setyystr(yytext); return CRFN;}
  152. XCRIM{optfield}    { setyystr(yytext); return CRIM;}
  153. XCTRY{optfield}    { setyystr(yytext); return CTRY;}
  154. XDATA{optfield}    { setyystr(yytext); return DATA;}
  155. XDATE[ ].*$        {setyystr(yytext); return DATE;}
  156. XDAU{optfield}    { setyystr(yytext); return DAU;}
  157. XDCHR{optfield}    { setyystr(yytext); return DCHR;}
  158. XDEAT        {return DEAT;}
  159. XDESC{optfield}    { setyystr(yytext); return DESC;}
  160. XDESI{optfield}    { setyystr(yytext); return DESI;}
  161. XDEST[ ].*$        {setyystr(yytext); return DEST;}
  162. XDIR{optfield}    { setyystr(yytext); return DIR;}
  163. XDISC{optfield}    { setyystr(yytext); return DISC;}
  164. XDISK{optfield}    { setyystr(yytext); return DISK;}
  165. XDIV[ ].*$        {if( yytext[4] == 'Y' ) yylval.num =1;
  166. X            else yylval.num = 0; return DIV;}
  167. XDIVF{optfield}    { setyystr(yytext); return DIVF;}
  168. XDOCS{optfield}    { setyystr(yytext); return DOCS;}
  169. XDUP{optfield}    { setyystr(yytext); return DUP;}
  170. XDWEL{optfield}    { setyystr(yytext); return DWEL;}
  171. XEDUC{optfield}    { setyystr(yytext); return EDUC;}
  172. XEMIG{optfield}    { setyystr(yytext); return EMIG;}
  173. XEMPL{optfield}    { setyystr(yytext); return EMPL;}
  174. XEND{optfield}    { setyystr(yytext); return END;}
  175. XENDL        {return ENDL;}
  176. XENGA{optfield}    { setyystr(yytext); return ENGA;}
  177. XENTR{optfield}    { setyystr(yytext); return ENTR;}
  178. XENUM{optfield}    { setyystr(yytext); return ENUM;}
  179. XENUR{optfield}    { setyystr(yytext); return ENUR;}
  180. XEOF{optfield}    { setyystr(yytext); return EOF9;}
  181. XEVAL[ ].+$    {setyystr(yytext); return EVAL;}
  182. XEVEN{optfield}    { setyystr(yytext); return EVEN;}
  183. XEXCE{optfield}    { setyystr(yytext); return EXCE;}
  184. XEXCO{optfield}    { setyystr(yytext); return EXCO;}
  185. XEXEC{optfield}    { setyystr(yytext); return EXEC;}
  186. XEXPL{optfield}    { setyystr(yytext); return EXPL;}
  187. XEXTD{optfield}    { setyystr(yytext); return EXTD;}
  188. XEXTR{optfield}    { setyystr(yytext); return EXTR;}
  189. XFAM            {return FAM;}
  190. XFAMC        {return FAMC;}
  191. XFAMF        {return FAMF;}
  192. XFAMO{optfield}    { setyystr(yytext); return FAMO;}
  193. XFAMP{optfield}    { setyystr(yytext); return FAMP;}
  194. XFAMR{optfield}    { setyystr(yytext); return FAMR;}
  195. XFAMS        {return FAMS;}
  196. XFATH{optfield}    { setyystr(yytext); return FATH;}
  197. XFCOM{optfield}    { setyystr(yytext); return FCOM;}
  198. XFEMA{optfield}    { setyystr(yytext); return FEMA;}
  199. XFGR{optfield}    { setyystr(yytext); return FGR;}
  200. XFHC{optfield}    { setyystr(yytext); return FHC;}
  201. XFILE[ ].*$        {setyystr(yytext); return FILE9;}
  202. XFILM{optfield}    { setyystr(yytext); return FILM;}
  203. XFLAG.+$        {setyystr(yytext); return FLAG;}
  204. XFOFN{optfield}    { setyystr(yytext); return FOFN;}
  205. XFOLI{optfield}    { setyystr(yytext); return FOLI;}
  206. XFONL{optfield}    { setyystr(yytext); return FONL;}
  207. XFORE{optfield}    { setyystr(yytext); return FORE;}
  208. XFORG{optfield}    { setyystr(yytext); return FORG;}
  209. XFOST{optfield}    { setyystr(yytext); return FOST;}
  210. XFRAM{optfield}    { setyystr(yytext); return FRAM;}
  211. XFRFN{optfield}    { setyystr(yytext); return FRFN;}
  212. XFROM{optfield}    { setyystr(yytext); return FROM;}
  213. XFSUB{optfield}    { setyystr(yytext); return FSUB;}
  214. XFUNC{optfield}    { setyystr(yytext); return FUNC;}
  215. XGENE{optfield}    { setyystr(yytext); return GENE;}
  216. XGIVN{optfield}    { setyystr(yytext); return GIVN;}
  217. XGNRL{optfield}    { setyystr(yytext); return GNRL;}
  218. XGRAD{optfield}    { setyystr(yytext); return GRAD;}
  219. XGROO{optfield}    { setyystr(yytext); return GROO;}
  220. XGSC{optfield}    { setyystr(yytext); return GSC;}
  221. XGUAR{optfield}    { setyystr(yytext); return GUAR;}
  222. XHAML{optfield}    { setyystr(yytext); return HAML;}
  223. XHAND{optfield}    { setyystr(yytext); return HAND;}
  224. XHDOF{optfield}    { setyystr(yytext); return HDOF;}
  225. XHDOH{optfield}    { setyystr(yytext); return HDOH;}
  226. XHEAD        {return HEAD;}
  227. XHEAL{optfield}    { setyystr(yytext); return HEAL;}
  228. XHEIL{optfield}    { setyystr(yytext); return HEIL;}
  229. XHEIR{optfield}    { setyystr(yytext); return HEIR;}
  230. XHEPR{optfield}    { setyystr(yytext); return HEPR;}
  231. XHIST{optfield}    { setyystr(yytext); return HIST;}
  232. XHUSB        {return HUSB;}
  233. XIBRZ{optfield}    { setyystr(yytext); return IBRZ;}
  234. XILLE{optfield}    { setyystr(yytext); return ILLE;}
  235. XILLU{optfield}    { setyystr(yytext); return ILLU;}
  236. XIMMI{optfield}    { setyystr(yytext); return IMMI;}
  237. XINDE{optfield}    { setyystr(yytext); return INDE;}
  238. XINDI        {return INDI;}
  239. XINFA{optfield}    { setyystr(yytext); return INFA;}
  240. XINFL{optfield}    { setyystr(yytext); return INFL;}
  241. XINFO{optfield}    { setyystr(yytext); return INFO;}
  242. XINFT{optfield}    { setyystr(yytext); return INFT;}
  243. XINST{optfield}    { setyystr(yytext); return INST;}
  244. XIRFN{optfield}    { setyystr(yytext); return IRFN;}
  245. XITEM{optfield}    { setyystr(yytext); return ITEM;}
  246. XLANG{optfield}    { setyystr(yytext); return LANG;}
  247. XLAST{optfield}    { setyystr(yytext); return LAST;}
  248. XLATI{optfield}    { setyystr(yytext); return LATI;}
  249. XLDAT{optfield}    { setyystr(yytext); return LDAT;}
  250. XLENG{optfield}    { setyystr(yytext); return LENG;}
  251. XLINE{optfield}    { setyystr(yytext); return LINE;}
  252. XLINK{optfield}    { setyystr(yytext); return LINK;}
  253. XLIVE{optfield}    { setyystr(yytext); return LIVE;}
  254. XLOC{optfield}    { setyystr(yytext); return LOC;}
  255. XLOCA{optfield}    { setyystr(yytext); return LOCA;}
  256. XLOCC{optfield}    { setyystr(yytext); return LOCC;}
  257. XLOCD{optfield}    { setyystr(yytext); return LOCD;}
  258. XLOCE{optfield}    { setyystr(yytext); return LOCE;}
  259. XLOCG{optfield}    { setyystr(yytext); return LOCG;}
  260. XLOCH{optfield}    { setyystr(yytext); return LOCH;}
  261. XLOCI{optfield}    { setyystr(yytext); return LOCI;}
  262. XLOCL{optfield}    { setyystr(yytext); return LOCL;}
  263. XLOCM{optfield}    { setyystr(yytext); return LOCM;}
  264. XLOCN{optfield}    { setyystr(yytext); return LOCN;}
  265. XLOCO{optfield}    { setyystr(yytext); return LOCO;}
  266. XLOCQ{optfield}    { setyystr(yytext); return LOCQ;}
  267. XLOCR{optfield}    { setyystr(yytext); return LOCR;}
  268. XLOCS{optfield}    { setyystr(yytext); return LOCS;}
  269. XLOCU{optfield}    { setyystr(yytext); return LOCU;}
  270. XLOCX{optfield}    { setyystr(yytext); return LOCX;}
  271. XLONG{optfield}    { setyystr(yytext); return LONG;}
  272. XLSF{optfield}    { setyystr(yytext); return LSF;}
  273. XLVG{optfield}    { setyystr(yytext); return LVG;}
  274. XMAID{optfield}    { setyystr(yytext); return MAID;}
  275. XMALE{optfield}    { setyystr(yytext); return MALE;}
  276. XMAP{optfield}    { setyystr(yytext); return MAP;}
  277. XMARB{optfield}    { setyystr(yytext); return MARB;}
  278. XMARC{optfield}    { setyystr(yytext); return MARC;}
  279. XMARD{optfield}    { setyystr(yytext); return MARD;}
  280. XMARL{optfield}    { setyystr(yytext); return MARL;}
  281. XMARR        {return MARR;}
  282. XMARS{optfield}    { setyystr(yytext); return MARS;}
  283. XMARY{optfield}    { setyystr(yytext); return MARY;}
  284. XMESS{optfield}    { setyystr(yytext); return MESS;}
  285. XMICR{optfield}    { setyystr(yytext); return MICR;}
  286. XMILI{optfield}    { setyystr(yytext); return MILI;}
  287. XMINR{optfield}    { setyystr(yytext); return MINR;}
  288. XMISC{optfield}    { setyystr(yytext); return MISC;}
  289. XMOTH{optfield}    { setyystr(yytext); return MOTH;}
  290. XMTD{optfield}    { setyystr(yytext); return MTD;}
  291. XNAME[ ].*$    {setyystr(yytext); return NAME;}
  292. XNAMR{optfield}    { setyystr(yytext); return NAMR;}
  293. XNAMS{optfield}    { setyystr(yytext); return NAMS;}
  294. XNATU{optfield}    { setyystr(yytext); return NATU;}
  295. XNFCI{optfield}    { setyystr(yytext); return NFCI;}
  296. XNOTE[ ].*$        {setyystr(yytext); return NOTE;}
  297. XNOTI{optfield}    { setyystr(yytext); return NOTI;}
  298. XNULL{optfield}    { setyystr(yytext); return NULL9;}
  299. XNUMB[ ].*$        {yylval.num = atoi(yytext+6); return NOTE;}
  300. XNUMP{optfield}    { setyystr(yytext); return NUMP;}
  301. XNXTB{optfield}    { setyystr(yytext); return NXTB;}
  302. XOBJ{optfield}    { setyystr(yytext); return OBJ;}
  303. XOCCU{optfield}    { setyystr(yytext); return OCCU;}
  304. XOFFI{optfield}    { setyystr(yytext); return OFFI;}
  305. XOLD{optfield}    { setyystr(yytext); return OLD;}
  306. XOPER{optfield}    { setyystr(yytext); return OPER;}
  307. XORDI{optfield}    { setyystr(yytext); return ORDI;}
  308. XORDL{optfield}    { setyystr(yytext); return ORDL;}
  309. XORDN{optfield}    { setyystr(yytext); return ORDN;}
  310. XORG{optfield}    { setyystr(yytext); return ORG;}
  311. XORPH{optfield}    { setyystr(yytext); return ORPH;}
  312. XOTHE{optfield}    { setyystr(yytext); return OTHE;}
  313. XOUT{optfield}    { setyystr(yytext); return OUT;}
  314. XOVER{optfield}    { setyystr(yytext); return OVER;}
  315. XPACK{optfield}    { setyystr(yytext); return PACK;}
  316. XPAGE{optfield}    { setyystr(yytext); return PAGE;}
  317. XPARE{optfield}    { setyystr(yytext); return PARE;}
  318. XPARI{optfield}    { setyystr(yytext); return PARI;}
  319. XPART{optfield}    { setyystr(yytext); return PART;}
  320. XPASL{optfield}    { setyystr(yytext); return PASL;}
  321. XPATC{optfield}    { setyystr(yytext); return PATC;}
  322. XPATR{optfield}    { setyystr(yytext); return PATR;}
  323. XPBRZ{optfield}    { setyystr(yytext); return PBRZ;}
  324. XPED{optfield}    { setyystr(yytext); return PED;}
  325. XPEDC{optfield}    { setyystr(yytext); return PEDC;}
  326. XPENS{optfield}    { setyystr(yytext); return PENS;}
  327. XPERS{optfield}    { setyystr(yytext); return PERS;}
  328. XPHON[ ].*$        {setyystr(yytext); return PHON;}
  329. XPID{optfield}    { setyystr(yytext); return PID;}
  330. XPIFF{optfield}    { setyystr(yytext); return PIFF;}
  331. XPLAC[ ].*$        {setyystr(yytext); return PLAC;}
  332. XPOLY{optfield}    { setyystr(yytext); return POLY;}
  333. XPORT{optfield}    { setyystr(yytext); return PORT;}
  334. XPOST{optfield}    { setyystr(yytext); return POST;}
  335. XPOVE{optfield}    { setyystr(yytext); return POVE;}
  336. XPREF{optfield}    { setyystr(yytext); return PREF;}
  337. XPRES{optfield}    { setyystr(yytext); return PRES;}
  338. XPREV{optfield}    { setyystr(yytext); return PREV;}
  339. XPRIN{optfield}    { setyystr(yytext); return PRIN;}
  340. XPRIO{optfield}    { setyystr(yytext); return PRIO;}
  341. XPRNT{optfield}    { setyystr(yytext); return PRNT;}
  342. XPROB{optfield}    { setyystr(yytext); return PROB;}
  343. XPROP{optfield}    { setyystr(yytext); return PROP;}
  344. XPROT{optfield}    { setyystr(yytext); return PROT;}
  345. XPROV{optfield}    { setyystr(yytext); return PROV;}
  346. XPROX{optfield}    { setyystr(yytext); return PROX;}
  347. XPRTR{optfield}    { setyystr(yytext); return PRTR;}
  348. XPRVB{optfield}    { setyystr(yytext); return PRVB;}
  349. XPSUB{optfield}    { setyystr(yytext); return PSUB;}
  350. XPUBL{optfield}    { setyystr(yytext); return PUBL;}
  351. XPUBR{optfield}    { setyystr(yytext); return PUBR;}
  352. XPVMG{optfield}    { setyystr(yytext); return PVMG;}
  353. XPVRL{optfield}    { setyystr(yytext); return PVRL;}
  354. XQUAL.*$            {setyystr(yytext); return QUAL;}
  355. XQUAY{optfield}    { setyystr(yytext); return QUAY;}
  356. XRACE{optfield}    { setyystr(yytext); return RACE;}
  357. XRANG{optfield}    { setyystr(yytext); return RANG;}
  358. XRARS{optfield}    { setyystr(yytext); return RARS;}
  359. XRATI{optfield}    { setyystr(yytext); return RATI;}
  360. XREAL{optfield}    { setyystr(yytext); return REAL;}
  361. XREBA{optfield}    { setyystr(yytext); return REBA;}
  362. XRECD{optfield}    { setyystr(yytext); return RECD;}
  363. XRECO{optfield}    { setyystr(yytext); return RECO;}
  364. XRECR{optfield}    { setyystr(yytext); return RECR;}
  365. XREFN{optfield}    { setyystr(yytext); return REFN;}
  366. XREGD{optfield}    { setyystr(yytext); return REGD;}
  367. XREGI{optfield}    { setyystr(yytext); return REGI;}
  368. XREJE{optfield}    { setyystr(yytext); return REJE;}
  369. XREL[ ].*$            {setyystr(yytext); return REL;}
  370. XRELI{optfield}    { setyystr(yytext); return RELI;}
  371. XREMA{optfield}    { setyystr(yytext); return REMA;}
  372. XREPO{optfield}    { setyystr(yytext); return REPO;}
  373. XREQD{optfield}    { setyystr(yytext); return REQD;}
  374. XREQU{optfield}    { setyystr(yytext); return REQU;}
  375. XRES{optfield}    { setyystr(yytext); return RES;}
  376. XRESE{optfield}    { setyystr(yytext); return RESE;}
  377. XRESI{optfield}    { setyystr(yytext); return RESI;}
  378. XRESN{optfield}    { setyystr(yytext); return RESN;}
  379. XREST{optfield}    { setyystr(yytext); return REST;}
  380. XRETI{optfield}    { setyystr(yytext); return RETI;}
  381. XRFN{optfield}    { setyystr(yytext); return RFN;}
  382. XSBID{optfield}    { setyystr(yytext); return SBID;}
  383. XSCHO{optfield}    { setyystr(yytext); return SCHO;}
  384. XSEAR{optfield}    { setyystr(yytext); return SEAR;}
  385. XSELF{optfield}    { setyystr(yytext); return SELF;}
  386. XSEQU{optfield}    { setyystr(yytext); return SEQU;}
  387. XSERI{optfield}    { setyystr(yytext); return SERI;}
  388. XSERS{optfield}    { setyystr(yytext); return SERS;}
  389. XSERV{optfield}    { setyystr(yytext); return SERV;}
  390. XSEX[ ].*$        {setyystr(yytext); return SEX;}
  391. XSHEE{optfield}    { setyystr(yytext); return SHEE;}
  392. XSHIP{optfield}    { setyystr(yytext); return SHIP;}
  393. XSIBL{optfield}    { setyystr(yytext); return SIBL;}
  394. XSIS{optfield}    { setyystr(yytext); return SIS;}
  395. XSLGC        {return SLGC;}
  396. XSLGP{optfield}    { setyystr(yytext); return SLGP;}
  397. XSLGS    {return SLGS;}
  398. XSON{optfield}    { setyystr(yytext); return SON;}
  399. XSORT{optfield}    { setyystr(yytext); return SORT;}
  400. XSOUR[ ].*$    {setyystr(yytext); return SOUR;}
  401. XSPEC{optfield}    { setyystr(yytext); return SPEC;}
  402. XSPEI{optfield}    { setyystr(yytext); return SPEI;}
  403. XSPEP{optfield}    { setyystr(yytext); return SPEP;}
  404. XSPLI{optfield}    { setyystr(yytext); return SPLI;}
  405. XSPOU{optfield}    { setyystr(yytext); return SPOU;}
  406. XSPUR{optfield}    { setyystr(yytext); return SPUR;}
  407. XSREF{optfield}    { setyystr(yytext); return SREF;}
  408. XSTAC{optfield}    { setyystr(yytext); return STAC;}
  409. XSTAE{optfield}    { setyystr(yytext); return STAE;}
  410. XSTAL            {return STAL;}
  411. XSTAT{optfield}    { setyystr(yytext); return STAT;}
  412. XSTDN{optfield}    { setyystr(yytext); return STDN;}
  413. XSTIL{optfield}    { setyystr(yytext); return STIL;}
  414. XSUB{optfield}    { setyystr(yytext); return SUB;}
  415. XSUBJ{optfield}    { setyystr(yytext); return SUBJ;}
  416. XSUBM            {return SUBM;}
  417. XSUBN            {return SUBN;}
  418. XSURN{optfield}    { setyystr(yytext); return SURN;}
  419. XSURO{optfield}    { setyystr(yytext); return SURO;}
  420. XSYMB{optfield}    { setyystr(yytext); return SYMB;}
  421. XSYST{optfield}    { setyystr(yytext); return SYST;}
  422. XTAPE{optfield}    { setyystr(yytext); return TAPE;}
  423. XTASK{optfield}    { setyystr(yytext); return TASK;}
  424. XTEMP[ ].+$        {setyystr(yytext); return TEMP;}
  425. XTEXT{optfield}    { setyystr(yytext); return TEXT;}
  426. XTIME{optfield}    { setyystr(yytext); return TIME;}
  427. XTIMP{optfield}    { setyystr(yytext); return TIMP;}
  428. XTITL[ ].*$        {setyystr(yytext); return TITL;}
  429. XTMPL{optfield}    { setyystr(yytext); return TMPL;}
  430. XTOR{optfield}    { setyystr(yytext); return TOR;}
  431. XTOWC{optfield}    { setyystr(yytext); return TOWC;}
  432. XTOWN{optfield}    { setyystr(yytext); return TOWN;}
  433. XTRAK{optfield}    { setyystr(yytext); return TRAK;}
  434. XTRAN{optfield}    { setyystr(yytext); return TRAN;}
  435. XTRAS{optfield}    { setyystr(yytext); return TRAS;}
  436. XTRLR        {return TRLR;}
  437. XTWP{optfield}    { setyystr(yytext); return TWP;}
  438. XTYPE[ ].+$    {setyystr(yytext); return TYPE;}
  439. XUDER{optfield}    { setyystr(yytext); return UDER;}
  440. XUNIF{optfield}    { setyystr(yytext); return UNIF;}
  441. XUPDA{optfield}    { setyystr(yytext); return UPDA;}
  442. XVALU{optfield}    { setyystr(yytext); return VALU;}
  443. XVERI{optfield}    { setyystr(yytext); return VERI;}
  444. XVITA{optfield}    { setyystr(yytext); return VITA;}
  445. XVOID{optfield}    { setyystr(yytext); return VOID;}
  446. XVOIL{optfield}    { setyystr(yytext); return VOIL;}
  447. XVOLU{optfield}    { setyystr(yytext); return VOLU;}
  448. XWAC{optfield}    { setyystr(yytext); return WAC;}
  449. XWARD{optfield}    { setyystr(yytext); return WARD;}
  450. XWARL{optfield}    { setyystr(yytext); return WARL;}
  451. XWIDO{optfield}    { setyystr(yytext); return WIDO;}
  452. XWIFE        {return WIFE;}
  453. XWILL{optfield}    { setyystr(yytext); return WILL;}
  454. XWITN{optfield}    { setyystr(yytext); return WITN;}
  455. XYEAR{optfield}    { setyystr(yytext); return YEAR;}
  456. XYOUN{optfield}    { setyystr(yytext); return YOUN;}
  457. XYTD{optfield}    { setyystr(yytext); return YTD;}
  458. X@[^@]+@        {int x; 
  459. X                        x = strlen(yytext);
  460. X                        yylval.str = (char *)malloc(x);
  461. X                        strncpy(yylval.str,yytext+1,x-2);
  462. X                        yylval.str[x-2]=0;
  463. X                        return REF;}
  464. X^0        {yylval.num = 0; return LEV0; }
  465. X^1        {yylval.num = 0; return LEV1; }
  466. X^2        {yylval.num = 0; return LEV2; }
  467. X^3        {yylval.num = 0; return LEV3; }
  468. X^[4-9]+        {yylval.num = atoi(yytext); return LEVEL;}
  469. X[0-9]+        {yylval.num = atoi(yytext); return NUM;}
  470. X\n                    {lineno++;}
  471. X[     ]*                {}
  472. X%%
  473. Xsetyystr(txt)
  474. Xchar *txt;
  475. X{
  476. X    int x=strlen(txt);
  477. X    char *y = txt;
  478. X    while( *y && *y != ' ' )
  479. X        y++;
  480. X    if( *y )
  481. X    {
  482. X        /* there is a space */
  483. X        x -= (y-txt);
  484. X        y++;
  485. X        yylval.str = (char *)malloc(x);
  486. X        strcpy(yylval.str,y);
  487. X    }
  488. X    else
  489. X        yylval.str = "";
  490. X}
  491. SHAR_EOF
  492. $TOUCH -am 0103114992 gedcom.lex.big &&
  493. chmod 0664 gedcom.lex.big ||
  494. echo "restore of gedcom.lex.big failed"
  495. set `wc -c gedcom.lex.big`;Wc_c=$1
  496. if test "$Wc_c" != "20393"; then
  497.     echo original size 20393, current size $Wc_c
  498. fi
  499. # ============= mylex2.c ==============
  500. echo "x - extracting mylex2.c (Text)"
  501. sed 's/^X//' << 'SHAR_EOF' > mylex2.c &&
  502. X/* starting time is 11:50:27 */
  503. X/* C code produced by gperf version 2.5 (GNU C++ version) */
  504. X/* Command-line: gperf -G -k 1,3,4 -p -S 1 -t keys.gperf  */
  505. Xstatic char rcs_stuff[] = "$Id: keys.gperf,v 1.2 1992/01/03 17:49:58 murf Exp $";
  506. X/*
  507. X# Copyright (C) 1992 Steven Michael Murphy
  508. X#
  509. X#
  510. X# This file is part of gcom, the GEDCOM file merging utility for UNIX,
  511. X# 
  512. X# 
  513. X# gcom is free software; you can redistribute it and/or modify
  514. X# it under the terms of the GNU General Public License as published by
  515. X# the Free Software Foundation; either version 2, or (at your option)
  516. X# any later version.
  517. X# 
  518. X# gcom is distributed in the hope that it will be useful,
  519. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  520. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  521. X# GNU General Public License for more details.
  522. X# 
  523. X# You should have received a copy of the GNU General Public License
  524. X# along with gcom; see the file COPYING.  If not, write to
  525. X# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  526. X*/
  527. X#include <stdio.h>
  528. X#include "gedcom.b.tab.h"
  529. Xextern int lineno;
  530. Xstatic char buff[300]; /* Actually, 80 may be enough */
  531. Xstatic char *buff_ptr = &buff[0];
  532. X
  533. X
  534. XFILE *yyin;
  535. Xstruct keyword {    char *name;     int val; };
  536. X
  537. X#define TOTAL_KEYWORDS 41
  538. X#define MIN_WORD_LENGTH 3
  539. X#define MAX_WORD_LENGTH 4
  540. X#define MIN_HASH_VALUE 4
  541. X#define MAX_HASH_VALUE 155
  542. X/* maximum key range = 152, duplicates = 0 */
  543. X
  544. Xstatic unsigned int
  545. Xhash (str, len)
  546. X     register char *str;
  547. X     register int unsigned len;
  548. X{
  549. X  static unsigned char asso_values[] =
  550. X    {
  551. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  552. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  553. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  554. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  555. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  556. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  557. X     156, 156, 156, 156, 156,  10,  50,  11,  41,  15,
  558. X      55,   6,  35,  55, 156, 156,  25,   0,  15,   0,
  559. X       1,  40,   0,   0,   6,   5, 156,  10,   5, 156,
  560. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  561. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  562. X     156, 156, 156, 156, 156, 156, 156, 156, 156, 156,
  563. X     156, 156, 156, 156, 156, 156, 156, 156,
  564. X    };
  565. X  register int hval = len;
  566. X
  567. X  switch (hval)
  568. X    {
  569. X      default:
  570. X      case 4:
  571. X        hval += asso_values[str[3]];
  572. X      case 3:
  573. X        hval += asso_values[str[2]];
  574. X      case 2:
  575. X      case 1:
  576. X        hval += asso_values[str[0]];
  577. X    }
  578. X  return hval;
  579. X}
  580. X
  581. Xstatic struct keyword wordlist[] =
  582. X{
  583. X      {"",}, {"",}, {"",}, {"",}, 
  584. X      {"MARR",  MARR},
  585. X      {"SEX",  SEX},
  586. X      {"SOUR",  SOUR},
  587. X      {"SLGS",  SLGS},
  588. X      {"TEMP",  TEMP},
  589. X      {"CHR",  CHR},
  590. X      {"COMM",  COMM},
  591. X      {"PHON",  PHON},
  592. X      {"SLGC",  SLGC},
  593. X      {"CHAR",  CHAR},
  594. X      {"PLAC",  PLAC},
  595. X      {"REL",  REL},
  596. X      {"NAME",  NAME},
  597. X      {"TRLR",  TRLR},
  598. X      {"CONT",  CONT},
  599. X      {"STAL",  STAL},
  600. X      {"NOTE",  NOTE},
  601. X      {"TITL",  TITL},
  602. X      {"DEST",  DEST},
  603. X      {"SUBM",  SUBM},
  604. X      {"ADDR",  ADDR},
  605. X      {"FAM",  FAM},
  606. X      {"FAMS",  FAMS},
  607. X      {"BIRT",  BIRT},
  608. X      {"DEAT",  DEAT},
  609. X      {"BIC",  BIC},
  610. X      {"DATE",  DATE},
  611. X      {"NUMB",  NUMB},
  612. X      {"FAMC",  FAMC},
  613. X      {"REFN",  REFN},
  614. X      {"FLAG",  FLAG},
  615. X      {"QUAL",  QUAL},
  616. X      {"BAPL",  BAPL},
  617. X      {"WIFE",  WIFE},
  618. X      {"ENDL",  ENDL},
  619. X      {"HUSB",  HUSB},
  620. X      {"HEAD",  HEAD},
  621. X      {"CHIL",  CHIL},
  622. X      {"FILE",  FILE9},
  623. X      {"BURI",  BURI},
  624. X      {"INDI",  INDI},
  625. X};
  626. X
  627. Xstruct keyword *
  628. Xin_word_set (str, len)
  629. X     register char *str;
  630. X     register unsigned int len;
  631. X{
  632. X  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
  633. X    {
  634. X      register int key = hash (str, len);
  635. X
  636. X      if (key <= MAX_HASH_VALUE && key >= MIN_HASH_VALUE)
  637. X        {
  638. X            {
  639. X              struct keyword  *resword; 
  640. X
  641. X              switch (key)
  642. X                {
  643. X                case    4:
  644. X                  resword = &wordlist[4]; break;
  645. X                case    8:
  646. X                  resword = &wordlist[5]; break;
  647. X                case    9:
  648. X                  resword = &wordlist[6]; break;
  649. X                case   10:
  650. X                  resword = &wordlist[7]; break;
  651. X                case   11:
  652. X                  resword = &wordlist[8]; break;
  653. X                case   14:
  654. X                  resword = &wordlist[9]; break;
  655. X                case   15:
  656. X                  resword = &wordlist[10]; break;
  657. X                case   20:
  658. X                  resword = &wordlist[11]; break;
  659. X                case   21:
  660. X                  resword = &wordlist[12]; break;
  661. X                case   25:
  662. X                  resword = &wordlist[13]; break;
  663. X                case   26:
  664. X                  resword = &wordlist[14]; break;
  665. X                case   28:
  666. X                  resword = &wordlist[15]; break;
  667. X                case   34:
  668. X                  resword = &wordlist[16]; break;
  669. X                case   35:
  670. X                  resword = &wordlist[17]; break;
  671. X                case   36:
  672. X                  resword = &wordlist[18]; break;
  673. X                case   39:
  674. X                  resword = &wordlist[19]; break;
  675. X                case   40:
  676. X                  resword = &wordlist[20]; break;
  677. X                case   41:
  678. X                  resword = &wordlist[21]; break;
  679. X                case   51:
  680. X                  resword = &wordlist[22]; break;
  681. X                case   54:
  682. X                  resword = &wordlist[23]; break;
  683. X                case   55:
  684. X                  resword = &wordlist[24]; break;
  685. X                case   58:
  686. X                  resword = &wordlist[25]; break;
  687. X                case   59:
  688. X                  resword = &wordlist[26]; break;
  689. X                case   60:
  690. X                  resword = &wordlist[27]; break;
  691. X                case   61:
  692. X                  resword = &wordlist[28]; break;
  693. X                case   64:
  694. X                  resword = &wordlist[29]; break;
  695. X                case   66:
  696. X                  resword = &wordlist[30]; break;
  697. X                case   69:
  698. X                  resword = &wordlist[31]; break;
  699. X                case   70:
  700. X                  resword = &wordlist[32]; break;
  701. X                case   74:
  702. X                  resword = &wordlist[33]; break;
  703. X                case   75:
  704. X                  resword = &wordlist[34]; break;
  705. X                case   79:
  706. X                  resword = &wordlist[35]; break;
  707. X                case   80:
  708. X                  resword = &wordlist[36]; break;
  709. X                case   84:
  710. X                  resword = &wordlist[37]; break;
  711. X                case   85:
  712. X                  resword = &wordlist[38]; break;
  713. X                case   89:
  714. X                  resword = &wordlist[39]; break;
  715. X                case   90:
  716. X                  resword = &wordlist[40]; break;
  717. X                case   95:
  718. X                  resword = &wordlist[41]; break;
  719. X                case   99:
  720. X                  resword = &wordlist[42]; break;
  721. X                case  109:
  722. X                  resword = &wordlist[43]; break;
  723. X                case  155:
  724. X                  resword = &wordlist[44]; break;
  725. X                default: return 0;
  726. X                }
  727. X              if (*str == *resword->name && !strcmp (str + 1, resword->name + 1))
  728. X                return resword;
  729. X              return 0;
  730. X            }
  731. X         }
  732. X    }
  733. X  return 0;
  734. X}
  735. X
  736. X
  737. Xyylex()
  738. X{
  739. X    struct keyword *kw;
  740. X    char *p;
  741. X    int i;
  742. X    
  743. X    if( !(*buff_ptr) )
  744. X    {
  745. X        int lev;
  746. X        if( !fgets(buff,300,yyin) )
  747. X        {
  748. X            return 0; /* end of file */
  749. X        }
  750. X        buff[strlen(buff)-1] = 0; /* blast the newline */
  751. X        lineno++;
  752. X        buff_ptr = &buff[0]; /* get a new line */
  753. X        /* the first thing on a line is the level number, get it */
  754. X        lev = strtol(buff,&p,10);
  755. X        if( p == buff_ptr )
  756. X        {
  757. X            fprintf(stderr,"No level number at the beginning of the line on line %d\n",
  758. X                    lineno);
  759. X            return LEV0;
  760. X        }
  761. X        buff_ptr = p;
  762. X        return LEV0+lev;
  763. X    }
  764. X    else
  765. X    {
  766. X        /* either a type or a reference */
  767. X        while(*buff_ptr &&
  768. X              (*buff_ptr == ' ' || *buff_ptr == '\t') )
  769. X            buff_ptr++;
  770. X        /* collect next token */
  771. X        p = buff_ptr;
  772. X        while( *buff_ptr && (*buff_ptr != ' ' && *buff_ptr != '\t' &&
  773. X                             *buff_ptr != '\n' ) )
  774. X            buff_ptr++;
  775. X        if( *p == '@' )
  776. X        {
  777. X            char x,*y;
  778. X            
  779. X            x = *buff_ptr;
  780. X            *buff_ptr = 0;
  781. X            p++; /* skip the @ stuff and just pass the ref id */
  782. X            yylval.str = (char *)malloc(buff_ptr-p);
  783. X            strncpy(yylval.str,p,buff_ptr-p);
  784. X            yylval.str[buff_ptr-p-1] = 0; /* leave out the '@'s */
  785. X            *buff_ptr = x;
  786. X            return REF;
  787. X        }
  788. X        if( !strncmp(p,"DIV",3) ) /* DIV is a slightly special case ... ? */
  789. X        {
  790. X            if( *(p+4) == 'Y' ) yylval.num = 1;
  791. X            else yylval.num = 0;
  792. X            *buff_ptr = 0; /* we are done here */
  793. X            return DIV;
  794. X        }
  795. X        *buff_ptr = 0;
  796. X        /* then match on the token, and return the rest of the line as
  797. X           the value */
  798. X        /* the tokens are arranged in a ______table. */
  799. X        kw = in_word_set(p,strlen(p));
  800. X        if( kw )
  801. X        {
  802. X            *buff_ptr = ' ';
  803. X            if( *(buff_ptr+1) == '@' )
  804. X            {
  805. X                return kw->val;
  806. X            }
  807. X            setyystr(p);
  808. X            *buff_ptr = 0; /* this will reset the lexer and read in a
  809. X                              new line next time.... */
  810. X            return kw->val;
  811. X        }
  812. X        else
  813. X        {
  814. X            /* else report error */
  815. X            fprintf(stderr,"HEY, '%s' is not a keyword I understand! (line %d)\n",
  816. X                    p, lineno);
  817. X        }
  818. X    }
  819. X}
  820. X
  821. X
  822. Xsetyystr(txt)
  823. Xchar *txt;
  824. X{
  825. X    int x=strlen(txt);
  826. X    char *y = txt;
  827. X    while( *y && *y != ' ' )
  828. X        y++;
  829. X    if( *y )
  830. X    {
  831. X        /* there is a space */
  832. X        x -= (y-txt);
  833. X        y++;
  834. X        yylval.str = (char *)malloc(x);
  835. X        strcpy(yylval.str,y);
  836. X    }
  837. X    else
  838. X        yylval.str = "";
  839. X}
  840. X
  841. X/* ending time is 11:50:27 */
  842. SHAR_EOF
  843. $TOUCH -am 0103115092 mylex2.c &&
  844. chmod 0664 mylex2.c ||
  845. echo "restore of mylex2.c failed"
  846. set `wc -c mylex2.c`;Wc_c=$1
  847. if test "$Wc_c" != "9443"; then
  848.     echo original size 9443, current size $Wc_c
  849. fi
  850. # ============= patchlevel.h ==============
  851. echo "x - extracting patchlevel.h (Text)"
  852. sed 's/^X//' << 'SHAR_EOF' > patchlevel.h &&
  853. X#include PATCHLEVEL 0
  854. SHAR_EOF
  855. $TOUCH -am 0105000992 patchlevel.h &&
  856. chmod 0664 patchlevel.h ||
  857. echo "restore of patchlevel.h failed"
  858. set `wc -c patchlevel.h`;Wc_c=$1
  859. if test "$Wc_c" != "22"; then
  860.     echo original size 22, current size $Wc_c
  861. fi
  862. # ============= COPYING ==============
  863. echo "x - extracting COPYING (Text)"
  864. sed 's/^X//' << 'SHAR_EOF' > COPYING &&
  865. X            GNU GENERAL PUBLIC LICENSE
  866. X               Version 2, June 1991
  867. X
  868. X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  869. X                          675 Mass Ave, Cambridge, MA 02139, USA
  870. X Everyone is permitted to copy and distribute verbatim copies
  871. X of this license document, but changing it is not allowed.
  872. X
  873. X                Preamble
  874. X
  875. X  The licenses for most software are designed to take away your
  876. Xfreedom to share and change it.  By contrast, the GNU General Public
  877. XLicense is intended to guarantee your freedom to share and change free
  878. Xsoftware--to make sure the software is free for all its users.  This
  879. XGeneral Public License applies to most of the Free Software
  880. XFoundation's software and to any other program whose authors commit to
  881. Xusing it.  (Some other Free Software Foundation software is covered by
  882. Xthe GNU Library General Public License instead.)  You can apply it to
  883. Xyour programs, too.
  884. X
  885. X  When we speak of free software, we are referring to freedom, not
  886. Xprice.  Our General Public Licenses are designed to make sure that you
  887. Xhave the freedom to distribute copies of free software (and charge for
  888. Xthis service if you wish), that you receive source code or can get it
  889. Xif you want it, that you can change the software or use pieces of it
  890. Xin new free programs; and that you know you can do these things.
  891. X
  892. X  To protect your rights, we need to make restrictions that forbid
  893. Xanyone to deny you these rights or to ask you to surrender the rights.
  894. XThese restrictions translate to certain responsibilities for you if you
  895. Xdistribute copies of the software, or if you modify it.
  896. X
  897. X  For example, if you distribute copies of such a program, whether
  898. Xgratis or for a fee, you must give the recipients all the rights that
  899. Xyou have.  You must make sure that they, too, receive or can get the
  900. Xsource code.  And you must show them these terms so they know their
  901. Xrights.
  902. X
  903. X  We protect your rights with two steps: (1) copyright the software, and
  904. X(2) offer you this license which gives you legal permission to copy,
  905. Xdistribute and/or modify the software.
  906. X
  907. X  Also, for each author's protection and ours, we want to make certain
  908. Xthat everyone understands that there is no warranty for this free
  909. Xsoftware.  If the software is modified by someone else and passed on, we
  910. Xwant its recipients to know that what they have is not the original, so
  911. Xthat any problems introduced by others will not reflect on the original
  912. Xauthors' reputations.
  913. X
  914. X  Finally, any free program is threatened constantly by software
  915. Xpatents.  We wish to avoid the danger that redistributors of a free
  916. Xprogram will individually obtain patent licenses, in effect making the
  917. Xprogram proprietary.  To prevent this, we have made it clear that any
  918. Xpatent must be licensed for everyone's free use or not licensed at all.
  919. X
  920. X  The precise terms and conditions for copying, distribution and
  921. Xmodification follow.
  922. X
  923. X            GNU GENERAL PUBLIC LICENSE
  924. X   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  925. X
  926. X  0. This License applies to any program or other work which contains
  927. Xa notice placed by the copyright holder saying it may be distributed
  928. Xunder the terms of this General Public License.  The "Program", below,
  929. Xrefers to any such program or work, and a "work based on the Program"
  930. Xmeans either the Program or any derivative work under copyright law:
  931. Xthat is to say, a work containing the Program or a portion of it,
  932. Xeither verbatim or with modifications and/or translated into another
  933. Xlanguage.  (Hereinafter, translation is included without limitation in
  934. Xthe term "modification".)  Each licensee is addressed as "you".
  935. X
  936. XActivities other than copying, distribution and modification are not
  937. Xcovered by this License; they are outside its scope.  The act of
  938. Xrunning the Program is not restricted, and the output from the Program
  939. Xis covered only if its contents constitute a work based on the
  940. XProgram (independent of having been made by running the Program).
  941. XWhether that is true depends on what the Program does.
  942. X
  943. X  1. You may copy and distribute verbatim copies of the Program's
  944. Xsource code as you receive it, in any medium, provided that you
  945. Xconspicuously and appropriately publish on each copy an appropriate
  946. Xcopyright notice and disclaimer of warranty; keep intact all the
  947. Xnotices that refer to this License and to the absence of any warranty;
  948. Xand give any other recipients of the Program a copy of this License
  949. Xalong with the Program.
  950. X
  951. XYou may charge a fee for the physical act of transferring a copy, and
  952. Xyou may at your option offer warranty protection in exchange for a fee.
  953. X
  954. X  2. You may modify your copy or copies of the Program or any portion
  955. Xof it, thus forming a work based on the Program, and copy and
  956. Xdistribute such modifications or work under the terms of Section 1
  957. Xabove, provided that you also meet all of these conditions:
  958. X
  959. X    a) You must cause the modified files to carry prominent notices
  960. X    stating that you changed the files and the date of any change.
  961. X
  962. X    b) You must cause any work that you distribute or publish, that in
  963. X    whole or in part contains or is derived from the Program or any
  964. X    part thereof, to be licensed as a whole at no charge to all third
  965. X    parties under the terms of this License.
  966. X
  967. X    c) If the modified program normally reads commands interactively
  968. X    when run, you must cause it, when started running for such
  969. X    interactive use in the most ordinary way, to print or display an
  970. X    announcement including an appropriate copyright notice and a
  971. X    notice that there is no warranty (or else, saying that you provide
  972. X    a warranty) and that users may redistribute the program under
  973. X    these conditions, and telling the user how to view a copy of this
  974. X    License.  (Exception: if the Program itself is interactive but
  975. X    does not normally print such an announcement, your work based on
  976. X    the Program is not required to print an announcement.)
  977. X
  978. XThese requirements apply to the modified work as a whole.  If
  979. Xidentifiable sections of that work are not derived from the Program,
  980. Xand can be reasonably considered independent and separate works in
  981. Xthemselves, then this License, and its terms, do not apply to those
  982. Xsections when you distribute them as separate works.  But when you
  983. Xdistribute the same sections as part of a whole which is a work based
  984. Xon the Program, the distribution of the whole must be on the terms of
  985. Xthis License, whose permissions for other licensees extend to the
  986. Xentire whole, and thus to each and every part regardless of who wrote it.
  987. X
  988. XThus, it is not the intent of this section to claim rights or contest
  989. Xyour rights to work written entirely by you; rather, the intent is to
  990. Xexercise the right to control the distribution of derivative or
  991. Xcollective works based on the Program.
  992. X
  993. XIn addition, mere aggregation of another work not based on the Program
  994. Xwith the Program (or with a work based on the Program) on a volume of
  995. Xa storage or distribution medium does not bring the other work under
  996. Xthe scope of this License.
  997. X
  998. X  3. You may copy and distribute the Program (or a work based on it,
  999. Xunder Section 2) in object code or executable form under the terms of
  1000. XSections 1 and 2 above provided that you also do one of the following:
  1001. X
  1002. X    a) Accompany it with the complete corresponding machine-readable
  1003. X    source code, which must be distributed under the terms of Sections
  1004. X    1 and 2 above on a medium customarily used for software interchange; or,
  1005. X
  1006. X    b) Accompany it with a written offer, valid for at least three
  1007. X    years, to give any third party, for a charge no more than your
  1008. X    cost of physically performing source distribution, a complete
  1009. X    machine-readable copy of the corresponding source code, to be
  1010. X    distributed under the terms of Sections 1 and 2 above on a medium
  1011. X    customarily used for software interchange; or,
  1012. X
  1013. X    c) Accompany it with the information you received as to the offer
  1014. X    to distribute corresponding source code.  (This alternative is
  1015. X    allowed only for noncommercial distribution and only if you
  1016. X    received the program in object code or executable form with such
  1017. X    an offer, in accord with Subsection b above.)
  1018. X
  1019. XThe source code for a work means the preferred form of the work for
  1020. Xmaking modifications to it.  For an executable work, complete source
  1021. Xcode means all the source code for all modules it contains, plus any
  1022. Xassociated interface definition files, plus the scripts used to
  1023. Xcontrol compilation and installation of the executable.  However, as a
  1024. Xspecial exception, the source code distributed need not include
  1025. Xanything that is normally distributed (in either source or binary
  1026. Xform) with the major components (compiler, kernel, and so on) of the
  1027. Xoperating system on which the executable runs, unless that component
  1028. Xitself accompanies the executable.
  1029. X
  1030. XIf distribution of executable or object code is made by offering
  1031. Xaccess to copy from a designated place, then offering equivalent
  1032. Xaccess to copy the source code from the same place counts as
  1033. Xdistribution of the source code, even though third parties are not
  1034. Xcompelled to copy the source along with the object code.
  1035. X
  1036. X  4. You may not copy, modify, sublicense, or distribute the Program
  1037. Xexcept as expressly provided under this License.  Any attempt
  1038. Xotherwise to copy, modify, sublicense or distribute the Program is
  1039. Xvoid, and will automatically terminate your rights under this License.
  1040. XHowever, parties who have received copies, or rights, from you under
  1041. Xthis License will not have their licenses terminated so long as such
  1042. Xparties remain in full compliance.
  1043. X
  1044. X  5. You are not required to accept this License, since you have not
  1045. Xsigned it.  However, nothing else grants you permission to modify or
  1046. Xdistribute the Program or its derivative works.  These actions are
  1047. Xprohibited by law if you do not accept this License.  Therefore, by
  1048. Xmodifying or distributing the Program (or any work based on the
  1049. XProgram), you indicate your acceptance of this License to do so, and
  1050. Xall its terms and conditions for copying, distributing or modifying
  1051. Xthe Program or works based on it.
  1052. X
  1053. X  6. Each time you redistribute the Program (or any work based on the
  1054. XProgram), the recipient automatically receives a license from the
  1055. Xoriginal licensor to copy, distribute or modify the Program subject to
  1056. Xthese terms and conditions.  You may not impose any further
  1057. Xrestrictions on the recipients' exercise of the rights granted herein.
  1058. XYou are not responsible for enforcing compliance by third parties to
  1059. Xthis License.
  1060. X
  1061. X  7. If, as a consequence of a court judgment or allegation of patent
  1062. Xinfringement or for any other reason (not limited to patent issues),
  1063. Xconditions are imposed on you (whether by court order, agreement or
  1064. Xotherwise) that contradict the conditions of this License, they do not
  1065. Xexcuse you from the conditions of this License.  If you cannot
  1066. Xdistribute so as to satisfy simultaneously your obligations under this
  1067. XLicense and any other pertinent obligations, then as a consequence you
  1068. Xmay not distribute the Program at all.  For example, if a patent
  1069. Xlicense would not permit royalty-free redistribution of the Program by
  1070. Xall those who receive copies directly or indirectly through you, then
  1071. Xthe only way you could satisfy both it and this License would be to
  1072. Xrefrain entirely from distribution of the Program.
  1073. X
  1074. XIf any portion of this section is held invalid or unenforceable under
  1075. Xany particular circumstance, the balance of the section is intended to
  1076. Xapply and the section as a whole is intended to apply in other
  1077. Xcircumstances.
  1078. X
  1079. XIt is not the purpose of this section to induce you to infringe any
  1080. Xpatents or other property right claims or to contest validity of any
  1081. Xsuch claims; this section has the sole purpose of protecting the
  1082. Xintegrity of the free software distribution system, which is
  1083. Ximplemented by public license practices.  Many people have made
  1084. Xgenerous contributions to the wide range of software distributed
  1085. Xthrough that system in reliance on consistent application of that
  1086. Xsystem; it is up to the author/donor to decide if he or she is willing
  1087. Xto distribute software through any other system and a licensee cannot
  1088. Ximpose that choice.
  1089. X
  1090. XThis section is intended to make thoroughly clear what is believed to
  1091. Xbe a consequence of the rest of this License.
  1092. X
  1093. X  8. If the distribution and/or use of the Program is restricted in
  1094. Xcertain countries either by patents or by copyrighted interfaces, the
  1095. Xoriginal copyright holder who places the Program under this License
  1096. Xmay add an explicit geographical distribution limitation excluding
  1097. Xthose countries, so that distribution is permitted only in or among
  1098. Xcountries not thus excluded.  In such case, this License incorporates
  1099. Xthe limitation as if written in the body of this License.
  1100. X
  1101. X  9. The Free Software Foundation may publish revised and/or new versions
  1102. Xof the General Public License from time to time.  Such new versions will
  1103. Xbe similar in spirit to the present version, but may differ in detail to
  1104. Xaddress new problems or concerns.
  1105. X
  1106. XEach version is given a distinguishing version number.  If the Program
  1107. Xspecifies a version number of this License which applies to it and "any
  1108. Xlater version", you have the option of following the terms and conditions
  1109. Xeither of that version or of any later version published by the Free
  1110. XSoftware Foundation.  If the Program does not specify a version number of
  1111. Xthis License, you may choose any version ever published by the Free Software
  1112. XFoundation.
  1113. X
  1114. X  10. If you wish to incorporate parts of the Program into other free
  1115. Xprograms whose distribution conditions are different, write to the author
  1116. Xto ask for permission.  For software which is copyrighted by the Free
  1117. XSoftware Foundation, write to the Free Software Foundation; we sometimes
  1118. Xmake exceptions for this.  Our decision will be guided by the two goals
  1119. Xof preserving the free status of all derivatives of our free software and
  1120. Xof promoting the sharing and reuse of software generally.
  1121. X
  1122. X                NO WARRANTY
  1123. X
  1124. X  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
  1125. XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
  1126. XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
  1127. XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
  1128. XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  1129. XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
  1130. XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  1131. XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
  1132. XREPAIR OR CORRECTION.
  1133. X
  1134. X  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
  1135. XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
  1136. XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
  1137. XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
  1138. XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
  1139. XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
  1140. XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
  1141. XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
  1142. XPOSSIBILITY OF SUCH DAMAGES.
  1143. X
  1144. X             END OF TERMS AND CONDITIONS
  1145. X
  1146. X    Appendix: How to Apply These Terms to Your New Programs
  1147. X
  1148. X  If you develop a new program, and you want it to be of the greatest
  1149. Xpossible use to the public, the best way to achieve this is to make it
  1150. Xfree software which everyone can redistribute and change under these terms.
  1151. X
  1152. X  To do so, attach the following notices to the program.  It is safest
  1153. Xto attach them to the start of each source file to most effectively
  1154. Xconvey the exclusion of warranty; and each file should have at least
  1155. Xthe "copyright" line and a pointer to where the full notice is found.
  1156. X
  1157. X    <one line to give the program's name and a brief idea of what it does.>
  1158. X    Copyright (C) 19yy  <name of author>
  1159. X
  1160. X    This program is free software; you can redistribute it and/or modify
  1161. X    it under the terms of the GNU General Public License as published by
  1162. X    the Free Software Foundation; either version 2 of the License, or
  1163. X    (at your option) any later version.
  1164. X
  1165. X    This program is distributed in the hope that it will be useful,
  1166. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  1167. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1168. X    GNU General Public License for more details.
  1169. X
  1170. X    You should have received a copy of the GNU General Public License
  1171. X    along with this program; if not, write to the Free Software
  1172. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1173. X
  1174. XAlso add information on how to contact you by electronic and paper mail.
  1175. X
  1176. XIf the program is interactive, make it output a short notice like this
  1177. Xwhen it starts in an interactive mode:
  1178. X
  1179. X    Gnomovision version 69, Copyright (C) 19yy name of author
  1180. X    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  1181. X    This is free software, and you are welcome to redistribute it
  1182. X    under certain conditions; type `show c' for details.
  1183. X
  1184. XThe hypothetical commands `show w' and `show c' should show the appropriate
  1185. Xparts of the General Public License.  Of course, the commands you use may
  1186. Xbe called something other than `show w' and `show c'; they could even be
  1187. Xmouse-clicks or menu items--whatever suits your program.
  1188. X
  1189. XYou should also get your employer (if you work as a programmer) or your
  1190. Xschool, if any, to sign a "copyright disclaimer" for the program, if
  1191. Xnecessary.  Here is a sample; alter the names:
  1192. X
  1193. X  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  1194. X  `Gnomovision' (which makes passes at compilers) written by James Hacker.
  1195. X
  1196. X  <signature of Ty Coon>, 1 April 1989
  1197. X  Ty Coon, President of Vice
  1198. X
  1199. XThis General Public License does not permit incorporating your program into
  1200. Xproprietary programs.  If your program is a subroutine library, you may
  1201. Xconsider it more useful to permit linking proprietary applications with the
  1202. Xlibrary.  If this is what you want to do, use the GNU Library General
  1203. XPublic License instead of this License.
  1204. SHAR_EOF
  1205. $TOUCH -am 0103114992 COPYING &&
  1206. chmod 0664 COPYING ||
  1207. echo "restore of COPYING failed"
  1208. set `wc -c COPYING`;Wc_c=$1
  1209. if test "$Wc_c" != "17982"; then
  1210.     echo original size 17982, current size $Wc_c
  1211. fi
  1212. echo "End of part 3, continue with part 4"
  1213. exit 0
  1214.  
  1215. exit 0 # Just in case...
  1216.