New windows NT/95 port using MSV5.0. Test server ztest now in
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 1 Sep 1997 08:55:52 +0000 (08:55 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 1 Sep 1997 08:55:52 +0000 (08:55 +0000)
separate directory. When using NT, this test server may operate
as an NT service. Note that the service.[ch] should be part of
generic, but it isn't yet.

ztest/Makefile [new file with mode: 0644]
ztest/dummy-grs [new file with mode: 0644]
ztest/dummy-records [new file with mode: 0644]
ztest/dummy-words [new file with mode: 0644]
ztest/read-grs.c [new file with mode: 0644]
ztest/ztest.c [new file with mode: 0644]
ztest/ztest.dsp [new file with mode: 0644]

diff --git a/ztest/Makefile b/ztest/Makefile
new file mode 100644 (file)
index 0000000..3ac8627
--- /dev/null
@@ -0,0 +1,49 @@
+# Copyright (C) 1995-1997, Index Data I/S 
+# All rights reserved.
+# Sebastian Hammer, Adam Dickmeiss
+# $Id: Makefile,v 1.1 1997-09-01 08:55:52 adam Exp $
+
+LIBDIR=../lib
+
+#LIBMOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a
+
+SHELL=/bin/sh
+INCLUDE=-I../include -I. -I../../xtimosi/src
+LIBINCLUDE=-L$(LIBDIR)
+DEFS=$(INCLUDE)
+LIB=$(LIBDIR)/libserver.a 
+LIBS=$(LIBDIR)/libserver.a $(LIBDIR)/libasn.a $(LIBDIR)/libodr.a \
+$(LIBDIR)/libcomstack.a $(LIBMOSI) $(LIBDIR)/libutil.a $(ELIBS)
+CPP=$(CC) -E
+PROG=ztest
+PROGO=ztest.o read-grs.o
+RANLIB=ranlib
+
+all: $(PROG)
+
+$(PROG): $(LIB) $(PROGO) 
+       $(CC) $(CFLAGS) $(LIBINCLUDE) -o $(PROG) $(PROGO) $(LIBS)
+
+alll:
+
+.c.o:
+       $(CC) -c $(DEFS) $(CFLAGS) $<
+
+clean:
+       rm -f *.[oa] test core mon.out gmon.out errlist tst cli $(PROG)
+
+depend: depend2
+
+depend1:
+       sed '/^#Depend/q' <Makefile >Makefile.tmp
+       $(CPP) $(DEFS) -M *.c >>Makefile.tmp
+       mv -f Makefile.tmp Makefile
+
+depend2:
+       $(CPP) $(INCLUDE) -M *.c >.depend       
+
+ifeq (.depend,$(wildcard .depend))
+include .depend
+endif
+
+#Depend --- DOT NOT DELETE THIS LINE
diff --git a/ztest/dummy-grs b/ztest/dummy-grs
new file mode 100644 (file)
index 0000000..b4d99fe
--- /dev/null
@@ -0,0 +1,98 @@
+#1
+(1,1) This is a test record
+(0,0)
+
+#2
+(1,2) title
+(1,8) {
+    (1,9) Author thing
+    (1,10) Other thing
+    (1,11) {
+       (1,12) test
+       (1,14) Deeper
+    }
+}
+(0,0)
+
+#3
+(3,title) The Ugly Duckling
+(3,author) {
+    (3,nationality) Danish
+    (3,name) Andersen, H.C.
+}
+(3,subject) Fairy tale about duck who would be swan and does so in end.
+(0,0)
+
+#4
+(3,title) This is a fairly deeply nested GRS-1 Record
+(3,level1) {
+    (3,level2) {
+       (3,level3) {
+           (3,level4) {
+               (3,level5) {
+                   (3,level6) {
+                       (3,level7) Whew!! This is silly
+                       (3,hmm) Let's hope it never comes to this.
+                   }
+                   (3,level6) Uhm.
+               }
+               (3,level5) Down again.
+           }
+           (3,level4) Down further.
+       }
+       (3,level3) Down...
+    }
+    (3,level2) Down...
+}
+(3,level1) Down...
+(0,0)
+
+#5
+(1,1) Data
+(1,2) Stuff
+(0,0)
+
+#6
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(1,1) GGGGGGGGGGGGGGGGGGG
+(0,0)
+
+#7
+(2,1) Zen and the Art of Motorcycle Maintenance
+(2,6) An inquiry into values
+(4,52) Robert M. Pirsig
+(4,70) {
+    (4,90) {
+       (2,7) Transworld Publishers, ltd.
+       (2,11) Century House, 61-63 Uxbridge Road, London
+    }
+}
+(4,27) Just a silly test record, really.
+(0,0)
+
+#8
+(3,someField) Ok.. this is the last of the test records.
+(3,someFIeld) It's time to get back to work.
+(0,0)
+
+#9
+(1,1) This is a test record
+(0,0)
+
+#10
+(1,1) This is a test record
+(0,0)
+
+#11
+(1,1) This is a test record
+(0,0)
diff --git a/ztest/dummy-records b/ztest/dummy-records
new file mode 100644 (file)
index 0000000..acbc141
--- /dev/null
@@ -0,0 +1 @@
+00366nam  22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168\1e   11224466 \1eDLC\1e00000000000000.0\1e910710c19910701nju           00010 eng  \1e  \1faDLC\1fcDLC\1e00\1fa123-xyz\1e10\1faJack Collins\1e10\1faHow to program a computer\1e\1faPenguin\1e  \1fa8710\1e  \1fap. cm.\1e  \1fa   11224466 \1e\1d00366nam  22001698a 4500001001300000003000400013005001700017008004100034010001700179040001300075050001200088100001700100245003000117260001200147263000900159300001100168\1e   11224467 \1eDLC\1e00000000000000.0\1e910710c19910701nju           00010 eng  \1e  \1faDLC\1fcDLC\1e00\1fa123-xyz\1e10\1faJack Collins\1e10\1faHow to program a computer\1e\1faPenguin\1e  \1fa8710\1e  \1fap. cm.\1e  \1fa   11224467 \1e\1d01369cam  2200265 i 4500001001800000003000400018005001700022008004100039010002201081040001800080050002200098082002100120111012100141245034700262260005400609300003000663504005100693650005600744650003900800650006200839700002300901700002000924710007100944710006601015\1e   73090924 //r82\1eDLC\1e19820524000000.0\1e760609s1974    nyua     b    10110 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e00\1faRC71.3\1fb.W67 1971\1e00\1fa616.07/575/02854\1e20\1faWorkshop on Computer Processing of Dynamic Images from an Anger Scintillation Camera,\1fcWashington University,\1fd1971.\1e10\1faComputer processing of dynamic images from an Anger scintillation camera :\1fbthe proceedings of a workshop /\1fccosponsored by the Biomedical Computer Laboratory and the Nuclear Medicine Division, Department of Radiology, School of Medicine, Washington University, St. Louis, January 18-22, 1971 ; edited by Kenneth B. Larson, Jerome R. Cox, Jr.\1e\1faNew York :\1fbSociety of Nuclear Medicine,\1fc[c1974]\1e  \1faxiv, p. :\1fbill. ;\1fc24 cm.\1e  \1faIncludes bibliographical references and index.\1e 0\1faRadioisotope scanning\1fxData processing\1fxCongresses.\1e 0\1faScintillation cameras\1fxCongresses.\1e 0\1faImaging systems in medicine\1fxData processing\1fxCongresses.\1e10\1faLarson, Kenneth B.\1e10\1faCox, Jerome R. \1e20\1faWashington University, St. Louis.\1fbBiomedical Computer Laboratory.\1e20\1faWashington University, St. Louis.\1fbNuclear Medicine Division.\1e  \1fa   73090924 //r82\1e\1d00942cam  22002531a 4500001001900000003000400019005001700023008004100040010002300665040001800081041001400099050001600113082001600129245007300145260007000218300005000288500004800338500009600386630003900482630003900521700003800560700003300598710003400631\1e   73209622 //r823\1eDLC\1e19820325000000.0\1e780306m19009999ohu           00000 grc  \1e  \1faDLC\1fcDLC\1fdDLC\1e\1fagrchebeng\1e00\1faBS421\1fb.C64\1e00\1fa220.4/4\1f219\1e04\1faThe Computer Bible /\1fcJ. Arthur Baird, David Noel Freedman, editors.\1e\1fa[Wooster, Ohio] :\1fbBiblical Research Associates,\1fc<1973-c1980   >\1e  \1fav. <2-4, 7-10, 13, 15-18, 20-24   > ;\1fc28 cm.\1e  \1faHebrew and Greek; introductions in English.\1e  \1faVols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates.\1e 0\1faBible. O.T.\1fxConcordances, Hebrew.\1e00\1faBible.\1fpN.T.\1fxConcordances, Greek.\1e10\1faBaird, J. Arthur\1fq(Joseph Arthur)\1e10\1faFreedman, David Noel,\1fd1922-\1e20\1faBiblical Research Associates.\1e  \1fa   73209622 //r823\1e\1d01033cam  2200253 i 4500001002100000003000400021005001700025008004100042010002500754040001800083043001200101050002200113100001900135245010500154260007300259300003800332490006800370500003500438504002400473650003400497651004600531700003900577810013800616\1e   76357895 /MAP/r82\1eDLC\1e19820806000000.0\1e760407s1974    waua     b    00010 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e  \1fan-us-wa\1e00\1faG1467.P8\1fbM3 1974\1e10\1faMairs, John W.\1e14\1faThe Puget Sound Region :\1fba portfolio of thematic computer maps /\1fcJohn W. Mairs, Eugene A. Hoerauf.\1e\1fa[Bellingham, Wash.] :\1fbCenter for Pacific Northwest Studies,\1fcc1974.\1e  \1faiii, 41 p. :\1fbill. ;\1fc25 x 36 cm.\1e\1faOccasional paper - Center for Pacific Northwest Studies ; no. 3\1e  \1faScale of maps ca. 1:1,000,000.\1e  \1faBibliography: p. 4.\1e 0\1faCartography\1fxData processing.\1e 0\1faPuget Sound region (Wash.)\1fxCensus\1fxMaps.\1e10\1faHoerauf, Eugene A.,\1fejoint author.\1e\1faWashington (State).\1fbWestern Washington State College, Bellingham.\1fbCenter for Pacific Northwest Studies.\1ftOccasional paper ;\1fvno. 3.\1e  \1fa   76357895 /MAP/r82\1e\1d01000pam  2200229 i 4500001001300000003000400013005001700017008004100034010001700753020001500075040001800090050001800108082001500126245030400141260004800445300003300493504005100526650002800577700002900605710004800634710007100682\1e   77000348 \1eDLC\1e19770707000000.0\1e770112s1977    mdua     b    10110 eng  \1e  \1fa0839108826\1e  \1faDLC\1fcDLC\1fdDLC\1e00\1faRC78.7.T6\1fbR4\1e00\1fa616.07/572\1e00\1faReconstruction tomography in diagnostic radiology and nuclear medicine :\1fbproceedings of the workshop ... /\1fcedited by Michel M. Ter-Pogossian ... [et al.] ; co-sponsors, the Edward Mallinckrodt Institute of Radiology and Biomedical Computer Laboratory, Washington University School of Medicine ....\1e\1faBaltimore :\1fbUniversity Park Press,\1fcc1977.\1e  \1faxv, 573 p. :\1fbill. ;\1fc24 cm.\1e  \1faIncludes bibliographical references and index.\1e 0\1faTomography\1fxCongresses.\1e20\1faTer-Pogossian, Michel M.\1e20\1faEdward Mallinckrodt Institute of Radiology.\1e20\1faWashington University, St. Louis.\1fbBiomedical Computer Laboratory.\1e  \1fa   77000348 \1e\1d01493pam  2200277 i 4500001001300000003000400013005001700017008004100034010001701198040001800075043001200093050003400105082002800139086001800167111009500185245044800280260013800728300003400866490003600900650005900936700003100995700002101026700002001047710005001067810008101117\1e   77004773 \1eDLC\1e19770822000000.0\1e770321s1977    dcua          10000 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e  \1fan-us---\1e00\1faQC100\1fb.U57 no. 500-8\1faTA1650\1e00\1fa602/.1 s\1fa621.381.9/598\1e  \1faC13.10:500-8.\1e20\1faWorkshop on Standards for Image Pattern Recognition,\1fcNational Bureau of Standards,\1fd1976.\1e10\1faComputer science & technology :\1fbproceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976 /\1fcWorkshop on Standards for Image Pattern Recognition ; John M. Evans, Jr., Russell Kirsch, and Roger N. Nagel, editor[s] ; sponsored by National Bureau of Standards, Electronic Industries Association, Institute of Electrical and Electronic Engineers, in cooperation with Association for Computing Machinery.\1e\1fa[Washington] :\1fbU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,\1fc1977.\1e  \1favii, 112 p. :\1fbill. ;\1fc26 cm.\1e\1faNBS special publication ; 500-8\1e 0\1faOptical pattern recognition\1fxStandards\1fzUnited States.\1e10\1faEvans, John Martin,\1fd1942-\1e10\1faKirsch, Russell.\1e10\1faNagel, Roger N.\1e10\1faUnited States.\1fbNational Bureau of Standards.\1e\1faUnited States.\1fbNational Bureau of Standards.\1ftSpecial publication ;\1fv500-8.\1e  \1fa   77004773 \1e\1d00878cam  2200229 i 4500001001300000003000400013005001700017008004100034010001700631040001800075050003800093082002200131086001700153100001900170245008700189260013800276300002400414440003400438490003600472650004200508810008100550\1e   77005558 \1eDLC\1e19770713000000.0\1e770401s1977    dcu           00010 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e00\1faQC100\1fb.U57 no. 500-9\1faQA76.9.A25\1e00\1fa602/.1 s\1fa001.6/4\1e\1faC13.10:500-9\1e10\1faWood, Helen M.\1e14\1faThe use of passwords for controlled access to computer resources /\1fcHelen M. Wood.\1e\1fa[Washington] :\1fbU.S. Dept. of Commerce, National Bureau of Standards : for sale by the Supt. of Docs., U.S. Govt. Print. Off.,\1fc1977.\1e  \1faiv, 53 p. ;\1fc26 cm.\1e 0\1faComputer science & technology\1e\1faNBS special publication ; 500-9\1e 0\1faComputers\1fxAccess control\1fxPasswords.\1e\1faUnited States.\1fbNational Bureau of Standards.\1ftSpecial publication ;\1fv500-9.\1e  \1fa   77005558 \1e\1d00791cam  2200217   4500001001800000003000400018005001700022008004100039010002200551040001800080043003000098050001800128082001800146100002100164245016200185260002300347300002600370500002900396650006400425710006200489\1e   77616367 //r84\1eDLC\1e19841213000000.0\1e720329s1971    dcua          00010 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e  \1fan-us-dc\1fan-us-md\1fan-us-va\1e00\1faHE2781.W3\1fbE5\1e00\1fa385/.22/09753\1e10\1faEnglund, Carl R.\1e10\1faWashington metropolitan area rail computer feasibility study;\1fbfinal report\1fc[by] Carl R. Englund, Jr. Prepared for Urban Mass Transportation Administration.\1e\1faWashington,\1fc1971.\1e  \1fa92 l.\1fbillus.\1fc28 cm.\1e  \1fa"Contract DOT-UT-10003."\1e 0\1faRailroads\1fzWashington Metropolitan Area\1fxCommuting traffic.\1e10\1faUnited States.\1fbUrban Mass Transportation Administration.\1e  \1fa   77616367 //r84\1e\1d00686cam  2200229   4500001001800000003000400018005001700022008004100039010002200434040001800080043001200098050002400110082001900134110007000153245005500223250000900278260002100287300001800308500001700326650004800343650004300391\1e   77637075 //r82\1eDLC\1e19820817000000.0\1e720320s1971    wau      s    00000 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e  \1fan-us-wa\1e00\1faLB1028.5\1fb.W37 1971\1e00\1fa378/.052/09797\1e10\1faWashington (State).\1fbState Board for Community College Education.\1e12\1faA plan for community college computer development.\1e  \1faRev.\1e\1fa[Olympia]\1fc1971.\1e  \1fa47 l.\1fc28 cm.\1e  \1faCover title.\1e 0\1faUniversities and colleges\1fxData processing.\1e 0\1faCommunity colleges\1fzWashington (State)\1e  \1fa   77637075 //r82\1e\1d00668nam  22002171  4500001001300000003000400013005001700017008004100034010001700433040001800075050001800093082001600111100001900127245007600146260004000222300004000262350000900302490003200311504003000343630006000373\1e   70001070 \1eDLC\1e19700427000000.0\1e700302s1968    mouab    b    00000 eng  \1e  \1faDLC\1fcDLC\1fdDLC\1e00\1faBS1275.5\1fb.O2\1e00\1fa222/.15/007\1e10\1faOberst, Bruce.\1e00\1faDeuteronomy.\1fcThought questions, by Don DeWelt. Summary by Adam Clarke.\1e\1faJoplin, Mo.,\1fbCollege Press\1fc[1968]\1e  \1faviii, 452 p.\1fbillus., maps.\1fc22 cm.\1e  \1fa5.95\1e\1faBible study textbook series\1e  \1faBibliography: p. 449-452.\1e 0\1faBible. O.T. Deuteronomy\1fxStudy\1fxOutlines, syllabi, etc.\1e  \1fa   70001070 \1e\1d00888pam  2200265   4500001001300000003000400013005001700017008004100034010001700605020001500075040001800090043001200108050002000120082001200140100002900152245009300181260005500274300002800329500008100357504004100438650004500479650002500524651002200549830003400571\1e   72002565 \1eDLC\1e19730409000000.0\1e720418r19721909nyu      b    00000 eng  \1e  \1fa0836968433\1e  \1faDLC\1fcDLC\1fdDLC\1e  \1fae-gr---\1e00\1faBL785\1fb.A3 1972\1e00\1fa292/.08\1e10\1faAdam, James,\1fd1860-1907.\1e14\1faThe religious teachers of Greece.\1fcEdited with a memoir, by his wife, Adela Marion Adam.\1e\1faFreeport, N.Y.,\1fbBooks for Libraries Press\1fc[1972]\1e  \1faxix, lv, 467 p.\1fc22 cm.\1e  \1faReprint of the 1909 ed., which was issued as the 1904-1906 Gifford lectures.\1e  \1faIncludes bibliographical references.\1e 0\1faGreek literature\1fxHistory and criticism.\1e 0\1faPhilosophy, Ancient.\1e 0\1faGreece\1fxReligion.\1e 0\1faGifford lectures,\1fv1904-1906.\1e  \1fa   72002565 \1e\1d01126nam  2200265 a 4500001001300000003000400013005001700017008004100034010001700843020003100075040001800106050002100124082001800145100004200163245015800205250003700363260004500400300005000445440003500495630006400530630006400594630006200658630006300720730006000783\1e   80082329 \1eDLC\1e19810528000000.0\1e810526s1980    ctuaf         00010 eng  \1e  \1fa0879832355 (pbk.) :\1fc$4.95\1e  \1faDLC\1fcDLC\1fdDLC\1e00\1faBS1433\1fb.S5 1980\1e00\1fa223/.2077\1f219\1e10\1faSmith, George Adam,\1fcSir,\1fd1856-1942.\1e10\1faFour psalms :\1fbXXIII, XXXVI, LII, CXXI /\1fcinterpreted for practical use by George Adam Smith ; introduction by F.F. Bruce ; illustrations by Ron McCarty.\1e  \1faShepherd illustrated classic ed.\1e\1faNew Canaan, Conn. :\1fbKeats Pub.,\1fcc1980.\1e  \1fa81 p., [5] leaves of plates :\1fbill. ;\1fc21 cm.\1e 2\1faA Shepherd illustrated classic\1e00\1faBible.\1fpO.T.\1fpPsalms XXIII\1fxCriticism, interpretation, etc.\1e00\1faBible.\1fpO.T.\1fpPsalms XXXVI\1fxCriticism, interpretation, etc.\1e00\1faBible.\1fpO.T.\1fpPsalms LII\1fxCriticism, interpretation, etc.\1e00\1faBible.\1fpO.T.\1fpPsalms CXXI\1fxCriticism, interpretation, etc.\1e01\1faBible.\1fpO.T.\1fpPsalms XXIII, XXXVI, LII, CXXI.\1flEnglish.\1e  \1fa   80082329 \1e\1d01433nas  2200421 a 4500001000900000003000400009005001700013008004100030010003100071022001400102030001100116032001700127035002000144035002700164040009600191042001300287050002000300070001800320072000900338082001400347210001900361222001900380245002000399260004300419265005800462300001700520310006200537350001100599362003200610500002400642650004600666650003600712650003900748650003500787650003300822780008200855850007400937\1eACD-3837\1eDLC\1e19940614065614.0\1e920728c19929999ctumn1p       0   a0eng d\1e  \1fa   92646062 \1fzsn 92004430 \1e\1fa1064-3923\1e  \1faIERNE8\1e  \1fa008187\1fbUSPS\1e  \1fa(OCoLC)26273275\1e00\1filcmarc/AQP-6285/JEANNE\1e  \1faNSDP\1fcNSDP\1fdWaU\1fdNIC\1fdDNAL\1fdOUCA\1fdNST\1fdDLC\1fdNST\1fdNSDP\1fdNST\1fdDLC\1fdInU\1fdMH\1fdNSDP\1fdN\1fdDLC\1fdMiU\1e  \1fansdp\1falc\1e00\1faTK5105.5\1fb.R448\1e\1faTK5105.5.R448\1e 0\1faX200\1e00\1fa384.3\1f220\1e\1faInternet world\1e 0\1faInternet world\1e00\1faInternet world.\1e  \1faWestport, CT :\1fbMeckler Corp.,\1fcc1992-\1e  \1faMeckler Corp., 11 Ferry Lane West, Westport, CT 06880\1e  \1fav. ;\1fc28 cm.\1e  \1faMonthly (except Jan./Feb., July/Aug., Nov./Dec. combined)\1e  \1fa$97.00\1e\1faVol. 3, no. 7 (Sept. 1992)-\1e  \1faTitle from caption.\1e 0\1faInternet (Computer network)\1fxPeriodicals.\1e 0\1faComputer networks\1fxPeriodicals.\1e 0\1faInformation networks\1fxPeriodicals.\1e 2\1faComputer Systems\1fxperiodicals.\1e 2\1faOnline Systems\1fxperiodicals.\1e00\1ftResearch & education networking\1fx1051-4791\1fw(DLC)   90646613\1fw(OCoLC)21974448\1e  \1faDLC\1faDNAL\1faDNGA\1faInU\1faMBCo\1faMH-Ed\1faMdBJ\1faMiU\1faMoKL\1faN\1faNIC\1faTxHR\1faWaU\1e\1d01330nas  22003735a 4500001000900000003000400009005001700013008004100030010001700071022002500088035002000113035002700133040002900160042001600189043001200205055001200217082001200229130003500241210002700276222002900303245001700332260005400349265006900403300002500472310001200497350002100509362003300530500002400563580005800587780008300645780005100728785008300779787009400862\1eACD-3799\1eDLC\1e19940614090514.0\1e920723c19919999oncmr4p       0   a0eng d\1e  \1facn 92031641 \1e\1fa1187-7081\1fy0025-9535\1e  \1fa(OCoLC)26244844\1e00\1filcmarc/AQF-2896/JEANNE\1e  \1faCaOOCM\1fbeng\1fcCaOONL\1fdInU\1e  \1fanlc\1faisds/c\1e  \1fan-cn---\1e 2\1faHD9696*\1e\1fa004\1f212\1e\1faInfo Canada (Downsview, Ont.).\1e\1faInfo Can.\1fb(Downsview)\1e 0\1faInfo Canada\1fb(Downsview)\1e00\1faInfo Canada.\1e  \1faDownsview, Ont. :\1fbLaurentian Technomedia,\1fc1991-\1e  \1faLaurentian Technomedia, 501 Oakdale Rd., Downsview, Ont. M3N 1W7\1e  \1fav. :\1fbill. ;\1fc40 cm.\1e  \1faMonthly\1e  \1fa$50.00 per year.\1e\1faVol. 16, no. 9 (Sept. 1991)-\1e  \1faTitle from caption.\1e  \1faIncludes: Network world Canada, Sept. 1991-Jan. 1992.\1e00\1ftComputer data\1fx0383-7319\1fw(CaOONL)770308317\1fw(OCoLC)11416479\1fw(DLC)cn 77030831\1e05\1ftI.T. magazine (Toronto, Ont.)\1fw(OCoLC)27699066\1e01\1ftNetwork world Canada\1fgFeb. 1992\1fx1187-2985\1fw(OCoLC)25314012\1fw(CaOONL)920305725\1e\1ftNetwork world Canada\1fgSept. 1991-Jan. 1992\1fx1187-2985\1fw(OCoLC)25314012\1fw(CaOONL)920305725\1e\1d00803nam  22002898a 4500001000900000003000400009005001700013008004100030010001700071020001500088035002700103040001300130043001200143050002800155082001800183100002500201245009500226250001200321260003400333263000900367300001100376500002000387630003800407600002200445600001500467650003100482\1eACD-3792\1eDLC\1e19931215084605.7\1e931206s1993    nyu           001 0 eng  \1e  \1fa   93047992 \1e  \1fa1562827545\1e00\1filcmarc/ARU-2364/STEVES\1e  \1faDLC\1fcDLC\1e  \1fan-us---\1e00\1faPN1992.77.T63\1fbC37 1993\1e00\1fa791.45/72\1f220\1e\1faCarter, Bill,\1fd1949-\1e14\1faThe late shift :\1fbLetterman, Leno, and the network battle for the night /\1fcby Bill Carter.\1e  \1fa1st ed.\1e  \1faNew York :\1fbHyperion,\1fcc1993.\1e  \1fa9402\1e  \1fap. cm.\1e  \1faIncludes index.\1e00\1faTonight show (Television program)\1e10\1faLetterman, David.\1e10\1faLeno, Jay.\1e 0\1faTalk shows\1fzUnited States.\1e\1d00766nam  22002658a 4500001000900000005001700009008004100026010001700067020001500084035002900099040001300128050002900141082001600170245007600186250001600262260005600278263000900334300001100343440003200354500002000386650003200406650001900438700002500457700001800482\1eACD-3665\1e19930730092004.1\1e930721s1993    nju           001 0 eng  \1e  \1fa   93030775 \1e  \1fa0132896613\1e00\1filcmarc/ARI-3804/JULIANNE\1e  \1faDLC\1fcDLC\1e00\1faTK5105.875.I57\1fbI56 1993\1e00\1fa384.3/4\1f220\1e00\1faInternet :\1fbmailing lists /\1fcedited by Edward T.L. Hardie, Vivian Neou.\1e  \1faUpdated ed.\1e  \1faEnglewood Cliffs, N.J. :\1fbPTR Prentice Hall,\1fc1993.\1e  \1fa9308\1e  \1fap. cm.\1e 0\1faInternet information series\1e  \1faIncludes index.\1e 0\1faInternet (Computer network)\1e 0\1faMailing lists.\1e10\1faHardie, Edward T. L.\1e10\1faNeou, Vivian.\1e\1d01324nam  2200289Ia 4500001000900000008004100009005001700050010001300067037002300080043001200103074001900115086002200134049000900156245006200165260014500227300002500372500008000397500022100477500005500698500002100753500002200774610006100796650004300857650004500900700002100945710006800966\1eACD-2728\1e910514s1984    nyu      r   f00100 eng d\1e19910519144551.0\1e  \1fo23740002\1e  \1faED ED 289459\1fbERIC\1e  \1fan-us---\1e  \1fa0466-A-03 (MF)\1e\1faED 1.310/2:289459\1e  \1faDRUG\1e00\1faTechnology programs that work /\1fcMichael B. Webb, editor.\1e\1faNew York, N.Y. :\1fbTechnology for the NDN Project, Institute for Urban and Minority Education, Teachers College, Columbia University,\1fc[1984]\1e  \1fa72, [1] p. ;\1fc28 cm.\1e  \1fa"Spons agency Office of Educational Research and Improvement"--Doc. resume.\1e  \1fa"This directory was developed by the Technology for the National Diffusion Network Project, Teachers College, Columbia University pursuant to contract number OE-300-83-0253, U.S. Department of Education"--T.p. verso.\1e  \1faDistributed to depository libraries in microfiche.\1e  \1fa"December 1984."\1e  \1faIncludes indexes.\1e10\1faUnited States.\1fbNational Diffusion Network\1fxDirectories.\1e 0\1faEducational technology\1fzUnited States.\1e 0\1faFederal aid to education\1fzUnited States.\1e10\1faWebb, Michael B.\1e10\1faUnited States.\1fbOffice of Educational Research and Improvement.\1e\1d01559nam  2200373Ia 4500001000900000008004100009005001700050010001300067037002000080043001200100074001900112086002200131088001600153049000900169100002200178245025900200260010500459300003300564500005500597500001700652504004100669500001800710650004400728650004400772650003700816650005200853650003700905700004400942700002500986710004801011710003001059710006801089740002801157\1eACD-2476\1e910425s1987    dcua     b   f00010 eng d\1e19910519144551.0\1e  \1fo23602389\1e  \1faED 288529\1fbERIC\1e  \1fan-us---\1e  \1fa0466-A-03 (MF)\1e\1faED 1.310/2:288529\1e  \1faLP 87-403 c\1e  \1faDRUG\1e10\1faSeager, Andrew J.\1e10\1faCheck this out :\1fblibrary program models /\1fcprepared by Andrew J. Seager, Sarah J. Roberts, Carol Z. Lincoln ; prepared for National Diffusion Network under contract to RMC Corporation, contract 300-84-0251 with the United States Department of Education.\1e\1faWashington, D.C. :\1fbOffice of Educational Research and Improvement, U.S. Dept. of Education,\1fc[1987]\1e  \1faix, 319 p. :\1fbill. ;\1fc28 cm.\1e  \1faDistributed to depository libraries in microfiche.\1e  \1fa"July 1987."\1e  \1faIncludes bibliographical references.\1e  \1fa"LP 87-403c."\1e 0\1faLibraries and community\1fzUnited States.\1e 0\1faLibraries and education\1fzUnited States.\1e 0\1faSchool libraries\1fzUnited States.\1e 0\1faInstructional materials centers\1fzUnited States.\1e 0\1faPublic libraries\1fzUnited States.\1e10\1faRoberts, Sarah J.\1fq(Sarah Jane),\1fd1946-\1e10\1faLincoln, Carol Zall.\1e10\1faUnited States.\1fbNational Diffusion Network.\1e20\1faRMC Research Corporation.\1e10\1faUnited States.\1fbOffice of Educational Research and Improvement.\1e01\1faLibrary program models.\1e\1d01155nas  22003135a 4500001000900000008004100009005001700050010002700067040000800094012001200102042000700114050001500121074001100136086002000147049000900167212008300176245006900259260011500328265007100443300001700514310001100531500003200542610003600574650006200610650006400672710002200736710007000758936001300828\1eACD-2376\1e910225c19uu9999dcuar        f0uuu 0eng  \1e19910519144551.0\1e  \1fa   91656060 \1fo23150847\1e  \1fdGPO\1e  \1fa2\1fi9103\1e  \1falc\1e00\1faIN PROCESS\1e  \1fa0785-H\1e\1faLC 1.40/2:F 31/\1e  \1faDRUG\1e\1faFederal Library and Information Network services directory for fiscal year ...\1e00\1faFEDLINK services directory for fiscal year ... /\1fcFLICC/FEDLINK.\1e00\1faWashington, D.C. :\1fbFederal Library and Information Network, Federal Library and Information Center Committee,\1e  \1faFEDLINK, Room LA 1026C, Library of Congress, Washington D.C. 20540\1e  \1fav. ;\1fc28 cm.\1e  \1faAnnual\1e  \1faDescription based on: 1990.\1e20\1faFEDLINK (Network)\1fxDirectories.\1e 0\1faLibrary information networks\1fzUnited States\1fxDirectories.\1e 0\1faLibraries, Governmental, administrative, etc.\1fxPeriodicals.\1e20\1faFEDLINK (Network)\1e20\1faUnited States.\1fbFederal Library and Information Center Committee.\1e  \1fa1991 LIC\1e\1d00915nam  2200229Ka 4500001000900000008004100009005001700050010001300067040001300080037002000093074001900113086002200132049000900154100001800163245015700181260012400338300000900462533009300471500005500564650001400619710005200633\1eACD-1949\1e910415r19901087dcu     b    f00010 eng d\1e19910421122541.0\1e  \1fo23469261\1e  \1faGPO\1fcGPO\1e  \1faED 286992\1fbERIC\1e  \1fa0466-A-03 (MF)\1e\1faED 1.310/2:286992\1e  \1faDRUG\1e10\1faPaulu, Nancy.\1e10\1faDealing with dropouts\1fhmicroform :\1fbthe urban superintendents' call to action /\1fcby the OERI Urban Superintendents Network ; Nancy Paulu, writer-editor.\1e\1fa[Washington, D.C]. :\1fbOffice of Educational Research and Improvement, Educational Resources Information Center,\1fc[1987]\1e  \1fa1 v.\1e  \1faMicrofiche.\1fb[Washington, D.C.?] :\1fcSupt. of Docs., U.S. G.P.O.,\1fd[1990].\1fe1 microfiche.\1e  \1faDistributed to depository libraries in microfiche.\1e 0\1faDropouts.\1e20\1faEducational Resources Information Center (U.S.)\1e\1d01053nam  2200217Ka 4500001000900000008004100009005001700050010001300067037002000080074001900100086002200119049000900141245016300150260025100313300000900564533009400573500005500667650002400722650003700746710005200783\1eACD-1947\1e910415r19901986dcu     b    f00010 eng d\1e19910421122541.0\1e  \1fo23469098\1e  \1faED 286333\1fbERIC\1e  \1fa0466-A-03 (MF)\1e\1faED 1.310/2:286333\1e  \1faDRUG\1e00\1faNational dissemination model for the I'M SPECIAL Program of Physical Education for the Handicapped, 1983-1986\1fhmicroform :\1fbfinal report, I'M SPECIAL network.\1e\1faTampa, Fla. :\1fbDepartment of Physical Education, College of Education, University of South Florida ;\1fa[Washington, D.C.] :\1fbU.S. Dept. of Education, Office of Educational Research and Improvement, Educational Resources Information Center,\1fc[1986]\1e  \1fa1 v.\1e  \1faMicrofiche.\1fb[Washington, D.C.?] :\1fcSupt. of Docs., U.S. G.P.O.,\1fd[1990].\1fe2 microfiches.\1e  \1faDistributed to depository libraries in microfiche.\1e 0\1faPhysical education.\1e 0\1faHandicapped children\1fxEducation.\1e20\1faEducational Resources Information Center (U.S.)\1e\1d01036nam  2200289Ia 4500001000900000008004100009005001700050010001300067040001300080043001200093074001400105086001800119088001500137049000900152245004500161260010500206300004100311500005500352500003300407500002800440500002600468610004800494650005500542650004400597710006800641740003700709\1eACD-1938\1e910415s1991    dcu          f00000 eng d\1e19910421122541.0\1e  \1fo23468272\1e  \1faGPO\1fcGPO\1e  \1fan-us---\1e  \1fa0461-D-05\1e\1faED 1.302:Sh 2\1e  \1faPIP 91-836\1e  \1faDRUG\1e00\1faNDN, sharing success to improve schools.\1e\1fa[Washington, DC] :\1fbU.S. Dept. of Education, Office of Educational Research and Improvement,\1fc[1991]\1e  \1fa1 folded sheet (6 p.) ;\1fc22 x 10 cm.\1e  \1faAt head of title: National Diffusion Network, NDN.\1e  \1faShipping list no.: 91-198-P.\1e  \1fa"January 1991"--P. [5].\1e  \1fa"PIP 91-836"--P. [5].\1e10\1faUnited States.\1fbNational Diffusion Network.\1e 0\1faDemonstration centers in education\1fzUnited States.\1e 0\1faEducational innovations\1fzUnited States.\1e10\1faUnited States.\1fbOffice of Educational Research and Improvement.\1e01\1faNational Diffusion Network, NDN.\1e\1d00725nam0 2200253   45  001001500000004001500015008002300030021003400053041001300087100001800100241001500118245012300133250002400256260003200280300002700312520003100339652001100370010002100381096001100402251002400413261000900437970001300446970001200459\1e00\1faD000015937\1e00\1fsa\1ftm\1frn\1fu0\1e00\1far19881981\1fbdk\1fldan\1e00\1fa87-11-04010-6\1fchf.\1fdkr. 92,00\1e00\1fadan\1fceng\1e00\1faAnderson\1fhBob\1e00\1faStretching\1e00\1faStrækøvelser\1fdBob Anderson\1ffillustreret af Jean Anderson\1ffdansk udgave ved Lis Engel\1ff[oversættelse ved Jesper Langer]\1e00\1fa1. udgave, 4. oplag\1e00\1fa[Kbh.]\1fbClausen bøger\1fc1988\1e00\1fa192 sider\1fbill.\1fc26 cm\1e00\1faTidligere: 1. udgave. 1981\1e00\1fa79.601\1e00\1fa870970\1fb05675030\1e00\1fz870970\1e00\1fa1. udgave, 4. oplag\1e00\1fc1988\1e00\1fb05675030\1e00\1fcDBF8842\1e\1d\1d\1d\0
\ No newline at end of file
diff --git a/ztest/dummy-words b/ztest/dummy-words
new file mode 100644 (file)
index 0000000..7093ee2
--- /dev/null
@@ -0,0 +1,990 @@
+0:44
+0OK:2
+0SUCCESS:2
+1:41
+10:5
+2:2
+210:4
+3:2
+301024:4
+3536:2
+45:2
+7:2
+8:2
+99:2
+A:249
+ABLE:4
+ABOUT:13
+ABOVE:2
+ABSENT:4
+ACCESS:10
+ACCORDING:2
+ACTUAL:3
+ACTUALLY:2
+ADAPT:2
+ADD:4
+ADDED:4
+ADDINFO:2
+ADDING:3
+ADDITION:3
+ADDRESS:19
+ADDRESSES:6
+AFTER:10
+AGAIN:8
+AGAINST:2
+ALL:21
+ALLOCATE:9
+ALLOCATED:14
+ALLOCATES:2
+ALLOCATING:2
+ALLOCATION:2
+ALLOW:5
+ALLOWED:3
+ALONG:2
+ALREADY:7
+ALSO:9
+ALTERNATIVE:2
+ALTHOUGH:6
+ALWAYS:7
+AN:69
+AND:161
+ANY:22
+APDUS:2
+API:12
+APIS:2
+APPEAR:2
+APPLICATION:10
+APPLICATIONS:7
+APPROACH:4
+ARCHIVE:2
+ARE:63
+ARGUMENT:6
+ARISES:3
+ARM:5
+AROUND:2
+ARRAY:11
+AS:75
+ASN:12
+ASN1:23
+ASSOCIATION:9
+ASSUME:8
+ASYNCHRONOUS:5
+AT:40
+ATTRIBUTESET:2
+AUTHORS:2
+AVAILABLE:5
+AWARE:3
+B:4
+BACKEND:18
+BACKENDH:4
+BADN:2
+BASE:2
+BASED:5
+BASENAME:2
+BASIC:3
+BE:123
+BECAUSE:6
+BEEN:21
+BEFORE:12
+BEGINNING:5
+BEHAVIOR:2
+BEING:2
+BELONGING:2
+BELOW:5
+BEND:3
+BENDDELETEREQUEST:4
+BENDDELETERESPONSEVOID:2
+BENDDELETERESULT:6
+BENDDELETEVOID:2
+BENDFETCHREQUEST:4
+BENDFETCHRESPONSEVOID:2
+BENDFETCHRESULT:6
+BENDFETCHVOID:2
+BENDINITBENDINITREQUEST:2
+BENDINITREQUEST:3
+BENDINITRESULT:4
+BENDSCANRESULT:2
+BENDSEARCHREQUEST:6
+BENDSEARCHRESPONSEVOID:2
+BENDSEARCHRESULT:8
+BENDSEARCHVOID:2
+BER:4
+BERENCODED:3
+BETTER:2
+BETWEEN:9
+BEYOND:3
+BIT:6
+BITMASK:5
+BITNO:3
+BITS:5
+BLOCK:4
+BLOCKING:6
+BOOLEAN:7
+BOOLT:4
+BOOLTNULL:3
+BOOLTTRUE:3
+BOOLVAL:4
+BOTH:3
+BRIEF:2
+BUF:11
+BUFFER:20
+BUFFERP:3
+BUT:15
+BY:58
+BYTES:4
+C:21
+CALL:41
+CALLED:8
+CALLING:8
+CALLS:6
+CAN:61
+CANGROW:4
+CANNOT:3
+CANT:3
+CAPABILITIES:3
+CARE:4
+CASE:9
+CASES:4
+CERTAIN:2
+CHANGE:3
+CHANGES:3
+CHAR:39
+CHARACTER:6
+CHARINDEX:2
+CHARYAZ:2
+CHECK:2
+CHOICE:11
+CHUNKS:2
+CLASS:10
+CLEAN:2
+CLEAR:2
+CLIENT:11
+CLOSE:3
+CODE:3
+COMES:3
+COMMAND:2
+COMMANDLINE:2
+COMMON:3
+COMMUNICATION:10
+COMMUNICATIONS:2
+COMPACT:3
+COMPILE:2
+COMPILER:6
+COMPLETE:4
+COMPLETED:3
+COMPLEX:9
+COMPLEXITY:2
+COMSTACK:14
+COMSTACKH:2
+CONDITION:7
+CONFIGNAME:2
+CONNECT:4
+CONNECTION:14
+CONNECTIONS:3
+CONSISTS:4
+CONST:4
+CONSTANT:3
+CONSTANTS:3
+CONSTRUCT:2
+CONSTRUCTED:6
+CONSTRUCTION:3
+CONSTRUCTIONS:2
+CONTAIN:3
+CONTAINED:2
+CONTAINS:4
+CONTENTS:4
+CONTEXT:3
+CONTROL:4
+COPY:2
+COPYRIGHT:3
+CORRECT:3
+CORRESPONDING:9
+CORRESPONDS:2
+COULD:7
+COURSE:2
+CRASH:2
+CREATE:8
+CREATED:3
+CSACCEPTCOMSTACK:2
+CSBINDCOMSTACK:2
+CSCLOSECOMSTACK:2
+CSCONNECT:2
+CSCONNECTCOMSTACK:2
+CSCREATECSTYPE:2
+CSERRLIST:2
+CSERRNO:2
+CSGET:8
+CSGETCOMSTACK:2
+CSLISTEN:3
+CSLISTENCOMSTACK:2
+CSLOOKCOMSTACK:2
+CSMORE:6
+CSMORECOMSTACK:2
+CSPERRORCOMSTACK:2
+CSPUTCOMSTACK:2
+CSRCVCONNECT:2
+CSRCVCONNECTCOMSTACK:2
+CSSTACKERRCOMSTACK:2
+CURRENT:9
+CURRENTLY:4
+DAMAGES:2
+DATA:54
+DATABASE:24
+DATABASENAMESCHARNULL:2
+DATABASES:2
+DATAYAZ:2
+DEBUGGING:2
+DECODE:11
+DECODED:2
+DECODES:2
+DECODING:18
+DEFAULT:9
+DEFAULTS:2
+DEFINE:3
+DEFINED:14
+DEFINITION:11
+DEFINITIONS:10
+DELETE:3
+DEMO:2
+DEPENDING:5
+DERIVED:3
+DESC:2
+DESCRIBED:4
+DESCRIPTOR:2
+DESIGNED:2
+DESIRED:2
+DETERMINE:4
+DETERMINES:2
+DEVELOPMENT:2
+DIAGNOSTIC:8
+DIFFERENT:14
+DIFFERENTLY:2
+DIGITS:2
+DIRECT:2
+DIRECTION:2
+DIRECTORY:13
+DISCONNECT:2
+DISCRIMINATOR:5
+DISTRIBUTION:3
+DN:2
+DO:7
+DOCUMENT:2
+DOCUMENTATION:5
+DOES:4
+DOESNT:6
+DONE:7
+DONT:9
+DURING:4
+EACH:18
+EASILY:3
+EFFECT:2
+EFFICIENT:2
+EG:6
+EITHER:17
+ELEMENT:4
+ELEMENTS:10
+EMPTY:4
+ENCODE:6
+ENCODED:8
+ENCODERS:2
+ENCODING:21
+ENCODINGDECODING:2
+END:3
+ENDPOINT:7
+ENSURE:3
+ENSURES:2
+ENTRIES:2
+ENUM:7
+EQUIVALENT:2
+ERRCODE:7
+ERROR:31
+ERRSTRING:7
+ESTABLISH:2
+ESTABLISHMENT:2
+ETC:4
+EVEN:4
+EVENT:9
+EVENTHANDLING:2
+EVERYTHING:5
+EXACTLY:2
+EXAMINED:2
+EXAMPLE:3
+EXAMPLES:2
+EXCEPT:2
+EXCHANGE:5
+EXISTING:5
+EXPECTED:4
+EXPLAIN:2
+EXPLICIT:4
+EXPLICITLY:3
+EXTERN:4
+EXTERNAL:2
+EXTRA:6
+FACILITIES:2
+FACILITY:4
+FAILED:2
+FAIRLY:8
+FAR:5
+FD:11
+FEW:2
+FIDDLE:2
+FIELD:10
+FIELDS:6
+FIELDTYPEDEFAULT:15
+FILE:18
+FILES:4
+FIND:3
+FIRST:11
+FIT:2
+FLAG:5
+FOLLOW:3
+FOLLOWED:2
+FOLLOWING:5
+FOR:115
+FORK:4
+FORM:9
+FORMAT:8
+FOUND:10
+FREE:3
+FREE2:2
+FREED:2
+FREELIST:2
+FROM:26
+FRONTEND:11
+FULL:10
+FULLY:2
+FUN:5
+FUNCTION:93
+FUNCTIONS:43
+FURNISS:3
+FURTHER:3
+FUTURE:6
+GCC:2
+GENERAL:7
+GENERALITY:2
+GENERALLY:14
+GET:6
+GIVE:2
+GIVEN:9
+GIVES:3
+GLOBAL:5
+GO:4
+GOOD:5
+GUIDE:2
+HAD:6
+HANDED:2
+HANDLE:54
+HAPPENS:2
+HAPPY:5
+HAS:34
+HAVE:43
+HAVENT:2
+HEADER:2
+HELP:2
+HERE:4
+HEX:2
+HIGHERLEVEL:2
+HITS:3
+HOLDS:4
+HOST:2
+HOSTNAME:3
+HOW:5
+HUMANREADABLE:2
+IDENTIFIERS:7
+IF:87
+IGNORED:3
+IMMEDIATELY:7
+IMPLEMENT:8
+IMPLEMENTATION:11
+IMPLEMENTATIONID:2
+IMPLEMENTATIONNAME:2
+IMPLEMENTATIONS:7
+IMPLEMENTATIONVERSIONCHARYAZVERSION:2
+IMPLEMENTED:3
+IMPLEMENTING:4
+IMPLEMENTS:3
+IMPLICIT:8
+IMPORTANT:6
+IN:156
+INCLUDE:15
+INCLUDING:3
+INCOMING:5
+INDEPENDENT:4
+INDEX:8
+INDICATE:2
+INDICATES:2
+INDIRECT:3
+INDIVIDUAL:9
+INDIVIDUALLY:2
+INFOINDEXPINGDK:2
+INFORMATION:6
+INITIALIZATION:2
+INITIALIZE:2
+INITIALIZED:4
+INITREQUEST:3
+INPUT:3
+INSTALLATION:2
+INSTANCE:5
+INSTEAD:3
+INT:172
+INTEGER:16
+INTEGRATION:2
+INTERESTED:2
+INTERFACE:33
+INTERFACES:5
+INTERNAL:4
+INTERNALLY:2
+INTERPRETED:2
+INTO:8
+INTVAL:4
+INVOCATION:2
+IO:2
+IPNUMBER:2
+IS:205
+ISNT:3
+ISODE:5
+IT:92
+ITS:25
+ITSELF:6
+JUST:5
+KEEP:3
+KEYWORD:2
+KIND:3
+L:2
+LANGUAGE:2
+LARGE:3
+LAST:5
+LASTINSET:2
+LATER:5
+LATEST:2
+LAYER:2
+LAYERS:4
+LEAST:5
+LEAVE:2
+LEN:17
+LENGTH:8
+LESS:3
+LEVEL:8
+LIBMOSIA:2
+LIBRARY:13
+LICENSE:2
+LIKE:22
+LIKELY:3
+LIKES:2
+LIMITED:3
+LINE:5
+LINK:4
+LIST:3
+LISTEN:2
+LISTENER:5
+LISTENING:2
+LITTLE:5
+LIVE:2
+LOCAL:3
+LOG:2
+LOGFILE:2
+LOGLEVEL:2
+LONG:2
+LONGER:3
+LOOK:16
+LOOKS:3
+LOWER:6
+LOWLEVEL:2
+MACRO:2
+MACROS:4
+MAIL:2
+MAIN:4
+MAINTAIN:2
+MAKE:14
+MAKEFILE:3
+MAKES:2
+MALLOC2:2
+MANAGEMENT:6
+MANAGING:4
+MANIFEST:2
+MANY:5
+MAP:2
+MAPPING:3
+MARK:2
+MATCH:3
+MATTER:2
+MAXIMUM:4
+MAXIMUMRECORDSIZE:2
+MAY:16
+MAYBE:2
+MEANS:2
+MECHANISM:8
+MEMBER:7
+MEMBERS:10
+MEMORY:28
+MESSAGE:11
+METHOD:2
+METHODS:2
+MIGHT:15
+MINIMUM:2
+MODE:20
+MODEL:3
+MODIFY:2
+MODULE:19
+MODULES:2
+MORE:15
+MOSI:2
+MOSISTRTOADDR:2
+MOSISTRTOADDRCHAR:2
+MOSITYPE:2
+MOST:12
+MOVE:2
+MUST:2
+MYARRAY:4
+MYCHOICE:3
+MYCHOICEOTHER:2
+MYCHOICETAGGED:2
+MYCHOICEUNTAGGED:2
+MYINT:2
+MYSEQUENCE:10
+MYSEQUENCEODR:3
+NAME:16
+NAMED:2
+NAMES:2
+NECESSARY:5
+NEED:25
+NEEDED:3
+NEEDS:2
+NEGOTIATION:3
+NETBUF:2
+NETWORK:6
+NEW:21
+NEXT:6
+NIBBLE:3
+NO:19
+NONBLOCKING:6
+NONZERO:3
+NORMAL:2
+NOT:32
+NOTE:21
+NOTICE:3
+NOW:2
+NULL:34
+NUM:2
+NUMBER:18
+NUMBEROFRECORDSRETURNED:2
+NUMDATABASENAMES:2
+O:65
+OBJECT:7
+OCCURS:4
+OCTET:3
+OCTETSTRING:2
+ODIRECTION:3
+ODR:62
+ODRARM:5
+ODRBITMASK:7
+ODRBOOLO:3
+ODRCONSTRUCTED:2
+ODRCONTEXT:5
+ODRCREATEMEMINT:2
+ODRDECODE:4
+ODRDESTROYODR:2
+ODRERRLIST:2
+ODREXPLICIT:5
+ODREXTRACTMEMODR:2
+ODRFUN:3
+ODRGETBUFODR:2
+ODRGETERRORODR:2
+ODRH:2
+ODRIMPLICIT:6
+ODRIMPLICITSETTAGODR:2
+ODRINTEGER:5
+ODRINTEGERO:3
+ODRINTEGERODR:2
+ODRMALLOC:6
+ODRMALLOCO:3
+ODRMALLOCODR:2
+ODRMEM:3
+ODROCT:3
+ODROID:3
+ODROIDNULL:3
+ODROKO:5
+ODRRELEASEMEMODRMEM:2
+ODRRESET:13
+ODRRESETODR:2
+ODRSEQUENCEBEGINO:3
+ODRSEQUENCEENDO:3
+ODRSETBUF:3
+ODRSETBUFODR:2
+OF:290
+OFF:2
+OFFERS:2
+OFTEN:3
+OID:8
+OIDENT:5
+OIDPROTO:3
+OIDS:2
+OK:2
+ON:59
+ONCE:7
+ONE:27
+ONLY:16
+OPAQUE:2
+OPEN:3
+OPERATE:2
+OPERATION:9
+OPERATIONS:4
+OPTION:4
+OPTIONAL:41
+OPTIONS:10
+OR:86
+OSF1:2
+OSI:16
+OTHER:23
+OTHERS:2
+OTHERWISE:3
+OUR:5
+OUT:7
+OUTPUT:4
+OVER:5
+OWN:8
+P:46
+PACKAGE:11
+PACKAGES:7
+PACKET:2
+PARAMETER:17
+PARAMETERS:8
+PART:7
+PARTIAL:2
+PASSED:2
+PBOOLVAL:3
+PDU:11
+PDUS:16
+PEER:3
+PENDING:3
+PERFORM:3
+PERMISSION:3
+PETER:3
+PINTVAL:3
+PLACE:6
+PLACED:2
+PLATFORMS:5
+POINT:8
+POINTED:5
+POINTER:22
+POINTERS:8
+POINTS:2
+PORT:6
+PORTABLE:2
+PORTNUMBER:2
+POSSIBILITY:2
+POSSIBLE:9
+PRACTICAL:2
+PREFERREDMESSAGESIZE:2
+PREFERREDRECORDSYNTAXODROIDNULL:2
+PREFIX:2
+PREPARE:2
+PRESENT:4
+PRESENTATION:5
+PRESENTSTATUSINT:2
+PRIMARY:3
+PRIMITIVE:18
+PRIMITIVES:2
+PRINTING:2
+PRINTS:2
+PRIVATE:2
+PROBABLY:3
+PROBLEM:5
+PROBLEMS:5
+PROCESS:9
+PROCESSING:5
+PROGRAM:3
+PROGRAMMER:2
+PROGRAMMING:4
+PROTO:3
+PROTOCOL:39
+PROTOCOLS:5
+PROTOCOLVERSION:2
+PROTOH:2
+PROTOSR:3
+PROTOTYPES:2
+PROTOZ3950:3
+PROVIDE:15
+PROVIDED:29
+PROVIDES:13
+PURPOSE:6
+PURPOSES:3
+QUALITY:2
+QUERY:8
+QUESTIONS:2
+QUITE:5
+R:12
+RATHER:5
+READ:9
+REAL:2
+REALISE:2
+REALLY:2
+REASON:5
+RECEIVED:6
+RECOMMEND:2
+RECORD:16
+RECORDS:6
+RECYCLED:2
+REFER:6
+REFERENCE:8
+REFERENCEID:15
+RELEASE:8
+RELEASED:2
+RELEASES:6
+REPEATEDLY:3
+REPLACESET:2
+REPORTS:2
+REPRESENT:2
+REPRESENTATION:8
+REPRESENTATIONS:2
+REPRESENTING:3
+REPRESENTS:2
+REQUEST:12
+REQUESTS:3
+REQUIRE:2
+REQUIRED:11
+REQUIREMENTS:2
+REQUIRING:2
+RESOURCES:2
+RESPOND:2
+RESPONSE:3
+REST:3
+RESULT:8
+RESULTING:2
+RESULTSETWANTED:2
+RESVALP:3
+RETAIN:4
+RETURN:40
+RETURNED:7
+RETURNS:11
+RFC1006:3
+ROLE:5
+ROUTINE:5
+ROUTINES:3
+RPN:2
+RULES:2
+RUN:4
+RUNTIME:2
+S:2
+SAME:11
+SAY:7
+SCHEME:2
+SEARCH:3
+SEARCHREQUEST:3
+SECTION:11
+SEE:12
+SEEN:2
+SELECT2:5
+SELECTOR:2
+SEND:2
+SENDS:2
+SENT:2
+SEPARATE:3
+SEQUENCE:13
+SEQUENCES:2
+SERVER:27
+SERVICE:6
+SESSION:4
+SET:37
+SETNAME:5
+SETS:3
+SETTINGS:3
+SEVERAL:4
+SHORT:2
+SHOULD:46
+SHOULDNT:2
+SIDE:4
+SIMILAR:2
+SIMPLE:14
+SIMPLIFY:3
+SIMPLY:7
+SINCE:6
+SINGLE:4
+SIZE:24
+SIZEOFP:6
+SMALL:4
+SO:9
+SOCKADDRIN:2
+SOCKETS:3
+SOFTWARE:17
+SOME:14
+SOMETHING:3
+SOMETIMES:4
+SOMEWHAT:2
+SOURCE:3
+SPACE:7
+SPECIAL:4
+SPECIFIC:3
+SPECIFICALLY:4
+SPECIFICATION:6
+SPECIFY:2
+SR:5
+STACK:2
+STACKS:2
+STANDARD:6
+STATE:5
+STATIC:4
+STATSERVMAIN:3
+STATSERVOPTIONSBLOCK:2
+STDERR:5
+STEPSIZE:2
+STILL:7
+STR:4
+STRAIGHTFORWARD:2
+STREAM:38
+STREAMS:5
+STRING:11
+STRINGS:5
+STRUCT:21
+STRUCTURE:33
+STRUCTURES:6
+SUBSYSTEM:8
+SUCCESS:5
+SUCH:7
+SUFFICIENT:3
+SUGGEST:2
+SUN:2
+SUPPLIED:3
+SUPPORT:11
+SYNOPSIS:3
+SYSTEM:22
+SYSTEMS:2
+TABLES:2
+TAG:10
+TAGGED:4
+TAGGING:10
+TAGMODE:2
+TAKE:6
+TAKEN:2
+TAKES:2
+TALK:3
+TARGET:2
+TASK:2
+TCP:2
+TCPIP:5
+TCPIPSTRTOADDRCHAR:2
+TELL:4
+TELLS:3
+TERMINATED:2
+THAN:10
+THAT:125
+THE:916
+THEIR:3
+THEM:2
+THEN:8
+THERE:7
+THERES:4
+THESE:5
+THEY:12
+THING:4
+THINGS:5
+THINK:2
+THINOSI:3
+THIS:95
+THREE:5
+THROUGH:3
+TIME:7
+TIMEOUT:3
+TIMES:2
+TO:369
+TOO:5
+TOOLKIT:3
+TOP:3
+TOPLEVEL:8
+TRANSPARENT:2
+TRANSPORT:15
+TRIED:2
+TRY:3
+TSELECTOR:2
+TWO:10
+TYPE:67
+TYPEDEF:14
+TYPES:41
+TYPICAL:2
+TYPICALLY:9
+U:3
+UNDER:4
+UNDERLYING:2
+UNION:7
+UNIONNULL:2
+UNLESS:4
+UNPACKED:2
+UNTAGGED:2
+UNTIL:6
+UP:6
+UPDATE:2
+US:3
+USE:67
+USED:26
+USEFUL:9
+USER:4
+USERINFORMATIONFIELD:2
+USERS:4
+USING:18
+V:2
+VALP:3
+VALUE:39
+VALUES:7
+VARIABLE:2
+VARIABLES:3
+VERIFY:2
+VERSION:5
+VERY:3
+VISIBLESTRING:2
+VOID:29
+WANT:12
+WARRANTY:2
+WAS:10
+WAY:12
+WE:52
+WED:5
+WELL:22
+WENT:3
+WERE:2
+WHAT:2
+WHEN:49
+WHENEVER:2
+WHERE:9
+WHETHER:3
+WHICH:44
+WHICHP:2
+WHILE:8
+WHOLE:2
+WILL:91
+WISH:9
+WITH:58
+WITHIN:2
+WITHOUT:9
+WONT:2
+WORK:8
+WORKING:2
+WORKS:6
+WORRY:4
+WOULD:16
+WRITE:5
+WRITING:2
+WRITTEN:5
+X500:4
+XDR:4
+XMOSIH:3
+XTI:2
+XTIMOSI:11
+YAZ:25
+YET:6
+YOU:198
+YOULL:5
+YOUR:53
+YOURE:6
+YOURSELF:6
+Z:3
+Z3950:8
+Z39501994:2
+Z3950SR:4
+ZAPDU:5
+ZELEMENTSETNAMES:3
+ZERO:6
+ZGET:2
+ZINITREQUEST:3
+ZLISTSTATUSNULL:2
+ZRECORDS:2
+ZREFERENCEIDNULL:15
diff --git a/ztest/read-grs.c b/ztest/read-grs.c
new file mode 100644 (file)
index 0000000..c847187
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 1995, Index Data.
+ * See the file LICENSE for details.
+ * Sebastian Hammer, Adam Dickmeiss
+ *
+ * $Log: read-grs.c,v $
+ * Revision 1.1  1997-09-01 08:55:53  adam
+ * New windows NT/95 port using MSV5.0. Test server ztest now in
+ * separate directory. When using NT, this test server may operate
+ * as an NT service. Note that the service.[ch] should be part of
+ * generic, but it isn't yet.
+ *
+ * Revision 1.1  1995/08/17 12:45:23  quinn
+ * Fixed minor problems with GRS-1. Added support in c&s.
+ *
+ *
+ */
+
+/*
+ * Little toy-thing to read a GRS-1 record from a file.
+ */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+#include <proto.h>
+#include <log.h>
+
+#define GRS_MAX_FIELDS 50
+
+Z_GenericRecord *read_grs1(FILE *f, ODR o)
+{
+    char line[512], *buf;
+    int type, ivalue;
+    char value[512];
+    Z_GenericRecord *r = 0;
+
+    for (;;)
+    {
+       Z_TaggedElement *t;
+       Z_ElementData *c;
+
+       while (fgets(buf = line, 512, f))
+       {
+           while (*buf && isspace(*buf))
+               buf++;
+           if (!*buf || *buf == '#')
+               continue;
+           break;
+       }
+       if (*buf == '}')
+           return r;
+       if (sscanf(buf, "(%d,%[^)])", &type, value) != 2)
+       {
+           logf(LOG_WARN, "Bad data in '%s'", buf);
+           return 0;
+       }
+       if (!type && *value == '0')
+           return r;
+       if (!(buf = strchr(buf, ')')))
+           return 0;
+       buf++;
+       while (*buf && isspace(*buf))
+           buf++;
+       if (!*buf)
+           return 0;
+       if (!r)
+       {
+           r = odr_malloc(o, sizeof(*r));
+           r->elements = odr_malloc(o, sizeof(Z_TaggedElement*) *
+               GRS_MAX_FIELDS);
+           r->num_elements = 0;
+       }
+       r->elements[r->num_elements] = t = odr_malloc(o,
+           sizeof(Z_TaggedElement));
+       t->tagType = odr_malloc(o, sizeof(int));
+       *t->tagType = type;
+       t->tagValue = odr_malloc(o, sizeof(Z_StringOrNumeric));
+       if ((ivalue = atoi(value)))
+       {
+           t->tagValue->which = Z_StringOrNumeric_numeric;
+           t->tagValue->u.numeric = odr_malloc(o, sizeof(int));
+           *t->tagValue->u.numeric = ivalue;
+       }
+       else
+       {
+           t->tagValue->which = Z_StringOrNumeric_string;
+           t->tagValue->u.string = odr_malloc(o, strlen(value)+1);
+           strcpy(t->tagValue->u.string, value);
+       }
+       t->tagOccurrence = 0;
+       t->metaData = 0;
+       t->appliedVariant = 0;
+       t->content = c = odr_malloc(o, sizeof(Z_ElementData));
+       if (*buf == '{')
+       {
+           c->which = Z_ElementData_subtree;
+           c->u.subtree = read_grs1(f, o);
+       }
+       else
+       {
+           c->which = Z_ElementData_string;
+           buf[strlen(buf)-1] = '\0';
+           c->u.string = odr_malloc(o, strlen(buf)+1);
+           strcpy(c->u.string, buf);
+       }
+       r->num_elements++;
+    }
+}
diff --git a/ztest/ztest.c b/ztest/ztest.c
new file mode 100644 (file)
index 0000000..8ce9c30
--- /dev/null
@@ -0,0 +1,369 @@
+
+/* little dummy-server */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <assert.h>
+
+#include <backend.h>
+#include <xmalloc.h>
+#include <proto.h>
+
+/* Specifically for NT Services - Shouldn't cause problems on UNIX */
+#include "service.h"
+
+Z_GenericRecord *read_grs1(FILE *f, ODR o);
+
+bend_initresult *bend_init(bend_initrequest *q)
+{
+    static bend_initresult r;
+    static char *dummy = "Hej fister";
+
+    r.errcode = 0;
+    r.errstring = 0;
+    r.handle = dummy;
+    return &r;
+}
+
+bend_searchresult *bend_search(void *handle, bend_searchrequest *q, int *fd)
+{
+    static bend_searchresult r;
+
+    r.errcode = 0;
+    r.errstring = 0;
+    r.hits = rand() % 22;
+    return &r;
+}
+
+static int atoin (const char *buf, int n)
+{
+    int val = 0;
+    while (--n >= 0)
+    {
+        if (isdigit(*buf))
+            val = val*10 + (*buf - '0');
+        buf++;
+    }
+    return val;
+}
+
+char *marc_read(FILE *inf)
+{
+    char length_str[5];
+    size_t size;
+    char *buf;
+
+    if (fread (length_str, 1, 5, inf) != 5)
+        return NULL;
+    size = atoin (length_str, 5);
+    if (size <= 6)
+        return NULL;
+    if (!(buf = xmalloc (size+1)))
+        return NULL;
+    if (fread (buf+5, 1, size-5, inf) != (size-5))
+    {
+        xfree (buf);
+        return NULL;
+    }
+    memcpy (buf, length_str, 5);
+    buf[size] = '\0';
+    return buf;
+}
+
+static char *dummy_database_record (int num)
+{
+    FILE *inf = fopen ("dummy-records", "r");
+    char *buf = 0;
+
+    if (!inf)
+       return NULL;
+    while (--num >= 0)
+    {
+       if (buf)
+          xfree(buf);
+       if (num == 98)
+       {
+           assert(buf = xmalloc(2101));
+           memset(buf, 'A', 2100);
+           buf[2100] = '\0';
+           break;
+       }
+       else
+           buf = marc_read (inf);
+       if (!num || !buf)
+           break;
+    }
+    fclose(inf);
+    if (num < 0)
+       return 0;
+    return buf;
+}
+
+static Z_GenericRecord *dummy_grs_record (int num, ODR o)
+{
+    FILE *f = fopen("dummy-grs", "r");
+    char line[512];
+    Z_GenericRecord *r = 0;
+    int n;
+
+    if (!f)
+       return 0;
+    while (fgets(line, 512, f))
+       if (*line == '#' && sscanf(line, "#%d", &n) == 1 && n == num)
+       {
+           r = read_grs1(f, o);
+           break;
+       }
+    fclose(f);
+    return r;
+}
+
+bend_fetchresult *bend_fetch(void *handle, bend_fetchrequest *q, int *num)
+{
+    static bend_fetchresult r;
+    static char *bbb = 0;
+
+    r.errstring = 0;
+    r.last_in_set = 0;
+    r.basename = "DUMMY";
+    if (bbb)
+    {
+    xfree(bbb);
+       bbb = 0;
+    }
+    
+    if (q->format == VAL_SUTRS)
+    {
+       char buf[100];
+
+       sprintf(buf, "This is dummy SUTRS record number %d\n", q->number);
+       assert(r.record = bbb = xmalloc(strlen(buf)+1));
+       strcpy(bbb, buf);
+       r.len = strlen(buf);
+    }
+#if 0
+    else if (q->format == VAL_GRS1)
+    {
+       Z_GenericRecord *rec = odr_malloc(q->stream, sizeof(*rec));
+       Z_TaggedElement *t1 = odr_malloc(q->stream, sizeof(*t1));
+       Z_StringOrNumeric *s1 = odr_malloc(q->stream, sizeof(*s1));
+       Z_ElementData *c1 = odr_malloc(q->stream, sizeof(*c1));
+
+       rec->elements = odr_malloc(q->stream, sizeof(Z_TaggedElement*)*10);
+       rec->num_elements = 1;
+       rec->elements[0] = t1 ;
+       t1->tagType = odr_malloc(q->stream, sizeof(int));
+       *t1->tagType = 3;
+       t1->tagValue = s1;
+       s1->which = Z_StringOrNumeric_string;
+       s1->u.string = "title";
+       t1->tagOccurrence = 0;
+       t1->content = c1;
+       c1->which = Z_ElementData_string;
+       c1->u.string = "The Bad Seed and The Ugly Duckling";
+       t1->metaData = 0;
+       t1->appliedVariant = 0;
+       r.record = (char*) rec;
+       r.len = -1;
+    }
+#endif
+    else if (q->format == VAL_GRS1)
+    {
+       r.len = -1;
+       r.record = (char*) dummy_grs_record(q->number, q->stream);
+       if (!r.record)
+       {
+           r.errcode = 13;
+           return &r;
+       }
+    }
+    else if (!(r.record = bbb = dummy_database_record(q->number)))
+    {
+       r.errcode = 13;
+       return &r;
+    }
+    else
+       r.len = strlen(r.record);
+    r.format = q->format;
+    r.errcode = 0;
+    return &r;
+}
+
+bend_deleteresult *bend_delete(void *handle, bend_deleterequest *q, int *num)
+{
+    return 0;
+}
+
+#if 0
+bend_scanresult *bend_scan(void *handle, bend_scanrequest *q, int *num)
+{
+    static struct scan_entry list[200];
+    static char buf[200][200];
+    static bend_scanresult r;
+    int i;
+
+    r.term_position = q->term_position;
+    r.num_entries = q->num_entries;
+    r.entries = list;
+    for (i = 0; i < r.num_entries; i++)
+    {
+       list[i].term = buf[i];
+       sprintf(list[i].term, "term-%d", i+1);
+       list[i].occurrences = rand() % 100000;
+    }
+    r.errcode = 0;
+    r.errstring = 0;
+    return &r;
+}
+#else
+/*
+ * silly dummy-scan what reads words from a file.
+ */
+bend_scanresult *bend_scan(void *handle, bend_scanrequest *q, int *num)
+{
+    static bend_scanresult r;
+    static FILE *f = 0;
+    static struct scan_entry list[200];
+    static char entries[200][80];
+    int hits[200];
+    char term[80], *p;
+    int i, pos;
+
+    r.errstring = 0;
+    r.entries = list;
+    r.status = BEND_SCAN_SUCCESS;
+    if (!f && !(f = fopen("dummy-words", "r")))
+    {
+       perror("dummy-words");
+       exit(1);
+    }
+    if (q->term->term->which != Z_Term_general)
+    {
+       r.errcode = 229; /* unsupported term type */
+       return &r;
+    }
+    if (q->term->term->u.general->len >= 80)
+    {
+       r.errcode = 11; /* term too long */
+       return &r;
+    }
+    if (q->num_entries > 200)
+    {
+       r.errcode = 31;
+       return &r;
+    }
+    memcpy(term, q->term->term->u.general->buf, q->term->term->u.general->len);
+    term[q->term->term->u.general->len] = '\0';
+    for (p = term; *p; p++)
+       if (islower(*p))
+           *p = toupper(*p);
+
+    fseek(f, 0, 0);
+    r.num_entries = 0;
+    for (i = 0, pos = 0; fscanf(f, " %79[^:]:%d", entries[pos], &hits[pos]) == 2;
+       i++, pos < 199 ? pos++ : (pos = 0))
+    {
+       if (!r.num_entries && strcmp(entries[pos], term) >= 0) /* s-point fnd */
+       {
+           if ((r.term_position = q->term_position) > i + 1)
+           {
+               r.term_position = i + 1;
+               r.status = BEND_SCAN_PARTIAL;
+           }
+           for (; r.num_entries < r.term_position; r.num_entries++)
+           {
+               int po;
+
+               po = pos - r.term_position + r.num_entries + 1; /* find pos */
+               if (po < 0)
+                   po += 200;
+               list[r.num_entries].term = entries[po];
+               list[r.num_entries].occurrences = hits[po];
+           }
+       }
+       else if (r.num_entries)
+       {
+           list[r.num_entries].term = entries[pos];
+           list[r.num_entries].occurrences = hits[pos];
+           r.num_entries++;
+       }
+       if (r.num_entries >= q->num_entries)
+           break;
+    }
+    if (feof(f))
+       r.status = BEND_SCAN_PARTIAL;
+    return &r;
+}
+
+#endif
+
+void bend_close(void *handle)
+{
+    return;
+}
+
+typedef struct _Args
+{
+    char **argv;
+    int argc;
+} Args; 
+
+static Args ArgDetails;
+
+/* name of the executable */
+#define SZAPPNAME            "server"
+
+/* internal name of the service */
+#define SZSERVICENAME        "Z3950 Test Server"
+
+/* displayed name of the service */
+#define SZSERVICEDISPLAYNAME "Z3950 Test Server"
+
+/* list of service dependencies - "dep1\0dep2\0\0" */
+#define SZDEPENDENCIES       ""
+
+int main(int argc, char **argv)
+{
+    /* Lets setup the Arg structure */
+    ArgDetails.argc = argc;
+    ArgDetails.argv = argv;
+
+#ifdef WIN32
+
+    /* Now setup the service with the service controller */
+    SetupService(argc, argv, &ArgDetails, SZAPPNAME, SZSERVICENAME, SZSERVICEDISPLAYNAME, SZDEPENDENCIES);
+
+#else /* WIN32 */
+
+    /* The service controller does the following for us under windows */
+    if (StartAppService(NULL, argc, argv))
+        RunAppService(NULL);
+
+    /* Ensure the service has been stopped */
+    StopAppService(NULL);
+
+#endif /* WIN32 */
+
+    return(0);
+}
+
+int StartAppService(void *pHandle, int argc, char **argv)
+{
+    /* Initializes the App */
+    return 1;
+}
+
+void RunAppService(void *pHandle)
+{
+    Args *pArgs = (Args *)pHandle;
+
+    /* Starts the app running */
+    statserv_main(pArgs->argc, pArgs->argv);
+}
+
+void StopAppService(void *pHandle)
+{
+    /* Stops the app */
+    statserv_closedown();
+}
diff --git a/ztest/ztest.dsp b/ztest/ztest.dsp
new file mode 100644 (file)
index 0000000..c7a0405
--- /dev/null
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="ztest" - Package Owner=<4>\r
+# Microsoft Developer Studio Generated Build File, Format Version 5.00\r
+# ** DO NOT EDIT **\r
+\r
+# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
+\r
+CFG=ztest - Win32 Debug\r
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
+!MESSAGE use the Export Makefile command and run\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "ztest.mak".\r
+!MESSAGE \r
+!MESSAGE You can specify a configuration when running NMAKE\r
+!MESSAGE by defining the macro CFG on the command line. For example:\r
+!MESSAGE \r
+!MESSAGE NMAKE /f "ztest.mak" CFG="ztest - Win32 Debug"\r
+!MESSAGE \r
+!MESSAGE Possible choices for configuration are:\r
+!MESSAGE \r
+!MESSAGE "ztest - Win32 Release" (based on "Win32 (x86) Console Application")\r
+!MESSAGE "ztest - Win32 Debug" (based on "Win32 (x86) Console Application")\r
+!MESSAGE \r
+\r
+# Begin Project\r
+# PROP Scc_ProjName ""\r
+# PROP Scc_LocalPath ""\r
+CPP=cl.exe\r
+RSC=rc.exe\r
+\r
+!IF  "$(CFG)" == "ztest - Win32 Release"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 0\r
+# PROP BASE Output_Dir "Release"\r
+# PROP BASE Intermediate_Dir "Release"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 0\r
+# PROP Output_Dir "Release"\r
+# PROP Intermediate_Dir "Release"\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
+# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "WINDOWS" /FD /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE RSC /l 0x406 /d "NDEBUG"\r
+# ADD RSC /l 0x406 /d "NDEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib yaz.lib server.lib /nologo /subsystem:console /machine:I386\r
+\r
+!ELSEIF  "$(CFG)" == "ztest - Win32 Debug"\r
+\r
+# PROP BASE Use_MFC 0\r
+# PROP BASE Use_Debug_Libraries 1\r
+# PROP BASE Output_Dir "Debug"\r
+# PROP BASE Intermediate_Dir "Debug"\r
+# PROP BASE Target_Dir ""\r
+# PROP Use_MFC 0\r
+# PROP Use_Debug_Libraries 1\r
+# PROP Output_Dir "Debug"\r
+# PROP Intermediate_Dir "Debug"\r
+# PROP Ignore_Export_Lib 0\r
+# PROP Target_Dir ""\r
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "WINDOWS" /FR /FD /c\r
+# SUBTRACT CPP /YX\r
+# ADD BASE RSC /l 0x406 /d "_DEBUG"\r
+# ADD RSC /l 0x406 /d "_DEBUG"\r
+BSC32=bscmake.exe\r
+# ADD BASE BSC32 /nologo\r
+# ADD BSC32 /nologo\r
+LINK32=link.exe\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib yaz.lib server.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+\r
+!ENDIF \r
+\r
+# Begin Target\r
+\r
+# Name "ztest - Win32 Release"\r
+# Name "ztest - Win32 Debug"\r
+# Begin Source File\r
+\r
+SOURCE=".\read-grs.c"\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\service.c\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\service.h\r
+# End Source File\r
+# Begin Source File\r
+\r
+SOURCE=.\ztest.c\r
+# End Source File\r
+# End Target\r
+# End Project\r