diff -cr bibview-1.5/BibView.eng.ad bibview-2.0/BibView.eng.ad *** bibview-1.5/BibView.eng.ad Wed Jun 2 09:48:34 1993 --- bibview-2.0/BibView.eng.ad Thu Jun 24 07:43:49 1993 *************** *** 1,8 **** ! ! Resource Database for bibView 1.5 ! --------------------------------- ! Language: English - BibView.title: bibView 1.5 BibView.iconName: bibView BibView*font: *helvetica-bold-r-*-120-* --- 1,7 ---- ! ! Resource Database for bibView 2.0 ! --------------------------------- ! Language: English BibView.iconName: bibView BibView*font: *helvetica-bold-r-*-120-* *************** *** 228,234 **** BibView*cardWin*Text*input: true BibView*cardWin*Label*justify: left ! BibView*cardWin.width: 400 BibView*cardWin.borderWidth: 2 BibView*cardWin.commandBox.showGrip: false BibView*cardWin.commandBox.width: 400 --- 227,233 ---- BibView*cardWin*Text*input: true BibView*cardWin*Label*justify: left ! BibView*cardWin.width: 450 BibView*cardWin.borderWidth: 2 BibView*cardWin.commandBox.showGrip: false BibView*cardWin.commandBox.width: 400 *************** *** 238,244 **** BibView*cardWin.commandBox.skipAdjust: true BibView*cardWin.commandBox*userDef.label: User Data BibView*cardWin.commandBox*save.label: Save - BibView*cardWin.commandBox*annote.label: Annote BibView*cardWin.commandBox*change.label: Change BibView*cardWin.commandBox*delete.label: Delete BibView*cardWin.commandBox*copy.label: Copy --- 237,242 ---- *************** *** 298,303 **** --- 296,308 ---- BibView*confirmQuitBox.label: There are unsaved changes!\nDo you really want to close? BibView*confirmQuitBox*ok.label: Close BibView*confirmQuitBox*cancel.label: Cancel + + ! confirm delete box resources + ! --------------------------- + BibView*confirmDeleteShell.title: Delete? + BibView*confirmDeleteBox.label: Do you really want to delete the entry? + BibView*confirmDeleteBox*ok.label: Yes + BibView*confirmDeleteBox*cancel.label: Cancel ! file select box resources ! ------------------------- diff -cr bibview-1.5/BibView.eng.ad bibview-2.0/BibView.eng.adbibview-1.5/BibView.ger.ad bibview-2.0/BibView.ger.ad *** bibview-1.5/BibView.ger.ad Wed Jun 2 09:56:50 1993 --- bibview-2.0/BibView.ger.ad Thu Jun 24 07:48:16 1993 *************** *** 1,8 **** ! ! Resource Database for bibView 1.5 ! --------------------------------- ! Language: German - BibView.title: bibView 1.5 BibView.iconName: bibView BibView*font: *helvetica-bold-r-*-120-* --- 1,7 ---- ! ! Resource Database for bibView 2.0 ! --------------------------------- ! Language: German BibView.iconName: bibView BibView*font: *helvetica-bold-r-*-120-* *************** *** 226,232 **** BibView*cardWin*Text*input: true BibView*cardWin*Label*justify: left ! BibView*cardWin.width: 400 BibView*cardWin.borderWidth: 2 BibView*cardWin.commandBox.showGrip: false BibView*cardWin.commandBox.width: 400 --- 225,231 ---- BibView*cardWin*Text*input: true BibView*cardWin*Label*justify: left ! BibView*cardWin.width: 450 BibView*cardWin.borderWidth: 2 BibView*cardWin.commandBox.showGrip: false BibView*cardWin.commandBox.width: 400 *************** *** 236,242 **** BibView*cardWin.commandBox.skipAdjust: true BibView*cardWin.commandBox*userDef.label: Benutzerdaten BibView*cardWin.commandBox*save.label: Speichern - BibView*cardWin.commandBox*annote.label: Anmerkung BibView*cardWin.commandBox*change.label: Aendern BibView*cardWin.commandBox*delete.label: Loeschen BibView*cardWin.commandBox*copy.label: Kopieren --- 235,240 ---- *************** *** 279,286 **** ! ------------------------------- BibView*confirmQuitShell.title: Schliessen? BibView*confirmQuitBox.label: Es wurden Aenderungen vorgenommen, die nicht gespeichert wurden!\n\nWollen Sie WIRKLICH alle Aenderungen verwerfen? ! BibView*confirmBibQuitBox*ok.label: Verwerfen ! BibView*confirmBibQuitBox*cancel.label: Abbrechen ! file select box resources --- 277,292 ---- ! ------------------------------- BibView*confirmQuitShell.title: Schliessen? BibView*confirmQuitBox.label: Es wurden Aenderungen vorgenommen, die nicht gespeichert wurden!\n\nWollen Sie WIRKLICH alle Aenderungen verwerfen? ! BibView*confirmQuitBox*ok.label: Verwerfen ! BibView*confirmQuitBox*cancel.label: Abbrechen ! ! ! ! confirm delete box resources ! ! ------------------------------- ! BibView*confirmDeleteShell.title: Loeschen? ! BibView*confirmDeleteBox.label: Wollen Sie WIRKLICH den Eintrag loeschen? ! BibView*confirmDeleteBox*ok.label: Loeschen ! BibView*confirmDeleteBox*cancel.label: Abbrechen ! file select box resources diff -cr bibview-1.5/BibView.ger.ad bibview-2.0/BibView.ger.adbibview-1.5/CHANGES bibview-2.0/CHANGES *** bibview-1.5/CHANGES Fri Jun 4 13:34:22 1993 --- bibview-2.0/CHANGES Fri Jun 18 16:41:04 1993 *************** *** 1,5 **** This is release 1.5 of bibview. ! In this release the following change was made. - It is now possible to define new BibTeX types and change existing types by adding new fields. This can be done in the configuration file. --- 1,14 ---- + This is release 2.0 of bibview + In this release the following changes were made. + - The loading of files is much faster. + - It is possible to move between the fields of a card + using the key (move downward) and the + key (move upward). The input focus is set to + a certain field by pressing the right mouse button in it. + + This is release 1.5 of bibview. ! In this release the following changes were made. - It is now possible to define new BibTeX types and change existing types by adding new fields. This can be done in the configuration file. diff -cr bibview-1.5/CHANGES bibview-2.0/CHANGESbibview-1.5/FileNom.c bibview-2.0/FileNom.c *** bibview-1.5/FileNom.c Wed Jun 2 17:36:31 1993 --- bibview-2.0/FileNom.c Fri Jun 18 15:40:34 1993 *************** *** 1,4 **** ! /*********************************************************************/ /* bibView: Administration of BibTeX-Databases */ /* (Verwaltung von BibTeX-Literaturdatenbanken) */ /* */ --- 1,4 ---- ! /*********************************************************************s /* bibView: Administration of BibTeX-Databases */ /* (Verwaltung von BibTeX-Literaturdatenbanken) */ /* */ *************** *** 79,85 **** --- 79,87 ---- #define Offset(field) XtOffsetOf(FileNominatorRec, fileNominator.field) + #ifdef ACTION_PROBLEM static int first_in = 1; + #endif static XtResource resources[] = { {XtNselectCallback, XtCCallback, XtRCallback, sizeof(XtCallbackList), *************** *** 473,484 **** #endif XtOverrideTranslations(Child(fnw,path_widget), XtParseTranslationTable(pathTranslations)); XtAppAddActions(XtWidgetToApplicationContext(new), pathActions, XtNumber(pathActions)); - if (first_in == 1){ XawSimpleMenuAddGlobalActions(XtWidgetToApplicationContext(new)); first_in = 0; } #ifdef GERMAN Child(fnw,cancel_widget) --- 475,490 ---- #endif XtOverrideTranslations(Child(fnw,path_widget), XtParseTranslationTable(pathTranslations)); + #ifdef ACTION_PROBLEM + if (first_in == 1){ + #endif XtAppAddActions(XtWidgetToApplicationContext(new), pathActions, XtNumber(pathActions)); XawSimpleMenuAddGlobalActions(XtWidgetToApplicationContext(new)); + #ifdef ACTION_PROBLEM first_in = 0; } + #endif #ifdef GERMAN Child(fnw,cancel_widget) diff -cr bibview-1.5/FileNom.c bibview-2.0/FileNom.cbibview-1.5/Imakefile bibview-2.0/Imakefile *** bibview-1.5/Imakefile Mon Jun 7 09:14:11 1993 --- bibview-2.0/Imakefile Fri Jun 18 16:38:01 1993 *************** *** 3,18 **** # # - /* Define next line as YES to link with MIT X11R4 libraries */ - #define LinkWithMIT NO - - #if LinkWithMIT - MITLIBDIR = /MIT/lib /* Where your MIT X11R4 libraries are located */ - XLIB = -L$(MITLIBDIR) -lX11 - XAWLIB = -L$(MITLIBDIR) -lXaw - XMULIB = -L$(MITLIBDIR) -lXmu - XTOOLLIB = -L$(MITLIBDIR) -lXt - #endif /* define as YES if you want the German version: */ #define German NO --- 3,8 ---- diff -cr bibview-1.5/Imakefile bibview-2.0/Imakefilebibview-1.5/Makefile bibview-2.0/Makefile *** bibview-1.5/Makefile Mon Jun 7 09:14:34 1993 --- bibview-2.0/Makefile Fri Jun 18 17:28:15 1993 *************** *** 7,13 **** # # ------------------------------------------------------------------------- ! # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl,v 1.157 92/06/28 17:40:08 rws Exp $ # # Platform-specific parameters may be set in the appropriate .cf --- 7,13 ---- # # ------------------------------------------------------------------------- ! # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl,v 1.157 92/06/28 17:40:08 rws Exp $ # # Platform-specific parameters may be set in the appropriate .cf *************** *** 102,109 **** TOP_INCLUDES = -I$(INCROOT) ! CDEBUGFLAGS = +O1 ! CCOPTIONS = +DA1.0 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) --- 102,109 ---- TOP_INCLUDES = -I$(INCROOT) ! CDEBUGFLAGS = ! CCOPTIONS = -O ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) diff -cr bibview-1.5/Makefile bibview-2.0/Makefilebibview-1.5/Makefile.bak bibview-2.0/Makefile.bak *** bibview-1.5/Makefile.bak Wed Jun 2 18:06:04 1993 --- bibview-2.0/Makefile.bak Thu Jun 17 17:31:21 1993 *************** *** 7,13 **** # # ------------------------------------------------------------------------- ! # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl,v 1.157 92/06/28 17:40:08 rws Exp $ # # Platform-specific parameters may be set in the appropriate .cf --- 7,13 ---- # # ------------------------------------------------------------------------- ! # Makefile generated from "Imake.tmpl" and # $XConsortium: Imake.tmpl,v 1.157 92/06/28 17:40:08 rws Exp $ # # Platform-specific parameters may be set in the appropriate .cf *************** *** 102,109 **** TOP_INCLUDES = -I$(INCROOT) ! CDEBUGFLAGS = +O1 ! CCOPTIONS = +DA1.0 ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) --- 102,109 ---- TOP_INCLUDES = -I$(INCROOT) ! CDEBUGFLAGS = ! CCOPTIONS = -O ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) *************** *** 284,296 **** # # ! SYS_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lm -lc ! ! DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) ! CC = cc -Aa ! DEFINES = -D_HPUX_SOURCE SRCS = bibview.c FileNom.c gui_main.c ctl_open.c ctl_opt.c\ gui_bibl.c gui_help.c ctl_srch.c gui_widg.c ctl_save.c\ --- 284,296 ---- # # ! DEFINES = -D_HPUX_SOURCE ! SYS_LIBRARIES = -lm ! CDEBUGFLAGS = CC = cc -Aa ! LOCAL_LIBRARIES = -lc $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) ! DEPLIBS = $(DEPXLIB) SRCS = bibview.c FileNom.c gui_main.c ctl_open.c ctl_opt.c\ gui_bibl.c gui_help.c ctl_srch.c gui_widg.c ctl_save.c\ *************** *** 303,308 **** --- 303,311 ---- gui_list.o gui_card.o ctl_card.o ctl_serv.o\ db_tree.o bib_file.o globdata.o bib_flex.o\ ComboBo.o rc_file.o ctl_prt.o gui_edit.o + + PROGRAMS = bibview + all:: $(PROGRAMS) PROGRAM = bibview diff -cr bibview-1.5/Makefile.bak bibview-2.0/Makefile.bakbibview-1.5/README bibview-2.0/README *** bibview-1.5/README Wed Mar 31 18:26:11 1993 --- bibview-2.0/README Fri Jun 18 16:39:48 1993 *************** *** 43,48 **** --- 43,52 ---- To create the German version, change the corresponding line of the Imakefile to #define German YES + If you have problems with the FileSelectBox reporting + "Action not found:...", then compile it with the + flag -DACTION_PROBLEM + Questions, comments, hacked source code: diff -cr bibview-1.5/README bibview-2.0/READMEbibview-1.5/b.tab.h bibview-2.0/b.tab.h *** bibview-1.5/b.tab.h Mon May 24 16:08:43 1993 --- bibview-2.0/b.tab.h Fri Jun 18 12:20:48 1993 *************** *** 1,31 **** # define COMMENT 257 # define STRING 258 # define PREAMBLE 259 ! # define ARTICLE 260 ! # define BOOK 261 ! # define BOOKLET 262 ! # define CONFERENCE 263 ! # define INBOOK 264 ! # define INCOLLECTION 265 ! # define INPROCEEDINGS 266 ! # define MANUAL 267 ! # define MASTERSTHESIS 268 ! # define MISC 269 ! # define PHDTHESIS 270 ! # define PROCEEDINGS 271 ! # define TECHREPORT 272 ! # define UNPUBLISHED 273 ! # define TYPE 274 ! # define KOMMA 275 ! # define EQ 276 ! # define LGKL 277 ! # define RGKL 278 ! # define LRKL 279 ! # define RRKL 280 ! # define DAZ 281 ! # define ZAUN 282 ! # define PROZENT 283 ! # define ZEICHEN 284 ! # define WHITE_SPACE 285 ! # define BUCHSTABE_ZAHL 286 ! # define KOMMENTAR 287 --- 1,18 ---- # define COMMENT 257 # define STRING 258 # define PREAMBLE 259 ! # define TYPE 260 ! # define KOMMA 261 ! # define EQ 262 ! # define AFFE 263 ! # define LGKL 264 ! # define RGKL 265 ! # define LRKL 266 ! # define RRKL 267 ! # define DAZ 268 ! # define ZAUN 269 ! # define PROZENT 270 ! # define ZEICHEN 271 ! # define WHITE_SPACE 272 ! # define BUCHSTABE_ZAHL 273 ! # define KOMMENTAR 274 diff -cr bibview-1.5/b.tab.h bibview-2.0/b.tab.hbibview-1.5/bib_file.c bibview-2.0/bib_file.c *** bibview-1.5/bib_file.c Fri Jun 4 13:03:28 1993 --- bibview-2.0/bib_file.c Fri Jun 18 15:47:54 1993 *************** *** 10,18 **** #define __RUNTIME_YYMAXDEPTH #define YYMAXDEPTH 1000 - #define MAX_UEBERGABE 20000 - char uebergabe[MAX_UEBERGABE]; int ueIdx = 0; FILE *tempDatei; --- 10,17 ---- #define __RUNTIME_YYMAXDEPTH #define YYMAXDEPTH 1000 char uebergabe[MAX_UEBERGABE]; + char ue2[MAX_UEBERGABE]; int ueIdx = 0; FILE *tempDatei; *************** *** 20,27 **** extern YY_NEW_FILE; extern int yy_init; ! extern int fld_indent, cont_indent, newline_indent; ! extern int max_fields; typedef struct _Snode { char inh; --- 19,25 ---- extern YY_NEW_FILE; extern int yy_init; ! extern int fld_indent, cont_indent, newline_indent, max_fields; typedef struct _Snode { char inh; *************** *** 44,50 **** static Snode *key = NULL; static Snode *fldname = NULL; - static Snode *fldcont = NULL; static char errstr[MAX_ERRLINELENGTH]; #ifdef GERMAN --- 42,47 ---- *************** *** 74,81 **** /*******************************************/ static void PushSign(Snode **w, char a); - static void AppendSign(Snode **w, char a); static void FreeStack(Snode **s); static void StackToString(Snode *s, char **text); static void GetKey(); static void GetFldNameCont(); --- 71,78 ---- /*******************************************/ static void PushSign(Snode **w, char a); static void FreeStack(Snode **s); + static void StringToString(char *text1, char **text); static void StackToString(Snode *s, char **text); static void GetKey(); static void GetFldNameCont(); *************** *** 82,89 **** static void SecStrcat(int maxlen, char *str1, char *str2); static int SetInputFile(char *file); ! static int SkipSpace(char *text, Snode **new); static int SkipNewLineSpace(char *text); static int StringIsPeteEmpty(char *text); static void WriteRecToFile(CardData *card, FILE *datei); static long WriteLineToFile(FILE *datei, char *feld, char *inh); --- 79,87 ---- static void SecStrcat(int maxlen, char *str1, char *str2); static int SetInputFile(char *file); ! static int SkipSpace(char *text, char *text2); static int SkipNewLineSpace(char *text); + static int SkipApe(char *text); static int StringIsPeteEmpty(char *text); static void WriteRecToFile(CardData *card, FILE *datei); static long WriteLineToFile(FILE *datei, char *feld, char *inh); *************** *** 97,130 **** # define COMMENT 257 # define STRING 258 # define PREAMBLE 259 ! # define ARTICLE 260 ! # define BOOK 261 ! # define BOOKLET 262 ! # define CONFERENCE 263 ! # define INBOOK 264 ! # define INCOLLECTION 265 ! # define INPROCEEDINGS 266 ! # define MANUAL 267 ! # define MASTERSTHESIS 268 ! # define MISC 269 ! # define PHDTHESIS 270 ! # define PROCEEDINGS 271 ! # define TECHREPORT 272 ! # define UNPUBLISHED 273 ! # define TYPE 274 ! # define KOMMA 275 ! # define EQ 276 ! # define LGKL 277 ! # define RGKL 278 ! # define LRKL 279 ! # define RRKL 280 ! # define DAZ 281 ! # define ZAUN 282 ! # define PROZENT 283 ! # define ZEICHEN 284 ! # define WHITE_SPACE 285 ! # define BUCHSTABE_ZAHL 286 ! # define KOMMENTAR 287 #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yychar; --- 95,115 ---- # define COMMENT 257 # define STRING 258 # define PREAMBLE 259 ! # define TYPE 260 ! # define KOMMA 261 ! # define EQ 262 ! # define AFFE 263 ! # define LGKL 264 ! # define RGKL 265 ! # define LRKL 266 ! # define RRKL 267 ! # define DAZ 268 ! # define ZAUN 269 ! # define PROZENT 270 ! # define ZEICHEN 271 ! # define WHITE_SPACE 272 ! # define BUCHSTABE_ZAHL 273 ! # define KOMMENTAR 274 #define yyclearin yychar = -1 #define yyerrok yyerrflag = 0 extern int yychar; *************** *** 153,158 **** --- 138,158 ---- + static int SkipApe(char *text) + { + int erg, back; + + erg = 0; + while (erg < MAX_UEBERGABE) { + if (*text == '@') + return erg+1; + text++; + erg++; + } + return 0; + } + + static int SkipNewLineSpace(char *text) { int erg, back; *************** *** 175,190 **** } ! ! ! static int SkipSpace(char *text, Snode **new) { int erg, lgkl, daz, index, inmakro; index = 0; lgkl = 0; daz = 0; inmakro = 0; while ((*text == ' ' || *text == '=' || *text == '\t') && index < ueIdx) { text++; index++; } erg = index; --- 175,190 ---- } ! static int SkipSpace(char *text, char *text2) { int erg, lgkl, daz, index, inmakro; + char *zaehler; index = 0; lgkl = 0; daz = 0; inmakro = 0; + zaehler = text2; while ((*text == ' ' || *text == '=' || *text == '\t') && index < ueIdx) { text++; index++; } erg = index; *************** *** 201,216 **** inmakro = 0; } else { ! AppendSign(new, '@'); ! AppendSign(new, *text); index++; text++; inmakro = 1; } while (index < ueIdx) { ! if (*text == '{') { if (lgkl >= 1 || daz >= 1) { /* Klammer in String */ ! AppendSign(new, *text); } text++; /* Klammer nach Zaun */ index++; --- 201,230 ---- inmakro = 0; } else { ! *zaehler++ = '@'; ! *zaehler++ = *text; index++; text++; inmakro = 1; } while (index < ueIdx) { ! if (isalnum(*text)) { ! if (lgkl < 1 && daz < 1 && (inmakro==0)) { ! if (text[index-1] != ' ') ! *zaehler++ = ' '; ! *zaehler++ = '@'; ! *zaehler++ = *text; ! inmakro = 1; ! } ! else { /* Zeichen in String */ ! *zaehler++ = *text; ! } ! text++; ! index++; ! } ! else if (*text == '{') { if (lgkl >= 1 || daz >= 1) { /* Klammer in String */ ! *zaehler++ = *text; } text++; /* Klammer nach Zaun */ index++; *************** *** 218,224 **** inmakro = 0; } else if (*text == '\n') { ! AppendSign(new, *text); text++; index++; while ((*text == ' ') || (*text == '\t')){ --- 232,238 ---- inmakro = 0; } else if (*text == '\n') { ! *zaehler++ = *text; text++; index++; while ((*text == ' ') || (*text == '\t')){ *************** *** 229,235 **** } else if (*text == '}') { if ((lgkl > 1) || (daz >= 1)) { ! AppendSign(new, *text); } text++; index++; --- 243,249 ---- } else if (*text == '}') { if ((lgkl > 1) || (daz >= 1)) { ! *zaehler++ = *text; } text++; index++; *************** *** 238,244 **** } else if (*text == '"') { if (lgkl >= 1) { ! AppendSign(new, *text); text++; index++; } --- 252,258 ---- } else if (*text == '"') { if (lgkl >= 1) { ! *zaehler++ = *text; text++; index++; } *************** *** 252,264 **** } else if (*text == '#') { /* Space vor/nach Konkatenation */ if (lgkl < 1 && daz < 1) { ! if (text[index-1] != ' ') AppendSign(new, ' '); ! AppendSign(new, '@'); /* # -> @# */ ! AppendSign(new, *text); ! if (text[index+1] != ' ') AppendSign(new, ' '); } else { /* Konkatenation in String */ ! AppendSign(new, *text); } text++; index++; --- 266,280 ---- } else if (*text == '#') { /* Space vor/nach Konkatenation */ if (lgkl < 1 && daz < 1) { ! if (text[index-1] != ' ') ! *zaehler++ = ' '; ! *zaehler++ = '@'; ! *zaehler++ = *text; ! if (text[index+1] != ' ') ! *zaehler++ = ' '; } else { /* Konkatenation in String */ ! *zaehler++ = *text; } text++; index++; *************** *** 267,273 **** else if (*text == ',') { /* Komma am Ende */ if (lgkl < 1 && daz != 1) break; else { ! AppendSign(new, *text); text++; index++; } --- 283,289 ---- else if (*text == ',') { /* Komma am Ende */ if (lgkl < 1 && daz != 1) break; else { ! *zaehler++ = *text; text++; index++; } *************** *** 276,313 **** else if (*text == ')') { /* runde Klammer am Ende */ if (lgkl < 1 && daz != 1) break; else { ! AppendSign(new, *text); text++; index++; } inmakro = 0; } ! else if (isalnum(*text)) { ! if (lgkl < 1 && daz < 1 && (inmakro==0)) { ! if (text[index-1] != ' ') AppendSign(new, ' '); ! AppendSign(new, '@'); /* makro -> @makro */ ! AppendSign(new, *text); ! inmakro = 1; ! } ! else { /* Zeichen in String */ ! AppendSign(new, *text); ! } text++; index++; } else { /* sonstiges Zeichen in String */ ! AppendSign(new, *text); text++; index++; inmakro = 0; } } return erg; } - - static void PushSign(Snode **w, char a) { Snode *hnode, *oldw; --- 292,322 ---- else if (*text == ')') { /* runde Klammer am Ende */ if (lgkl < 1 && daz != 1) break; else { ! *zaehler++ = *text; text++; index++; } inmakro = 0; } ! else if (*text == '@') { /* @ */ ! *zaehler++ = *text; ! *zaehler++ = *text; text++; index++; + inmakro = 0; } else { /* sonstiges Zeichen in String */ ! *zaehler++ = *text; text++; index++; inmakro = 0; } } + *zaehler++ = '\0'; return erg; } static void PushSign(Snode **w, char a) { Snode *hnode, *oldw; *************** *** 330,366 **** } - static void AppendSign(Snode **w, char a) - { - Snode *hnode, *oldw; - int newslen; - - if (*w == NULL) { - hnode = (Snode *)XtCalloc(1,sizeof(Snode)); - hnode->inh = a; - hnode->slen = 1; - hnode->next = NULL; - *w = hnode; - } - else { - oldw = *w; - newslen = 1; - while (oldw->next != NULL) { - newslen++; - oldw = oldw->next; - } - newslen++; - hnode = (Snode *)XtCalloc(1,sizeof(Snode)); - hnode->inh = a; - hnode->slen = 1; - hnode->next = NULL; - oldw->next = hnode; - oldw = *w; - oldw->slen = newslen; /* echte Laenge nur im 1. El. */ - } - } - - static void FreeStack(Snode **s) { Snode *h, *del; --- 339,344 ---- *************** *** 375,380 **** --- 353,366 ---- } + static void StringToString(char *text1, char **text) + + { + *text = (char *)XtCalloc(1,strlen(text1)+1); + strcpy(*text, text1); + } + + static void StackToString(Snode *s, char **text) { char *help; *************** *** 405,410 **** --- 391,397 ---- FreeStack(&key); err = dbtInsert(glbbp, card); err = dbtDeleteCard(&card); + ueIdx = 0; } *************** *** 419,434 **** } StackToString(fldname, &helpFldName); strlower(helpFldName); ! SkipSpace(uebergabe, &fldcont); found = 0; for (i=0;ifield[i]); else { err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StackToString(fldcont, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } found = 1; --- 406,421 ---- } StackToString(fldname, &helpFldName); strlower(helpFldName); ! SkipSpace(uebergabe, ue2); found = 0; for (i=0;ifield[i]); else { err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StringToString(ue2, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } found = 1; *************** *** 438,448 **** if (!found){ err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StackToString(fldcont, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } FreeStack(&fldname); - FreeStack(&fldcont); } static void SecStrcat(int maxlen, char *str1, char *str2) --- 425,434 ---- if (!found){ err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StringToString(ue2, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } FreeStack(&fldname); } static void SecStrcat(int maxlen, char *str1, char *str2) *************** *** 484,489 **** --- 470,476 ---- Errcode bifFileRead(BibPtr bp) { int erg; + char *tempName; yynline = 1; yynflexcalls = 0; *************** *** 491,498 **** sprintf(errorstr, anfhelpstr, "KEY", "OFFSET", "LINE"); #ifdef NO_TEMPNAM ! bp->tempfile = (char *)tmpnam(NULL); ! bp->macrofile = (char *)tmpnam(NULL); #else bp->tempfile = (char *)tempnam(NULL, NULL); bp->macrofile = (char *)tempnam(NULL, NULL); --- 478,489 ---- sprintf(errorstr, anfhelpstr, "KEY", "OFFSET", "LINE"); #ifdef NO_TEMPNAM ! tempName = (char *)tmpnam(NULL); ! bp->tempfile = (char *)XtMalloc(strlen(tempName)+1); ! strcpy(bp->tempfile,tempName); ! tempName = (char *)tmpnam(NULL); ! bp->macrofile = (char *)XtMalloc(strlen(tempName)+1); ! strcpy(bp->macrofile,tempName); #else bp->tempfile = (char *)tempnam(NULL, NULL); bp->macrofile = (char *)tempnam(NULL, NULL); *************** *** 527,533 **** if (yyin) fclose(yyin); FreeStack(&key); FreeStack(&fldname); - FreeStack(&fldcont); return (Errcode)erg; } } --- 518,523 ---- *************** *** 537,544 **** Errcode bifFileWrite(BibPtr bp) { char sysStr[2*MAX_FILEPATHLEN]; - CardListNode *cl = NULL; Errcode status; if (bp->macrofile!=NULL){ --- 527,535 ---- Errcode bifFileWrite(BibPtr bp) { char sysStr[2*MAX_FILEPATHLEN]; CardListNode *cl = NULL; + char wcKey[] = "."; + CardData *wcCard; Errcode status; if (bp->macrofile!=NULL){ *************** *** 552,560 **** if (tempDatei == NULL) return BIF_EWRITE; ! if ((status = dbtBuildList(bp->treeIdx, &cl, bp->sortedby)) != DBT_OK) { ! return (status); } while (cl != NULL) { WriteRecToFile(cl->data, tempDatei); --- 543,558 ---- if (tempDatei == NULL) return BIF_EWRITE; ! /* build list with wildcard search */ ! if ((status = (int)dbtMakeCard(&wcCard)) != OK) { ! guwError(status); } + wcCard->cardtype = (int)regexpr; + wcCard->mainkey = glbNewString("."); + if ((status = dbtSearchList(bp->treeIdx, wcCard, &cl, bp->sortedby)) != OK) { + guwError(status); + return(status); + } while (cl != NULL) { WriteRecToFile(cl->data, tempDatei); *************** *** 571,576 **** --- 569,575 ---- Errcode bifFileListWrite(BibPtr bp, CardListNode *list, String fname) { CardListNode *hlist; + Errcode erg; char sysStr[2*MAX_FILEPATHLEN]; if (bp->macrofile!=NULL){ *************** *** 638,643 **** --- 637,651 ---- case '@': if (inmakro) fprintf(datei, " "); + else if (*(zeichen+1) == '@'){ + if (instring){ + *blankptr++ = '\0'; + fprintf(datei, "%s", blank); + blankptr = blank; + } + fprintf(datei, "@"); + zeichen++; + } else if (instring){ fprintf(datei, "} "); inmakro = 1; *************** *** 780,969 **** 0, 3, -2, 0, }; ! # define YYNPROD 182 ! # define YYLAST 513 __YYSCLASS yytabelem yyact[]={ ! 21, 17, 22, 23, 45, 46, 50, 188, 51, 52, ! 49, 47, 48, 43, 41, 44, 42, 184, 25, 4, ! 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ! 15, 16, 45, 46, 50, 95, 51, 52, 49, 47, ! 48, 43, 41, 44, 42, 195, 197, 201, 209, 199, ! 200, 190, 198, 196, 194, 191, 193, 192, 45, 46, ! 50, 205, 51, 52, 49, 47, 48, 43, 41, 44, ! 42, 60, 61, 65, 180, 66, 113, 64, 62, 63, ! 58, 56, 59, 57, 60, 61, 65, 111, 66, 246, ! 64, 62, 63, 58, 56, 59, 57, 195, 197, 201, ! 136, 199, 200, 134, 198, 196, 194, 191, 193, 192, ! 229, 231, 228, 241, 226, 227, 230, 131, 117, 225, ! 222, 224, 223, 229, 231, 228, 221, 226, 227, 230, ! 156, 100, 225, 222, 224, 223, 60, 61, 65, 32, ! 66, 33, 64, 62, 63, 58, 56, 59, 57, 229, ! 231, 228, 167, 226, 227, 230, 232, 80, 225, 222, ! 224, 223, 78, 177, 79, 77, 32, 76, 33, 171, ! 32, 208, 33, 172, 164, 153, 175, 32, 174, 33, ! 142, 32, 141, 33, 80, 32, 220, 33, 37, 78, ! 39, 79, 77, 34, 76, 36, 32, 29, 33, 31, ! 204, 32, 171, 33, 163, 32, 172, 33, 179, 175, ! 145, 174, 162, 32, 151, 33, 32, 32, 33, 33, ! 135, 32, 142, 33, 141, 175, 81, 174, 82, 70, ! 53, 71, 54, 132, 130, 128, 114, 84, 28, 144, ! 127, 118, 189, 137, 140, 173, 73, 40, 55, 1, ! 24, 169, 26, 27, 20, 75, 19, 18, 3, 2, ! 0, 168, 0, 0, 139, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 69, 0, 0, 72, 83, 0, 0, 85, ! 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, ! 97, 98, 0, 99, 0, 101, 102, 103, 104, 105, ! 106, 107, 108, 109, 110, 112, 0, 0, 115, 0, ! 116, 0, 0, 0, 0, 74, 0, 0, 125, 126, ! 119, 0, 121, 122, 123, 124, 0, 0, 0, 0, ! 0, 0, 0, 129, 0, 0, 0, 0, 30, 35, ! 38, 0, 0, 0, 0, 0, 0, 0, 67, 68, ! 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 146, 0, 0, 0, 0, 147, 0, 0, 0, ! 0, 148, 0, 149, 0, 0, 157, 158, 159, 160, ! 0, 0, 0, 0, 0, 0, 0, 165, 0, 0, ! 0, 120, 0, 152, 0, 0, 0, 0, 181, 234, ! 235, 236, 237, 238, 239, 240, 242, 243, 244, 187, ! 202, 203, 186, 0, 0, 0, 0, 0, 247, 183, ! 0, 152, 0, 248, 210, 211, 212, 213, 214, 215, ! 216, 217, 218, 219, 138, 143, 206, 152, 0, 0, ! 0, 0, 0, 138, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 150, 233, 154, 155, 0, 0, 0, ! 138, 138, 161, 0, 0, 245, 0, 0, 0, 166, ! 0, 0, 170, 0, 0, 176, 178, 0, 0, 0, ! 182, 0, 0, 170, 0, 185, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ! 170, 0, 207 }; __YYSCLASS yytabelem yypact[]={ ! -256, -3000, -256, -256, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, ! -3000, -40, -80, -84, -89, -3000, -3000, -3000, -3000, -217, ! -47, -139, -69, -69, -217, -48, -139, -119, -51, -119, ! -41, -217, -217, -217, -217, -217, -217, -217, -217, -217, ! -243, -217, -217, -217, -139, -149, -139, -139, -139, -139, ! -139, -139, -139, -139, -139, -191, -204, -3000, -3000, -42, ! -217, -139, -162, -34, -92, -69, -92, -92, -92, -92, ! -3000, -119, -119, -35, -3000, -3000, -3000, -3000, -3000, -3000, ! -3000, -3000, -3000, -3000, -43, -217, -3000, -3000, -44, -163, ! -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, ! -45, -139, -177, -3000, -3000, -58, -180, -3000, -104, -69, ! -3000, -3000, -3000, -3000, -3000, -36, -65, -104, -217, -3000, ! -3000, -3000, -139, -3000, -139, -3000, -3000, -64, -62, -100, ! -146, -62, -62, -3000, -104, -104, -68, -3000, -3000, -3000, ! -74, -3000, -101, -104, -3000, -124, -108, -3000, -3000, -115, ! -72, -206, -3000, -3000, -104, -3000, -62, -108, -265, -69, ! -75, -271, -230, -3000, -59, -59, -78, -3000, -219, -3000, ! -3000, -3000, -62, -265, -108, -3000, -69, -107, -3000, -233, ! -3000, -178, -178, -178, -178, -178, -178, -178, -178, -178, ! -178, -152, -3000, -3000, -3000, -3000, -265, -3000, -3000, -3000, ! -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, ! -122, -178, -126, -126, -126, -126, -126, -126, -165, -126, ! -126, -126, -178, -3000, -3000, -3000, -3000, -3000, -3000, -3000, ! -189, -126, -3000, -3000, -3000, -3000, -126, -3000, -3000 }; __YYSCLASS yytabelem yypgo[]={ ! 0, 249, 259, 258, 257, 256, 254, 247, 325, 248, ! 250, 246, 243, 255, 264, 244, 261, 251, 242, 245, ! 186 }; __YYSCLASS yytabelem yyr1[]={ 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, ! 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, ! 5, 7, 7, 7, 7, 7, 7, 7, 7, 7, ! 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, ! 7, 7, 7, 7, 7, 7, 7, 9, 9, 9, ! 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, ! 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, ! 9, 9, 6, 6, 6, 6, 6, 6, 6, 6, ! 10, 11, 11, 11, 11, 13, 13, 13, 13, 13, ! 13, 13, 13, 13, 12, 12, 12, 12, 12, 12, ! 12, 12, 12, 14, 14, 15, 15, 15, 15, 8, ! 8, 8, 8, 16, 16, 16, 16, 16, 17, 17, ! 17, 17, 17, 19, 19, 19, 19, 18, 18, 18, ! 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, ! 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, ! 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, ! 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, ! 20, 20 }; __YYSCLASS yytabelem yyr2[]={ 0, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 9, 11, 9, 11, 9, 11, 9, ! 11, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 8, 6, 6, 4, 4, 4, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 8, 6, 6, 4, ! 8, 6, 4, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 15, 17, 13, 15, 15, 17, 13, 15, ! 3, 4, 4, 6, 2, 5, 5, 5, 5, 3, ! 3, 3, 3, 3, 8, 6, 6, 8, 4, 6, ! 4, 2, 4, 9, 7, 5, 5, 3, 3, 4, ! 4, 2, 2, 6, 2, 4, 4, 6, 6, 6, ! 4, 4, 2, 4, 4, 2, 2, 4, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 6, 8, 4, ! 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 4, 4, 4, 4, 4, 4, 6, 8, 4, ! 6, 2, 2, 2, 4, 4, 4, 2, 2, 2, ! 2, 2 }; __YYSCLASS yytabelem yychk[]={ ! -3000, -1, -2, -3, 275, 276, 277, 278, 279, 280, ! 281, 282, 283, 284, 285, 286, 287, 257, -4, -5, ! -6, 256, 258, 259, -10, 274, -1, -1, 278, 277, ! -8, 279, 285, 287, 277, -8, 279, 277, -8, 279, ! -7, 285, 287, 284, 286, 275, 276, 282, 283, 281, ! 277, 279, 280, 277, 279, -9, 285, 287, 284, 286, ! 275, 276, 282, 283, 281, 277, 279, -8, -8, -7, ! 277, 279, -9, -11, -8, -13, 286, 284, 281, 283, ! 276, 277, 279, -11, 278, -7, -7, -7, -7, -7, ! -7, -7, -7, -7, -7, 278, -7, -7, -7, -9, ! 280, -9, -9, -9, -9, -9, -9, -9, -9, -9, ! -9, 278, -9, 280, 278, -7, -9, 280, 275, -13, ! -8, -13, -13, -13, -13, -11, -11, 275, 278, -7, ! 278, 280, 278, -9, 280, 278, 280, -12, -8, -14, ! -15, 286, 284, -8, 275, 275, -12, -7, -9, -9, ! -8, 278, -14, 275, -8, -8, 276, -15, -15, -12, ! -12, -8, 280, 278, 275, -12, -8, 276, -16, -17, ! -8, 277, 281, -19, 286, 284, -8, 278, -8, 280, ! 280, -12, -8, -16, 282, -8, -17, -7, 278, -18, ! 281, 285, 287, 286, 284, 275, 283, 276, 282, 279, ! 280, 277, -19, -19, 278, 280, -16, -8, 278, 281, ! -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, ! -20, 278, 285, 287, 286, 284, 279, 280, 277, 275, ! 281, 276, 278, -18, -20, -20, -20, -20, -20, -20, ! -20, 278, -20, -20, -20, -18, 278, -20, -20 }; __YYSCLASS yytabelem yydef[]={ 0, -2, -2, -2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ! 21, 0, 0, 0, 0, 90, 1, 2, 22, 0, ! 0, 0, 121, 122, 0, 0, 0, 0, 0, 0, ! 0, 46, 47, 48, 49, 50, 51, 52, 53, 54, ! 0, 55, 56, 0, 0, 0, 73, 74, 75, 76, ! 77, 78, 79, 80, 81, 0, 0, 119, 120, 0, ! 0, 0, 0, 0, 0, 94, 99, 100, 102, 103, ! 101, 0, 0, 0, 23, 31, 32, 33, 34, 35, ! 36, 37, 38, 39, 0, 43, 44, 45, 0, 0, ! 25, 57, 58, 59, 60, 61, 62, 63, 64, 65, ! 0, 69, 0, 72, 27, 0, 0, 29, 0, 91, ! 92, 95, 96, 97, 98, 0, 0, 0, 42, 41, ! 24, 26, 68, 67, 71, 28, 30, 0, 0, 111, ! 0, 117, 118, 93, 0, 0, 0, 40, 66, 70, ! 0, 84, 110, 108, 112, 0, 0, 115, 116, 0, ! 0, 0, 88, 82, 106, 105, 109, 0, 114, 124, ! 0, 0, 0, 132, 135, 136, 0, 85, 0, 89, ! 86, 104, 107, 113, 0, 125, 126, 0, 131, 0, ! 130, 151, 152, 153, 154, 155, 156, 157, 158, 159, ! 160, 0, 133, 134, 83, 87, 123, 127, 128, 129, ! 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, ! 0, 149, 171, 172, 173, 177, 178, 179, 0, 180, ! 181, 0, 147, 150, 161, 162, 163, 164, 165, 166, ! 0, 169, 174, 175, 176, 148, 167, 170, 168 }; typedef struct { char *t_name; int t_val; } yytoktype; #ifndef YYDEBUG # define YYDEBUG 0 /* don't allow debugging */ --- 788,1011 ---- 0, 3, -2, 0, }; ! # define YYNPROD 233 ! # define YYLAST 573 __YYSCLASS yytabelem yyact[]={ ! 266, 97, 33, 227, 34, 98, 99, 96, 255, 100, ! 95, 33, 94, 34, 225, 212, 232, 60, 58, 59, ! 57, 49, 50, 61, 54, 231, 55, 56, 53, 51, ! 52, 47, 45, 48, 46, 60, 58, 59, 57, 49, ! 50, 61, 54, 115, 55, 56, 53, 51, 52, 47, ! 45, 48, 46, 21, 22, 23, 24, 26, 4, 5, ! 175, 6, 7, 8, 9, 10, 11, 12, 13, 14, ! 15, 16, 248, 246, 247, 245, 238, 240, 249, 244, ! 173, 242, 243, 233, 241, 239, 237, 234, 236, 235, ! 60, 58, 59, 57, 49, 50, 61, 54, 171, 55, ! 56, 53, 51, 52, 47, 45, 48, 46, 79, 77, ! 78, 76, 69, 70, 80, 74, 168, 75, 138, 73, ! 71, 72, 67, 65, 68, 66, 79, 77, 78, 76, ! 69, 70, 80, 74, 136, 75, 307, 73, 71, 72, ! 67, 65, 68, 66, 248, 246, 247, 245, 238, 240, ! 249, 244, 151, 242, 243, 147, 241, 239, 237, 234, ! 236, 235, 278, 276, 277, 275, 280, 282, 279, 274, ! 297, 272, 273, 281, 125, 288, 271, 268, 270, 269, ! 278, 276, 277, 275, 280, 282, 279, 274, 267, 272, ! 273, 281, 254, 224, 271, 268, 270, 269, 79, 77, ! 78, 76, 69, 70, 80, 74, 223, 75, 222, 73, ! 71, 72, 67, 65, 68, 66, 278, 276, 277, 275, ! 280, 282, 279, 274, 206, 272, 273, 281, 209, 202, ! 271, 268, 270, 269, 219, 33, 174, 34, 220, 203, ! 172, 223, 33, 222, 34, 181, 33, 180, 34, 169, ! 167, 256, 257, 258, 259, 260, 261, 262, 263, 264, ! 265, 165, 283, 284, 285, 286, 287, 148, 144, 290, ! 291, 292, 293, 294, 295, 296, 298, 299, 300, 301, ! 302, 303, 304, 305, 289, 97, 104, 29, 219, 98, ! 99, 96, 220, 100, 95, 223, 94, 222, 308, 41, ! 184, 43, 38, 183, 40, 306, 164, 33, 309, 34, ! 33, 35, 34, 37, 30, 152, 32, 195, 211, 33, ! 221, 34, 33, 33, 34, 34, 201, 33, 192, 34, ! 92, 33, 181, 34, 180, 190, 101, 44, 102, 33, ! 216, 34, 33, 88, 34, 89, 84, 62, 85, 63, ! 217, 179, 207, 31, 36, 39, 42, 178, 1, 215, ! 25, 27, 28, 20, 81, 82, 176, 93, 91, 64, ! 19, 18, 17, 83, 3, 2, 87, 0, 0, 0, ! 0, 0, 0, 105, 106, 107, 108, 109, 110, 111, ! 112, 113, 114, 116, 117, 118, 119, 120, 121, 122, ! 123, 0, 0, 0, 0, 0, 0, 86, 0, 0, ! 90, 0, 103, 0, 0, 140, 0, 0, 0, 0, ! 0, 0, 145, 0, 154, 0, 149, 0, 0, 0, ! 0, 0, 0, 124, 0, 126, 127, 128, 129, 130, ! 131, 132, 133, 134, 135, 137, 139, 0, 141, 142, ! 143, 0, 0, 166, 0, 146, 0, 0, 0, 150, ! 153, 0, 155, 156, 157, 158, 159, 160, 161, 0, ! 162, 163, 0, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 177, 182, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 177, 0, 0, 0, 0, ! 0, 0, 0, 186, 0, 0, 170, 189, 0, 193, ! 194, 0, 0, 0, 177, 177, 200, 0, 0, 0, ! 0, 0, 0, 205, 0, 0, 0, 0, 0, 208, ! 210, 185, 196, 197, 214, 191, 0, 0, 218, 187, ! 0, 188, 0, 250, 251, 0, 218, 0, 228, 0, ! 198, 199, 0, 0, 0, 0, 226, 230, 218, 204, ! 253, 0, 0, 191, 0, 0, 0, 0, 252, 229, ! 213, 0, 191 }; __YYSCLASS yytabelem yypact[]={ ! -203, -3000, -203, -203, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, -3000, ! -3000, 22, 50, 47, 38, 35, -3000, -3000, -3000, -3000, ! -167, 83, -59, -270, -270, -167, 82, -59, -167, 79, ! -59, -261, 72, -261, 21, -167, -167, -167, -167, -167, ! -167, -167, -167, -167, -222, -167, -167, -167, -167, -167, ! -167, -167, -167, -59, -93, -59, -59, -59, -59, -59, ! -59, -59, -59, -59, -131, -149, -59, -167, -59, -59, ! -59, -3000, -3000, 3, -167, -59, -112, 2, -167, -59, ! -115, 54, 23, -270, 23, 23, 23, 23, 23, 23, ! 23, -261, -261, 45, -3000, -3000, -3000, -3000, -3000, -3000, ! -3000, -3000, -3000, -3000, -4, -167, -3000, -3000, -3000, -3000, ! -3000, -3000, -3000, -15, -151, -3000, -3000, -3000, -3000, -3000, ! -3000, -3000, -3000, -3000, -3000, -16, -59, -169, -3000, -3000, ! -3000, -3000, -3000, -3000, -3000, -25, -187, -3000, -3000, -29, ! -207, -3000, -26, -270, -3000, -3000, -3000, -3000, -3000, -3000, ! -3000, -3000, 42, 39, -26, -167, -3000, -3000, -3000, -59, ! -3000, -59, -3000, -3000, -3000, -3000, 70, 61, 67, 55, ! 61, 61, -3000, -26, -26, 59, -3000, -3000, -3000, -36, ! -3000, -22, -26, -3000, -38, -3000, -3000, -3000, -37, 51, ! -252, -3000, -3000, -26, -3000, 61, -3000, -30, -72, -3000, ! -253, -3000, -3000, -3000, 61, -30, -266, -270, 24, -240, ! -185, -3000, -65, -65, -3000, -3000, -266, -30, -3000, -270, ! -73, -3000, -260, -3000, -113, -113, -113, -113, -113, -113, ! -113, -113, -113, -113, -77, -113, -113, -113, -113, -113, ! -3000, -3000, -266, -3000, -3000, -3000, -3000, -3000, -3000, -3000, ! -3000, -3000, -3000, -3000, -3000, -3000, -90, -113, -41, -41, ! -41, -41, -41, -41, -95, -41, -41, -41, -41, -41, ! -41, -41, -41, -3000, -3000, -3000, -3000, -3000, -113, -3000, ! -3000, -3000, -3000, -3000, -3000, -3000, -129, -41, -3000, -3000, ! -3000, -3000, -3000, -3000, -3000, -3000, -3000, -41, -3000, -3000 }; __YYSCLASS yytabelem yypgo[]={ ! 0, 358, 375, 374, 372, 371, 370, 363, 337, 330, ! 369, 360, 368, 366, 367, 357, 351, 359, 340, 352, ! 350, 16, 320, 0 }; __YYSCLASS yytabelem yyr1[]={ 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, ! 3, 3, 3, 5, 5, 5, 5, 4, 4, 4, ! 4, 6, 6, 6, 6, 8, 8, 8, 8, 8, ! 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, ! 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, ! 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, ! 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, ! 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, ! 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, ! 10, 10, 10, 10, 10, 10, 7, 7, 7, 7, ! 7, 7, 7, 7, 11, 12, 12, 12, 12, 14, ! 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, ! 14, 14, 14, 13, 13, 13, 13, 13, 13, 13, ! 13, 13, 17, 15, 19, 15, 16, 16, 16, 16, ! 9, 9, 9, 9, 18, 18, 18, 18, 18, 20, ! 20, 20, 20, 20, 22, 22, 22, 22, 21, 21, ! 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, ! 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, ! 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, ! 21, 21, 23, 23, 23, 23, 23, 23, 23, 23, ! 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, ! 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, ! 23, 23, 23 }; __YYSCLASS yytabelem yyr2[]={ 0, 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 5, 9, 11, 9, 11, 9, 11, 9, ! 11, 9, 11, 9, 11, 4, 4, 4, 4, 4, ! 4, 4, 4, 4, 8, 6, 6, 4, 4, 4, ! 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, ! 8, 6, 6, 4, 8, 6, 4, 4, 4, 4, ! 4, 4, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 15, 17, 13, 15, ! 15, 17, 13, 15, 3, 4, 4, 6, 2, 5, ! 5, 5, 5, 5, 5, 5, 3, 3, 3, 3, ! 3, 3, 3, 8, 6, 6, 8, 4, 6, 4, ! 2, 4, 1, 11, 1, 9, 5, 5, 3, 3, ! 4, 4, 2, 2, 6, 2, 4, 4, 6, 6, ! 6, 4, 4, 2, 4, 4, 2, 2, 4, 4, ! 4, 4, 4, 4, 4, 4, 4, 4, 6, 8, ! 4, 6, 4, 4, 4, 4, 4, 2, 2, 2, ! 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 4, 4, 4, 4, 4, 4, 6, 8, ! 4, 6, 4, 4, 4, 4, 4, 2, 2, 2, ! 4, 4, 4, 2, 2, 2, 2, 2, 2, 2, ! 2, 2, 2 }; __YYSCLASS yytabelem yychk[]={ ! -3000, -1, -2, -3, 261, 262, 264, 265, 266, 267, ! 268, 269, 270, 271, 272, 273, 274, -4, -5, -6, ! -7, 256, 257, 258, 259, -11, 260, -1, -1, 265, ! 264, -9, 266, 272, 274, 264, -9, 266, 264, -9, ! 266, 264, -9, 266, -8, 272, 274, 271, 273, 261, ! 262, 269, 270, 268, 264, 266, 267, 260, 258, 259, ! 257, 263, 264, 266, -10, 272, 274, 271, 273, 261, ! 262, 269, 270, 268, 264, 266, 260, 258, 259, 257, ! 263, -9, -9, -8, 264, 266, -10, -8, 264, 266, ! -10, -12, -9, -14, 273, 271, 268, 262, 266, 267, ! 270, 264, 266, -12, 265, -8, -8, -8, -8, -8, ! -8, -8, -8, -8, -8, 265, -8, -8, -8, -8, ! -8, -8, -8, -8, -10, 267, -10, -10, -10, -10, ! -10, -10, -10, -10, -10, -10, 265, -10, 267, -10, ! -8, -10, -10, -10, 265, -8, -10, 267, 265, -8, ! -10, 267, 261, -14, -9, -14, -14, -14, -14, -14, ! -14, -14, -12, -12, 261, 265, -8, 265, 267, 265, ! -10, 267, 265, 267, 265, 267, -13, -9, -15, -16, ! 273, 271, -9, 261, 261, -13, -8, -10, -10, -9, ! 265, -15, 261, -9, -9, 262, -16, -16, -13, -13, ! -9, 267, 265, 261, -13, -9, 262, -19, -9, 265, ! -9, 267, 267, -13, -9, -17, -18, -20, -9, 264, ! 268, -22, 273, 271, 265, 267, -18, 269, -9, -20, ! -8, 265, -21, 268, 272, 274, 273, 271, 261, 270, ! 262, 269, 266, 267, 264, 260, 258, 259, 257, 263, ! -22, -22, -18, -9, 265, 268, -21, -21, -21, -21, ! -21, -21, -21, -21, -21, -21, -23, 265, 272, 274, ! 273, 271, 266, 267, 264, 260, 258, 259, 257, 263, ! 261, 268, 262, -21, -21, -21, -21, -21, 265, -21, ! -23, -23, -23, -23, -23, -23, -23, 265, -23, -23, ! -23, -23, -23, -23, -23, -23, -21, 265, -23, -23 }; __YYSCLASS yytabelem yydef[]={ 0, -2, -2, -2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, ! 21, 0, 0, 0, 0, 0, 114, 1, 2, 22, ! 0, 0, 0, 152, 153, 0, 0, 0, 0, 0, ! 0, 0, 0, 0, 0, 55, 56, 57, 58, 59, ! 60, 61, 62, 63, 0, 64, 65, 66, 68, 69, ! 70, 67, 0, 0, 0, 92, 93, 94, 95, 96, ! 97, 98, 99, 100, 0, 0, 101, 103, 104, 105, ! 102, 150, 151, 0, 0, 0, 0, 0, 0, 0, ! 0, 0, 0, 118, 126, 127, 129, 128, 131, 132, ! 130, 0, 0, 0, 27, 35, 36, 37, 38, 39, ! 40, 41, 42, 43, 0, 47, 48, 49, 50, 51, ! 52, 53, 54, 0, 0, 29, 71, 72, 73, 74, ! 75, 76, 77, 78, 79, 0, 83, 0, 91, 86, ! 87, 88, 89, 90, 23, 0, 0, 25, 31, 0, ! 0, 33, 0, 115, 116, 119, 120, 121, 122, 123, ! 124, 125, 0, 0, 0, 46, 45, 28, 30, 82, ! 81, 85, 24, 26, 32, 34, 0, 0, 140, 0, ! 148, 149, 117, 0, 0, 0, 44, 80, 84, 0, ! 108, 139, 137, 141, 0, 144, 146, 147, 0, 0, ! 0, 112, 106, 135, 134, 138, 142, 0, 0, 109, ! 0, 113, 110, 133, 136, 0, 145, 155, 0, 0, ! 0, 163, 166, 167, 107, 111, 143, 0, 156, 157, ! 0, 162, 0, 161, 187, 188, 189, 190, 191, 192, ! 193, 194, 195, 196, 0, 198, 199, 200, 201, 197, ! 164, 165, 154, 158, 159, 160, 168, 169, 170, 171, ! 172, 173, 174, 175, 176, 177, 0, 180, 217, 218, ! 219, 223, 224, 225, 0, 229, 230, 231, 232, 228, ! 226, 227, 0, 182, 183, 184, 185, 186, 178, 181, ! 202, 203, 204, 205, 206, 207, 0, 210, 212, 213, ! 214, 215, 216, 220, 221, 222, 179, 208, 211, 209 }; typedef struct { char *t_name; int t_val; } yytoktype; #ifndef YYDEBUG # define YYDEBUG 0 /* don't allow debugging */ *************** *** 976,1009 **** "COMMENT", 257, "STRING", 258, "PREAMBLE", 259, ! "ARTICLE", 260, ! "BOOK", 261, ! "BOOKLET", 262, ! "CONFERENCE", 263, ! "INBOOK", 264, ! "INCOLLECTION", 265, ! "INPROCEEDINGS", 266, ! "MANUAL", 267, ! "MASTERSTHESIS", 268, ! "MISC", 269, ! "PHDTHESIS", 270, ! "PROCEEDINGS", 271, ! "TECHREPORT", 272, ! "UNPUBLISHED", 273, ! "TYPE", 274, ! "KOMMA", 275, ! "EQ", 276, ! "LGKL", 277, ! "RGKL", 278, ! "LRKL", 279, ! "RRKL", 280, ! "DAZ", 281, ! "ZAUN", 282, ! "PROZENT", 283, ! "ZEICHEN", 284, ! "WHITE_SPACE", 285, ! "BUCHSTABE_ZAHL", 286, ! "KOMMENTAR", 287, "-unknown-", -1 /* ends search */ }; --- 1018,1038 ---- "COMMENT", 257, "STRING", 258, "PREAMBLE", 259, ! "TYPE", 260, ! "KOMMA", 261, ! "EQ", 262, ! "AFFE", 263, ! "LGKL", 264, ! "RGKL", 265, ! "LRKL", 266, ! "RRKL", 267, ! "DAZ", 268, ! "ZAUN", 269, ! "PROZENT", 270, ! "ZEICHEN", 271, ! "WHITE_SPACE", 272, ! "BUCHSTABE_ZAHL", 273, ! "KOMMENTAR", 274, "-unknown-", -1 /* ends search */ }; *************** *** 1027,1033 **** "between : WHITE_SPACE", "between : BUCHSTABE_ZAHL", "between : KOMMENTAR", ! "entry : COMMENT", "entry : string", "entry : preamble", "entry : eintrag", --- 1056,1062 ---- "between : WHITE_SPACE", "between : BUCHSTABE_ZAHL", "between : KOMMENTAR", ! "entry : comment", "entry : string", "entry : preamble", "entry : eintrag", *************** *** 1036,1041 **** --- 1065,1074 ---- "string : STRING leerraum LGKL allstringG RGKL", "string : STRING LRKL allstringR RRKL", "string : STRING leerraum LRKL allstringR RRKL", + "comment : COMMENT LGKL allstringG RGKL", + "comment : COMMENT leerraum LGKL allstringG RGKL", + "comment : COMMENT LRKL allstringR RRKL", + "comment : COMMENT leerraum LRKL allstringR RRKL", "preamble : PREAMBLE LGKL allstringG RGKL", "preamble : PREAMBLE leerraum LGKL allstringG RGKL", "preamble : PREAMBLE LRKL allstringR RRKL", *************** *** 1055,1060 **** --- 1088,1098 ---- "allstringG : LGKL RGKL", "allstringG : LRKL allstringG", "allstringG : RRKL allstringG", + "allstringG : TYPE allstringG", + "allstringG : STRING allstringG", + "allstringG : PREAMBLE allstringG", + "allstringG : COMMENT allstringG", + "allstringG : AFFE allstringG", "allstringG : WHITE_SPACE", "allstringG : KOMMENTAR", "allstringG : ZEICHEN", *************** *** 1066,1071 **** --- 1104,1114 ---- "allstringG : DAZ", "allstringG : LRKL", "allstringG : RRKL", + "allstringG : TYPE", + "allstringG : AFFE", + "allstringG : STRING", + "allstringG : PREAMBLE", + "allstringG : COMMENT", "allstringR : WHITE_SPACE allstringR", "allstringR : KOMMENTAR allstringR", "allstringR : ZEICHEN allstringR", *************** *** 1081,1086 **** --- 1124,1134 ---- "allstringR : LGKL RGKL", "allstringR : LRKL allstringR RRKL allstringR", "allstringR : LRKL allstringR RRKL", + "allstringR : TYPE allstringR", + "allstringR : STRING allstringG", + "allstringR : PREAMBLE allstringR", + "allstringR : COMMENT allstringR", + "allstringR : AFFE allstringR", "allstringR : LRKL RRKL", "allstringR : WHITE_SPACE", "allstringR : KOMMENTAR", *************** *** 1091,1096 **** --- 1139,1149 ---- "allstringR : ZAUN", "allstringR : PROZENT", "allstringR : DAZ", + "allstringR : TYPE", + "allstringR : AFFE", + "allstringR : STRING", + "allstringR : PREAMBLE", + "allstringR : COMMENT", "eintrag : eingabetyp LGKL schluessel KOMMA felder leerraum RGKL", "eintrag : eingabetyp leerraum LGKL schluessel KOMMA felder leerraum RGKL", "eintrag : eingabetyp LGKL schluessel KOMMA felder RGKL", *************** *** 1107,1112 **** --- 1160,1168 ---- "schl : BUCHSTABE_ZAHL schl", "schl : ZEICHEN schl", "schl : DAZ schl", + "schl : EQ schl", + "schl : LRKL schl", + "schl : RRKL schl", "schl : PROZENT schl", "schl : BUCHSTABE_ZAHL", "schl : ZEICHEN", *************** *** 1113,1118 **** --- 1169,1176 ---- "schl : EQ", "schl : DAZ", "schl : PROZENT", + "schl : LRKL", + "schl : RRKL", "felder : leerraum feld KOMMA felder", "felder : feld KOMMA felder", "felder : leerraum feld KOMMA", *************** *** 1122,1128 **** --- 1180,1188 ---- "felder : leerraum feld", "felder : feld", "felder : feld leerraum", + "feld : feldname leerraum EQ", "feld : feldname leerraum EQ konkatenation", + "feld : feldname EQ", "feld : feldname EQ konkatenation", "feldname : BUCHSTABE_ZAHL feldname", "feldname : ZEICHEN feldname", *************** *** 1160,1165 **** --- 1220,1230 ---- "dazfeldinhalt : LGKL dazdaz RGKL dazfeldinhalt", "dazfeldinhalt : LGKL RGKL", "dazfeldinhalt : LGKL RGKL dazfeldinhalt", + "dazfeldinhalt : TYPE dazfeldinhalt", + "dazfeldinhalt : STRING dazfeldinhalt", + "dazfeldinhalt : PREAMBLE dazfeldinhalt", + "dazfeldinhalt : COMMENT dazfeldinhalt", + "dazfeldinhalt : AFFE dazfeldinhalt", "dazfeldinhalt : WHITE_SPACE", "dazfeldinhalt : KOMMENTAR", "dazfeldinhalt : BUCHSTABE_ZAHL", *************** *** 1170,1175 **** --- 1235,1245 ---- "dazfeldinhalt : ZAUN", "dazfeldinhalt : LRKL", "dazfeldinhalt : RRKL", + "dazfeldinhalt : AFFE", + "dazfeldinhalt : TYPE", + "dazfeldinhalt : STRING", + "dazfeldinhalt : PREAMBLE", + "dazfeldinhalt : COMMENT", "dazdaz : WHITE_SPACE dazdaz", "dazdaz : KOMMENTAR dazdaz", "dazdaz : BUCHSTABE_ZAHL dazdaz", *************** *** 1180,1185 **** --- 1250,1260 ---- "dazdaz : LGKL dazdaz RGKL dazdaz", "dazdaz : LGKL RGKL", "dazdaz : LGKL RGKL dazdaz", + "dazdaz : TYPE dazdaz", + "dazdaz : STRING dazdaz", + "dazdaz : PREAMBLE dazdaz", + "dazdaz : COMMENT dazdaz", + "dazdaz : AFFE dazdaz", "dazdaz : WHITE_SPACE", "dazdaz : KOMMENTAR", "dazdaz : BUCHSTABE_ZAHL", *************** *** 1191,1196 **** --- 1266,1276 ---- "dazdaz : RRKL", "dazdaz : KOMMA", "dazdaz : DAZ", + "dazdaz : AFFE", + "dazdaz : TYPE", + "dazdaz : STRING", + "dazdaz : PREAMBLE", + "dazdaz : COMMENT", }; #endif /* YYDEBUG */ #define YYFLAG (-3000) *************** *** 1259,1273 **** __YYSCLASS YYSTYPE *yyv; /* pointer to malloc'ed value stack */ __YYSCLASS int *yys; /* pointer to malloc'ed stack stack */ - #if defined(__STDC__) || defined (__cplusplus) - #include - #else - extern char *malloc(); - extern char *realloc(); - extern void free(); - #endif /* __STDC__ or __cplusplus */ - static int allocate_stacks(); static void free_stacks(); # ifndef YYINCREMENT --- 1339,1345 ---- *************** *** 1683,1831 **** } break; case 23:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 24:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 25:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 26:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 27:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; ! case 28:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 29:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 30:{ keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; ! case 82:{ GetKey(); } break; ! case 83:{ GetKey(); } break; ! case 84:{ GetKey(); } break; ! case 85:{ GetKey(); } break; ! case 86:{ GetKey(); } break; ! case 87:{ GetKey(); } break; ! case 88:{ GetKey(); } break; ! case 89:{ GetKey(); } break; ! case 90:{ err = dbtMakeCard(&card); card->cardtype = cardtype = ! glbNameToType(strlower(uebergabe)); if (cardtype == -1) card->cardtype = cardtype = MAX_BIBTEX_TYPES; ! Scalloc(&card->cardtypestr, uebergabe); } break; ! case 95:{ PushSign(&key, yypvt[-1]); keyline = yynline; } break; ! case 96:{ PushSign(&key, yypvt[-1]); keyline = yynline; } break; ! case 97:{ PushSign(&key, yypvt[-1]); keyline = yynline; } break; ! case 98:{ PushSign(&key, '%'); keyline = yynline; PushSign(&key, '\\'); } break; ! case 99:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 100:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 101:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 102:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 103:{ PushSign(&key, '%'); PushSign(&key, '\\'); keyline = yynline; } break; ! case 113:{ GetFldNameCont(); } break; ! case 114:{ GetFldNameCont(); } break; ! case 115:{ PushSign(&fldname, yypvt[-1]); ueIdx = 0; } break; ! case 116:{ PushSign(&fldname, yypvt[-1]); ueIdx = 0; } break; ! case 117:{ PushSign(&fldname, yypvt[-0]); ueIdx = 0; } break; ! case 118:{ PushSign(&fldname, yypvt[-0]); ueIdx = 0; } break; --- 1755,1947 ---- } break; case 23:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 24:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 25:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 26:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 27:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; ! case 28:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 29:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; case 30:{ keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } break; ! case 31:{ ! keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ! ueIdx = 0; ! } break; ! case 32:{ ! keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ! ueIdx = 0; ! } break; ! case 33:{ ! keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ! ueIdx = 0; ! } break; ! case 34:{ ! keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ! ueIdx = 0; ! } break; ! case 106:{ GetKey(); } break; ! case 107:{ GetKey(); } break; ! case 108:{ GetKey(); } break; ! case 109:{ GetKey(); } break; ! case 110:{ GetKey(); } break; ! case 111:{ GetKey(); } break; ! case 112:{ GetKey(); } break; ! case 113:{ GetKey(); } break; ! case 114:{ err = dbtMakeCard(&card); + beginIdx = SkipApe(uebergabe); card->cardtype = cardtype = ! glbNameToType(strlower(&uebergabe[beginIdx])); if (cardtype == -1) card->cardtype = cardtype = MAX_BIBTEX_TYPES; ! Scalloc(&card->cardtypestr, &uebergabe[beginIdx]); ! ueIdx = 0; } break; ! case 119:{ PushSign(&key, yypvt[-1]); keyline = yynline; } break; ! case 120:{ PushSign(&key, yypvt[-1]); keyline = yynline; } break; ! case 121:{ PushSign(&key, yypvt[-1]); keyline = yynline; } break; ! case 122:{ ! PushSign(&key, yypvt[-1]); ! keyline = yynline; ! } break; ! case 123:{ ! PushSign(&key, yypvt[-1]); ! keyline = yynline; ! } break; ! case 124:{ ! PushSign(&key, yypvt[-1]); ! keyline = yynline; ! } break; ! case 125:{ PushSign(&key, '%'); keyline = yynline; PushSign(&key, '\\'); } break; ! case 126:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 127:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 128:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 129:{ PushSign(&key, yypvt[-0]); keyline = yynline; } break; ! case 130:{ PushSign(&key, '%'); PushSign(&key, '\\'); keyline = yynline; } break; ! case 131:{ ! PushSign(&key, yypvt[-0]); ! keyline = yynline; ! } break; ! case 132:{ ! PushSign(&key, yypvt[-0]); ! keyline = yynline; ! } break; ! case 142:{ ! ueIdx = 0; ! } break; ! case 143:{ GetFldNameCont(); } break; ! case 144:{ ! ueIdx = 0; ! } break; ! case 145:{ GetFldNameCont(); } break; ! case 146:{ PushSign(&fldname, yypvt[-1]); ueIdx = 0; } break; ! case 147:{ PushSign(&fldname, yypvt[-1]); ueIdx = 0; } break; ! case 148:{ PushSign(&fldname, yypvt[-0]); ueIdx = 0; } break; ! case 149:{ PushSign(&fldname, yypvt[-0]); ueIdx = 0; } break; diff -cr bibview-1.5/bib_file.c bibview-2.0/bib_file.cbibview-1.5/bib_flex.c bibview-2.0/bib_flex.c *** bibview-1.5/bib_flex.c Mon May 24 16:12:57 1993 --- bibview-2.0/bib_flex.c Fri Jun 18 15:46:55 1993 *************** *** 32,45 **** #ifdef __STDC__ - #ifdef __GNUC__ - #include - void *malloc( size_t ); - void free( void* ); - #else - #include - #endif /* __GNUC__ */ - #define YY_USE_PROTOS #define YY_USE_CONST --- 32,37 ---- *************** *** 263,274 **** FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; ! #define YY_END_OF_BUFFER 20 typedef int yy_state_type; static const short int yy_accept[45] = { 0, ! 0, 0, 20, 18, 15, 15, 14, 7, 18, 9, ! 10, 8, 16, 13, 6, 18, 11, 12, 0, 2, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 3, 6, 5, 0 --- 255,266 ---- FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; ! #define YY_END_OF_BUFFER 21 typedef int yy_state_type; static const short int yy_accept[45] = { 0, ! 0, 0, 21, 19, 16, 16, 15, 8, 19, 10, ! 11, 9, 17, 14, 7, 19, 12, 13, 0, 2, 6, 6, 6, 6, 1, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 3, 6, 5, 0 *************** *** 475,480 **** --- 467,474 ---- # line 19 "b.l" { yynflexcalls += 1; + if (ueIdx+2 >= MAX_UEBERGABE) + return PROZENT; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = yytext[1]; uebergabe[ueIdx+2] = '\0'; *************** *** 484,490 **** } YY_BREAK case 2: ! # line 29 "b.l" { yynflexcalls += 1; yylval = yytext[0]; --- 478,484 ---- } YY_BREAK case 2: ! # line 31 "b.l" { yynflexcalls += 1; yylval = yytext[0]; *************** *** 493,522 **** } YY_BREAK case 3: ! # line 36 "b.l" ! { ! yynflexcalls += 1; ! return COMMENT; ! } YY_BREAK case 4: ! # line 41 "b.l" { ! yynflexcalls += 1; ! return STRING; ! } YY_BREAK case 5: ! # line 46 "b.l" { yynflexcalls += 1; ! return PREAMBLE; } YY_BREAK case 6: ! # line 51 "b.l" { ! strcpy(uebergabe, &yytext[1]); ueIdx += strlen(yytext); yynflexcalls += 1; return TYPE; --- 487,530 ---- } YY_BREAK case 3: ! # line 38 "b.l" ! { ! if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) ! return COMMENT; ! strcpy(&uebergabe[ueIdx], yytext); ! ueIdx += strlen(yytext); ! yynflexcalls += 1; ! return COMMENT; ! } YY_BREAK case 4: ! # line 47 "b.l" { ! if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) ! return STRING; ! strcpy(&uebergabe[ueIdx], yytext); ! ueIdx += strlen(yytext); ! yynflexcalls += 1; ! return STRING; ! } YY_BREAK case 5: ! # line 56 "b.l" { + if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) + return PREAMBLE; + strcpy(&uebergabe[ueIdx], yytext); + ueIdx += strlen(yytext); yynflexcalls += 1; ! return PREAMBLE; } YY_BREAK case 6: ! # line 65 "b.l" { ! if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) ! return TYPE; ! strcpy(&uebergabe[ueIdx], yytext); ueIdx += strlen(yytext); yynflexcalls += 1; return TYPE; *************** *** 523,632 **** } YY_BREAK case 7: ! # line 58 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return ZAUN; } YY_BREAK case 8: ! # line 68 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return KOMMA; } YY_BREAK case 9: ! # line 77 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return LRKL; } YY_BREAK case 10: ! # line 86 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return RRKL; } YY_BREAK case 11: ! # line 95 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return LGKL; } YY_BREAK case 12: ! # line 104 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return RGKL; } YY_BREAK case 13: ! # line 113 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return EQ; } YY_BREAK case 14: ! # line 122 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return DAZ; } YY_BREAK case 15: ! # line 131 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; if (yytext[0] == '\n') yynline += 1; return WHITE_SPACE; } YY_BREAK ! case 16: ! # line 141 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; --- 531,673 ---- } YY_BREAK case 7: ! # line 74 "b.l" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return AFFE; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return AFFE; } YY_BREAK case 8: ! # line 85 "b.l" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return ZAUN; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return ZAUN; } YY_BREAK case 9: ! # line 97 "b.l" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return KOMMA; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return KOMMA; } YY_BREAK case 10: ! # line 108 "b.l" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return LRKL; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return LRKL; } YY_BREAK case 11: ! # line 119 "b.l" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return RRKL; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return RRKL; } YY_BREAK case 12: ! # line 130 "b.l" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return LGKL; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return LGKL; } YY_BREAK case 13: ! # line 141 "b.l" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return RGKL; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return RGKL; } YY_BREAK case 14: ! # line 152 "b.l" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return EQ; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; ! return EQ; } YY_BREAK case 15: ! # line 163 "b.l" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return DAZ; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; + return DAZ; + } + YY_BREAK + case 16: + # line 174 "b.l" + { + yynflexcalls += 1; + yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return WHITE_SPACE; + uebergabe[ueIdx] = yytext[0]; + uebergabe[ueIdx+1] = '\0'; + ueIdx++; if (yytext[0] == '\n') yynline += 1; return WHITE_SPACE; } YY_BREAK ! case 17: ! # line 186 "b.l" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return BUCHSTABE_ZAHL; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 634,640 **** } YY_BREAK case YY_STATE_EOF(INITIAL): ! # line 150 "b.l" { yynflexcalls += 1; YY_NEW_FILE; --- 675,681 ---- } YY_BREAK case YY_STATE_EOF(INITIAL): ! # line 197 "b.l" { yynflexcalls += 1; YY_NEW_FILE; *************** *** 642,652 **** return 0; } YY_BREAK ! case 18: ! # line 157 "b.l" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; --- 683,695 ---- return 0; } YY_BREAK ! case 19: ! # line 204 "b.l" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return ZEICHEN; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 653,660 **** return ZEICHEN; } YY_BREAK ! case 19: ! # line 167 "b.l" ECHO; YY_BREAK --- 696,703 ---- return ZEICHEN; } YY_BREAK ! case 20: ! # line 216 "b.l" ECHO; YY_BREAK *************** *** 1178,1183 **** b->yy_eof_status = EOF_NOT_SEEN; } ! # line 167 "b.l" --- 1221,1226 ---- b->yy_eof_status = EOF_NOT_SEEN; } ! # line 216 "b.l" diff -cr bibview-1.5/bib_flex.c bibview-2.0/bib_flex.cbibview-1.5/bibview.c bibview-2.0/bibview.c *** bibview-1.5/bibview.c Fri Jun 4 13:05:28 1993 --- bibview-2.0/bibview.c Thu Jun 24 07:08:44 1993 *************** *** 64,70 **** extern char *actual_path; extern UserDefFld userDefFlds[]; extern PredefLists predefLst; ! extern listEntry list_layout; --- 64,70 ---- extern char *actual_path; extern UserDefFld userDefFlds[]; extern PredefLists predefLst; ! extern listEntry *list_layout; *************** *** 262,268 **** "BibView", /* Appl class */ optionDesc, /* cmdline options */ XtNumber(optionDesc), ! &argc, argv, /* command line args */ (String *)fallback_resources,/* fallback resources */ NULL); /* end varargs list */ --- 262,268 ---- "BibView", /* Appl class */ optionDesc, /* cmdline options */ XtNumber(optionDesc), ! &argc, argv, /* command line args */ (String *)fallback_resources,/* fallback resources */ NULL); /* end varargs list */ *************** *** 482,501 **** max_fields = 25; max_bibtex_types = 14; ! ! list_layout.number = 0; ! list_layout.field[list_layout.number] = nauthor; ! list_layout.width[list_layout.number++] = 30; ! list_layout.field[list_layout.number] = ntitle; ! list_layout.width[list_layout.number++] = 50; ! list_layout.field[list_layout.number] = nyear; ! list_layout.width[list_layout.number++] = 5; ! list_layout.field[list_layout.number] = ncategory; ! list_layout.width[list_layout.number++] = 10; ! list_layout.field[list_layout.number] = -2; /* BibTeX type */ ! list_layout.width[list_layout.number++] = 10; ! list_layout.field[list_layout.number] = -1; /* mainkey */ ! list_layout.width[list_layout.number++] = 10; for (i=0; i< MAX_BIBTEX_TYPES+1; i++){ for (j=0; j< MAX_FIELDS; j++){ --- 482,502 ---- max_fields = 25; max_bibtex_types = 14; ! ! list_layout = (listEntry *) XtCalloc(1, sizeof(listEntry)); ! list_layout->number = 0; ! list_layout->field[list_layout->number] = nauthor; ! list_layout->width[(list_layout->number)++] = 30; ! list_layout->field[list_layout->number] = ntitle; ! list_layout->width[(list_layout->number)++] = 50; ! list_layout->field[list_layout->number] = nyear; ! list_layout->width[(list_layout->number)++] = 5; ! list_layout->field[list_layout->number] = ncategory; ! list_layout->width[(list_layout->number)++] = 10; ! list_layout->field[list_layout->number] = -2; /* BibTeX type */ ! list_layout->width[(list_layout->number)++] = 10; ! list_layout->field[list_layout->number] = -1; /* mainkey */ ! list_layout->width[(list_layout->number)++] = 10; for (i=0; i< MAX_BIBTEX_TYPES+1; i++){ for (j=0; j< MAX_FIELDS; j++){ diff -cr bibview-1.5/bibview.c bibview-2.0/bibview.cbibview-1.5/bibview.h bibview-2.0/bibview.h *** bibview-1.5/bibview.h Mon Jun 7 08:30:56 1993 --- bibview-2.0/bibview.h Thu Jun 24 08:34:12 1993 *************** *** 38,43 **** --- 38,44 ---- #define MAX_LINELEN 80 #define MAX_ERRORSTRLEN 1000 #define MAX_ERRLINELENGTH 80 + #define MAX_UEBERGABE 10000 #define FLDINDENT 3 #define CONTINDENT 15 #define NEWLINEINDENT 7 *************** *** 216,222 **** /* structure to hold all widget pointers for all card types */ typedef struct { ! Widget wfield[2*(MAX_FIELDS-1)]; Widget owntype, owntypeL, mainkey, mainkeyL, annote; --- 217,223 ---- /* structure to hold all widget pointers for all card types */ typedef struct { ! Widget wfield[2*MAX_FIELDS]; Widget owntype, owntypeL, mainkey, mainkeyL, annote; *************** *** 538,543 **** --- 539,546 ---- void guwNotice(Errcode errcode); void guwConfirmClose (Position x, Position y, XtCallbackProc p1, XtCallbackProc p2); + void guwConfirmDelete (Position x, Position y, + XtCallbackProc p1, XtCallbackProc p2); void guwProgInfo (Widget w, XtPointer clientData, XtPointer callData); /* gui_help.c */ *************** *** 595,601 **** /* db_tree.c */ Errcode dbtInsert (BibPtr bp, CardData *card); ! Errcode dbtDelete (int treeIdx, CardData *card); Errcode dbtSearch (int treeIdx, CardData **card); Errcode dbtMakeCard (CardData **card); Errcode dbtDeleteCard (CardData **card); --- 598,604 ---- /* db_tree.c */ Errcode dbtInsert (BibPtr bp, CardData *card); ! Errcode dbtDelete (int treeIdx, CardData *card, int *deleted); Errcode dbtSearch (int treeIdx, CardData **card); Errcode dbtMakeCard (CardData **card); Errcode dbtDeleteCard (CardData **card); diff -cr bibview-1.5/bibview.h bibview-2.0/bibview.hbibview-1.5/bibview.man bibview-2.0/bibview.man *** bibview-1.5/bibview.man Fri Jun 4 11:15:03 1993 --- bibview-2.0/bibview.man Sat Jun 26 15:41:10 1993 *************** *** 32,38 **** .br The \fIcard window\fR (at most one for every entry) helps editing an entry. It contains boxes for each field of the entry (according to the type). ! The fields can be edited by putting the mouse cursor into the field. .br The annote field of an entry can be edited in a separate window after clicking 'annote' in the card window. --- 32,42 ---- .br The \fIcard window\fR (at most one for every entry) helps editing an entry. It contains boxes for each field of the entry (according to the type). ! The fields can be edited by putting the mouse cursor into the card ! window. The field with the input focus has no border. The input ! focus can be changed using the key (move to next field), the ! key (move to preceding field) or by clicking the right ! mouse button in the new input field. .br The annote field of an entry can be edited in a separate window after clicking 'annote' in the card window. Only in bibview-1.5: bibview.ps diff -cr bibview-1.5/bibview.man bibview-2.0/bibview.manbibview-1.5/bibview_ger.1 bibview-2.0/bibview_ger.1 *** bibview-1.5/bibview_ger.1 Fri Jun 4 11:18:15 1993 --- bibview-2.0/bibview_ger.1 Sat Jun 26 16:04:06 1993 *************** *** 26,32 **** Die f\(uer den bearbeiteten Typ ben\(oetigten Felder sind durch dicke Umrandung gekennzeichnet. Editieren eines Feldes erfolgt durch das Positionieren der Maus in das ! entsprechende Feld. Im Feld BibTeX-Key wird der f\(uer jeden Eintrag erforderliche cite-key abgefragt. Durch das Feld \fICategory\fR k\(oennen Eintr\(aege kategorisiert werden. --- 26,37 ---- Die f\(uer den bearbeiteten Typ ben\(oetigten Felder sind durch dicke Umrandung gekennzeichnet. Editieren eines Feldes erfolgt durch das Positionieren der Maus in das ! Kartenfenster. Das aktuelle Eingabefeld hat keinen Rand. ! Das Eingabefeld kann durch Dr\(uecken der - bzw. -Taste ! vorw\(aerts bzw. r\(ueckw\(aerts bewegt werden. Durch das Dr\(uecken ! der rechten Maustaste in einem Feld wird dieses Feld zum neuen ! Eingabefeld. ! Im Feld BibTeX-Key wird der f\(uer jeden Eintrag erforderliche cite-key abgefragt. Durch das Feld \fICategory\fR k\(oennen Eintr\(aege kategorisiert werden. Common subdirectories: bibview-1.5/bitmaps and bibview-2.0/bitmaps diff -cr bibview-1.5/bibview_ger.1 bibview-2.0/bibview_ger.1bibview-1.5/ctl_card.c bibview-2.0/ctl_card.c *** bibview-1.5/ctl_card.c Wed Jun 2 17:42:28 1993 --- bibview-2.0/ctl_card.c Thu Jun 24 08:33:15 1993 *************** *** 52,57 **** --- 52,58 ---- /* ------------------------- */ static void annoteChanged (Widget w, XtPointer clientData, XtPointer callData); static void confirmCloseCard (CardPtr cp); + static void confirmDeleteCard (CardPtr cp); static void confirmCloseAnnote (CardPtr cp); static void cancelQuitCmd (Widget w, XtPointer clientData, XtPointer callData); static void cardQuitOkCmd (Widget w, XtPointer clientData, XtPointer callData); *************** *** 61,66 **** --- 62,68 ---- static Errcode annoteClose (CardPtr cp); static void annoteSaveCmd (Widget w, XtPointer clientData, XtPointer callData); static void annoteCloseCmd (Widget w, XtPointer clientData, XtPointer callData); + static void DeleteOkCmd (Widget w, XtPointer clientData, XtPointer callData); /* exported variables */ *************** *** 305,313 **** return; } if (cp->cd->mainkey==NULL) ! sprintf(aw->shellName, "Annote: NEW"); else ! sprintf(aw->shellName, "Annote: %s", cp->cd->mainkey); aw->annoteShell = XtVaCreatePopupShell("AnnoteShell", topLevelShellWidgetClass, topLevel, XtNtitle, aw->shellName, --- 307,315 ---- return; } if (cp->cd->mainkey==NULL) ! sprintf(aw->shellName, "%s: NEW", glbFldToName(nannote)); else ! sprintf(aw->shellName, "%s: %s", glbFldToName(nannote), cp->cd->mainkey); aw->annoteShell = XtVaCreatePopupShell("AnnoteShell", topLevelShellWidgetClass, topLevel, XtNtitle, aw->shellName, *************** *** 356,361 **** --- 358,387 ---- CardDataList cl, clp; Errcode status; + confirmDeleteCard(cp); + return; + } + + /*********************************************************************/ + /* DeleteOkCmd: */ + /* Callback function "OK" button */ + /*********************************************************************/ + static void + DeleteOkCmd (Widget w, XtPointer clientData, XtPointer callData) + { + Widget shell = (Widget)clientData; + CardPtr cp; + CardDataList cl, clp; + BibPtr bp; + Errcode status; + int del_erg; + + /* remove confirm shell */ + XtPopdown(shell); + + cp = gcp; + bp = (BibPtr)cp->bp; + /* remove card from list of cards for list window */ if (gulListWinExists(bp)){ if (cp->cd->mainkey!=NULL){ *************** *** 396,406 **** guwError(status); /* delete card from data tree */ ! if ((status = dbtDelete(bp->treeIdx, cp->cd)) != DBT_OK) { guwError(status); return; } ! bp->changed = TRUE; } --- 422,438 ---- guwError(status); /* delete card from data tree */ ! if ((status = dbtDelete(bp->treeIdx, cp->cd, &del_erg)) != DBT_OK) { guwError(status); return; } ! if (del_erg) ! bp->changed = TRUE; ! gcp = NULL; ! ! /* enable menus */ ! XtSetSensitive(mainMenu, TRUE); ! gubSetSensitive(NULL, TRUE); } *************** *** 420,429 **** Errcode status; XawTextBlock textblock; CardData *hcard = NULL; String str; /* delete old card from data tree */ ! if ((status = dbtDelete(bp->treeIdx, cp->cd)) != DBT_OK) { guwError(status); return; } --- 452,462 ---- Errcode status; XawTextBlock textblock; CardData *hcard = NULL; + int del_erg; String str; /* delete old card from data tree */ ! if ((status = dbtDelete(bp->treeIdx, cp->cd, &del_erg)) != DBT_OK) { guwError(status); return; } *************** *** 684,689 **** --- 717,745 ---- cp->aw->changed = TRUE; } + + + /*********************************************************************/ + /* confirmDeleteCard: */ + /* Opens dialogbox for user to confirm closing without saving */ + /*********************************************************************/ + static void + confirmDeleteCard (CardPtr cp) + { + Position dx, dy, x, y; + + XtVaGetValues(desktop, + XtNx, &dx, + XtNy, &dy, NULL); + XtTranslateCoords(cp->cw->cardDesk, + (Position)dx + SUBWIN_MARGIN, + (Position)dy + SUBWIN_MARGIN, + &x, &y); + gcp = cp; + guwConfirmDelete(x,y,cancelQuitCmd,DeleteOkCmd); + } + + /*********************************************************************/ /* confirmCloseCard: */ diff -cr bibview-1.5/ctl_card.c bibview-2.0/ctl_card.cbibview-1.5/ctl_open.c bibview-2.0/ctl_open.c *** bibview-1.5/ctl_open.c Mon Jun 7 10:02:36 1993 --- bibview-2.0/ctl_open.c Thu Jun 17 17:31:20 1993 *************** *** 80,85 **** --- 80,86 ---- BibPtr bp; FILE *tempFile; int status; + char *tempName; /* make new global data struct for bib file */ if ((status = glbNewBibListEl(&bp)) != OK) { *************** *** 107,113 **** /* create temp file */ #ifdef NO_TEMPNAM ! bp->tempfile = (char *)tmpnam(NULL); #else bp->tempfile = (char *)tempnam(NULL, NULL); #endif --- 108,116 ---- /* create temp file */ #ifdef NO_TEMPNAM ! tempName = (char *)tmpnam(NULL); ! bp->tempfile = (char *)XtMalloc(strlen(tempName)+1); ! strcpy(bp->tempfile,tempName); #else bp->tempfile = (char *)tempnam(NULL, NULL); #endif diff -cr bibview-1.5/ctl_open.c bibview-2.0/ctl_open.cbibview-1.5/ctl_serv.c bibview-2.0/ctl_serv.c *** bibview-1.5/ctl_serv.c Wed Jun 2 17:05:05 1993 --- bibview-2.0/ctl_serv.c Thu Jun 17 17:31:21 1993 *************** *** 289,294 **** --- 289,295 ---- { Errcode status; int fh; + char *tempName; /* window opened already? */ if (gueMacroWinExists(bp)) { *************** *** 302,308 **** /* open new temp file? */ if (bp->macrofile == NULL) { #ifdef NO_TEMPNAM ! bp->macrofile = (char *)tmpnam(NULL); #else bp->macrofile = (char *)tempnam(NULL, NULL); #endif --- 303,311 ---- /* open new temp file? */ if (bp->macrofile == NULL) { #ifdef NO_TEMPNAM ! tempName = (char *)tmpnam(NULL); ! bp->macrofile = (char *)XtMalloc(strlen(tempName)+1); ! strcpy(bp->macrofile,tempName); #else bp->macrofile = (char *)tempnam(NULL, NULL); #endif diff -cr bibview-1.5/ctl_serv.c bibview-2.0/ctl_serv.cbibview-1.5/db_tree-regexp.c bibview-2.0/db_tree-regexp.c *** bibview-1.5/db_tree-regexp.c Mon Jun 7 08:25:08 1993 --- bibview-2.0/db_tree-regexp.c Thu Jun 24 09:01:18 1993 *************** *** 107,113 **** int dbtSearchUserFld(UserFld **list, UserFld **reglist); Boolean Insert(int treeIdx, AvlNode **tree, CardData *card, int *h); Boolean Search(AvlNode *tree, CardData **card); ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card); Errcode MakeListNode(ListNode **list); Errcode ListAppend(ListNode **list, String word); Errcode MakeCardListNode(CardListNode **list); --- 107,113 ---- int dbtSearchUserFld(UserFld **list, UserFld **reglist); Boolean Insert(int treeIdx, AvlNode **tree, CardData *card, int *h); Boolean Search(AvlNode *tree, CardData **card); ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card, int *deleted); Errcode MakeListNode(ListNode **list); Errcode ListAppend(ListNode **list, String word); Errcode MakeCardListNode(CardListNode **list); *************** *** 679,692 **** * TRUE balancing required * FALSE no further balancing required */ ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card) { int result; if ((*tree) == NULL) { /* * key not in tree */ return FALSE; } else if ((result = --- 679,694 ---- * TRUE balancing required * FALSE no further balancing required */ ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card, int *deleted) { int result; + int del_erg; if ((*tree) == NULL) { /* * key not in tree */ + *deleted = 0; return FALSE; } else if ((result = *************** *** 694,699 **** --- 696,702 ---- /* * key found */ + *deleted = 1; return del_item(treeIdx, tree); } else if (result < 0) { *************** *** 700,708 **** /* * key could be in left sub-tree */ ! if (Delete(treeIdx, &((*tree)->left), card)) { return left_path_balance(treeIdx, tree); } return FALSE; } else { --- 703,713 ---- /* * key could be in left sub-tree */ ! if (Delete(treeIdx, &((*tree)->left), card, &del_erg)) { ! *deleted = del_erg; return left_path_balance(treeIdx, tree); } + *deleted = del_erg; return FALSE; } else { *************** *** 709,717 **** /* * key could be in right sub-tree */ ! if (Delete(treeIdx, &((*tree)->right), card)) { return right_path_balance(treeIdx, tree); } return FALSE; } } --- 714,724 ---- /* * key could be in right sub-tree */ ! if (Delete(treeIdx, &((*tree)->right), card, &del_erg)) { ! *deleted = del_erg; return right_path_balance(treeIdx, tree); } + *deleted = del_erg; return FALSE; } } *************** *** 1466,1478 **** /* card wird aus dem AVL-Baum mit dem Index treeIdx geloescht */ /*********************************************************************/ ! Errcode dbtDelete(int treeIdx, CardData *card) ! { Boolean err; ! if (TreeRoots[treeIdx] == (AvlNode *)1) return DBT_OK; /* nur vorerst */ ! err = Delete(treeIdx, &TreeRoots[treeIdx], card); return DBT_OK; /* nur vorerst */ } --- 1473,1488 ---- /* card wird aus dem AVL-Baum mit dem Index treeIdx geloescht */ /*********************************************************************/ ! Errcode dbtDelete(int treeIdx, CardData *card, int *deleted) ! { int del_erg; Boolean err; ! if (TreeRoots[treeIdx] == (AvlNode *)1) { ! *deleted = 0; return DBT_OK; /* nur vorerst */ ! } ! err = Delete(treeIdx, &TreeRoots[treeIdx], card, &del_erg); ! *deleted = del_erg; return DBT_OK; /* nur vorerst */ } *************** *** 2000,2010 **** i = 0; inbracket=0; ! name[i] = strtok(entry, semicolon); while ((name[i] != NULL) && (i<10)) { i++; ! name[i] = strtok(NULL, semicolon); } for (j=0; jauthorsort, p_surname); mystrcat (card->authorsort, p_firstname); } --- 2040,2047 ---- else { /* get firstname and surname in right order */ ! p_surname = (char *) strtok (name[j], comma); ! p_firstname = (char *) strtok (NULL, comma); mystrcat (card->authorsort, p_surname); mystrcat (card->authorsort, p_firstname); } diff -cr bibview-1.5/db_tree-regexp.c bibview-2.0/db_tree-regexp.cbibview-1.5/db_tree.c bibview-2.0/db_tree.c *** bibview-1.5/db_tree.c Mon Jun 7 08:23:59 1993 --- bibview-2.0/db_tree.c Thu Jun 24 08:44:04 1993 *************** *** 93,99 **** int dbtSearchUserFld(UserFld **list, UserFld **reglist); Boolean Insert(int treeIdx, AvlNode **tree, CardData *card, int *h); Boolean Search(AvlNode *tree, CardData **card); ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card); Errcode MakeListNode(ListNode **list); Errcode ListAppend(ListNode **list, String word); Errcode MakeCardListNode(CardListNode **list); --- 93,99 ---- int dbtSearchUserFld(UserFld **list, UserFld **reglist); Boolean Insert(int treeIdx, AvlNode **tree, CardData *card, int *h); Boolean Search(AvlNode *tree, CardData **card); ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card, int *deleted); Errcode MakeListNode(ListNode **list); Errcode ListAppend(ListNode **list, String word); Errcode MakeCardListNode(CardListNode **list); *************** *** 248,254 **** * Returns: tree: possibly modified tree containing new_key * TRUE a new node was added so check the balance * FALSE balance is okay or node already in tree ! * (maybe should return something else for duplicate key???) */ Boolean Insert(int treeIdx, AvlNode **tree, CardData *card, int *h) { --- 248,254 ---- * Returns: tree: possibly modified tree containing new_key * TRUE a new node was added so check the balance * FALSE balance is okay or node already in tree ! * (maybe should return something else for duplicate key?) */ Boolean Insert(int treeIdx, AvlNode **tree, CardData *card, int *h) { *************** *** 667,680 **** * TRUE balancing required * FALSE no further balancing required */ ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card) { int result; if ((*tree) == NULL) { /* * key not in tree */ return FALSE; } else if ((result = --- 667,682 ---- * TRUE balancing required * FALSE no further balancing required */ ! Boolean Delete(int treeIdx, AvlNode **tree, CardData *card, int *deleted) { int result; + int del_erg; if ((*tree) == NULL) { /* * key not in tree */ + *deleted = 0; return FALSE; } else if ((result = *************** *** 682,687 **** --- 684,690 ---- /* * key found */ + *deleted = 1; return del_item(treeIdx, tree); } else if (result < 0) { *************** *** 688,696 **** /* * key could be in left sub-tree */ ! if (Delete(treeIdx, &((*tree)->left), card)) { return left_path_balance(treeIdx, tree); } return FALSE; } else { --- 691,701 ---- /* * key could be in left sub-tree */ ! if (Delete(treeIdx, &((*tree)->left), card, &del_erg)) { ! *deleted = del_erg; return left_path_balance(treeIdx, tree); } + *deleted = del_erg; return FALSE; } else { *************** *** 697,705 **** /* * key could be in right sub-tree */ ! if (Delete(treeIdx, &((*tree)->right), card)) { return right_path_balance(treeIdx, tree); } return FALSE; } } --- 702,712 ---- /* * key could be in right sub-tree */ ! if (Delete(treeIdx, &((*tree)->right), card, &del_erg)) { ! *deleted = del_erg; return right_path_balance(treeIdx, tree); } + *deleted = del_erg; return FALSE; } } *************** *** 1349,1359 **** i = 0; inbracket=0; ! name[i] = strtok(entry, semicolon); while ((name[i] != NULL) && (i<10)) { i++; ! name[i] = strtok(NULL, semicolon); } for (j=0; jauthorsort, p_surname); mystrcat (card->authorsort, p_firstname); } --- 1386,1393 ---- else { /* get firstname and surname in right order */ ! p_surname = (char *) strtok (name[j], comma); ! p_firstname = (char *) strtok (NULL, comma); mystrcat (card->authorsort, p_surname); mystrcat (card->authorsort, p_firstname); } *************** *** 1619,1629 **** /* card wird aus dem AVL-Baum mit dem Index treeIdx geloescht */ /*********************************************************************/ ! Errcode dbtDelete(int treeIdx, CardData *card) ! { ! if (TreeRoots[treeIdx] == (AvlNode *)1) return DBT_OK; /* nur vorerst */ ! Delete(treeIdx, &TreeRoots[treeIdx], card); return DBT_OK; /* nur vorerst */ } --- 1626,1641 ---- /* card wird aus dem AVL-Baum mit dem Index treeIdx geloescht */ /*********************************************************************/ ! Errcode dbtDelete(int treeIdx, CardData *card, int *deleted) ! { int del_erg; ! Boolean err; ! ! if (TreeRoots[treeIdx] == (AvlNode *)1) { ! *deleted = 0; return DBT_OK; /* nur vorerst */ ! } ! err = Delete(treeIdx, &TreeRoots[treeIdx], card, &del_erg); ! *deleted = del_erg; return DBT_OK; /* nur vorerst */ } diff -cr bibview-1.5/db_tree.c bibview-2.0/db_tree.cbibview-1.5/fb_ger.h bibview-2.0/fb_ger.h *** bibview-1.5/fb_ger.h Fri May 28 15:30:32 1993 --- bibview-2.0/fb_ger.h Thu Jun 24 07:54:05 1993 *************** *** 104,110 **** "BibView*listWin*sortMenu.label: Sortieren Menu", "BibView*listWin*listVport.fromVert: commandBox", "BibView*listWin*listVport*font: *fixed-bold-r-*-100-*", - "BibView*listWin*head1.width: 1000", "BibView*listWin*list.verticalList: true", "BibView*listWin*list.forceColumns: true", "BibView*listWin*list.defaultColumns: 1", --- 104,109 ---- *************** *** 243,251 **** "BibView*confirmLoadBox*ok.label: OK", "BibView*confirmLoadBox*cancel.label: Abbrechen", "BibView*confirmQuitShell.title: Schliessen?", ! "BibView*confirmQuitBox.label: Es wurden Aenderungen vorgenommen, die nicht gespeichert wurden!\\nWollen Sie wirklich alle Aenderungen verwerfen?", "BibView*confirmQuitBox*ok.label: Verwerfen", "BibView*confirmQuitBox*cancel.label: Abbrechen", "BibView*fileSelectBoxShell.title: BibView Dateimanager", "BibView*fileSelectBoxShell.iconName: BibView Dateimanager", "BibView*fileLoadHead.label: BibTeX-Datei auswaehlen:", --- 242,254 ---- "BibView*confirmLoadBox*ok.label: OK", "BibView*confirmLoadBox*cancel.label: Abbrechen", "BibView*confirmQuitShell.title: Schliessen?", ! "BibView*confirmQuitBox.label: Es wurden Aenderungen vorgenommen, die nicht gespeichert wurden!\\nWollen Sie WIRKLICH alle Aenderungen verwerfen?", "BibView*confirmQuitBox*ok.label: Verwerfen", "BibView*confirmQuitBox*cancel.label: Abbrechen", + "BibView*confirmDeleteShell.title: Schliessen?", + "BibView*confirmDeleteBox.label: Wollen Sie WIRKLICH loeschen?", + "BibView*confirmDeleteBox*ok.label: Loeschen", + "BibView*confirmDeleteBox*cancel.label: Abbrechen", "BibView*fileSelectBoxShell.title: BibView Dateimanager", "BibView*fileSelectBoxShell.iconName: BibView Dateimanager", "BibView*fileLoadHead.label: BibTeX-Datei auswaehlen:", diff -cr bibview-1.5/fb_ger.h bibview-2.0/fb_ger.hbibview-1.5/fb_res.h bibview-2.0/fb_res.h *** bibview-1.5/fb_res.h Thu Jun 3 10:28:09 1993 --- bibview-2.0/fb_res.h Thu Jun 24 07:53:03 1993 *************** *** 104,110 **** "BibView*listWin*sortMenu.label: Sort Menu", "BibView*listWin*listVport.fromVert: commandBox", "BibView*listWin*listVport*font: *fixed-bold-r-*-100-*", - "BibView*listWin*head1.width: 1200", "BibView*listWin*list.verticalList: true", "BibView*listWin*list.forceColumns: True", "BibView*listWin*list.defaultColumns: 1", --- 104,109 ---- *************** *** 230,236 **** "BibView*confirmQuitBox.label: There are unsaved changes!\\nDo you really want to close?", "BibView*confirmQuitBox*ok.label: Close", "BibView*confirmQuitBox*cancel.label: Cancel", ! "BibView*confirmMacQuitBox*quit.label: Quit", "BibView*fileSelectBoxShell.title: BibView Filemanager", "BibView*fileSelectBoxShell.iconName: BibView Filemanager", "BibView*fileLoadHead.label: Choose BibTeX-file:", --- 229,238 ---- "BibView*confirmQuitBox.label: There are unsaved changes!\\nDo you really want to close?", "BibView*confirmQuitBox*ok.label: Close", "BibView*confirmQuitBox*cancel.label: Cancel", ! "BibView*confirmDeleteShell.title: Delete?", ! "BibView*confirmDeleteBox.label: Do you really want to delete?", ! "BibView*confirmDeleteBox*ok.label: Yes", ! "BibView*confirmDeleteBox*cancel.label: Cancel", "BibView*fileSelectBoxShell.title: BibView Filemanager", "BibView*fileSelectBoxShell.iconName: BibView Filemanager", "BibView*fileLoadHead.label: Choose BibTeX-file:", Common subdirectories: bibview-1.5/flexsrc and bibview-2.0/flexsrc diff -cr bibview-1.5/fb_res.h bibview-2.0/fb_res.hbibview-1.5/globdata.c bibview-2.0/globdata.c *** bibview-1.5/globdata.c Mon Jun 7 08:44:43 1993 --- bibview-2.0/globdata.c Fri Jun 18 15:26:39 1993 *************** *** 540,546 **** i++; sprintf(tmpfile, "%s.bak.%d", path, i); } ! sprintf(sysStr, "mv -f %s %s.bak.%d", path, path, i); if (access(path, F_OK) == 0) { system(sysStr); return(OK); --- 540,546 ---- i++; sprintf(tmpfile, "%s.bak.%d", path, i); } ! sprintf(sysStr, "cp -f %s %s.bak.%d", path, path, i); if (access(path, F_OK) == 0) { system(sysStr); return(OK); *************** *** 784,789 **** --- 784,793 ---- int inh; dptr = fopen(dateiName, "r"); + + if (dptr == NULL) + return 0; + while ( ((inh = getc(dptr)) != EOF) && isascii(inh) ) ; fclose(dptr); diff -cr bibview-1.5/globdata.c bibview-2.0/globdata.cbibview-1.5/gui_bibl.c bibview-2.0/gui_bibl.c *** bibview-1.5/gui_bibl.c Mon Jun 7 10:01:25 1993 --- bibview-2.0/gui_bibl.c Thu Jun 17 17:31:21 1993 *************** *** 133,139 **** /* make pulldownmenus for command boxes */ glbCreateTypeMenu("newMenu", bw->new, ! &bw->newMenu, ccdNewCardCmd, bp); createMenu("windowMenu", windowEntry, bw->window, &bw->windowMenu, bp); XtAddCallback(bw->search, XtNcallback, csrSearchCmd, (XtPointer)bp); --- 133,139 ---- /* make pulldownmenus for command boxes */ glbCreateTypeMenu("newMenu", bw->new, ! &bw->newMenu, ccdNewCardCmd, (XtPointer) bp); createMenu("windowMenu", windowEntry, bw->window, &bw->windowMenu, bp); XtAddCallback(bw->search, XtNcallback, csrSearchCmd, (XtPointer)bp); diff -cr bibview-1.5/gui_bibl.c bibview-2.0/gui_bibl.cbibview-1.5/gui_card.c bibview-2.0/gui_card.c *** bibview-1.5/gui_card.c Fri Jun 4 17:07:09 1993 --- bibview-2.0/gui_card.c Fri Jun 18 16:58:10 1993 *************** *** 64,72 **** --- 64,276 ---- /* local global variables */ /* ------------------------- */ + static XtTranslations trans; + static char trans_string[] = + "Tab: forward_focus()\n\ + Escape: backward_focus()\n\ + ,: set_focus()"; + static void forward_focus(); + static void backward_focus(); + static void set_focus(); + + static XtActionsRec actions[] = { + "forward_focus", forward_focus, + "backward_focus", backward_focus, + "set_focus", set_focus, + }; + + #ifdef ACTION_PROBLEM + static int first_in = 1; + #endif + /*********************************************************************/ + /* forward_focus: */ + /* moves the focus of a field to the next field */ + /*********************************************************************/ + static void forward_focus(Widget w) + { + BibPtr bp; + CardPtr cp; + CardWidgetsPtr cwp; + int i; + Pixel back, fore; + + bp = glbFirstBibListEl(); + while (bp!=NULL){ + cp = glbFirstCardListEl(bp); + while (cp!=NULL){ + XtVaGetValues(cp->cw->cardWin, XtNbackground, &back, NULL); + XtVaGetValues(cp->cw->cardWin, XtNforeground, &fore, NULL); + cwp = &cp->cw->ct.cw; + if (w == cwp->mainkey){ + XtVaSetValues(cwp->mainkey, XtNborderColor, fore, NULL); + if (cwp->owntype){ + XtSetKeyboardFocus(XtParent(w), cwp->owntype); + XtVaSetValues(cwp->owntype, XtNborderColor, back, NULL); + return; + } + else { + for (i=0; i< MAX_FIELDS; i++) + if (cwp->wfield[2*i+1]){ + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, back, NULL); + XtSetKeyboardFocus(XtParent(w), cwp->wfield[2*i+1]); + return; + } + if (i == MAX_FIELDS){ + XtSetKeyboardFocus(XtParent(w), cwp->mainkey); + XtVaSetValues(cwp->mainkey, XtNborderColor, back, NULL); + return; + } + } + } + if (w == cwp->owntype){ + XtVaSetValues(cwp->owntype, XtNborderColor, fore, NULL); + for (i=0; i< MAX_FIELDS; i++) + if (cwp->wfield[2*i+1]){ + XtSetKeyboardFocus(XtParent(w), cwp->wfield[2*i+1]); + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, back, NULL); + return; + } + if (i == MAX_FIELDS){ + XtVaSetValues(cwp->mainkey, XtNborderColor, back, NULL); + XtSetKeyboardFocus(XtParent(w), cwp->mainkey); + return; + } + } + for (i=0; i< MAX_FIELDS; i++) + if (w == cwp->wfield[2*i+1]){ + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, fore, NULL); + for (i=i+1; i< MAX_FIELDS; i++) + if (cwp->wfield[2*i+1]){ + XtSetKeyboardFocus(XtParent(w), cwp->wfield[2*i+1]); + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, back, NULL); + return; + } + if (i == MAX_FIELDS){ + XtSetKeyboardFocus(XtParent(w), cwp->mainkey); + XtVaSetValues(cwp->mainkey, XtNborderColor, back, NULL); + return; + } + } + cp = glbNextCardListEl(bp,cp); + } + bp = glbNextBibListEl(bp); + } + } + + /*********************************************************************/ + /* forward_focus: */ + /* moves the focus to the previous field */ + /*********************************************************************/ + static void backward_focus(Widget w) + { + BibPtr bp; + CardPtr cp; + CardWidgetsPtr cwp; + int i; + Pixel back, fore; + + bp = glbFirstBibListEl(); + while (bp!=NULL){ + cp = glbFirstCardListEl(bp); + while (cp!=NULL){ + XtVaGetValues(cp->cw->cardWin, XtNbackground, &back, NULL); + XtVaGetValues(cp->cw->cardWin, XtNforeground, &fore, NULL); + cwp = &cp->cw->ct.cw; + if (w == cwp->mainkey){ + XtVaSetValues(cwp->mainkey, XtNborderColor, fore, NULL); + for (i=MAX_FIELDS-1; i>=0; i--) + if (cwp->wfield[2*i+1]){ + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, back, NULL); + XtSetKeyboardFocus(XtParent(w), cwp->wfield[2*i+1]); + return; + } + if (i < 0){ + if (cwp->owntype){ + XtVaSetValues(cwp->owntype, XtNborderColor, back, NULL); + XtSetKeyboardFocus(XtParent(w), cwp->owntype); + return; + } + else{ + XtSetKeyboardFocus(XtParent(w), cwp->mainkey); + XtVaSetValues(cwp->mainkey, XtNborderColor, fore, NULL); + return; + } + } + } + if (w == cwp->owntype){ + XtVaSetValues(cwp->owntype, XtNborderColor, fore, NULL); + XtSetKeyboardFocus(XtParent(w), cwp->mainkey); + XtVaSetValues(cwp->mainkey, XtNborderColor, back, NULL); + return; + } + for (i=MAX_FIELDS-1; i>=0; i--) + if (w == cwp->wfield[2*i+1]){ + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, fore, NULL); + for (i=i-1; i>=0; i--) + if (cwp->wfield[2*i+1]){ + XtSetKeyboardFocus(XtParent(w), cwp->wfield[2*i+1]); + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, back, NULL); + return; + } + if (i < 0){ + if (cwp->owntype){ + XtSetKeyboardFocus(XtParent(w), cwp->owntype); + XtVaSetValues(cwp->owntype, XtNborderColor, back, NULL); + return; + } + else{ + XtSetKeyboardFocus(XtParent(w), cwp->mainkey); + XtVaSetValues(cwp->mainkey, XtNborderColor, back, NULL); + return; + } + } + } + cp = glbNextCardListEl(bp,cp); + } + bp = glbNextBibListEl(bp); + } + } + + /*********************************************************************/ + /* set_focus: */ + /* moves the focus to the field in which the left mouse */ + /* button is pressed */ + /*********************************************************************/ + static void set_focus(Widget w) + { + BibPtr bp; + CardPtr cp; + CardWidgetsPtr cwp; + int i; + Pixel back, fore; + + bp = glbFirstBibListEl(); + while (bp!=NULL){ + cp = glbFirstCardListEl(bp); + while (cp!=NULL){ + cwp = &cp->cw->ct.cw; + XtVaGetValues(cp->cw->cardWin, XtNbackground, &back, NULL); + XtVaGetValues(cp->cw->cardWin, XtNforeground, &fore, NULL); + XtVaSetValues(cwp->mainkey, XtNborderColor, fore, NULL); + if (cwp->owntype) + XtVaSetValues(cwp->mainkey, XtNborderColor, fore, NULL); + for (i=0; i< MAX_FIELDS; i++) + if (cwp->wfield[2*i+1]) + XtVaSetValues(cwp->wfield[2*i+1], XtNborderColor, + fore, NULL); + cp = glbNextCardListEl(bp,cp); + } + bp = glbNextBibListEl(bp); + } + XtSetKeyboardFocus(XtParent(w), w); + XtVaSetValues(w, XtNborderColor, back, NULL); + } + + + /*********************************************************************/ /* gucOpenCardWin: */ /* Creates an instance of a card window */ /*********************************************************************/ *************** *** 74,80 **** --- 278,298 ---- gucOpenCardWin (BibPtr bp, CardPtr cp, Boolean isNew) { CardWinPtr cw; + CardWidgetsPtr cwp; + Pixel fore, back; + + #ifdef ACTION_PROBLEM + if (first_in){ + #endif + XtAppAddActions(XtWidgetToApplicationContext(topLevel), actions, + XtNumber(actions)); + #ifdef ACTION_PROBLEM + first_in = 0; + } + #endif + trans = XtParseTranslationTable(trans_string); + /* allocate memory for new element of window list */ if ((cw = (CardWinPtr) XtCalloc(1, sizeof(CardWin))) == NULL) { /* error-handling is done in control modules */ *************** *** 114,120 **** cw->userDef = XtVaCreateManagedWidget("userDef", commandWidgetClass, cw->cmdBox, NULL); cw->annote = XtVaCreateManagedWidget("annote", ! commandWidgetClass, cw->cmdBox, NULL); cw->delete = XtVaCreateManagedWidget("delete", commandWidgetClass, cw->cmdBox, NULL); cw->change = XtVaCreateManagedWidget("save", --- 332,339 ---- cw->userDef = XtVaCreateManagedWidget("userDef", commandWidgetClass, cw->cmdBox, NULL); cw->annote = XtVaCreateManagedWidget("annote", ! commandWidgetClass, cw->cmdBox, ! XtNlabel, glbFldToName(nannote), NULL); cw->delete = XtVaCreateManagedWidget("delete", commandWidgetClass, cw->cmdBox, NULL); cw->change = XtVaCreateManagedWidget("save", *************** *** 138,144 **** /* create card window desktop */ cw->cardDesk = XtVaCreateManagedWidget("carddesk", ! formWidgetClass, cw->cardWin); cw->cardFlds = XtVaCreateManagedWidget(glbTypeToName(cp->cd->cardtype), formWidgetClass, cw->cardDesk, NULL); --- 357,363 ---- /* create card window desktop */ cw->cardDesk = XtVaCreateManagedWidget("carddesk", ! formWidgetClass, cw->cardWin, NULL); cw->cardFlds = XtVaCreateManagedWidget(glbTypeToName(cp->cd->cardtype), formWidgetClass, cw->cardDesk, NULL); *************** *** 164,171 **** --- 383,396 ---- /* build only widgets for specific card type */ createWidgets(bp, cp); + cwp = &cp->cw->ct.cw; XtPopup(cw->cardShell, XtGrabNone); + XtVaGetValues(cp->cw->cardWin, XtNbackground, &back, NULL); + XtVaGetValues(cp->cw->cardWin, XtNforeground, &fore, NULL); + XtSetKeyboardFocus(cw->cardFlds, cwp->mainkey); + XtVaSetValues(cwp->mainkey, XtNborderColor, back, NULL); + return(OK); } *************** *** 689,696 **** CardDataPtr cdp = cp->cd; /* ptr to real card data */ Widget card = cp->cw->cardFlds; /* parent widget */ Widget aktwidget; ! FieldName i; cdp->annoteChanged = FALSE; cwp->mainkeyL = XtVaCreateManagedWidget("fieldLabel", labelWidgetClass, card, --- 914,926 ---- CardDataPtr cdp = cp->cd; /* ptr to real card data */ Widget card = cp->cw->cardFlds; /* parent widget */ Widget aktwidget; ! int i; + for (i=0; iwfield[2*i] = NULL; + cwp->wfield[2*i+1] = NULL; + } + cdp->annoteChanged = FALSE; cwp->mainkeyL = XtVaCreateManagedWidget("fieldLabel", labelWidgetClass, card, *************** *** 703,708 **** --- 933,939 ---- XtNtop, XtChainTop, XtNfromHoriz, cwp->mainkeyL, NULL); + XtOverrideTranslations(cwp->mainkey, trans); aktwidget = cwp->mainkey; if (cdp->cardtype == MAX_BIBTEX_TYPES){ cwp->owntypeL = XtVaCreateManagedWidget("fieldLabel", *************** *** 715,720 **** --- 946,952 ---- XtNstring, cdp->cardtypestr, XtNfromVert, aktwidget, XtNfromHoriz, cwp->owntypeL, NULL); + XtOverrideTranslations(cwp->owntype, trans); aktwidget = cwp->owntype; } for (i=0; ifield[i], XtNfromVert, aktwidget, XtNfromHoriz, cwp->wfield[2*i], NULL); + XtOverrideTranslations(cwp->wfield[2*i+1], trans); if (isrequiredfield(i, cdp->cardtype)) XtVaSetValues(cwp->wfield[2*i+1], XtNborderWidth, 3, NULL); aktwidget = cwp->wfield[2*i+1]; diff -cr bibview-1.5/gui_card.c bibview-2.0/gui_card.cbibview-1.5/gui_edit.c bibview-2.0/gui_edit.c *** bibview-1.5/gui_edit.c Wed Jun 2 17:46:25 1993 --- bibview-2.0/gui_edit.c Thu Jun 17 17:31:21 1993 *************** *** 41,46 **** --- 41,47 ---- /* ------------------------- */ extern Widget topLevel, desktop; extern Pixmap macIconPixmap; + extern listEntry *list_layout; /* macros and definitions */ *************** *** 412,425 **** { if (bp->ew != NULL) { XtPopdown(bp->ew->macShell); - XtDestroyWidget(bp->ew->macShell); - XtDestroyWidget(bp->ew->macWin); - XtDestroyWidget(bp->ew->cmdBox); - XtDestroyWidget(bp->ew->save); - XtDestroyWidget(bp->ew->close); - XtDestroyWidget(bp->ew->file); - XtFree((char *)bp->ew->shellName); - XtFree((char *)bp->ew); bp->ew = NULL; } return(OK); --- 413,418 ---- *************** *** 440,456 **** {guwError(status); return; } - if (bp->ew != NULL) { - XtDestroyWidget(bp->ew->macShell); - XtDestroyWidget(bp->ew->macWin); - XtDestroyWidget(bp->ew->cmdBox); - XtDestroyWidget(bp->ew->save); - XtDestroyWidget(bp->ew->close); - XtDestroyWidget(bp->ew->file); - XtFree((char *)bp->ew->shellName); - XtFree((char *)bp->ew); - bp->ew = NULL; - } return; } --- 433,438 ---- diff -cr bibview-1.5/gui_edit.c bibview-2.0/gui_edit.cbibview-1.5/gui_list.c bibview-2.0/gui_list.c *** bibview-1.5/gui_list.c Fri Jun 4 13:07:44 1993 --- bibview-2.0/gui_list.c Fri Jun 18 18:06:36 1993 *************** *** 51,57 **** /* exported variables */ /* ------------------ */ ! listEntry list_layout; /* local global variables */ --- 51,57 ---- /* exported variables */ /* ------------------ */ ! listEntry *list_layout; /* local global variables */ *************** *** 144,151 **** panedWidgetClass, lw->lstVp, NULL); lst_width = 0; ! for (i=0; ilstVp, NULL); lst_width = 0; ! for (i=0; inumber; i++) ! lst_width += list_layout->width[i] + LST_WHITESPACE; if ((help = (String)XtCalloc(1, lst_width+1)) == NULL) return(ERR_NOMALLOC); *************** *** 154,172 **** return(ERR_NOMALLOC); strcpy(sp, ""); ! for (i=0; inumber; i++){ ! if (list_layout->field[i] == -1) sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], "MAINKEY"); ! else if (list_layout->field[i] == -2) sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], "CARDTYPE"); else sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], ! glbFldToName(list_layout->field[i])); sp = strcat(sp, help); sprintf(help, "%-*.*s", LST_WHITESPACE, LST_WHITESPACE, ""); *************** *** 402,419 **** XtFree((char *)bp->lw->listArgv); if (bp->lw->strs) XtFree((char *)bp->lw->strs); ! XtDestroyWidget(bp->lw->lstShell); ! XtDestroyWidget(bp->lw->lstWin); ! XtDestroyWidget(bp->lw->cmdBox); ! XtDestroyWidget(bp->lw->save); ! XtDestroyWidget(bp->lw->sort); ! XtDestroyWidget(bp->lw->copy); ! XtDestroyWidget(bp->lw->print); ! XtDestroyWidget(bp->lw->quit); ! XtDestroyWidget(bp->lw->lstVp); ! XtDestroyWidget(bp->lw->vpWin); ! XtDestroyWidget(bp->lw->headBox); ! XtDestroyWidget(bp->lw->list); dbtCardListDelete(&bp->lw->cardLst); bp->lw->cardLst = NULL; XtFree((char *)bp->lw->shellName); --- 402,408 ---- XtFree((char *)bp->lw->listArgv); if (bp->lw->strs) XtFree((char *)bp->lw->strs); ! XtPopdown(bp->lw->lstShell); dbtCardListDelete(&bp->lw->cardLst); bp->lw->cardLst = NULL; XtFree((char *)bp->lw->shellName); *************** *** 558,565 **** } lst_width = 0; ! for (i=0; inumber; i++) ! lst_width += list_layout->width[i] + LST_WHITESPACE; /* alloc new argv for Strings */ *************** *** 578,599 **** for (cl=lw->cardLst, sp=lw->listArgv; cl != NULL; cl=cl->next, sp++) { strcpy(*sp, ""); ! for (i=0; idata->mainkey); ! else if (list_layout.field[i] == -2) sprintf(help, "%-*.*s", ! list_layout.width[i], list_layout.width[i], cl->data->cardtypestr); ! else if (!glbIsStringEmpty(cl->data->field[list_layout.field[i]])) sprintf(help, "%-*.*s", ! list_layout.width[i], list_layout.width[i], ! cl->data->field[list_layout.field[i]]); else sprintf(help, "%-*.*s", ! list_layout.width[i], list_layout.width[i], "-----"); *sp = strcat(*sp, help); sprintf(help, "%-*.*s", LST_WHITESPACE, LST_WHITESPACE, ""); --- 567,588 ---- for (cl=lw->cardLst, sp=lw->listArgv; cl != NULL; cl=cl->next, sp++) { strcpy(*sp, ""); ! for (i=0; inumber; i++){ ! if (list_layout->field[i] == -1) sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], cl->data->mainkey); ! else if (list_layout->field[i] == -2) sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], cl->data->cardtypestr); ! else if (!glbIsStringEmpty(cl->data->field[list_layout->field[i]])) sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], ! cl->data->field[list_layout->field[i]]); else sprintf(help, "%-*.*s", ! list_layout->width[i], list_layout->width[i], "-----"); *sp = strcat(*sp, help); sprintf(help, "%-*.*s", LST_WHITESPACE, LST_WHITESPACE, ""); diff -cr bibview-1.5/gui_list.c bibview-2.0/gui_list.cbibview-1.5/gui_widg.c bibview-2.0/gui_widg.c *** bibview-1.5/gui_widg.c Mon Jun 7 10:04:59 1993 --- bibview-2.0/gui_widg.c Thu Jun 24 07:44:38 1993 *************** *** 206,211 **** --- 206,239 ---- /*********************************************************************/ + /* guwConfirmDelete: */ + /* Opens dialogbox for user to confirm deleting an entry */ + /*********************************************************************/ + void + guwConfirmDelete (Position x, Position y, XtCallbackProc p1, XtCallbackProc p2) + { + static Widget conShell, conDialog, conOKButton, conQuitButton; + + conShell = XtVaCreatePopupShell("confirmDeleteShell", + transientShellWidgetClass, topLevel, + XtNx, x, XtNy, y, NULL); + conDialog = XtVaCreateManagedWidget("confirmDeleteBox", + dialogWidgetClass, conShell, + XtNicon, questPixmap, NULL); + conOKButton = XtVaCreateManagedWidget("ok", + commandWidgetClass, conDialog, NULL); + conQuitButton = XtVaCreateManagedWidget("cancel", + commandWidgetClass, conDialog, NULL); + XtAddCallback(conQuitButton, XtNcallback, p1, conShell); + XtAddCallback(conOKButton, XtNcallback, p2, conShell); + + XtSetSensitive(mainMenu, FALSE); + gubSetSensitive(NULL, FALSE); + XtPopup(conShell, XtGrabNonexclusive); + } + + + /*********************************************************************/ /* guwError: */ /* Display error message in a popup shell on desktop */ /*********************************************************************/ diff -cr bibview-1.5/gui_widg.c bibview-2.0/gui_widg.cbibview-1.5/patchlevel.h bibview-2.0/patchlevel.h *** bibview-1.5/patchlevel.h Thu Feb 18 09:09:58 1993 --- bibview-2.0/patchlevel.h Thu Jun 17 17:31:22 1993 *************** *** 1,3 **** ! #define VERSION 1 ! #define PATCHLEVEL 5 ! #define VERSION_STRING "1.5" --- 1,3 ---- ! #define VERSION 2 ! #define PATCHLEVEL 0 ! #define VERSION_STRING "2.0" diff -cr bibview-1.5/patchlevel.h bibview-2.0/patchlevel.hbibview-1.5/rc_file.c bibview-2.0/rc_file.c *** bibview-1.5/rc_file.c Fri Jun 4 16:48:22 1993 --- bibview-2.0/rc_file.c Thu Jun 17 17:31:21 1993 *************** *** 113,119 **** char *actual_path; extern char *style_file; extern int sortedby; ! extern listEntry list_layout; extern char requiredfields[MAX_BIBTEX_TYPES+1][MAX_FIELDS]; extern char standardfields[MAX_BIBTEX_TYPES+1][MAX_FIELDS]; --- 113,119 ---- char *actual_path; extern char *style_file; extern int sortedby; ! extern listEntry *list_layout; extern char requiredfields[MAX_BIBTEX_TYPES+1][MAX_FIELDS]; extern char standardfields[MAX_BIBTEX_TYPES+1][MAX_FIELDS]; *************** *** 215,221 **** /* curMode = getCfgFileTag(cfgLine); */ curMode = getCfgFileTag(cfgp); if (curMode == listFieldTags) ! list_layout.number = 0; if (curMode != illegalTag) continue; processLine = TRUE; --- 215,221 ---- /* curMode = getCfgFileTag(cfgLine); */ curMode = getCfgFileTag(cfgp); if (curMode == listFieldTags) ! list_layout->number = 0; if (curMode != illegalTag) continue; processLine = TRUE; *************** *** 966,976 **** return(OK); } if (strcmp(field, "mainkey") == 0) ! list_layout.field[list_layout.number] = -1; else if (strcmp(field, "cardtype") == 0) ! list_layout.field[list_layout.number] = -2; else if ((fieldnr = glbNameToField(field)) != -1) ! list_layout.field[list_layout.number] = fieldnr; else { if (max_fields == MAX_FIELDS){ fprintf(stderr, --- 966,976 ---- return(OK); } if (strcmp(field, "mainkey") == 0) ! list_layout->field[list_layout->number] = -1; else if (strcmp(field, "cardtype") == 0) ! list_layout->field[list_layout->number] = -2; else if ((fieldnr = glbNameToField(field)) != -1) ! list_layout->field[list_layout->number] = fieldnr; else { if (max_fields == MAX_FIELDS){ fprintf(stderr, *************** *** 979,989 **** } fieldNames[max_fields] = XtCalloc(strlen(field)+1, sizeof(char)); strcpy(fieldNames[max_fields], strlower(field)); ! list_layout.field[list_layout.number] = max_fields; max_fields++; } ! list_layout.width[list_layout.number] = width; ! list_layout.number++; return(OK); } --- 979,989 ---- } fieldNames[max_fields] = XtCalloc(strlen(field)+1, sizeof(char)); strcpy(fieldNames[max_fields], strlower(field)); ! list_layout->field[list_layout->number] = max_fields; max_fields++; } ! list_layout->width[list_layout->number] = width; ! list_layout->number++; return(OK); } diff -cr bibview-1.5/bitmaps/bv_ann64 bibview-2.0/bitmaps/bv_ann64 *** bibview-1.5/bitmaps/bv_ann64 Wed Dec 2 10:04:42 1992 --- bibview-2.0/bitmaps/bv_ann64 Thu Jun 17 17:31:20 1993 *************** *** 1,6 **** #define bv_annote64_width 64 #define bv_annote64_height 64 ! static char bv_annote64_bits[] = { 0x25, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x21, 0x00, 0xf0, 0xdc, 0xf3, 0x01, 0x21, 0x89, 0x10, 0x00, 0x10, 0x49, 0x44, 0x00, 0x12, 0x44, 0x08, 0x00, 0x10, 0x49, 0x44, 0x00, 0x0c, 0x22, 0x04, 0x00, 0xf0, --- 1,6 ---- #define bv_annote64_width 64 #define bv_annote64_height 64 ! static unsigned char bv_annote64_bits[] = { 0x25, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x21, 0x00, 0xf0, 0xdc, 0xf3, 0x01, 0x21, 0x89, 0x10, 0x00, 0x10, 0x49, 0x44, 0x00, 0x12, 0x44, 0x08, 0x00, 0x10, 0x49, 0x44, 0x00, 0x0c, 0x22, 0x04, 0x00, 0xf0, diff -cr bibview-1.5/bitmaps/bv_ann64 bibview-2.0/bitmaps/bv_ann64bibview-1.5/bitmaps/bv_hlp64 bibview-2.0/bitmaps/bv_hlp64 *** bibview-1.5/bitmaps/bv_hlp64 Wed Dec 2 10:04:42 1992 --- bibview-2.0/bitmaps/bv_hlp64 Thu Jun 17 17:31:20 1993 *************** *** 1,6 **** #define bv_help64_width 64 #define bv_help64_height 64 ! static char bv_help64_bits[] = { 0x25, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x21, 0x00, 0xf0, 0xdc, 0xf3, 0x01, 0x21, 0x89, 0x10, 0x00, 0x10, 0x49, 0x44, 0x00, 0x12, 0x44, 0x08, 0x00, 0x10, 0x49, 0x44, 0x00, 0x0c, 0x22, 0x04, 0x00, 0xf0, --- 1,6 ---- #define bv_help64_width 64 #define bv_help64_height 64 ! static unsigned char bv_help64_bits[] = { 0x25, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x21, 0x00, 0xf0, 0xdc, 0xf3, 0x01, 0x21, 0x89, 0x10, 0x00, 0x10, 0x49, 0x44, 0x00, 0x12, 0x44, 0x08, 0x00, 0x10, 0x49, 0x44, 0x00, 0x0c, 0x22, 0x04, 0x00, 0xf0, diff -cr bibview-1.5/bitmaps/bv_hlp64 bibview-2.0/bitmaps/bv_hlp64bibview-1.5/bitmaps/proggerm.xbm bibview-2.0/bitmaps/proggerm.xbm *** bibview-1.5/bitmaps/proggerm.xbm Thu Feb 18 09:04:33 1993 --- bibview-2.0/bitmaps/proggerm.xbm Thu Jun 17 17:31:20 1993 *************** *** 1,6 **** #define proginfo_width 311 #define proginfo_height 311 ! static char proginfo_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, --- 1,6 ---- #define proginfo_width 311 #define proginfo_height 311 ! static unsigned char proginfo_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff -cr bibview-1.5/bitmaps/proggerm.xbm bibview-2.0/bitmaps/proggerm.xbmbibview-1.5/bitmaps/proginfo.xbm bibview-2.0/bitmaps/proginfo.xbm *** bibview-1.5/bitmaps/proginfo.xbm Thu Feb 18 09:05:54 1993 --- bibview-2.0/bitmaps/proginfo.xbm Thu Jun 17 17:31:20 1993 *************** *** 1,6 **** #define proginfo_width 311 #define proginfo_height 311 ! static char proginfo_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, --- 1,6 ---- #define proginfo_width 311 #define proginfo_height 311 ! static unsigned char proginfo_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff -cr bibview-1.5/flexsrc/b.l bibview-2.0/flexsrc/b.l *** bibview-1.5/flexsrc/b.l Mon May 24 15:59:00 1993 --- bibview-2.0/flexsrc/b.l Fri Jun 18 14:51:26 1993 *************** *** 18,23 **** --- 18,25 ---- "\\%" { yynflexcalls += 1; + if (ueIdx+2 >= MAX_UEBERGABE) + return PROZENT; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = yytext[1]; uebergabe[ueIdx+2] = '\0'; *************** *** 33,62 **** return KOMMENTAR; } ! "@comment" { ! yynflexcalls += 1; ! return COMMENT; ! } "@string" { ! yynflexcalls += 1; ! return STRING; ! } "@preamble" { yynflexcalls += 1; ! return PREAMBLE; } ! "@"[a-zA-Z]* { ! strcpy(uebergabe, &yytext[1]); ueIdx += strlen(yytext); yynflexcalls += 1; return TYPE; } "#" { yynflexcalls += 1; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; --- 35,91 ---- return KOMMENTAR; } ! "@comment" { ! if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) ! return COMMENT; ! strcpy(&uebergabe[ueIdx], yytext); ! ueIdx += strlen(yytext); ! yynflexcalls += 1; ! return COMMENT; ! } "@string" { ! if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) ! return STRING; ! strcpy(&uebergabe[ueIdx], yytext); ! ueIdx += strlen(yytext); ! yynflexcalls += 1; ! return STRING; ! } "@preamble" { + if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) + return PREAMBLE; + strcpy(&uebergabe[ueIdx], yytext); + ueIdx += strlen(yytext); yynflexcalls += 1; ! return PREAMBLE; } ! "@"[a-zA-Z]+ { ! if (ueIdx+strlen(yytext) >= MAX_UEBERGABE) ! return TYPE; ! strcpy(&uebergabe[ueIdx], yytext); ueIdx += strlen(yytext); yynflexcalls += 1; return TYPE; } + "@" { + yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return AFFE; + yylval = yytext[0]; + uebergabe[ueIdx] = yytext[0]; + uebergabe[ueIdx+1] = '\0'; + ueIdx++; + return AFFE; + } + "#" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return ZAUN; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; *************** *** 67,72 **** --- 96,103 ---- "," { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return KOMMA; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; *************** *** 77,82 **** --- 108,115 ---- "(" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return LRKL; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 85,90 **** --- 118,125 ---- ")" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return RRKL; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; *************** *** 94,99 **** --- 129,136 ---- "{" { yynflexcalls += 1; + if (ueIdx+1 >= MAX_UEBERGABE) + return LGKL; yylval = yytext[0]; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; *************** *** 104,109 **** --- 141,148 ---- "}" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return RGKL; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 113,118 **** --- 152,159 ---- "=" { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return EQ; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 122,127 **** --- 163,170 ---- [\"] { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return DAZ; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 131,136 **** --- 174,181 ---- [ \t\n] { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return WHITE_SPACE; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 141,146 **** --- 186,193 ---- [a-zA-Z0-9] { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return BUCHSTABE_ZAHL; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; *************** *** 157,162 **** --- 204,211 ---- . { yynflexcalls += 1; yylval = yytext[0]; + if (ueIdx+1 >= MAX_UEBERGABE) + return ZEICHEN; uebergabe[ueIdx] = yytext[0]; uebergabe[ueIdx+1] = '\0'; ueIdx++; diff -cr bibview-1.5/flexsrc/b.l bibview-2.0/flexsrc/b.lbibview-1.5/flexsrc/b.y bibview-2.0/flexsrc/b.y *** bibview-1.5/flexsrc/b.y Fri Jun 4 13:04:00 1993 --- bibview-2.0/flexsrc/b.y Fri Jun 18 14:51:00 1993 *************** *** 11,19 **** #define __RUNTIME_YYMAXDEPTH #define YYMAXDEPTH 1000 - #define MAX_UEBERGABE 20000 - char uebergabe[MAX_UEBERGABE]; int ueIdx = 0; FILE *tempDatei; --- 11,18 ---- #define __RUNTIME_YYMAXDEPTH #define YYMAXDEPTH 1000 char uebergabe[MAX_UEBERGABE]; + char ue2[MAX_UEBERGABE]; int ueIdx = 0; FILE *tempDatei; *************** *** 21,27 **** extern YY_NEW_FILE; extern int yy_init; ! extern int fld_indent, cont_indent, newline_indent; typedef struct _Snode { char inh; --- 20,26 ---- extern YY_NEW_FILE; extern int yy_init; ! extern int fld_indent, cont_indent, newline_indent, max_fields; typedef struct _Snode { char inh; *************** *** 44,50 **** static Snode *key = NULL; static Snode *fldname = NULL; - static Snode *fldcont = NULL; static char errstr[MAX_ERRLINELENGTH]; #ifdef GERMAN --- 43,48 ---- *************** *** 74,81 **** /*******************************************/ static void PushSign(Snode **w, char a); - static void AppendSign(Snode **w, char a); static void FreeStack(Snode **s); static void StackToString(Snode *s, char **text); static void GetKey(); static void GetFldNameCont(); --- 72,79 ---- /*******************************************/ static void PushSign(Snode **w, char a); static void FreeStack(Snode **s); + static void StringToString(char *text1, char **text); static void StackToString(Snode *s, char **text); static void GetKey(); static void GetFldNameCont(); *************** *** 82,89 **** static void SecStrcat(int maxlen, char *str1, char *str2); static int SetInputFile(char *file); ! static int SkipSpace(char *text, Snode **new); static int SkipNewLineSpace(char *text); static int StringIsPeteEmpty(char *text); static void WriteRecToFile(CardData *card, FILE *datei); static long WriteLineToFile(FILE *datei, char *feld, char *inh); --- 80,88 ---- static void SecStrcat(int maxlen, char *str1, char *str2); static int SetInputFile(char *file); ! static int SkipSpace(char *text, char *text2); static int SkipNewLineSpace(char *text); + static int SkipApe(char *text); static int StringIsPeteEmpty(char *text); static void WriteRecToFile(CardData *card, FILE *datei); static long WriteLineToFile(FILE *datei, char *feld, char *inh); *************** *** 91,113 **** %token COMMENT %token STRING %token PREAMBLE - %token ARTICLE - %token BOOK - %token BOOKLET - %token CONFERENCE - %token INBOOK - %token INCOLLECTION - %token INPROCEEDINGS - %token MANUAL - %token MASTERSTHESIS - %token MISC - %token PHDTHESIS - %token PROCEEDINGS - %token TECHREPORT - %token UNPUBLISHED %token TYPE %token KOMMA %token EQ %token LGKL %token RGKL %token LRKL --- 90,99 ---- %token COMMENT %token STRING %token PREAMBLE %token TYPE %token KOMMA %token EQ + %token AFFE %token LGKL %token RGKL %token LRKL *************** *** 144,150 **** | KOMMENTAR entry ! : COMMENT | string | preamble | eintrag --- 130,136 ---- | KOMMENTAR entry ! : comment | string | preamble | eintrag *************** *** 167,233 **** : STRING LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | STRING leerraum LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | STRING LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | STRING leerraum LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@STRING"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } preamble : PREAMBLE LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | PREAMBLE leerraum LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | PREAMBLE LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | PREAMBLE leerraum LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipNewLineSpace(uebergabe); ! fprintf(tempDatei,"@PREAMBLE"); ! fprintf(tempDatei,"%s\n",&uebergabe[beginIdx]); ueIdx = 0; } --- 153,241 ---- : STRING LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | STRING leerraum LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | STRING LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | STRING leerraum LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } + comment + : COMMENT LGKL allstringG RGKL + { + keyline = yynline; + beginIdx = SkipApe(uebergabe); + fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); + ueIdx = 0; + } + | COMMENT leerraum LGKL allstringG RGKL + { + keyline = yynline; + beginIdx = SkipApe(uebergabe); + fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); + ueIdx = 0; + } + | COMMENT LRKL allstringR RRKL + { + keyline = yynline; + beginIdx = SkipApe(uebergabe); + fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); + ueIdx = 0; + } + | COMMENT leerraum LRKL allstringR RRKL + { + keyline = yynline; + beginIdx = SkipApe(uebergabe); + fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); + ueIdx = 0; + } + preamble : PREAMBLE LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | PREAMBLE leerraum LGKL allstringG RGKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | PREAMBLE LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } | PREAMBLE leerraum LRKL allstringR RRKL { keyline = yynline; ! beginIdx = SkipApe(uebergabe); ! fprintf(tempDatei,"@%s\n",&uebergabe[beginIdx]); ueIdx = 0; } *************** *** 247,252 **** --- 255,265 ---- | LGKL RGKL | LRKL allstringG | RRKL allstringG + | TYPE allstringG + | STRING allstringG + | PREAMBLE allstringG + | COMMENT allstringG + | AFFE allstringG | WHITE_SPACE | KOMMENTAR | ZEICHEN *************** *** 258,263 **** --- 271,281 ---- | DAZ | LRKL | RRKL + | TYPE + | AFFE + | STRING + | PREAMBLE + | COMMENT allstringR : WHITE_SPACE allstringR *************** *** 275,280 **** --- 293,303 ---- | LGKL RGKL | LRKL allstringR RRKL allstringR | LRKL allstringR RRKL + | TYPE allstringR + | STRING allstringG + | PREAMBLE allstringR + | COMMENT allstringR + | AFFE allstringR | LRKL RRKL | WHITE_SPACE | KOMMENTAR *************** *** 285,290 **** --- 308,318 ---- | ZAUN | PROZENT | DAZ + | TYPE + | AFFE + | STRING + | PREAMBLE + | COMMENT eintrag : eingabetyp LGKL schluessel KOMMA felder leerraum RGKL { *************** *** 323,333 **** : TYPE { err = dbtMakeCard(&card); card->cardtype = cardtype = ! glbNameToType(strlower(uebergabe)); ! if (cardtype == illegal) card->cardtype = cardtype = MAX_BIBTEX_TYPES; ! Scalloc(&card->cardtypestr, uebergabe); } schluessel --- 351,363 ---- : TYPE { err = dbtMakeCard(&card); + beginIdx = SkipApe(uebergabe); card->cardtype = cardtype = ! glbNameToType(strlower(&uebergabe[beginIdx])); ! if (cardtype == -1) card->cardtype = cardtype = MAX_BIBTEX_TYPES; ! Scalloc(&card->cardtypestr, &uebergabe[beginIdx]); ! ueIdx = 0; } schluessel *************** *** 353,358 **** --- 383,403 ---- PushSign(&key, $1); keyline = yynline; } + | EQ schl + { + PushSign(&key, $1); + keyline = yynline; + } + | LRKL schl + { + PushSign(&key, $1); + keyline = yynline; + } + | RRKL schl + { + PushSign(&key, $1); + keyline = yynline; + } | PROZENT schl { PushSign(&key, '%'); *************** *** 385,390 **** --- 430,445 ---- PushSign(&key, '\\'); keyline = yynline; } + | LRKL + { + PushSign(&key, $1); + keyline = yynline; + } + | RRKL + { + PushSign(&key, $1); + keyline = yynline; + } felder : leerraum feld KOMMA felder *************** *** 399,409 **** feld ! : feldname leerraum EQ konkatenation { GetFldNameCont(); } ! | feldname EQ konkatenation { GetFldNameCont(); } --- 454,472 ---- feld ! : feldname leerraum EQ ! { ! ueIdx = 0; ! } ! konkatenation { GetFldNameCont(); } ! | feldname EQ ! { ! ueIdx = 0; ! } ! konkatenation { GetFldNameCont(); } *************** *** 471,476 **** --- 534,544 ---- | LGKL dazdaz RGKL dazfeldinhalt | LGKL RGKL | LGKL RGKL dazfeldinhalt + | TYPE dazfeldinhalt + | STRING dazfeldinhalt + | PREAMBLE dazfeldinhalt + | COMMENT dazfeldinhalt + | AFFE dazfeldinhalt | WHITE_SPACE | KOMMENTAR | BUCHSTABE_ZAHL *************** *** 481,486 **** --- 549,559 ---- | ZAUN | LRKL | RRKL + | AFFE + | TYPE + | STRING + | PREAMBLE + | COMMENT dazdaz : WHITE_SPACE dazdaz *************** *** 493,498 **** --- 566,576 ---- | LGKL dazdaz RGKL dazdaz | LGKL RGKL | LGKL RGKL dazdaz + | TYPE dazdaz + | STRING dazdaz + | PREAMBLE dazdaz + | COMMENT dazdaz + | AFFE dazdaz | WHITE_SPACE | KOMMENTAR | BUCHSTABE_ZAHL *************** *** 504,513 **** --- 582,611 ---- | RRKL | KOMMA | DAZ + | AFFE + | TYPE + | STRING + | PREAMBLE + | COMMENT %% + static int SkipApe(char *text) + { + int erg, back; + + erg = 0; + while (erg < MAX_UEBERGABE) { + if (*text == '@') + return erg+1; + text++; + erg++; + } + return 0; + } + + static int SkipNewLineSpace(char *text) { int erg, back; *************** *** 530,545 **** } ! ! ! static int SkipSpace(char *text, Snode **new) { int erg, lgkl, daz, index, inmakro; index = 0; lgkl = 0; daz = 0; inmakro = 0; while ((*text == ' ' || *text == '=' || *text == '\t') && index < ueIdx) { text++; index++; } erg = index; --- 628,643 ---- } ! static int SkipSpace(char *text, char *text2) { int erg, lgkl, daz, index, inmakro; + char *zaehler; index = 0; lgkl = 0; daz = 0; inmakro = 0; + zaehler = text2; while ((*text == ' ' || *text == '=' || *text == '\t') && index < ueIdx) { text++; index++; } erg = index; *************** *** 556,571 **** inmakro = 0; } else { ! AppendSign(new, '@'); ! AppendSign(new, *text); index++; text++; inmakro = 1; } while (index < ueIdx) { ! if (*text == '{') { if (lgkl >= 1 || daz >= 1) { /* Klammer in String */ ! AppendSign(new, *text); } text++; /* Klammer nach Zaun */ index++; --- 654,683 ---- inmakro = 0; } else { ! *zaehler++ = '@'; ! *zaehler++ = *text; index++; text++; inmakro = 1; } while (index < ueIdx) { ! if (isalnum(*text)) { ! if (lgkl < 1 && daz < 1 && (inmakro==0)) { ! if (text[index-1] != ' ') ! *zaehler++ = ' '; ! *zaehler++ = '@'; ! *zaehler++ = *text; ! inmakro = 1; ! } ! else { /* Zeichen in String */ ! *zaehler++ = *text; ! } ! text++; ! index++; ! } ! else if (*text == '{') { if (lgkl >= 1 || daz >= 1) { /* Klammer in String */ ! *zaehler++ = *text; } text++; /* Klammer nach Zaun */ index++; *************** *** 573,579 **** inmakro = 0; } else if (*text == '\n') { ! AppendSign(new, *text); text++; index++; while ((*text == ' ') || (*text == '\t')){ --- 685,691 ---- inmakro = 0; } else if (*text == '\n') { ! *zaehler++ = *text; text++; index++; while ((*text == ' ') || (*text == '\t')){ *************** *** 584,590 **** } else if (*text == '}') { if ((lgkl > 1) || (daz >= 1)) { ! AppendSign(new, *text); } text++; index++; --- 696,702 ---- } else if (*text == '}') { if ((lgkl > 1) || (daz >= 1)) { ! *zaehler++ = *text; } text++; index++; *************** *** 593,599 **** } else if (*text == '"') { if (lgkl >= 1) { ! AppendSign(new, *text); text++; index++; } --- 705,711 ---- } else if (*text == '"') { if (lgkl >= 1) { ! *zaehler++ = *text; text++; index++; } *************** *** 607,619 **** } else if (*text == '#') { /* Space vor/nach Konkatenation */ if (lgkl < 1 && daz < 1) { ! if (text[index-1] != ' ') AppendSign(new, ' '); ! AppendSign(new, '@'); /* # -> @# */ ! AppendSign(new, *text); ! if (text[index+1] != ' ') AppendSign(new, ' '); } else { /* Konkatenation in String */ ! AppendSign(new, *text); } text++; index++; --- 719,733 ---- } else if (*text == '#') { /* Space vor/nach Konkatenation */ if (lgkl < 1 && daz < 1) { ! if (text[index-1] != ' ') ! *zaehler++ = ' '; ! *zaehler++ = '@'; ! *zaehler++ = *text; ! if (text[index+1] != ' ') ! *zaehler++ = ' '; } else { /* Konkatenation in String */ ! *zaehler++ = *text; } text++; index++; *************** *** 622,628 **** else if (*text == ',') { /* Komma am Ende */ if (lgkl < 1 && daz != 1) break; else { ! AppendSign(new, *text); text++; index++; } --- 736,742 ---- else if (*text == ',') { /* Komma am Ende */ if (lgkl < 1 && daz != 1) break; else { ! *zaehler++ = *text; text++; index++; } *************** *** 631,668 **** else if (*text == ')') { /* runde Klammer am Ende */ if (lgkl < 1 && daz != 1) break; else { ! AppendSign(new, *text); text++; index++; } inmakro = 0; } ! else if (isalnum(*text)) { ! if (lgkl < 1 && daz < 1 && (inmakro==0)) { ! if (text[index-1] != ' ') AppendSign(new, ' '); ! AppendSign(new, '@'); /* makro -> @makro */ ! AppendSign(new, *text); ! inmakro = 1; ! } ! else { /* Zeichen in String */ ! AppendSign(new, *text); ! } text++; index++; } else { /* sonstiges Zeichen in String */ ! AppendSign(new, *text); text++; index++; inmakro = 0; } } return erg; } - - static void PushSign(Snode **w, char a) { Snode *hnode, *oldw; --- 745,775 ---- else if (*text == ')') { /* runde Klammer am Ende */ if (lgkl < 1 && daz != 1) break; else { ! *zaehler++ = *text; text++; index++; } inmakro = 0; } ! else if (*text == '@') { /* @ */ ! *zaehler++ = *text; ! *zaehler++ = *text; text++; index++; + inmakro = 0; } else { /* sonstiges Zeichen in String */ ! *zaehler++ = *text; text++; index++; inmakro = 0; } } + *zaehler++ = '\0'; return erg; } static void PushSign(Snode **w, char a) { Snode *hnode, *oldw; *************** *** 685,721 **** } - static void AppendSign(Snode **w, char a) - { - Snode *hnode, *oldw; - int newslen; - - if (*w == NULL) { - hnode = (Snode *)XtCalloc(1,sizeof(Snode)); - hnode->inh = a; - hnode->slen = 1; - hnode->next = NULL; - *w = hnode; - } - else { - oldw = *w; - newslen = 1; - while (oldw->next != NULL) { - newslen++; - oldw = oldw->next; - } - newslen++; - hnode = (Snode *)XtCalloc(1,sizeof(Snode)); - hnode->inh = a; - hnode->slen = 1; - hnode->next = NULL; - oldw->next = hnode; - oldw = *w; - oldw->slen = newslen; /* echte Laenge nur im 1. El. */ - } - } - - static void FreeStack(Snode **s) { Snode *h, *del; --- 792,797 ---- *************** *** 730,735 **** --- 806,819 ---- } + static void StringToString(char *text1, char **text) + + { + *text = (char *)XtCalloc(1,strlen(text1)+1); + strcpy(*text, text1); + } + + static void StackToString(Snode *s, char **text) { char *help; *************** *** 760,765 **** --- 844,850 ---- FreeStack(&key); err = dbtInsert(glbbp, card); err = dbtDeleteCard(&card); + ueIdx = 0; } *************** *** 774,789 **** } StackToString(fldname, &helpFldName); strlower(helpFldName); ! SkipSpace(uebergabe, &fldcont); found = 0; ! for (i=0;ifield[i]); else { err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StackToString(fldcont, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } found = 1; --- 859,874 ---- } StackToString(fldname, &helpFldName); strlower(helpFldName); ! SkipSpace(uebergabe, ue2); found = 0; ! for (i=0;ifield[i]); else { err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StringToString(ue2, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } found = 1; *************** *** 793,803 **** if (!found){ err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StackToString(fldcont, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } FreeStack(&fldname); - FreeStack(&fldcont); } static void SecStrcat(int maxlen, char *str1, char *str2) --- 878,887 ---- if (!found){ err = dbtMakeUserFld(&helpufield); Scalloc(&helpufield->fldName, helpFldName); ! StringToString(ue2, &helpufield->fldData); err = dbtAppendUserFld(&card->ufield, helpufield); } FreeStack(&fldname); } static void SecStrcat(int maxlen, char *str1, char *str2) *************** *** 839,844 **** --- 923,929 ---- Errcode bifFileRead(BibPtr bp) { int erg; + char *tempName; yynline = 1; yynflexcalls = 0; *************** *** 846,853 **** sprintf(errorstr, anfhelpstr, "KEY", "OFFSET", "LINE"); #ifdef NO_TEMPNAM ! bp->tempfile = (char *)tmpnam(NULL); ! bp->macrofile = (char *)tmpnam(NULL); #else bp->tempfile = (char *)tempnam(NULL, NULL); bp->macrofile = (char *)tempnam(NULL, NULL); --- 931,942 ---- sprintf(errorstr, anfhelpstr, "KEY", "OFFSET", "LINE"); #ifdef NO_TEMPNAM ! tempName = (char *)tmpnam(NULL); ! bp->tempfile = (char *)XtMalloc(strlen(tempName)+1); ! strcpy(bp->tempfile,tempName); ! tempName = (char *)tmpnam(NULL); ! bp->macrofile = (char *)XtMalloc(strlen(tempName)+1); ! strcpy(bp->macrofile,tempName); #else bp->tempfile = (char *)tempnam(NULL, NULL); bp->macrofile = (char *)tempnam(NULL, NULL); *************** *** 882,888 **** if (yyin) fclose(yyin); FreeStack(&key); FreeStack(&fldname); - FreeStack(&fldcont); return (Errcode)erg; } } --- 971,976 ---- *************** *** 1002,1007 **** --- 1090,1104 ---- case '@': if (inmakro) fprintf(datei, " "); + else if (*(zeichen+1) == '@'){ + if (instring){ + *blankptr++ = '\0'; + fprintf(datei, "%s", blank); + blankptr = blank; + } + fprintf(datei, "@"); + zeichen++; + } else if (instring){ fprintf(datei, "} "); inmakro = 1; *************** *** 1080,1088 **** pos = ftell(datei); fprintf(datei,",\n"); ! for (i=0; ifield[i])) ! pos = WriteLineToFile(datei, glbFldToUpName(i), card->field[i]); } h = card->ufield; while (h) { --- 1177,1185 ---- pos = ftell(datei); fprintf(datei,",\n"); ! for (i=0; ifield[i])) ! pos = WriteLineToFile(datei, glbFldToName(i), card->field[i]); } h = card->ufield; while (h) {