home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / bibview / part03 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  50.2 KB

  1. Path: uunet!dtix!darwin.sura.net!mips!msi!dcmartin
  2. From: liebla@informatik.tu-muenchen.de (Armin Liebl)
  3. Newsgroups: comp.sources.x
  4. Subject: v18i101: bibview - BibTeX GUI, Part03/20
  5. Message-ID: <1992Aug27.161403.25226@msi.com>
  6. Date: 27 Aug 92 16:14:03 GMT
  7. References: <csx-18i099-bibview@uunet.UU.NET>
  8. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  9. Organization: Molecular Simulations, Inc.
  10. Lines: 1731
  11. Approved: dcmartin@msi.com
  12. Originator: dcmartin@fascet
  13.  
  14. Submitted-by: Armin Liebl <liebla@informatik.tu-muenchen.de>
  15. Posting-number: Volume 18, Issue 101
  16. Archive-name: bibview/part03
  17.  
  18. #!/bin/sh
  19. # this is part.03 (part 3 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file Makefile continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 3; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping Makefile'
  37. else
  38. echo 'x - continuing file Makefile'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'Makefile' &&
  40. X         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  41. X      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  42. X
  43. # $XConsortium: sunLib.tmpl,v 1.11 91/07/31 11:32:08 rws Exp $
  44. X
  45. SHLIBLDFLAGS = -b
  46. PICFLAGS = +Z
  47. X
  48. X  DEPEXTENSIONLIB =
  49. X     EXTENSIONLIB = -lXext
  50. X
  51. X          DEPXLIB = $(DEPEXTENSIONLIB)
  52. X             XLIB = $(EXTENSIONLIB) -lX11
  53. X
  54. X        DEPXMULIB = $(USRLIBDIR)/libXmu.sl
  55. X           XMULIB = -lXmu
  56. X
  57. X       DEPOLDXLIB =
  58. X          OLDXLIB = -loldX
  59. X
  60. X      DEPXTOOLLIB = $(USRLIBDIR)/libXt.sl
  61. X         XTOOLLIB = -lXt
  62. X
  63. X        DEPXAWLIB = $(USRLIBDIR)/libXaw.sl
  64. X           XAWLIB = -lXaw
  65. X
  66. X        DEPXILIB =
  67. X           XILIB = -lXi
  68. X
  69. X        SOXLIBREV = SharedXlibRev
  70. X          SOXTREV = SharedXtRev
  71. X         SOXAWREV = SharedXawRev
  72. X        SOOLDXREV = SharedOldXRev
  73. X         SOXMUREV = SharedXmuRev
  74. X        SOXEXTREV = SharedXextRev
  75. X      SOXINPUTREV = SharedXinputRev
  76. X
  77. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  78. X         XAUTHLIB =  -lXau
  79. X      DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a
  80. X         XDMCPLIB =  -lXdmcp
  81. X
  82. X        DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a
  83. X           PHIGSLIB =  -lphigs
  84. X
  85. X       DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a
  86. X          XBSDLIB =  -lXbsd
  87. X
  88. X LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln
  89. X         LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln
  90. X          LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln
  91. X        LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln
  92. X          LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln
  93. X           LINTXI = $(LINTLIBDIR)/llib-lXi.ln
  94. X        LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln
  95. X
  96. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  97. X
  98. X         DEPLIBS1 = $(DEPLIBS)
  99. X         DEPLIBS2 = $(DEPLIBS)
  100. X         DEPLIBS3 = $(DEPLIBS)
  101. X
  102. # -------------------------------------------------------------------------
  103. # Imake rules for building libraries, programs, scripts, and data files
  104. # rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
  105. X
  106. # -------------------------------------------------------------------------
  107. # start of Imakefile
  108. X
  109. #
  110. # bibView
  111. #
  112. #
  113. X
  114. SYS_LIBRARIES = -lm
  115. CDEBUGFLAGS =
  116. X
  117. DEFINES = -D_HPUX_SOURCE 
  118. SYS_LIBRARIES = -lm
  119. CDEBUGFLAGS =
  120. CC = cc -Aa
  121. # 18
  122. X
  123. LOCAL_LIBRARIES = -lc $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  124. DEPLIBS = $(DEPXLIB)
  125. X
  126. SRCS=    bibview.c FileNom.c gui_main.c ctl_open.c ctl_opt.c\
  127. X    gui_bibl.c gui_help.c ctl_srch.c gui_widg.c ctl_save.c\
  128. X    gui_list.c gui_card.c ctl_card.c ctl_serv.c\
  129. X    db_tree.c bib_file.c globdata.c bib_flex.c\
  130. X    ComboBo.c rc_file.c ctl_prt.c gui_edit.c
  131. OBJS=    bibview.o FileNom.o gui_main.o ctl_open.o ctl_opt.o\
  132. X    gui_bibl.o gui_help.o ctl_srch.o gui_widg.o ctl_save.o\
  133. X    gui_list.o gui_card.o ctl_card.o ctl_serv.o\
  134. X    db_tree.o bib_file.o globdata.o bib_flex.o\
  135. X    ComboBo.o rc_file.o ctl_prt.o gui_edit.o
  136. X
  137. PROGRAMS = bibview
  138. all::  $(PROGRAMS)
  139. X
  140. X PROGRAM = bibview
  141. X
  142. all:: bibview
  143. X
  144. bibview: $(OBJS) $(DEPLIBS)
  145. X    if [ -f $@ ]; then $(RM) $@~; $(MV) $@ $@~; fi
  146. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  147. X
  148. install:: bibview
  149. X    @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  150. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  151. X    $(INSTALL) -c $(INSTPGMFLAGS)  bibview $(DESTDIR)$(BINDIR)
  152. X
  153. install.man:: bibview.man
  154. X    @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  155. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  156. X    $(INSTALL) -c $(INSTMANFLAGS) bibview.man $(DESTDIR)$(MANDIR)/bibview.$(MANSUFFIX)
  157. X
  158. depend::
  159. X    $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  160. X
  161. lint:
  162. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  163. lint1:
  164. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  165. X
  166. clean::
  167. X    $(RM) $(PROGRAM)
  168. X
  169. # -------------------------------------------------------------------------
  170. # common rules for all Makefiles - do not edit
  171. X
  172. emptyrule::
  173. X
  174. clean::
  175. X    $(RM_CMD) "#"*
  176. X
  177. Makefile::
  178. X    -@if [ -f Makefile ]; then set -x; \
  179. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  180. X    else exit 0; fi
  181. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  182. X
  183. tags::
  184. X    $(TAGS) -w *.[ch]
  185. X    $(TAGS) -xw *.[ch] > TAGS
  186. X
  187. # -------------------------------------------------------------------------
  188. # empty rules for directories that do not have SUBDIRS - do not edit
  189. X
  190. install::
  191. X    @echo "install in $(CURRENT_DIR) done"
  192. X
  193. install.man::
  194. X    @echo "install.man in $(CURRENT_DIR) done"
  195. X
  196. Makefiles::
  197. X
  198. includes::
  199. X
  200. # -------------------------------------------------------------------------
  201. # dependencies generated by makedepend
  202. X
  203. SHAR_EOF
  204. echo 'File Makefile is complete' &&
  205. chmod 0640 Makefile ||
  206. echo 'restore of Makefile failed'
  207. Wc_c="`wc -c < 'Makefile'`"
  208. test 10445 -eq "$Wc_c" ||
  209.     echo 'Makefile: original size 10445, current size' "$Wc_c"
  210. rm -f _shar_wnt_.tmp
  211. fi
  212. # ============= bibview.1 ==============
  213. if test -f 'bibview.1' -a X"$1" != X"-c"; then
  214.     echo 'x - skipping bibview.1 (File already exists)'
  215.     rm -f _shar_wnt_.tmp
  216. else
  217. > _shar_wnt_.tmp
  218. echo 'x - extracting bibview.1 (Text)'
  219. sed 's/^X//' << 'SHAR_EOF' > 'bibview.1' &&
  220. .TH BIBVIEW 1 "Jul 1992"
  221. .SH NAME
  222. bibview \- 
  223. an X based graphical user interface for manipulating BiBTeX databases 
  224. .SH SYNOPSIS
  225. \fBbibview  [standard options] [-file <bib file>] [-rcfile <conf file>]  \fP 
  226. .SH DESCRIPTION
  227. X     
  228. \fIBibview\fR facilitates the manipulation of BiBTeX databases (in the 
  229. following called BiB). It supports the user in making new entries,
  230. searching for entries and moving entries from one BiB to another.
  231. It is possible to work with more than one BiB simultaneously. 
  232. .br
  233. There are six types of windows in \fIbibview\fR:
  234. .br
  235. The \fImain window\fR contains menus for customizing \fIbibview\fR and
  236. for working with BiBs on the file level.
  237. .br
  238. The \fIbibliography window\fR (one for every open BiB) contains commands
  239. for manipulating the BiB.
  240. .br
  241. The \fIlist window\fR (at most one for every open BiB) shows a list of
  242. entries. It displays the fields author, title, type and year.
  243. .br
  244. The \fIcard window\fR (at most one for every entry) helps editing an entry. 
  245. It contains boxes for each field of the entry (according to the type).
  246. The fields can be edited by putting the mouse cursor into the field.
  247. Macros in fields and the symbol for concatenation ('#') are marked
  248. by a preceding '@'. The required fields are marked by bold lines.
  249. A card window is displayed after clicking an entry in the list menu
  250. (left mouse button) or selecting a type in the `New` menu of a
  251. bibliography window.
  252. .br
  253. The \fImacro window\fR (at most one for every open BiB) helps editing 
  254. the STRING and PREAMBLE parts of a BiB. 
  255. .br
  256. The \fIerror window\fR (at most one for every BiB) is displayed
  257. if a BiB cannot be opened because of syntax errors. The line with
  258. the error is marked. The file can be edited and opened again.
  259. X
  260. .SH Main Window
  261. X
  262. The \fImain window\fR is displayed at the start of \fIbibview\fR.
  263. It offers the following menus.
  264. .br
  265. \fBFile\fR:  Load and save BiBs. For choosing a name a file select box 
  266. is displayed
  267. .br
  268. \fINew\fR - Create a new BiB.
  269. .br
  270. \fIOpen\fR - Read an existing BiB.
  271. .br
  272. \fIClose\fR - Close an open BiB.
  273. .br
  274. \fISave\fR -  Save an open BiB.
  275. .br
  276. \fISave as\fR -  Save an open BiB and select a new name for it.
  277. .br
  278. \fIQuit\fR - Quit a bibview session.
  279. .br
  280. X
  281. \fBServices\fR:
  282. .br
  283. \fIConsistency Check\fR - Entries that don't contain all required fields
  284. for that type are shown in the list window. (More sophisticated tests
  285. should be implemented.)
  286. .br
  287. \fIUnify\fR - Insert all entries of one BiB in another. Entries with
  288. conflicting types are ignored.
  289. .br
  290. \fIPrint\fR - A LaTeX file with the entries of a BiB is created. 
  291. .br
  292. \fIEdit Macros\fR - Open \fImacro window\fR for editing the macros of a BiB.
  293. .br
  294. \fILoad Configuration\fR - Load a configuration file. 
  295. X
  296. \fBOptions\fR: Change default options
  297. .br
  298. \fIBeep on Errors\fR - Beep in case of an error (default: TRUE).
  299. .br
  300. \fIBackup\fR - Before writing a BiB on disk, a backup of the file with the
  301. ending '.bak' is created (default: TRUE).
  302. .br
  303. \fIIcons on Desktop\fR - Icons of list and card windows are layed down
  304. on the corresponding bibliography window (default: FALSE). This option 
  305. doesn't work with all window managers.
  306. .br
  307. \fIAutom. Check\fR - A consistency check takes place if a new BiB is
  308. loaded (default: TRUE).
  309. .br
  310. \fIRequired Fields\fR - An entry can only be saved if it contains all
  311. fields required by BiBTeX (default: FALSE).
  312. X               
  313. \fBWindow\fR: 
  314. .br
  315. \fICascade\fR - The windows belonging to the same BiB (bibliography window,
  316. macro window, card windows) are grouped together. This doesn't work with
  317. all window managers.
  318. X
  319. \fBHelp\fR:
  320. .br 
  321. Help texts are offered to the following topics:
  322. .br
  323. \fISurvey\fR
  324. .br
  325. \fIMain Window\fR
  326. .br
  327. \fIBibliography Window\fR
  328. .br
  329. \fIList Window\fR
  330. .br
  331. \fICard Window\fR
  332. .br
  333. \fIMacro and Error Window\fR
  334. .br
  335. \fIProgram Info\fR
  336. X
  337. .SH Bibliography Window
  338. X
  339. The menu bar of the bibliography window contains functions for
  340. manipulating the corresponding BiB:
  341. X
  342. \fBNew\fR: 
  343. .br 
  344. Create a new entry. The type of the entry must be chosen
  345. from a pulldown menu.
  346. .br
  347. \fBSearch\fR: 
  348. .br
  349. Search for all entries that fullfill certain conditions. A window is displayed
  350. in which for every field a regular expression can be entered. The result of
  351. the search (the entries that match all regular expressions) is shown
  352. in the list window.
  353. .br
  354. \fBList\fR:
  355. .br
  356. All entries of the BiB are shown in the \fIlist window\fR. The \fIcard 
  357. window\fR is displayed after clicking the corresponding entry.
  358. .br
  359. \fBMacros\fR: 
  360. .br
  361. The \fImacro window\fR for editing STRING und PREAMBLE macros is
  362. displayed.
  363. .br
  364. \fBPrint\fR:
  365. .br
  366. A LaTeX file with the entries of the list is created
  367. .br
  368. \fBSave\fR: 
  369. .br
  370. Save the BiB on disk. The BiB remains loaded.
  371. .br
  372. \fBClose\fR:
  373. .br
  374. Close the BiB.
  375. X
  376. .SH List Window
  377. The \fIlist window\fR is displayed after clicking the menu 
  378. item \fIlist\fR of the bibliography window, as result of a search
  379. or as result of a consistency check. The menu bar of the \fIlist window\fR
  380. offers the following commands:
  381. .br
  382. \fBPrint\fR:
  383. .br
  384. A LaTeX file with the entries of the list is created.
  385. .br
  386. \fBSave\fR:
  387. .br
  388. The entries of the list are saved as a new BiB.
  389. .br
  390. \fBClose\fR:
  391. .br
  392. The \fIlist\fR window is closed.
  393. X
  394. .SH Card Window
  395. X
  396. The menu bar of the \fIcard window\fR offers the following commands:
  397. .br
  398. \fBUser Data\fR: 
  399. .br
  400. The \fIcard window\fR is extended with the
  401. fields defined by the user.
  402. .br
  403. \fBAnnote\fR: 
  404. .br
  405. The annote field of an entry can be edited in a window.
  406. .br
  407. \fBDelete\fR: 
  408. .br
  409. The entry is deleted from the BiB.
  410. .br
  411. \fBSave\fR: 
  412. .br
  413. The entry is saved in the BiB.
  414. .br
  415. \fBCopy\fR: 
  416. .br
  417. The entry is copied into another BiB.
  418. .br
  419. \fBClose\fR: 
  420. .br
  421. Close the \fIcard window\fR.
  422. X
  423. .SH Macro Window
  424. X
  425. The menu bar of the \fImacro window\fR offers the following commands:
  426. .br
  427. \fBSave\fR: 
  428. .br
  429. Save the macros and preambles of the \fImacro window\fR.
  430. .br
  431. \fBClose\fR: 
  432. .br
  433. Close the \fImacro window\fR.
  434. X
  435. .SH Error Window
  436. X
  437. The menu bar of the \fIerror window\fR offers the following commands:
  438. .br
  439. \fBSave\fR: 
  440. .br
  441. Save the content of the \fIerror window\fR.
  442. .br
  443. \fBClose\fR: 
  444. .br
  445. Close the \fIerror window\fR.
  446. X
  447. X
  448. .SH Configuration File
  449. X
  450. With the configuration file it is possible to customize \fIbibview\fR.
  451. The standard configuration file is the file \fI.bibviewrc\fR in the
  452. home directory of the user. The configuration file contains
  453. a part for setting the default options [Options], define 
  454. additional fields for certain entries [Fields], define data for
  455. a search [Predefines] and define header [LatexHeader] und footer
  456. [LatexFooter] for LaTeX file. An example is given in the file
  457. \fIbibviewrc\fR of this distribution. The Options part is not
  458. evaluated if a configuration file is loaded by 'Load Configuration'.
  459. X
  460. .SH Resource File
  461. X
  462. The resources (width and height of windows, foreground, colours,
  463. texts,...) can bei customized with a file \fIBibView\fR in the
  464. home directory. A sample file is included.
  465. X
  466. .SH OPTIONS
  467. X
  468. \fBstandard options\fR:
  469. .br
  470. The standard options are
  471. -display, -geometry, -iconic and others.
  472. .br
  473. \fB-file <bib file>\fR:
  474. .br
  475. The BiBTeX database <bib file> is loaded at the start of \fIbibview\fR.
  476. .br
  477. \fB-rcfile <configuration file>\fR:
  478. .br
  479. Instead of \fI.bibviewrc\fR in the home directory
  480. the file <configuration file> is used.
  481. X
  482. .SH LIMITATIONS
  483. Because of a bug in the Athena List Widget there are problems
  484. with files with more than ca. 1000 entries. 
  485. The \fIconsistency check\fR is not sophisticated enough.
  486. Entries are sorted only by BiBTeX key.
  487. .br
  488. Ideas for more features are welcome.
  489. X
  490. .SH COPYRIGHT
  491. Copyright 1992 Technische Universitaet Muenchen
  492. X
  493. .SH AUTHORS
  494. Holger Martin, Peter Urban and Armin Liebl.
  495. .br
  496. Send bug reports and ideas for enhancement to
  497. liebla@informatik.tu-muenchen.de 
  498. X
  499. SHAR_EOF
  500. chmod 0640 bibview.1 ||
  501. echo 'restore of bibview.1 failed'
  502. Wc_c="`wc -c < 'bibview.1'`"
  503. test 7641 -eq "$Wc_c" ||
  504.     echo 'bibview.1: original size 7641, current size' "$Wc_c"
  505. rm -f _shar_wnt_.tmp
  506. fi
  507. # ============= b.tab.h ==============
  508. if test -f 'b.tab.h' -a X"$1" != X"-c"; then
  509.     echo 'x - skipping b.tab.h (File already exists)'
  510.     rm -f _shar_wnt_.tmp
  511. else
  512. > _shar_wnt_.tmp
  513. echo 'x - extracting b.tab.h (Text)'
  514. sed 's/^X//' << 'SHAR_EOF' > 'b.tab.h' &&
  515. # define STRING 257
  516. # define PREAMBLE 258
  517. # define ARTICLE 259
  518. # define BOOK 260
  519. # define BOOKLET 261
  520. # define CONFERENCE 262
  521. # define INBOOK 263
  522. # define INCOLLECTION 264
  523. # define INPROCEEDINGS 265
  524. # define MANUAL 266
  525. # define MASTERSTHESIS 267
  526. # define MISC 268
  527. # define PHDTHESIS 269
  528. # define PROCEEDINGS 270
  529. # define TECHREPORT 271
  530. # define UNPUBLISHED 272
  531. # define KOMMA 273
  532. # define EQ 274
  533. # define LGKL 275
  534. # define RGKL 276
  535. # define LRKL 277
  536. # define RRKL 278
  537. # define DAZ 279
  538. # define ZAUN 280
  539. # define ZEICHEN 281
  540. # define WHITE_SPACE 282
  541. # define BUCHSTABE_ZAHL 283
  542. SHAR_EOF
  543. chmod 0644 b.tab.h ||
  544. echo 'restore of b.tab.h failed'
  545. Wc_c="`wc -c < 'b.tab.h'`"
  546. test 577 -eq "$Wc_c" ||
  547.     echo 'b.tab.h: original size 577, current size' "$Wc_c"
  548. rm -f _shar_wnt_.tmp
  549. fi
  550. # ============= bib_file.c ==============
  551. if test -f 'bib_file.c' -a X"$1" != X"-c"; then
  552.     echo 'x - skipping bib_file.c (File already exists)'
  553.     rm -f _shar_wnt_.tmp
  554. else
  555. > _shar_wnt_.tmp
  556. echo 'x - extracting bib_file.c (Text)'
  557. sed 's/^X//' << 'SHAR_EOF' > 'bib_file.c' &&
  558. #ifdef __cplusplus
  559. X   #include <stdio.h>
  560. X   extern "C" {
  561. X     extern void yyerror(char *);
  562. X     extern int yylex();
  563. X   }
  564. #endif    /* __cplusplus */ 
  565. #include <stdio.h>
  566. #include <ctype.h>
  567. #include <X11/Intrinsic.h>
  568. #include <unistd.h>
  569. #include "bibview.h"
  570. X
  571. X
  572. #define YYSTYPE char
  573. X
  574. #define __RUNTIME_YYMAXDEPTH
  575. #define YYMAXDEPTH 1000
  576. X
  577. #define MAX_UEBERGABE  20000
  578. X
  579. char uebergabe[MAX_UEBERGABE];
  580. int ueIdx = 0;
  581. X
  582. FILE *tempDatei;
  583. extern FILE *yyin;
  584. extern YY_NEW_FILE;
  585. extern int yy_init;
  586. X
  587. typedef struct _Snode {
  588. X                       char inh;
  589. X                       int slen;
  590. X                       struct _Snode *next;
  591. } Snode;
  592. X
  593. /*******************************************/
  594. /* Globale Variablen                       */
  595. /*******************************************/
  596. X
  597. static Snode *key = NULL;            
  598. static Snode *fldname = NULL;       
  599. static Snode *fldcont = NULL;      
  600. X
  601. static CardData *card = NULL;
  602. static UserFld *helpufield = NULL;
  603. static String helpFldName = NULL;
  604. static Errcode err;
  605. static int glbtreeIdx;
  606. static int beginIdx;
  607. int yynline;
  608. int yynflexcalls;
  609. int yynerrs;
  610. /*******************************************/
  611. /* Lokale Funktionen                       */
  612. /*******************************************/
  613. X
  614. static void PushSign(Snode **w, char a);
  615. static void AppendSign(Snode **w, char a);
  616. static void FreeStack(Snode **s);
  617. static void StackToString(Snode *s, char **text); 
  618. static void GetKey();
  619. static void GetFldNameCont();
  620. X
  621. static Errcode Scalloc(String *s1, String s2);
  622. static char * Sncalloc(char *s2, int von, int bis);
  623. static int SetInputFile(char *file);
  624. static int SkipSpace(char *text, Snode **new);
  625. static int SkipNewLineSpace(char *text);
  626. static void StrToLower(char *text);
  627. static int StringIsPeteEmpty(char *text);
  628. static void WriteRecToFile(CardData *card, FILE *datei);
  629. static long WriteLineToFile(FILE *datei, char *feld, char *inh);
  630. static int ItIsBibFile(char *dateiName);
  631. # define STRING 257
  632. # define PREAMBLE 258
  633. # define ARTICLE 259
  634. # define BOOK 260
  635. # define BOOKLET 261
  636. # define CONFERENCE 262
  637. # define INBOOK 263
  638. # define INCOLLECTION 264
  639. # define INPROCEEDINGS 265
  640. # define MANUAL 266
  641. # define MASTERSTHESIS 267
  642. # define MISC 268
  643. # define PHDTHESIS 269
  644. # define PROCEEDINGS 270
  645. # define TECHREPORT 271
  646. # define UNPUBLISHED 272
  647. # define KOMMA 273
  648. # define EQ 274
  649. # define LGKL 275
  650. # define RGKL 276
  651. # define LRKL 277
  652. # define RRKL 278
  653. # define DAZ 279
  654. # define ZAUN 280
  655. # define ZEICHEN 281
  656. # define WHITE_SPACE 282
  657. # define BUCHSTABE_ZAHL 283
  658. #define yyclearin yychar = -1
  659. #define yyerrok yyerrflag = 0
  660. extern int yychar;
  661. #ifndef YYMAXDEPTH
  662. #define YYMAXDEPTH 150
  663. #endif
  664. X
  665. /* __YYSCLASS defines the scoping/storage class for global objects
  666. X * that are NOT renamed by the -p option.  By default these names
  667. X * are going to be 'static' so that multi-definition errors
  668. X * will not occur with multiple parsers.
  669. X * If you want (unsupported) access to internal names you need
  670. X * to define this to be null so it implies 'extern' scope.
  671. X * This should not be used in conjunction with -p.
  672. X */
  673. #ifndef __YYSCLASS
  674. # define __YYSCLASS static
  675. #endif
  676. #ifndef YYSTYPE
  677. #define YYSTYPE int
  678. #endif
  679. YYSTYPE yylval;
  680. __YYSCLASS YYSTYPE yyval;
  681. typedef int yytabelem;
  682. # define YYERRCODE 256
  683. X
  684. X
  685. static void StrToLower(char *text)
  686. {
  687. X while (*text != '\0') {
  688. X   *text++ = tolower(*text);
  689. X }
  690. }
  691. X
  692. X
  693. X
  694. static int SkipNewLineSpace(char *text)
  695. X int erg, back;
  696. X
  697. X erg = 0;
  698. X while (erg < MAX_UEBERGABE) {
  699. X   if (*text == '{' ||  *text == '(') {
  700. X     back = strlen(text);
  701. X     text = text + back;
  702. X     while (*text != '}' && *text != ')') { 
  703. X       *text = '\0';
  704. X       text--;
  705. X     }
  706. X     return erg;
  707. X   }
  708. X   text++;
  709. X   erg++;
  710. X }
  711. X return 0;
  712. }
  713. X
  714. X
  715. X
  716. X
  717. static int SkipSpace(char *text, Snode **new)
  718. {
  719. X int erg, lgkl, daz, index, inmakro;
  720. X index = 0;
  721. X lgkl = 0;
  722. X daz = 0;
  723. X inmakro = 0;
  724. X
  725. X while ((*text == ' ' || *text == '=' || *text == '\t') && index < ueIdx) { text++; index++; }
  726. X erg = index;
  727. X if (*text == '{') {
  728. X   lgkl += 1;
  729. X   index++;
  730. X   text++; 
  731. X   inmakro = 0;
  732. X }
  733. X else if (*text == '"') {
  734. X   daz += 1;
  735. X   index++;
  736. X   text++; 
  737. X   inmakro = 0;
  738. X }
  739. X else {
  740. X   AppendSign(new, '@');
  741. X   AppendSign(new, *text);
  742. X   index++;
  743. X   text++; 
  744. X   inmakro = 1;
  745. X }
  746. X while (index < ueIdx) {
  747. X   if (*text == '{') {
  748. X     if (lgkl >= 1 || daz >= 1) {  /* Klammer in String */
  749. X       AppendSign(new, *text);
  750. X     }
  751. X     text++;                       /* Klammer nach Zaun */
  752. X     index++;
  753. X     lgkl += 1;
  754. X     inmakro = 0;
  755. X   }
  756. X   else if (*text == '}') {
  757. X     if ((lgkl > 1) || (daz >= 1)) {
  758. X       AppendSign(new, *text);
  759. X     } 
  760. X     text++;
  761. X     index++;
  762. X     lgkl -= 1;
  763. X     inmakro = 0;
  764. X   }
  765. X   else if (*text == '"') {
  766. X     if (lgkl >= 1) {
  767. X       AppendSign(new, *text);
  768. X       text++;
  769. X       index++;
  770. X     } 
  771. X     else {
  772. X       text++;
  773. X       index++;
  774. X       if (daz == 0) daz++;
  775. X       else daz = 0;
  776. X     }
  777. X     inmakro = 0;
  778. X   }
  779. X   else if (*text == '#') {        /* Space vor/nach Konkatenation */
  780. X     if (lgkl < 1 && daz < 1) {
  781. X       if (text[index-1] != ' ') AppendSign(new, ' ');
  782. X       AppendSign(new, '@');       /* # -> @# */
  783. X       AppendSign(new, *text);
  784. X       if (text[index+1] != ' ') AppendSign(new, ' ');
  785. X     }
  786. X     else {                        /* Konkatenation in String */
  787. X       AppendSign(new, *text);
  788. X     }
  789. X     text++;
  790. X     index++;
  791. X     inmakro = 0;
  792. X   } 
  793. X   else if (*text == ',') {        /* Komma am Ende */
  794. X     if (lgkl < 1 && daz != 1) break;
  795. X     else {
  796. X       AppendSign(new, *text);
  797. X       text++;
  798. X       index++;
  799. X     }
  800. X     inmakro = 0;
  801. X   }
  802. X   else if (*text == ')') {        /* runde Klammer am Ende */
  803. X     if (lgkl < 1 && daz != 1) break;
  804. X     else {
  805. X       AppendSign(new, *text);
  806. X       text++;
  807. X       index++;
  808. X     }
  809. X     inmakro = 0;
  810. X   }
  811. X   else if (isalnum(*text)) {
  812. X     if (lgkl < 1 && daz < 1 && (inmakro==0)) {
  813. X       if (text[index-1] != ' ') AppendSign(new, ' ');
  814. X       AppendSign(new, '@');       /* makro -> @makro */
  815. X       AppendSign(new, *text);
  816. X       inmakro = 1;
  817. X     }
  818. X     else {                        /* Zeichen in String */
  819. X       AppendSign(new, *text);
  820. X     }
  821. X     text++;
  822. X     index++;
  823. X   } 
  824. X   else {                        /* sonstiges Zeichen in String */
  825. X     AppendSign(new, *text);
  826. X     text++;
  827. X     index++;
  828. X     inmakro = 0;
  829. X   } 
  830. X }
  831. X return erg;
  832. X  
  833. }
  834. X
  835. X
  836. static void PushSign(Snode **w, char a)
  837. {
  838. X Snode *hnode, *oldw;
  839. X
  840. X if (*w == NULL) {
  841. X   hnode = (Snode *)calloc(1,sizeof(Snode));
  842. X   hnode->inh = a;
  843. X   hnode->slen = 1;
  844. X   hnode->next = NULL;
  845. X   *w = hnode;
  846. X }
  847. X else {
  848. X   oldw = *w; 
  849. X   hnode = (Snode *)calloc(1,sizeof(Snode));
  850. X   hnode->inh = a;
  851. X   hnode->slen = oldw->slen + 1;
  852. X   hnode->next = oldw;
  853. X   *w = hnode;
  854. }
  855. }
  856. X
  857. X
  858. static void AppendSign(Snode **w, char a)
  859. {
  860. X Snode *hnode, *oldw;
  861. X int newslen;
  862. X
  863. X if (*w == NULL) {
  864. X   hnode = (Snode *)calloc(1,sizeof(Snode));
  865. X   hnode->inh = a;
  866. X   hnode->slen = 1;
  867. X   hnode->next = NULL;
  868. X   *w = hnode;
  869. X }
  870. X else {
  871. X   oldw = *w; 
  872. X   newslen = 1;
  873. X   while (oldw->next != NULL) {
  874. X     newslen++; 
  875. X     oldw = oldw->next;
  876. X   }
  877. X   newslen++; 
  878. X   hnode = (Snode *)calloc(1,sizeof(Snode));
  879. X   hnode->inh = a;
  880. X   hnode->slen = 1;
  881. X   hnode->next = NULL;
  882. X   oldw->next = hnode;
  883. X   oldw = *w; 
  884. X   oldw->slen = newslen;      /* echte Laenge nur im 1. El. */
  885. }
  886. }
  887. X
  888. X
  889. static void FreeStack(Snode **s)
  890. {
  891. X Snode *h, *del;
  892. X
  893. X del = *s;
  894. X while (del != NULL) {
  895. X   h = del->next;
  896. X   free(del);
  897. X   del = h;
  898. X }
  899. X *s = NULL;
  900. X
  901. X
  902. static void StackToString(Snode *s, char **text) 
  903. {
  904. X  char *help;
  905. X
  906. X  help = (char *)calloc(1,s->slen+1);
  907. X  *text = help;
  908. X  while (s != NULL) {
  909. X    *help = s->inh; 
  910. X    s = s->next;
  911. X    help++;
  912. X  }
  913. X  *help = '\0';
  914. X  help--;
  915. X  while (*help == '\n') {    /* NL am Ende vom Wort loeschen */
  916. X    *help = '\0';
  917. X    help--;
  918. X  }
  919. }
  920. X
  921. X
  922. X
  923. static void GetKey()
  924. {
  925. X  StackToString(key, &card->mainkey);
  926. X  FreeStack(&key);
  927. X  err = dbtInsert(glbtreeIdx, card);
  928. X  err = dbtDeleteCard(&card);
  929. }
  930. X
  931. X
  932. static void GetFldNameCont()
  933. {
  934. X  int anf, i;
  935. X  
  936. X  if (helpFldName != NULL) {
  937. X    free(helpFldName);
  938. X    helpFldName = NULL;
  939. X  }
  940. X  StackToString(fldname, &helpFldName);
  941. X  StrToLower(helpFldName); 
  942. X  anf = SkipSpace(uebergabe, &fldcont);
  943. X
  944. X  if (strcmp(helpFldName, "address") == 0) {
  945. X    StackToString(fldcont, &card->address);
  946. X  } 
  947. X  else if (strcmp(helpFldName, "annote") == 0) {
  948. X    StackToString(fldcont, &card->annote);
  949. X  } 
  950. X  else if (strcmp(helpFldName, "author") == 0) {
  951. X    StackToString(fldcont, &card->author);
  952. X  } 
  953. X  else if (strcmp(helpFldName, "booktitle") == 0) {
  954. X    StackToString(fldcont, &card->booktitle);
  955. X  } 
  956. X  else if (strcmp(helpFldName, "chapter") == 0) {
  957. X    StackToString(fldcont, &card->chapter);
  958. X  } 
  959. X  else if (strcmp(helpFldName, "crossref") == 0) {
  960. X    StackToString(fldcont, &card->crossref);
  961. X  }
  962. X  else if (strcmp(helpFldName, "edition") == 0) {
  963. X    StackToString(fldcont, &card->edition);
  964. X  } 
  965. X  else if (strcmp(helpFldName, "editor") == 0) {
  966. X    StackToString(fldcont, &card->editor);
  967. X  } 
  968. X  else if (strcmp(helpFldName, "howpublished") == 0) {
  969. X    StackToString(fldcont, &card->howpublished);
  970. X  } 
  971. X  else if (strcmp(helpFldName, "institution") == 0) {
  972. X    StackToString(fldcont, &card->institution);
  973. X  } 
  974. X  else if (strcmp(helpFldName, "journal") == 0) {
  975. X    StackToString(fldcont, &card->journal);
  976. X  } 
  977. X  else if (strcmp(helpFldName, "key") == 0) {
  978. X    StackToString(fldcont, &card->key);
  979. X  } 
  980. X  else if (strcmp(helpFldName, "month") == 0) {
  981. X    StackToString(fldcont, &card->month);
  982. X  } 
  983. X  else if (strcmp(helpFldName, "note") == 0) {
  984. X    StackToString(fldcont, &card->note);
  985. X  } 
  986. X  else if (strcmp(helpFldName, "number") == 0) {
  987. X    StackToString(fldcont, &card->number);
  988. X  } 
  989. X  else if (strcmp(helpFldName, "organization") == 0) {
  990. X    StackToString(fldcont, &card->organization);
  991. X  } 
  992. X  else if (strcmp(helpFldName, "pages") == 0) {
  993. X    StackToString(fldcont, &card->pages);
  994. X  } 
  995. X  else if (strcmp(helpFldName, "publisher") == 0) {
  996. X    StackToString(fldcont, &card->publisher);
  997. X  } 
  998. X  else if (strcmp(helpFldName, "school") == 0) {
  999. X    StackToString(fldcont, &card->school);
  1000. X  } 
  1001. X  else if (strcmp(helpFldName, "series") == 0) {
  1002. X    StackToString(fldcont, &card->series);
  1003. X  } 
  1004. X  else if (strcmp(helpFldName, "title") == 0) {
  1005. X    StackToString(fldcont, &card->title);
  1006. X  } 
  1007. X  else if (strcmp(helpFldName, "type") == 0) {
  1008. X    StackToString(fldcont, &card->type);
  1009. X  } 
  1010. X  else if (strcmp(helpFldName, "volume") == 0) {
  1011. X    StackToString(fldcont, &card->volume);
  1012. X  } 
  1013. X  else if (strcmp(helpFldName, "year") == 0) {
  1014. X    StackToString(fldcont, &card->year);
  1015. X  } 
  1016. X  else if (strcmp(helpFldName, "category") == 0) {
  1017. X    StackToString(fldcont, &card->category);
  1018. X  } 
  1019. X  else {
  1020. X    err = dbtMakeUserFld(&helpufield);
  1021. X    Scalloc(&helpufield->fldName, helpFldName);
  1022. X    StackToString(fldcont, &helpufield->fldData); 
  1023. X    err = dbtAppendUserFld(&card->ufield, helpufield);
  1024. X  }
  1025. X  FreeStack(&fldname);
  1026. X  FreeStack(&fldcont);
  1027. }
  1028. X
  1029. X
  1030. X
  1031. /*********************************************************************/
  1032. /*  Errcode Scalloc(String *s1, String s2):                          */
  1033. /*  Platz fuer s1 bereitstellen und s2 nach s1 kopieren              */
  1034. /*********************************************************************/
  1035. X
  1036. static Errcode Scalloc(String *s1, String s2)
  1037. {
  1038. X if (s2 != NULL){
  1039. X   *s1 = (String)calloc(1,strlen(s2)+1);
  1040. X   if (*s1 == NULL) return BIF_ECALLOC;
  1041. X   strcpy(*s1, s2);
  1042. X }
  1043. X return BIF_OK;
  1044. }
  1045. X
  1046. X
  1047. X
  1048. static char * Sncalloc(char *s2, int von, int bis)
  1049. {
  1050. X char *help, *weiter;
  1051. X int i;
  1052. X
  1053. X if (s2 != NULL){
  1054. X   help = (char *)calloc(1,bis);
  1055. X   if (help == NULL) return NULL;
  1056. X   strncpy(help, &s2[von], bis - von + 1 );
  1057. X   weiter = help;
  1058. X   for (i = 0; i < bis - von + 1; i++) weiter++;
  1059. X   *weiter = '\0'; 
  1060. }
  1061. X return help;
  1062. }
  1063. X
  1064. X
  1065. X
  1066. static int SetInputFile(char *file)
  1067. {
  1068. X char *infilename; 
  1069. X    
  1070. X if (file)
  1071. X {
  1072. X  infilename = file;
  1073. X  yyin = fopen(infilename, "r" );
  1074. X
  1075. X  if ( yyin == NULL ) {
  1076. X    return BIF_EOPEN;  
  1077. X  }
  1078. X  return BIF_OK;  
  1079. X }
  1080. X else
  1081. X {
  1082. X   yyin = stdin;
  1083. X   infilename = "<stdin>";
  1084. X   return BIF_OK;  
  1085. X }
  1086. }
  1087. X
  1088. X
  1089. /*********************************************
  1090. X * Test, ob Datei im BibTeX-Format           *
  1091. X *********************************************/
  1092. static int ItIsBibFile(char *dateiName)
  1093. {
  1094. X FILE *dptr;
  1095. X char inh;
  1096. X
  1097. X dptr = fopen(dateiName, "r");
  1098. X inh = (char)getc(dptr);
  1099. X if (inh == '@') {
  1100. X   fclose(dptr); 
  1101. X   return 1;
  1102. X }
  1103. X while (inh == ' ' || inh == '\t' || inh == '\n') 
  1104. X   inh = (char)getc(dptr);
  1105. X if (inh == '@') {
  1106. X   fclose(dptr); 
  1107. X   return 1;
  1108. X }
  1109. X else {
  1110. X   fclose(dptr); 
  1111. X   return 0;
  1112. X }
  1113. }
  1114. X
  1115. X
  1116. X
  1117. /*********************************************
  1118. X * BibTeX-Datei lesen                        *
  1119. X *********************************************/
  1120. Errcode bifFileRead(BibPtr bp)
  1121. {
  1122. X  int erg;
  1123. X  int len, i;
  1124. X  char *tempName;
  1125. X
  1126. X  yynline = 1; 
  1127. X  yynflexcalls = 0;
  1128. X  bp->tempfile = (char *)tempnam(NULL, NULL);
  1129. X  bp->macrofile = (char *)tempnam(NULL, NULL);
  1130. X  tempDatei = fopen(bp->macrofile, "w" );
  1131. X  if ((erg = SetInputFile(bp->filepath)) != 1) return erg;
  1132. X  if ((erg = ItIsBibFile(bp->filepath)) != 1) return ERR_NOBIB;
  1133. X  glbtreeIdx = bp->treeIdx; 
  1134. X  erg = yyparse();
  1135. X  fclose(tempDatei);
  1136. X  uebergabe[0] = '\0';
  1137. X  ueIdx = 0;
  1138. X  if (erg == 0) {
  1139. X    if (yyin) fclose(yyin);
  1140. X    return BIF_OK;
  1141. X  }
  1142. X  else {
  1143. X    erg = -yynline;
  1144. X    yy_init = 1;
  1145. X    if (yyin) fclose(yyin);
  1146. X    return (Errcode)erg;
  1147. X  }
  1148. }
  1149. X
  1150. X
  1151. X
  1152. Errcode bifFileWrite(BibPtr bp)
  1153. {
  1154. X CardListNode *list, *hlist;
  1155. X CardData *hcard;
  1156. X Errcode erg;
  1157. X char sysStr[2*MAX_FILEPATHLEN];
  1158. X String saveName;
  1159. X int savelen;
  1160. X
  1161. CardListNode *cl = NULL;
  1162. char wcKey[] = ".";
  1163. CardData *wcCard;
  1164. Errcode status;
  1165. X
  1166. X if (bp->macrofile!=NULL){
  1167. X    sprintf(sysStr, "cp  %s %s", bp->macrofile, bp->tempfile);
  1168. X    system(sysStr);
  1169. X    tempDatei = fopen(bp->tempfile, "r+");
  1170. X    }
  1171. X else
  1172. X    {tempDatei = fopen(bp->tempfile, "w+");
  1173. X     }
  1174. X
  1175. X if (tempDatei == NULL) return BIF_EWRITE;
  1176. X
  1177. X   /* build list with wildcard search */
  1178. X   if ((status = (int)dbtMakeCard(&wcCard)) != OK) {
  1179. X      guwError(status);
  1180. X   }
  1181. X   wcCard->cardtype = (int)regexpr;
  1182. X   wcCard->mainkey = glbNewString(".");
  1183. X   if ((status = dbtSearchList(bp->treeIdx, wcCard, &cl)) != OK) {
  1184. X      guwError(status); 
  1185. X      return;
  1186. X   }
  1187. X
  1188. X while (cl != NULL) {
  1189. X   WriteRecToFile(cl->data, tempDatei);
  1190. X   cl = cl->next;
  1191. X } 
  1192. X
  1193. X fclose(tempDatei);
  1194. X sprintf(sysStr, "cp  %s %s", bp->tempfile, bp->filepath);
  1195. X system(sysStr);
  1196. X return BIF_OK;
  1197. }
  1198. X
  1199. X
  1200. Errcode bifFileListWrite(BibPtr bp, CardListNode *list, String fname)
  1201. {
  1202. X CardListNode *hlist;
  1203. X CardData *hcard;
  1204. X Errcode erg;
  1205. X char sysStr[2*MAX_FILEPATHLEN];
  1206. X String saveName;
  1207. X int savelen;
  1208. X if (bp->macrofile!=NULL)
  1209. X    {sprintf(sysStr, "cp %s %s", bp->macrofile, fname);
  1210. X     system(sysStr);
  1211. X     }
  1212. X
  1213. X tempDatei = fopen(fname, "a+");
  1214. X if (tempDatei == NULL) return BIF_EWRITE;
  1215. X hlist = list;
  1216. X while (hlist != NULL) {
  1217. X   WriteRecToFile(hlist->data, tempDatei);
  1218. X   hlist = hlist->next;
  1219. X } 
  1220. X fclose(tempDatei);
  1221. X return BIF_OK;
  1222. }
  1223. X
  1224. X
  1225. static long WriteLineToFile(FILE *datei, char *feld, char *inh)
  1226. {
  1227. X  int makro = 2;    /* weder Makro, noch String */
  1228. X  long pos; 
  1229. X  char *tmp;
  1230. X
  1231. X  fprintf(datei,"     %s = ",feld);    
  1232. X  while (*inh == ' ' || *inh == '\t' || *inh == '\n') {
  1233. X    fprintf(datei,"%c",*inh);    
  1234. X    inh++;
  1235. X  }
  1236. X  if (*inh == '@') {
  1237. X    fprintf(datei," ");    
  1238. X    makro = 1;
  1239. X  }
  1240. X  else {
  1241. X    fprintf(datei,"{");    
  1242. X    fprintf(datei,"%c",*inh);    
  1243. X    makro = 0;
  1244. X  }
  1245. X  inh++;
  1246. X  while (*inh != '\0') {
  1247. X    if (*inh == '@') {
  1248. X      tmp = inh;
  1249. X      tmp++;
  1250. X      if (*tmp == '#') {                  /* KONKATENATION */
  1251. X        if (makro == 1) {
  1252. X          fprintf(datei," # ");           /* letzter Teil war ein MAKRO */ 
  1253. X          tmp++;
  1254. X          while (*tmp == ' ' || *tmp == '\t' || *tmp == '\n') {
  1255. X            fprintf(datei,"%c",*tmp);    
  1256. X            tmp++;
  1257. X          }
  1258. X          if (*tmp == '@') {              /* naechster Teil ist ein MAKRO */
  1259. X            fprintf(datei," ");    
  1260. X            makro = 1;
  1261. X          }
  1262. X          else {
  1263. X            fprintf(datei,"{");    
  1264. X            fprintf(datei,"%c",*tmp);     /* naechster Teil ist ein STRING */
  1265. X            makro = 0;
  1266. X          }
  1267. X        }
  1268. X        else if (makro == 0) {
  1269. X          fprintf(datei,"} # ");          /* letzter Teil war ein STRING */ 
  1270. X          tmp++;
  1271. X          while (*tmp == ' ' || *tmp == '\t' || *tmp == '\n') {
  1272. X            fprintf(datei,"%c",*tmp);    
  1273. X            tmp++;
  1274. X          }
  1275. X          if (*tmp == '@') {              /* naechster Teil ist ein MAKRO */
  1276. X            fprintf(datei," ");    
  1277. X            makro = 1;
  1278. X          }
  1279. X          else {
  1280. X            fprintf(datei,"{");    
  1281. X            fprintf(datei,"%c",*tmp);     /* naechster Teil ist ein STRING */
  1282. X            makro = 0;
  1283. X          }
  1284. X        }  /* else if makro == 0 */
  1285. X        inh = tmp;
  1286. X      }
  1287. X      else {                              /* AFFE nicht schreiben */
  1288. X        fprintf(datei," ");    
  1289. X        makro = 1;
  1290. X      }
  1291. X    }      /* if @ */
  1292. X    else {
  1293. X      fprintf(datei,"%c",*inh);    
  1294. X    }
  1295. X    inh++;
  1296. X  }  /* while */
  1297. X  if (makro == 0) {
  1298. X    fprintf(datei,"}");    
  1299. X  }
  1300. X        
  1301. X   pos = ftell(datei);
  1302. X   fprintf(datei,",  \n");
  1303. X   return pos;
  1304. }
  1305. X
  1306. X
  1307. static void WriteRecToFile(CardData *card, FILE *datei)
  1308. {
  1309. X UserFld *h;
  1310. X String newType;
  1311. X long pos;
  1312. X
  1313. X fseek(datei, 0L, SEEK_END); 
  1314. X fprintf(datei,"\n");
  1315. X pos = ftell(datei);
  1316. X newType = glbNewString(glbTypeToName(card->cardtype));
  1317. X fprintf(datei,"@%s{%s",newType, card->mainkey);
  1318. X pos = ftell(datei);
  1319. X fprintf(datei,",\n");
  1320. X if (!StringIsPeteEmpty(card->address)) {
  1321. X   pos = WriteLineToFile(datei,"ADDRESS",card->address);    
  1322. X } 
  1323. X if (!StringIsPeteEmpty(card->annote)) {
  1324. X   pos = WriteLineToFile(datei,"ANNOTE",card->annote);    
  1325. X } 
  1326. X if (!StringIsPeteEmpty(card->author)) {
  1327. X   pos = WriteLineToFile(datei,"AUTHOR",card->author);    
  1328. X } 
  1329. X if (!StringIsPeteEmpty(card->booktitle)) {
  1330. X   pos = WriteLineToFile(datei,"BOOKTITLE",card->booktitle);    
  1331. X } 
  1332. X if (!StringIsPeteEmpty(card->chapter)) {
  1333. X   pos = WriteLineToFile(datei,"CHAPTER",card->chapter);    
  1334. X } 
  1335. X if (!StringIsPeteEmpty(card->crossref)) {
  1336. X   pos = WriteLineToFile(datei,"CROSSREF",card->crossref);    
  1337. X } 
  1338. X if (!StringIsPeteEmpty(card->edition)) {
  1339. X   pos = WriteLineToFile(datei,"EDITION",card->edition);    
  1340. X } 
  1341. X if (!StringIsPeteEmpty(card->editor)) {
  1342. X   pos = WriteLineToFile(datei,"EDITOR",card->editor);    
  1343. X } 
  1344. X if (!StringIsPeteEmpty(card->howpublished)) {
  1345. X   pos = WriteLineToFile(datei,"HOWPUBLISHED",card->howpublished);    
  1346. X } 
  1347. X if (!StringIsPeteEmpty(card->institution)) {
  1348. X   pos = WriteLineToFile(datei,"INSTITUTION",card->institution);    
  1349. X } 
  1350. X if (!StringIsPeteEmpty(card->journal)) {
  1351. X   pos = WriteLineToFile(datei,"JOURNAL",card->journal);    
  1352. X } 
  1353. X if (!StringIsPeteEmpty(card->key)) {
  1354. X   pos = WriteLineToFile(datei,"KEY",card->key);    
  1355. X } 
  1356. X if (!StringIsPeteEmpty(card->month)) {
  1357. X   pos = WriteLineToFile(datei,"MONTH",card->month);    
  1358. X } 
  1359. X if (!StringIsPeteEmpty(card->note)) {
  1360. X   pos = WriteLineToFile(datei,"NOTE",card->note);    
  1361. X } 
  1362. X if (!StringIsPeteEmpty(card->number)) {
  1363. X   pos = WriteLineToFile(datei,"NUMBER",card->number);    
  1364. X } 
  1365. X if (!StringIsPeteEmpty(card->organization)) {
  1366. X   pos = WriteLineToFile(datei,"ORGANIZATION",card->organization);    
  1367. X } 
  1368. X if (!StringIsPeteEmpty(card->pages)) {
  1369. X   pos = WriteLineToFile(datei,"PAGES",card->pages);    
  1370. X } 
  1371. X if (!StringIsPeteEmpty(card->publisher)) {
  1372. X   pos = WriteLineToFile(datei,"PUBLISHER",card->publisher);    
  1373. X } 
  1374. X if (!StringIsPeteEmpty(card->school)) {
  1375. X   pos = WriteLineToFile(datei,"SCHOOL",card->school);    
  1376. X } 
  1377. X if (!StringIsPeteEmpty(card->series)) {
  1378. X   pos = WriteLineToFile(datei,"SERIES",card->series);    
  1379. X } 
  1380. X if (!StringIsPeteEmpty(card->title)) {
  1381. X   pos = WriteLineToFile(datei,"TITLE",card->title);    
  1382. X } 
  1383. X if (!StringIsPeteEmpty(card->type)) {
  1384. X   pos = WriteLineToFile(datei,"TYPE",card->type);    
  1385. X } 
  1386. X if (!StringIsPeteEmpty(card->volume)) {
  1387. X   pos = WriteLineToFile(datei,"VOLUME",card->volume);    
  1388. X } 
  1389. X if (!StringIsPeteEmpty(card->year)) {
  1390. X   pos = WriteLineToFile(datei,"YEAR",card->year);    
  1391. X } 
  1392. X if (!StringIsPeteEmpty(card->category)) {
  1393. X   pos = WriteLineToFile(datei,"CATEGORY",card->category);    
  1394. X } 
  1395. X h = card->ufield; 
  1396. X while (h) {
  1397. X   pos = WriteLineToFile(datei,h->fldName,h->fldData);    
  1398. X   h = h->next;
  1399. X }   
  1400. X fseek(datei, pos, SEEK_SET);
  1401. X fprintf(datei,"\n}\n\n");
  1402. }
  1403. X
  1404. X
  1405. X
  1406. static int StringIsPeteEmpty(char *text)
  1407. {
  1408. X if (text == NULL || *text == '\0') return 1;
  1409. X return 0;
  1410. }
  1411. X
  1412. X
  1413. X
  1414. yyerror(char *s)
  1415. {
  1416. X
  1417. X fputs(s, stderr);
  1418. X putc('\n', stderr);
  1419. }
  1420. X
  1421. #ifdef BIFMAIN
  1422. X
  1423. int main(int argc, char *argv[])
  1424. {
  1425. X Bib bp;
  1426. X int erg, b1, i;
  1427. X Errcode err;
  1428. X
  1429. #ifdef YYDEBUG
  1430. X       extern int yydebug;
  1431. X
  1432. X       yydebug = 1;
  1433. #endif
  1434. X
  1435. X strcpy(bp.filepath, argv[1]);
  1436. X dbtGetFreeTreeIdx(&b1);
  1437. X bp.treeIdx = b1;
  1438. X err = bifFileRead(&bp);
  1439. X err = bifFileWrite(&bp);
  1440. }
  1441. X
  1442. #endif
  1443. __YYSCLASS yytabelem yyexca[] ={
  1444. -1, 1,
  1445. X    0, -1,
  1446. X    -2, 0,
  1447. X    };
  1448. # define YYNPROD 161
  1449. # define YYLAST 554
  1450. __YYSCLASS yytabelem yyact[]={
  1451. X
  1452. X     8,     9,    11,    12,    13,    14,    15,    16,    17,    18,
  1453. X    19,    20,    21,    22,    23,    24,    39,   166,   135,   165,
  1454. X     4,   135,     4,   193,   175,     4,     8,     9,    11,    12,
  1455. X    13,    14,    15,    16,    17,    18,    19,    20,    21,    22,
  1456. X    23,    24,    26,    36,   170,    38,   197,   158,     4,   171,
  1457. X     4,     4,     8,     9,    11,    12,    13,    14,    15,    16,
  1458. X    17,    18,    19,    20,    21,    22,    23,    24,   162,   153,
  1459. X   130,   155,   163,     4,   166,     4,   165,     4,    48,    49,
  1460. X    52,   179,    53,    54,    51,    50,    46,    45,    47,    48,
  1461. X    49,    52,    92,    53,    54,    51,    50,    46,    45,    47,
  1462. X   211,   213,   210,   204,   208,   209,   212,   128,   207,   205,
  1463. X   206,    48,    49,    52,   125,    53,    54,    51,    50,    46,
  1464. X    45,    47,    61,    62,    65,   112,    66,   108,    64,    63,
  1465. X    59,    58,    60,    61,    62,    65,   106,    66,   145,    64,
  1466. X    63,    59,    58,    60,   211,   213,   210,     4,   208,   209,
  1467. X   212,    97,   207,   205,   206,   188,   189,   187,   138,   185,
  1468. X   186,   181,    76,   184,   182,   183,    61,    62,    65,    75,
  1469. X    66,    74,    64,    63,    59,    58,    60,   188,   189,   187,
  1470. X   203,   185,   186,   228,   216,   184,   182,   183,     8,     9,
  1471. X    11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
  1472. X    21,    22,    23,    24,    81,     8,     9,    11,    12,    13,
  1473. X    14,    15,    16,    17,    18,    19,    20,    21,    22,    23,
  1474. X    24,    43,     8,     9,    11,    12,    13,    14,    15,    16,
  1475. X    17,    18,    19,    20,    21,    22,    23,    24,   162,    77,
  1476. X    76,    78,   163,    33,   166,    35,   165,    75,     4,    74,
  1477. X     4,    30,   137,    32,   168,   148,   143,    68,     4,    69,
  1478. X     4,   196,     4,     4,    55,   180,    56,   192,   154,   129,
  1479. X   126,   124,   122,   109,    83,   120,   113,   159,    44,   164,
  1480. X    10,     2,   160,     7,    71,    27,    29,   134,     6,   133,
  1481. X    31,    34,    37,    73,     5,     0,     0,     0,     0,     0,
  1482. X     0,     0,     0,     0,     0,     0,     0,    40,     3,     0,
  1483. X     0,    25,    67,     0,     0,     0,     0,     1,    72,     0,
  1484. X    72,    28,   131,    79,    84,    85,    86,    87,    88,    89,
  1485. X    90,    91,    93,    94,    95,     0,    25,     0,     0,     0,
  1486. X     0,     0,     0,    41,    42,     0,     0,   110,     0,    25,
  1487. X     0,     0,     0,     0,     0,   115,     0,    80,     0,    72,
  1488. X    72,    82,   118,   119,     0,     0,   114,     0,   116,   117,
  1489. X     0,   123,     0,     0,     0,     0,     0,     0,     0,     0,
  1490. X     0,     0,     0,     0,     0,     0,   218,   219,   220,   221,
  1491. X   222,   223,   224,   225,   226,   132,   136,     0,     0,   121,
  1492. X     0,   140,   132,     0,     0,     0,     0,     0,     0,   229,
  1493. X     0,     0,     0,   142,     0,   146,   147,     0,     0,   132,
  1494. X   132,   152,   144,   149,     0,     0,    57,   157,     0,     0,
  1495. X   161,     0,   167,   169,     0,     0,   174,   173,     0,     0,
  1496. X   161,   178,   176,   139,   177,   190,   191,   144,   198,   199,
  1497. X   200,   201,   202,   194,   214,   215,     0,   161,     0,   195,
  1498. X   150,   151,    70,   144,     0,     0,     0,     0,   156,     0,
  1499. X   217,     0,     0,     0,     0,     0,     0,     0,   172,     0,
  1500. X     0,     0,   227,    96,     0,    98,    99,   100,   101,   102,
  1501. X   103,   104,   105,   107,     0,     0,   111,     0,     0,     0,
  1502. X     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  1503. X     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  1504. X     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  1505. X     0,     0,     0,   127,     0,     0,     0,     0,     0,     0,
  1506. X     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
  1507. X     0,     0,     0,   141 };
  1508. __YYSCLASS yytabelem yypact[]={
  1509. X
  1510. X  -205, -3000,   -35,  -231,  -260, -3000, -3000, -3000,   -24,   -32,
  1511. X  -232, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000,
  1512. X -3000, -3000, -3000, -3000, -3000,  -257,  -205,   -52, -3000, -3000,
  1513. X  -162,   -11,  -107,  -162,   -18,  -107,   -34,   -36,   -34,  -205,
  1514. X   -69, -3000, -3000,  -205,    -2,  -162,  -162,  -162,  -162,  -162,
  1515. X  -162,  -162,  -184,  -162,  -162,  -162,  -107,  -127,  -107,  -107,
  1516. X  -107,  -107,  -107,  -107,  -107,  -140,  -151,    -3,  -162,  -107,
  1517. X  -153,     3,  -112,  -260,  -112,  -112, -3000,   -34,   -34,     2,
  1518. X -3000,  -205, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000,
  1519. X -3000,    -4,  -162, -3000, -3000,    -5,  -164, -3000, -3000, -3000,
  1520. X -3000, -3000, -3000, -3000, -3000,    -6,  -107,  -171, -3000, -3000,
  1521. X    -7,  -208, -3000,  -262,  -260, -3000, -3000, -3000,   -21,  -115,
  1522. X  -262, -3000,  -162, -3000, -3000, -3000,  -107, -3000, -3000, -3000,
  1523. X -3000,   -20,  -265,  -135,   -19,  -265, -3000,  -262,  -262,  -209,
  1524. X -3000, -3000,    -8, -3000,  -202,  -262, -3000,  -227,  -207, -3000,
  1525. X   -22,  -234,  -229, -3000, -3000,  -262, -3000,  -265,  -207,  -256,
  1526. X  -260,   -37,  -195,  -118, -3000,  -264,  -264,    -9, -3000,  -255,
  1527. X -3000, -3000, -3000,  -265,  -256,  -207, -3000,  -260,   -15, -3000,
  1528. X  -233, -3000,   -96,   -96,   -96,   -96,   -96,  -173,   -96,   -96,
  1529. X -3000, -3000, -3000, -3000,  -256, -3000, -3000, -3000, -3000, -3000,
  1530. X -3000, -3000, -3000,   -92,   -96,  -129,  -129,  -129,  -129,  -129,
  1531. X  -129,  -129,  -129,  -129, -3000, -3000,   -96, -3000, -3000, -3000,
  1532. X -3000, -3000, -3000,   -93, -3000, -3000, -3000, -3000,  -129, -3000 };
  1533. __YYSCLASS yytabelem yypgo[]={
  1534. X
  1535. X     0,   317,   281,   308,   294,   288,   283,   278,   426,   280,
  1536. X   284,   322,   293,   289,   287,   277,   282,   265,   279,   180 };
  1537. __YYSCLASS yytabelem yyr1[]={
  1538. X
  1539. X     0,     1,     1,     1,     1,     1,     1,     1,     1,     1,
  1540. X     1,     1,     1,     1,     3,     3,     3,     4,     4,     4,
  1541. X     4,     5,     5,     5,     5,     7,     7,     7,     7,     7,
  1542. X     7,     7,     7,     7,     7,     7,     7,     7,     7,     7,
  1543. X     7,     7,     7,     7,     7,     7,     7,     8,     8,     8,
  1544. X     8,     8,     8,     8,     8,     8,     8,     8,     8,     8,
  1545. X     8,     8,     8,     8,     8,     8,     8,     6,     6,     6,
  1546. X     6,     6,     6,     6,     6,     9,     9,     9,     9,     9,
  1547. X     9,     9,     9,     9,     9,     9,     9,     9,     9,    10,
  1548. X    10,    10,    10,    12,    12,    12,    12,    12,    11,    11,
  1549. X    11,    11,    11,    11,    11,    11,    11,    13,    13,    14,
  1550. X    14,     2,     2,    15,    15,    15,    15,    15,    16,    16,
  1551. X    16,    16,    16,    18,    18,    18,    18,    17,    17,    17,
  1552. X    17,    17,    17,    17,    17,    17,    17,    17,    17,    17,
  1553. X    17,    17,    17,    17,    19,    19,    19,    19,    19,    19,
  1554. X    19,    19,    19,    19,    19,    19,    19,    19,    19,    19,
  1555. X    19 };
  1556. __YYSCLASS yytabelem yyr2[]={
  1557. X
  1558. X     0,     8,     6,    10,     8,     6,     4,     6,     4,     8,
  1559. X     6,     4,     2,     2,     2,     2,     2,     9,    11,     9,
  1560. X    11,     9,    11,     9,    11,     4,     4,     4,     4,     4,
  1561. X     4,     4,     8,     6,     6,     4,     4,     4,     2,     2,
  1562. X     2,     2,     2,     2,     2,     2,     2,     4,     4,     4,
  1563. X     4,     4,     4,     4,     8,     6,     6,     4,     6,     4,
  1564. X     2,     2,     2,     2,     2,     2,     2,    15,    17,    13,
  1565. X    15,    15,    17,    13,    15,     3,     3,     3,     3,     3,
  1566. X     3,     3,     3,     3,     3,     3,     3,     3,     3,     4,
  1567. X     4,     6,     2,     5,     5,     3,     3,     3,     8,     6,
  1568. X     6,     8,     4,     6,     4,     2,     4,     9,     7,     5,
  1569. X     3,     4,     2,     6,     2,     4,     4,     6,     6,     6,
  1570. X     4,     4,     2,     4,     4,     2,     2,     4,     4,     4,
  1571. X     4,     4,     6,     8,     4,     6,     2,     2,     4,     4,
  1572. X     2,     2,     2,     2,     4,     4,     4,     4,     4,     6,
  1573. X     8,     2,     2,     4,     4,     4,     2,     2,     2,     2,
  1574. X     2 };
  1575. __YYSCLASS yytabelem yychk[]={
  1576. X
  1577. X -3000,    -1,    -2,    -3,   282,    -4,    -5,    -6,   257,   258,
  1578. X    -9,   259,   260,   261,   262,   263,   264,   265,   266,   267,
  1579. X   268,   269,   270,   271,   272,    -3,   273,    -2,    -1,    -2,
  1580. X   275,    -2,   277,   275,    -2,   277,   275,    -2,   277,   273,
  1581. X    -2,    -1,    -1,   273,    -7,   282,   281,   283,   273,   274,
  1582. X   280,   279,   275,   277,   278,   275,   277,    -8,   282,   281,
  1583. X   283,   273,   274,   280,   279,   275,   277,    -7,   275,   277,
  1584. X    -8,   -10,    -2,   -12,   283,   281,   274,   275,   277,   -10,
  1585. X    -1,   273,    -1,   276,    -7,    -7,    -7,    -7,    -7,    -7,
  1586. X    -7,    -7,   276,    -7,    -7,    -7,    -8,   278,    -8,    -8,
  1587. X    -8,    -8,    -8,    -8,    -8,    -8,   276,    -8,   278,   276,
  1588. X    -7,    -8,   278,   273,   -12,    -2,   -12,   -12,   -10,   -10,
  1589. X   273,    -1,   276,    -7,   276,   278,   276,    -8,   278,   276,
  1590. X   278,   -11,    -2,   -13,   -14,   283,    -2,   273,   273,   -11,
  1591. X    -7,    -8,    -2,   276,   -13,   273,    -2,    -2,   274,   -14,
  1592. X   -11,   -11,    -2,   278,   276,   273,   -11,    -2,   274,   -15,
  1593. X   -16,    -2,   275,   279,   -18,   283,   281,    -2,   276,    -2,
  1594. X   278,   278,   -11,    -2,   -15,   280,    -2,   -16,    -7,   276,
  1595. X   -17,   279,   282,   283,   281,   277,   278,   275,   273,   274,
  1596. X   -18,   -18,   276,   278,   -15,    -2,   276,   279,   -17,   -17,
  1597. X   -17,   -17,   -17,   -19,   276,   282,   283,   281,   277,   278,
  1598. X   275,   273,   279,   274,   -17,   -17,   276,   -17,   -19,   -19,
  1599. X   -19,   -19,   -19,   -19,   -19,   -19,   -19,   -17,   276,   -19 };
  1600. __YYSCLASS yytabelem yydef[]={
  1601. X
  1602. X     0,    -2,    13,    12,   112,    14,    15,    16,     0,     0,
  1603. X     0,    75,    76,    77,    78,    79,    80,    81,    82,    83,
  1604. X    84,    85,    86,    87,    88,    11,     8,    13,     6,   111,
  1605. X     0,     0,     0,     0,     0,     0,     0,     0,     0,     7,
  1606. X    13,     5,     2,    10,     0,    38,    39,    40,    41,    42,
  1607. X    43,    44,     0,    45,    46,     0,     0,     0,    60,    61,
  1608. X    62,    63,    64,    65,    66,     0,     0,     0,     0,     0,
  1609. X     0,     0,     0,    92,    95,    96,    97,     0,     0,     0,
  1610. X     1,     9,     4,    17,    25,    26,    27,    28,    29,    30,
  1611. X    31,     0,    35,    36,    37,     0,     0,    19,    47,    48,
  1612. X    49,    50,    51,    52,    53,     0,    57,     0,    59,    21,
  1613. X     0,     0,    23,     0,    89,    90,    93,    94,     0,     0,
  1614. X     0,     3,    34,    33,    18,    20,    56,    55,    58,    22,
  1615. X    24,     0,     0,   105,     0,   110,    91,     0,     0,     0,
  1616. X    32,    54,     0,    69,   104,   102,   106,     0,     0,   109,
  1617. X     0,     0,     0,    73,    67,   100,    99,   103,     0,   108,
  1618. X   114,     0,     0,     0,   122,   125,   126,     0,    70,     0,
  1619. X    74,    71,    98,   101,   107,     0,   115,   116,     0,   121,
  1620. X     0,   120,   136,   137,   140,   141,   142,     0,   143,     0,
  1621. X   123,   124,    68,    72,   113,   117,   118,   119,   127,   128,
  1622. X   129,   130,   131,     0,   134,   151,   152,   156,   157,   158,
  1623. X     0,   159,   160,     0,   138,   139,   132,   135,   144,   145,
  1624. X   146,   147,   148,     0,   153,   154,   155,   133,   149,   150 };
  1625. typedef struct { char *t_name; int t_val; } yytoktype;
  1626. #ifndef YYDEBUG
  1627. #    define YYDEBUG    0    /* don't allow debugging */
  1628. #endif
  1629. X
  1630. #if YYDEBUG
  1631. X
  1632. __YYSCLASS yytoktype yytoks[] =
  1633. {
  1634. X    "STRING",    257,
  1635. X    "PREAMBLE",    258,
  1636. X    "ARTICLE",    259,
  1637. X    "BOOK",    260,
  1638. X    "BOOKLET",    261,
  1639. X    "CONFERENCE",    262,
  1640. X    "INBOOK",    263,
  1641. X    "INCOLLECTION",    264,
  1642. X    "INPROCEEDINGS",    265,
  1643. X    "MANUAL",    266,
  1644. X    "MASTERSTHESIS",    267,
  1645. X    "MISC",    268,
  1646. X    "PHDTHESIS",    269,
  1647. X    "PROCEEDINGS",    270,
  1648. X    "TECHREPORT",    271,
  1649. X    "UNPUBLISHED",    272,
  1650. X    "KOMMA",    273,
  1651. X    "EQ",    274,
  1652. X    "LGKL",    275,
  1653. X    "RGKL",    276,
  1654. X    "LRKL",    277,
  1655. X    "RRKL",    278,
  1656. X    "DAZ",    279,
  1657. X    "ZAUN",    280,
  1658. X    "ZEICHEN",    281,
  1659. X    "WHITE_SPACE",    282,
  1660. X    "BUCHSTABE_ZAHL",    283,
  1661. X    "-unknown-",    -1    /* ends search */
  1662. };
  1663. X
  1664. __YYSCLASS char * yyreds[] =
  1665. {
  1666. X    "-no such reduction-",
  1667. X    "datei : leerraum entry KOMMA datei",
  1668. X    "datei : entry KOMMA datei",
  1669. X    "datei : leerraum entry leerraum KOMMA datei",
  1670. X    "datei : entry leerraum KOMMA datei",
  1671. X    "datei : leerraum entry datei",
  1672. X    "datei : entry datei",
  1673. X    "datei : leerraum entry KOMMA",
  1674. X    "datei : entry KOMMA",
  1675. X    "datei : leerraum entry leerraum KOMMA",
  1676. X    "datei : entry leerraum KOMMA",
  1677. X    "datei : leerraum entry",
  1678. X    "datei : entry",
  1679. X    "datei : leerraum",
  1680. X    "entry : string",
  1681. X    "entry : preamble",
  1682. X    "entry : eintrag",
  1683. X    "string : STRING LGKL allstringG RGKL",
  1684. X    "string : STRING leerraum LGKL allstringG RGKL",
  1685. X    "string : STRING LRKL allstringR RRKL",
  1686. X    "string : STRING leerraum LRKL allstringR RRKL",
  1687. X    "preamble : PREAMBLE LGKL allstringG RGKL",
  1688. X    "preamble : PREAMBLE leerraum LGKL allstringG RGKL",
  1689. X    "preamble : PREAMBLE LRKL allstringR RRKL",
  1690. X    "preamble : PREAMBLE leerraum LRKL allstringR RRKL",
  1691. X    "allstringG : WHITE_SPACE allstringG",
  1692. X    "allstringG : ZEICHEN allstringG",
  1693. X    "allstringG : BUCHSTABE_ZAHL allstringG",
  1694. X    "allstringG : KOMMA allstringG",
  1695. X    "allstringG : EQ allstringG",
  1696. X    "allstringG : ZAUN allstringG",
  1697. X    "allstringG : DAZ allstringG",
  1698. X    "allstringG : LGKL allstringG RGKL allstringG",
  1699. X    "allstringG : LGKL RGKL allstringG",
  1700. X    "allstringG : LGKL allstringG RGKL",
  1701. X    "allstringG : LGKL RGKL",
  1702. X    "allstringG : LRKL allstringG",
  1703. X    "allstringG : RRKL allstringG",
  1704. X    "allstringG : WHITE_SPACE",
  1705. X    "allstringG : ZEICHEN",
  1706. X    "allstringG : BUCHSTABE_ZAHL",
  1707. X    "allstringG : KOMMA",
  1708. X    "allstringG : EQ",
  1709. X    "allstringG : ZAUN",
  1710. X    "allstringG : DAZ",
  1711. X    "allstringG : LRKL",
  1712. X    "allstringG : RRKL",
  1713. X    "allstringR : WHITE_SPACE allstringR",
  1714. X    "allstringR : ZEICHEN allstringR",
  1715. X    "allstringR : BUCHSTABE_ZAHL allstringR",
  1716. X    "allstringR : KOMMA allstringR",
  1717. X    "allstringR : EQ allstringR",
  1718. X    "allstringR : ZAUN allstringR",
  1719. X    "allstringR : DAZ allstringR",
  1720. X    "allstringR : LGKL allstringR RGKL allstringR",
  1721. X    "allstringR : LGKL RGKL allstringR",
  1722. X    "allstringR : LGKL allstringR RGKL",
  1723. X    "allstringR : LGKL RGKL",
  1724. X    "allstringR : LRKL allstringR RRKL",
  1725. X    "allstringR : LRKL RRKL",
  1726. X    "allstringR : WHITE_SPACE",
  1727. SHAR_EOF
  1728. true || echo 'restore of bib_file.c failed'
  1729. fi
  1730. echo 'End of  part 3'
  1731. echo 'File bib_file.c is continued in part 4'
  1732. echo 4 > _shar_seq_.tmp
  1733. exit 0
  1734. -- 
  1735. Senior Systems Scientist        mail: dcmartin@msi.com
  1736. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  1737. 796 North Pastoria Avenue        at&t: 408/522-9236
  1738. Sunnyvale, California 94086        fax: 408/732-0831
  1739.