home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / bibview / part18 < prev    next >
Encoding:
Text File  |  1992-08-26  |  50.3 KB  |  1,532 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!mips!msi!dcmartin
  3. From: Armin Liebl <liebla@informatik.tu-muenchen.de>
  4. Subject: v18i116: bibview - BibTeX GUI, Part18/20
  5. Message-ID: <1992Aug27.161831.26142@msi.com>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. References: <csx-18i099-bibview@uunet.UU.NET>
  10. Date: Thu, 27 Aug 1992 16:18:31 GMT
  11. Approved: dcmartin@msi.com
  12. Lines: 1518
  13.  
  14. Submitted-by: Armin Liebl <liebla@informatik.tu-muenchen.de>
  15. Posting-number: Volume 18, Issue 116
  16. Archive-name: bibview/part18
  17.  
  18. #!/bin/sh
  19. # this is part.18 (part 18 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file gui_widg.c continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 18; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping gui_widg.c'
  37. else
  38. echo 'x - continuing file gui_widg.c'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'gui_widg.c' &&
  40. {
  41. static Widget errShell, errForm, errIcon, errType, errText, errOKButton;
  42. char textLabel[20];
  43. Position dx, dy, x, y;
  44. X
  45. X   XtVaGetValues(desktop,
  46. X                 XtNx, &dx,
  47. X                 XtNy, &dy, NULL);
  48. X   XtTranslateCoords(desktop,
  49. X                     (Position)dx + SUBWIN_MARGIN,
  50. X                     (Position)dy + SUBWIN_MARGIN,
  51. X                     &x, &y);
  52. X   errShell = XtVaCreatePopupShell("errorShell",
  53. X            transientShellWidgetClass, topLevel, 
  54. X        XtNx, x, XtNy, y, NULL);
  55. X   errForm = XtVaCreateManagedWidget("errorWin",
  56. X           formWidgetClass, errShell, NULL);
  57. X   errIcon = XtVaCreateManagedWidget("errorIcon",
  58. X           labelWidgetClass, errForm, 
  59. X           XtNborderWidth, 0,
  60. X           XtNtop, XtChainTop,
  61. X           XtNleft, XtChainLeft,
  62. X           XtNbitmap, errorPixmap, NULL);
  63. X   errType = XtVaCreateManagedWidget("type",
  64. X           labelWidgetClass, errForm, 
  65. X           XtNjustify, XtJustifyLeft,
  66. X           XtNborderWidth, 0,
  67. X           XtNtop, XtChainTop,
  68. X           XtNfromHoriz, errIcon, NULL);
  69. X   sprintf(textLabel, "msgText%d", abs((int)errcode));
  70. X   errText = XtVaCreateManagedWidget(textLabel,
  71. X           labelWidgetClass, errForm, 
  72. X           XtNjustify, XtJustifyLeft,
  73. X           XtNborderWidth, 0,
  74. X           XtNfromVert, errType,
  75. X           XtNfromHoriz, errIcon, NULL);
  76. X   errOKButton = XtVaCreateManagedWidget("ok",
  77. X               commandWidgetClass, errForm, 
  78. X           XtNfromVert, errText,
  79. X           XtNbottom, XtChainBottom, 
  80. X           XtNfromHoriz, errIcon, NULL);
  81. X
  82. X   XtAddCallback(errOKButton, XtNcallback, closeMsgWin, errShell);
  83. X
  84. X   XtSetSensitive(mainMenu, FALSE);
  85. X   gubSetSensitive(NULL, FALSE);
  86. X   if (cotBeepOnError())
  87. X      XBell(XtDisplay(topLevel), 100);
  88. X   XtPopup(errShell, XtGrabNonexclusive);
  89. }
  90. X
  91. X
  92. /*********************************************************************/
  93. /* guwWarning:                                                       */
  94. /*    Display warning message in a popup shell on desktop            */
  95. /*********************************************************************/
  96. void
  97. guwWarning (Errcode errcode)
  98. {
  99. static Widget warnShell, warnForm, warnIcon, 
  100. X          warnType, warnText, warnOKButton;
  101. char textLabel[20];
  102. Position dx, dy, x, y;
  103. X
  104. X   XtVaGetValues(desktop,
  105. X                 XtNx, &dx,
  106. X                 XtNy, &dy, NULL);
  107. X   XtTranslateCoords(desktop,
  108. X                     (Position)dx + SUBWIN_MARGIN,
  109. X                     (Position)dy + SUBWIN_MARGIN,
  110. X                     &x, &y);
  111. X   warnShell    = XtVaCreatePopupShell("warnShell",
  112. X                transientShellWidgetClass, topLevel, 
  113. X            XtNx, x, XtNy, y, NULL);
  114. X   warnForm     = XtVaCreateManagedWidget("warnWin",
  115. X                formWidgetClass, warnShell, NULL);
  116. X   warnIcon     = XtVaCreateManagedWidget("warnIcon",
  117. X                labelWidgetClass, warnForm, 
  118. X                XtNborderWidth, 0,
  119. X                XtNtop, XtChainTop,
  120. X                XtNleft, XtChainLeft,
  121. X                XtNbitmap, warnPixmap, NULL);
  122. X   warnType     = XtVaCreateManagedWidget("type",
  123. X                labelWidgetClass, warnForm, 
  124. X            XtNjustify, XtJustifyLeft,
  125. X                XtNborderWidth, 0,
  126. X                XtNtop, XtChainTop,
  127. X                XtNfromHoriz, warnIcon, NULL);
  128. X   sprintf(textLabel, "msgText%d", abs((int)errcode));
  129. X   warnText     = XtVaCreateManagedWidget(textLabel,
  130. X                labelWidgetClass, warnForm, 
  131. X            XtNjustify, XtJustifyLeft,
  132. X                XtNborderWidth, 0,
  133. X                XtNfromVert, warnType,
  134. X                XtNfromHoriz, warnIcon, NULL);
  135. X   warnOKButton = XtVaCreateManagedWidget("ok",
  136. X                commandWidgetClass, warnForm, 
  137. X            XtNfromVert, warnText,
  138. X            XtNbottom, XtChainBottom, 
  139. X            XtNfromHoriz, warnIcon, NULL);
  140. X
  141. X   XtAddCallback(warnOKButton, XtNcallback, closeMsgWin, warnShell);
  142. X
  143. X   XtSetSensitive(mainMenu, FALSE);
  144. X   gubSetSensitive(NULL, FALSE);
  145. X   if (cotBeepOnError())
  146. X      XBell(XtDisplay(topLevel), 100);
  147. X   XtPopup(warnShell, XtGrabNonexclusive);
  148. }
  149. X
  150. X
  151. /*********************************************************************/
  152. /* guwNotice:                                                        */
  153. /*    Display notice message in a popup shell on desktop             */
  154. /*********************************************************************/
  155. void
  156. guwNotice (Errcode errcode)
  157. {
  158. static Widget noticeShell, noticeForm, noticeIcon, noticeType, 
  159. X          noticeText, noticeOKButton;
  160. char textLabel[20];
  161. Position dx, dy, x, y;
  162. X
  163. X   XtVaGetValues(desktop,
  164. X                 XtNx, &dx,
  165. X                 XtNy, &dy, NULL);
  166. X   XtTranslateCoords(desktop,
  167. X                     (Position)dx + SUBWIN_MARGIN,
  168. X                     (Position)dy + SUBWIN_MARGIN,
  169. X                     &x, &y);
  170. X   noticeShell    = XtVaCreatePopupShell("noticeShell",
  171. X                  transientShellWidgetClass, topLevel, 
  172. X              XtNx, x, XtNy, y, NULL);
  173. X   noticeForm     = XtVaCreateManagedWidget("noticeWin",
  174. X                  formWidgetClass, noticeShell, NULL);
  175. X   noticeIcon     = XtVaCreateManagedWidget("noticeIcon",
  176. X                  labelWidgetClass, noticeForm, 
  177. X                  XtNborderWidth, 0,
  178. X                  XtNtop, XtChainTop,
  179. X                  XtNleft, XtChainLeft,
  180. X                  XtNbitmap, noticePixmap, NULL);
  181. X   noticeType     = XtVaCreateManagedWidget("type",
  182. X                  labelWidgetClass, noticeForm, 
  183. X                  XtNborderWidth, 0,
  184. X              XtNjustify, XtJustifyLeft,
  185. X                  XtNtop, XtChainTop,
  186. X                  XtNfromHoriz, noticeIcon, NULL);
  187. X   sprintf(textLabel, "msgText%d", abs((int)errcode));
  188. X   noticeText     = XtVaCreateManagedWidget(textLabel,
  189. X                  labelWidgetClass, noticeForm, 
  190. X                  XtNborderWidth, 0,
  191. X              XtNjustify, XtJustifyLeft,
  192. X                  XtNfromVert, noticeType,
  193. X                  XtNfromHoriz, noticeIcon, NULL);
  194. X   noticeOKButton = XtVaCreateManagedWidget("ok",
  195. X                  commandWidgetClass, noticeForm, 
  196. X              XtNfromVert, noticeText,
  197. X              XtNbottom, XtChainBottom, 
  198. X              XtNfromHoriz, noticeIcon, NULL);
  199. X
  200. X   XtAddCallback(noticeOKButton, XtNcallback, closeMsgWin, noticeShell);
  201. X
  202. X   XtSetSensitive(mainMenu, FALSE);
  203. X   gubSetSensitive(NULL, FALSE);
  204. X   XtPopup(noticeShell, XtGrabNonexclusive);
  205. }
  206. X
  207. X
  208. /*********************************************************************/
  209. /* CloseMsgWin:                                                      */
  210. /*    Callback function for OK button in message windows             */
  211. /*********************************************************************/
  212. static void
  213. closeMsgWin (Widget w, XtPointer clientData, XtPointer callData)
  214. {
  215. Widget shell = (Widget)clientData;
  216. X
  217. X   XtSetSensitive(mainMenu, TRUE);
  218. X   gubSetSensitive(NULL, TRUE);
  219. X   XtPopdown(shell);
  220. }
  221. X
  222. X
  223. /*********************************************************************/
  224. /* guwProgInfo:                                                      */
  225. /*    Display programm information                                   */
  226. /*********************************************************************/
  227. void
  228. guwProgInfo (Widget w, XtPointer clientData, XtPointer callData)
  229. {
  230. static Widget piShell, piIcon;
  231. Position dx, dy, x, y;
  232. X
  233. X   XtVaGetValues(desktop,
  234. X                 XtNx, &dx,
  235. X                 XtNy, &dy, NULL);
  236. X   XtTranslateCoords(desktop,
  237. X                     (Position)dx + SUBWIN_MARGIN,
  238. X                     (Position)dy + SUBWIN_MARGIN,
  239. X                     &x, &y);
  240. X   piShell  = XtVaCreatePopupShell("progInfoShell",
  241. X            transientShellWidgetClass, topLevel, 
  242. X        XtNx, x, XtNy, y, NULL);
  243. X   piIcon  = XtVaCreateManagedWidget("progInfo",
  244. X           commandWidgetClass, piShell, 
  245. X           XtNbitmap, progInfoPixmap, NULL);
  246. X
  247. X   XtAddCallback(piIcon, XtNcallback, closeProgInfoWin, piShell);
  248. X   XtPopup(piShell, XtGrabNonexclusive);
  249. }
  250. X
  251. X
  252. /*********************************************************************/
  253. /* CloseProgInfoWin:                                                 */
  254. /*    Callback function for OK button in message windows             */
  255. /*********************************************************************/
  256. static void
  257. closeProgInfoWin (Widget w, XtPointer clientData, XtPointer callData)
  258. {
  259. Widget shell = (Widget)clientData;
  260. X
  261. X   XtPopdown(shell);
  262. }
  263. X
  264. X
  265. X
  266. X
  267. X
  268. SHAR_EOF
  269. echo 'File gui_widg.c is complete' &&
  270. chmod 0644 gui_widg.c ||
  271. echo 'restore of gui_widg.c failed'
  272. Wc_c="`wc -c < 'gui_widg.c'`"
  273. test 14942 -eq "$Wc_c" ||
  274.     echo 'gui_widg.c: original size 14942, current size' "$Wc_c"
  275. rm -f _shar_wnt_.tmp
  276. fi
  277. # ============= rc_file.c ==============
  278. if test -f 'rc_file.c' -a X"$1" != X"-c"; then
  279.     echo 'x - skipping rc_file.c (File already exists)'
  280.     rm -f _shar_wnt_.tmp
  281. else
  282. > _shar_wnt_.tmp
  283. echo 'x - extracting rc_file.c (Text)'
  284. sed 's/^X//' << 'SHAR_EOF' > 'rc_file.c' &&
  285. /*********************************************************************/
  286. /*  bibView: Administration of bibTex-Databases                      */
  287. /*           (Verwaltung von bibTeX-Literaturdatenbanken)            */
  288. /*                                                                   */
  289. /*  Module:  rc_file.c                                               */
  290. /*                                                                   */
  291. /*             - Handling of Configuration files                     */
  292. /*             -                                                     */
  293. /*                                                                   */
  294. /*  Author:  Holger Martin,  martinh@informatik.tu-muenchen.de       */
  295. /*           Peter M. Urban, urban@informatik.tu-muenchen.de         */
  296. /*                                                                   */
  297. /*  History:                                                         */
  298. /*    11.22.91  HM   created                                         */
  299. /*    05.26.92       Version 1.0 released                            */
  300. /*                                                                   */
  301. /*  Copyright 1992 TU MUENCHEN                                       */
  302. /*    See ./Copyright for complete rights and liability information. */
  303. /*                                                                   */
  304. /*********************************************************************/
  305. X
  306. #include <stdio.h>
  307. #include <string.h>
  308. #include <X11/Intrinsic.h>
  309. #include <X11/StringDefs.h>
  310. #include "bibview.h"
  311. X
  312. /* imported global variables */
  313. /* ------------------------- */
  314. X
  315. X
  316. /* macros and definitions */
  317. /* ---------------------- */
  318. #define STR_TRUE         "TRUE"
  319. #define STR_BEEP_ON_ERROR_OPT    "BeepOnError"
  320. #define STR_ICON_ON_DESK_OPT    "IconsOnDesk"
  321. #define STR_MAKE_BACKUPS_OPT    "MakeBackups"
  322. #define STR_AUTO_CHECK_BIB_OPT    "AutoCheckBib"
  323. #define STR_REQUIRED_FIELDS_OPT "RequiredFields"
  324. X
  325. #define MAX_TAGLEN        80
  326. #define MAX_CFGLINELEN        255
  327. X
  328. typedef enum {
  329. X   findTag,       /* Modus: Suche nach Tag in Konfigdatei        */
  330. X   illegalTag,    /*        Tag gefunden, aber ungueltig         */
  331. X   optionTags,    /*        Optionen-Tag, jetzt folgen Optionen  */
  332. X   userFldTags,   /*        Benutzerdefinierte Felder folgen     */
  333. X   predefTags,    /*        Vordefinierte Feldinhalte  folgen    */
  334. X   latexHeadTags, /*        Kopfzeilen der LaTeX-Druckdatei      */
  335. X   latexFootTags  /*        Fusszeilen der LaTeX-Druckdatei      */
  336. } CfgMode;
  337. X
  338. typedef struct {
  339. X   char *tagStr;
  340. X   CfgMode mode;
  341. } TagType;
  342. X
  343. X
  344. /* local function prototypes */
  345. /* ------------------------- */
  346. static CfgMode  getCfgFileTag      (char *str);
  347. static int      procOptionLine     (char *str);
  348. static int      procPredefLine     (char *str);
  349. static int      procUserFldLine    (char *str);
  350. static int      procLatexHeadLine  (char *str);
  351. static int      procLatexFootLine  (char *str);
  352. X
  353. X
  354. /* exported variables */
  355. /* ------------------ */
  356. UserDefFld userDefFlds[MAX_BIBTEX_TYPES] = {
  357. X   NULL, /* article */
  358. X   NULL, /* book */
  359. X   NULL, /* booklet */
  360. X   NULL, /* conference */
  361. X   NULL, /* inbook */
  362. X   NULL, /* incollection */
  363. X   NULL, /* inproceedings */
  364. X   NULL, /* manual */
  365. X   NULL, /* masterythesis */
  366. X   NULL, /* misc */
  367. X   NULL, /* phdthesis */
  368. X   NULL, /* proceedings */
  369. X   NULL, /* techreport */
  370. X   NULL, /* unpublished */
  371. };
  372. X
  373. PredefLists predefLst = {
  374. X   NULL, /* address */
  375. X   NULL, /* annote */
  376. X   NULL, /* author */
  377. X   NULL, /* booktitle */
  378. X   NULL, /* chapter */
  379. X   NULL, /* edition */
  380. X   NULL, /* editor */
  381. X   NULL, /* howpublished */
  382. X   NULL, /* institution */
  383. X   NULL, /* journal */
  384. X   NULL, /* key */
  385. X   NULL, /* month */
  386. X   NULL, /* note */
  387. X   NULL, /* number */
  388. X   NULL, /* organization */
  389. X   NULL, /* pages */
  390. X   NULL, /* publisher */
  391. X   NULL, /* school */
  392. X   NULL, /* series */
  393. X   NULL, /* title */
  394. X   NULL, /* type */
  395. X   NULL, /* volume */
  396. X   NULL, /* year */
  397. X   NULL  /* category */
  398. };
  399. X
  400. char *latexHeader = NULL;
  401. int latexHeaderLen = 0;
  402. char *latexFooter = NULL;
  403. int latexFooterLen = 0;
  404. X
  405. X
  406. /* local global variables */
  407. /* ---------------------- */
  408. X
  409. TagType tagTypes[] = {
  410. X   { "Options",     optionTags },
  411. X   { "Fields",      userFldTags },
  412. X   { "Predefines",  predefTags },
  413. X   { "LatexHeader", latexHeadTags },
  414. X   { "LatexFooter", latexFootTags },
  415. X   { NULL,          illegalTag }
  416. };
  417. X
  418. static Boolean processOptions = TRUE,
  419. X               prtToStd = TRUE;
  420. X
  421. X
  422. X
  423. /*********************************************************************/
  424. /* rcfReadCfgFile:                                                   */
  425. /*    Reads and processes .bibrc configuration file                  */
  426. /*********************************************************************/
  427. int
  428. rcfReadCfgFile (char *cfgFname)
  429. {
  430. FILE *cfgFP;
  431. CfgMode curMode;
  432. char cfgLine[MAX_CFGLINELEN+1];
  433. int  i;
  434. char processLine;
  435. X
  436. X   /* throw away old values */
  437. X   if (latexHeader) {
  438. X      free(latexHeader);
  439. X      latexHeaderLen = 0;
  440. X   }
  441. X   if (latexFooter) {
  442. X      free(latexFooter);
  443. X      latexFooterLen = 0;
  444. X   }
  445. X
  446. X   if ((cfgFP = fopen(cfgFname, "r")) == NULL) {
  447. X      return(ERR_NO_CFGFILE);
  448. X   }
  449. X
  450. X   curMode = findTag;
  451. X   while (TRUE) {
  452. X      /* Zeile in Zeilenpuffer lesen */
  453. X      for (i=0; i <= MAX_CFGLINELEN && cfgLine[i-1] != '\n'; i++) {
  454. X         if (fread(&cfgLine[i], 1, 1, cfgFP) == 0)
  455. X            break;
  456. X      }
  457. X      if (feof(cfgFP))  /* Ende der Konfigdatei */
  458. X         break;
  459. X      if (cfgLine[0] == '\n')  /* Leerzeilen ueberspringen */
  460. X         continue;
  461. X      cfgLine[i-1] = '\0';  /* Stringende setzen */
  462. X
  463. X      /* gelesene Zeile bearbeiten */
  464. X      switch (cfgLine[0]) {
  465. X         case '#':  /* Kommentarzeile */
  466. X                    processLine = FALSE;
  467. X                    break;
  468. X         case '[':  /* Neuer Abschnitt in Konfigdatei */
  469. X                    curMode = getCfgFileTag(cfgLine);
  470. X                    if (curMode != illegalTag)
  471. X                       continue;
  472. X                    processLine = TRUE;
  473. X                    break;
  474. X         default:   /* Zeile je nach aktuellem Modus bearbeiten */
  475. X                    processLine = TRUE;
  476. X      } /* endswitch */
  477. X
  478. X      if (processLine) {
  479. X         switch (curMode) {
  480. X            case optionTags:  /* Optionszeilen bearbeiten */
  481. X                              procOptionLine(cfgLine);
  482. X                              break;
  483. X            case predefTags:  /* Vordef.zeilen bearbeiten */
  484. X                              procPredefLine(cfgLine);
  485. X                              break;
  486. X            case userFldTags: /* Ersetzungsdef bearbeiten */
  487. X                              procUserFldLine(cfgLine);
  488. X                              break;
  489. X            case latexHeadTags: /* Kopfzeilen bearbeiten */
  490. X                              procLatexHeadLine(cfgLine);
  491. X                              break;
  492. X            case latexFootTags: /* Fusszeilen bearbeiten */
  493. X                              procLatexFootLine(cfgLine);
  494. X                              break;
  495. X            case illegalTag:  /* Fehler im Tag aufgetreten */
  496. X                              if (prtToStd)
  497. X                 fprintf(stderr, "bibview: illegal tag %s in %s\n", cfgLine, cfgFname); 
  498. X                              curMode = findTag;
  499. X                              break;
  500. X            case findTag:
  501. X            default:          ;
  502. X         } /* endswitch */
  503. X      } /* endif */
  504. X   } /* endwhile */
  505. X
  506. X   fclose(cfgFP);
  507. X   return(OK);
  508. }
  509. X
  510. X
  511. /*********************************************************************/
  512. /* rcfSetPrintMode:                                                  */
  513. /*    Sets whether messages go to stderr or not                      */
  514. /*********************************************************************/
  515. Errcode
  516. rcfSetPrintMode (Boolean bool)
  517. {
  518. X   prtToStd = bool;
  519. X   return(OK);
  520. }
  521. X
  522. X
  523. /*********************************************************************/
  524. /* rcfReadOptions:                                                   */
  525. /*    Sets flag whether options in rc file should be processed       */
  526. /*********************************************************************/
  527. Errcode
  528. rcfReadOptions (Boolean bool)
  529. {
  530. X   processOptions = bool;
  531. X   return(OK);
  532. }
  533. X
  534. X
  535. X
  536. /*********************************************************************/
  537. /* LOCAL FUNCTIONS                                                   */
  538. /*********************************************************************/
  539. X
  540. /*********************************************************************/
  541. /* getCfgFileTag:                                                    */
  542. /*    Finds next paragraph of config file                            */
  543. /*********************************************************************/
  544. static CfgMode
  545. getCfgFileTag (char *str)
  546. {
  547. char token[MAX_TAGLEN+1] = "";
  548. TagType *tptr;
  549. char found;
  550. X
  551. X   sscanf(str, "[%[^]]s", token);
  552. X
  553. X   for (tptr = &tagTypes[0];
  554. X    tptr->tagStr != NULL && strcmp(token, tptr->tagStr);
  555. X    tptr++) ;
  556. X
  557. X   return( (tptr->tagStr != NULL) ? tptr->mode : illegalTag);
  558. }
  559. X
  560. X
  561. /*********************************************************************/
  562. /* procOptionLine:                                                   */
  563. /*    Process line containing option defs                            */
  564. /*********************************************************************/
  565. static int
  566. procOptionLine (char *str)
  567. {
  568. char token[MAX_TAGLEN+1] = "",
  569. X     value[MAX_TAGLEN+1] = "";
  570. char *p;
  571. int i;
  572. X
  573. X   if (!processOptions)
  574. X      return(OK);
  575. X
  576. X   sscanf(str, "%[^= ]s", token);
  577. X   sscanf(strchr(str, '=')+1, " %[^= ]s", value);
  578. X   if (strcmp(token, STR_BEEP_ON_ERROR_OPT) == 0) {
  579. X      optionsStatus[OPT_BEEP_ON_ERROR] = 
  580. X                   (strcmp(strupr(value), STR_TRUE) == 0);
  581. X   }
  582. X   else if (strcmp(token, STR_ICON_ON_DESK_OPT) == 0) {
  583. X      optionsStatus[OPT_ICON_ON_DESKTOP] = 
  584. X                   (strcmp(strupr(value), STR_TRUE) == 0);
  585. X   }
  586. X   else if (strcmp(token, STR_MAKE_BACKUPS_OPT) == 0) {
  587. X      optionsStatus[OPT_BACKUP_ON_SAVE] = 
  588. X                   (strcmp(strupr(value), STR_TRUE) == 0);
  589. X   }
  590. X   else if (strcmp(token, STR_AUTO_CHECK_BIB_OPT) == 0) {
  591. X      optionsStatus[OPT_AUTO_CHECK_BIB] = 
  592. X                   (strcmp(strupr(value), STR_TRUE) == 0);
  593. X   }
  594. X   else if (strcmp(token, STR_REQUIRED_FIELDS_OPT) == 0) {
  595. X      optionsStatus[OPT_REQUIRED_FIELDS] = 
  596. X                   (strcmp(strupr(value), STR_TRUE) == 0);
  597. X   }
  598. X   else {
  599. X      if (prtToStd)
  600. X     fprintf(stderr, "bibview: Illegal option %s in config file.\n", str);
  601. X   }
  602. X   return(OK);
  603. }
  604. X
  605. X
  606. /*********************************************************************/
  607. /* procPredefLine:                                                   */
  608. /*    Process line containing predefined data for a field            */
  609. /*********************************************************************/
  610. static int
  611. procPredefLine (char *str)
  612. {
  613. char field[MAX_TAGLEN+1] = "",
  614. X     data[MAX_CFGLINELEN+1] = "";
  615. ListNode **lnp;
  616. char *p;
  617. X
  618. X   if ((p = strchr(str, ':')) == NULL) {
  619. X      if (prtToStd)
  620. X     fprintf(stderr, "bibview: illegal [Predef] format: %s\n", str);
  621. X      return(OK);
  622. X   }
  623. X
  624. X   *p = '\0';
  625. X   strcpy(field, str);
  626. X   glbTrimString(field);
  627. X   strcpy(data, p+1);
  628. X   glbTrimString(data);
  629. X   if (strcmp(field, "address") == 0)     lnp = &predefLst.address;
  630. X   else if (strcmp(field, "annote") == 0) lnp = &predefLst.annote;
  631. X   else if (strcmp(field, "author") == 0) lnp = &predefLst.author;
  632. X   else if (strcmp(field, "booktitle") == 0) lnp = &predefLst.booktitle;
  633. X   else if (strcmp(field, "chapter") == 0) lnp = &predefLst.chapter;
  634. X   else if (strcmp(field, "edition") == 0) lnp = &predefLst.edition;
  635. X   else if (strcmp(field, "editor") == 0) lnp = &predefLst.editor;
  636. X   else if (strcmp(field, "howpublished") == 0) lnp = &predefLst.howpublished;
  637. X   else if (strcmp(field, "institution") == 0) lnp = &predefLst.institution;
  638. X   else if (strcmp(field, "journal") == 0) lnp = &predefLst.journal;
  639. X   else if (strcmp(field, "key") == 0) lnp = &predefLst.key;
  640. X   else if (strcmp(field, "month") == 0) lnp = &predefLst.month;
  641. X   else if (strcmp(field, "note") == 0) lnp = &predefLst.note;
  642. X   else if (strcmp(field, "number") == 0) lnp = &predefLst.number;
  643. X   else if (strcmp(field, "organization") == 0) lnp = &predefLst.organization;
  644. X   else if (strcmp(field, "pages") == 0) lnp = &predefLst.pages;
  645. X   else if (strcmp(field, "publisher") == 0) lnp = &predefLst.publisher;
  646. X   else if (strcmp(field, "school") == 0) lnp = &predefLst.school;
  647. X   else if (strcmp(field, "series") == 0) lnp = &predefLst.series;
  648. X   else if (strcmp(field, "title") == 0) lnp = &predefLst.title;
  649. X   else if (strcmp(field, "type") == 0) lnp = &predefLst.type;
  650. X   else if (strcmp(field, "volume") == 0) lnp = &predefLst.volume;
  651. X   else if (strcmp(field, "year") == 0) lnp = &predefLst.year;
  652. X   else if (strcmp(field, "category") == 0) lnp = &predefLst.category;
  653. X   else { 
  654. X      if (prtToStd)
  655. X     fprintf(stderr, "bibview: illegal field %s in config file.\n", field);
  656. X      return(OK);
  657. X   }
  658. X
  659. X   dbtListAppend(lnp, data);
  660. X   return(OK);
  661. }
  662. X
  663. X
  664. /*********************************************************************/
  665. /* procUserFldLine:                                                  */
  666. /*    Process line containing user defined field for a card type     */
  667. /*********************************************************************/
  668. static int
  669. procUserFldLine (char *str)
  670. {
  671. char type[MAX_TAGLEN+1] = "",
  672. X     data[MAX_CFGLINELEN+1] = "";
  673. CardType cardtype;
  674. ListNode **lnp;
  675. char *p;
  676. int i;
  677. X
  678. X   if ((p = strchr(str, '=')) == NULL) {
  679. X      if (prtToStd)
  680. X     fprintf(stderr, "bibview: illegal [Fields] format: %s\n", str);
  681. X      return(OK);
  682. X   }
  683. X
  684. X   *p = '\0';
  685. X   strcpy(type, str);
  686. X   glbTrimString(type);
  687. X   strcpy(data, p+1);
  688. X   glbTrimString(data);
  689. X   if (strcmp(type, "all") == 0) {
  690. X      for (i = 0; i < MAX_BIBTEX_TYPES; i++)
  691. X     dbtListAppend(&userDefFlds[i], data);
  692. X   }
  693. X   else if ((cardtype = glbNameToType(type)) != illegal)
  694. X      dbtListAppend(&userDefFlds[cardtype], data);
  695. X   else {
  696. X      if (prtToStd)
  697. X     fprintf(stderr, "bibview: illegal type %s in config file.\n", 
  698. X             type);
  699. X   }
  700. X
  701. X   return(OK);
  702. }
  703. X
  704. X
  705. /*********************************************************************/
  706. /* procLatexHeadLine:                                                */
  707. /*    Process line containing a line of LaTeX-Header                 */
  708. /*********************************************************************/
  709. static int
  710. procLatexHeadLine (char *str)
  711. {
  712. int linelen;
  713. X
  714. X   linelen = strlen(str);
  715. X   if (latexHeader) {
  716. X      latexHeaderLen += linelen + 1;
  717. X      latexHeader = (char *)realloc(latexHeader, latexHeaderLen);
  718. X      strcat(latexHeader, str);
  719. X      strcat(latexHeader, "\n");
  720. X   }
  721. X   else {
  722. X      latexHeaderLen = linelen + 2;
  723. X      latexHeader = (char *)malloc(latexHeaderLen);
  724. X      strcpy(latexHeader, str);
  725. X      strcat(latexHeader, "\n");
  726. X   }
  727. X
  728. X   return(OK);
  729. }
  730. X
  731. X
  732. /*********************************************************************/
  733. /* procLatexFootLine:                                                */
  734. /*    Process line containing a line of LaTeX-Footer                 */
  735. /*********************************************************************/
  736. static int
  737. procLatexFootLine (char *str)
  738. {
  739. int linelen;
  740. X
  741. X   linelen = strlen(str);
  742. X   if (latexFooter) {
  743. X      latexFooterLen += linelen + 1;
  744. X      latexFooter = (char *)realloc(latexFooter, latexFooterLen);
  745. X      strcat(latexFooter, str);
  746. X      strcat(latexFooter, "\n");
  747. X   }
  748. X   else {
  749. X      latexFooterLen = linelen + 2;
  750. X      latexFooter = (char *)malloc(latexFooterLen);
  751. X      strcpy(latexFooter, str);
  752. X      strcat(latexFooter, "\n");
  753. X   }
  754. X
  755. X   return(OK);
  756. }
  757. X
  758. X
  759. SHAR_EOF
  760. chmod 0644 rc_file.c ||
  761. echo 'restore of rc_file.c failed'
  762. Wc_c="`wc -c < 'rc_file.c'`"
  763. test 15379 -eq "$Wc_c" ||
  764.     echo 'rc_file.c: original size 15379, current size' "$Wc_c"
  765. rm -f _shar_wnt_.tmp
  766. fi
  767. # ============= Copyright ==============
  768. if test -f 'Copyright' -a X"$1" != X"-c"; then
  769.     echo 'x - skipping Copyright (File already exists)'
  770.     rm -f _shar_wnt_.tmp
  771. else
  772. > _shar_wnt_.tmp
  773. echo 'x - extracting Copyright (Text)'
  774. sed 's/^X//' << 'SHAR_EOF' > 'Copyright' &&
  775. X
  776. X Copyright 1992 Technische Universitaet Muenchen
  777. X
  778. X Permission to use, copy, modify, and distribute this software
  779. X and its documentation for any purpose is hereby granted without fee,
  780. X provided that the above copyright notice appear in all copies and
  781. X that both that copyright notice and this permission notice appear
  782. X in supporting documentation.  The authors make no representations
  783. X about the suitability of this software for any purpose.  It is
  784. X provided "as is" without express or implied warranty.
  785. X
  786. X THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  787. X INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
  788. X NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  789. X CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  790. X OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  791. X OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
  792. X USE OR PERFORMANCE OF THIS SOFTWARE.
  793. SHAR_EOF
  794. chmod 0640 Copyright ||
  795. echo 'restore of Copyright failed'
  796. Wc_c="`wc -c < 'Copyright'`"
  797. test 954 -eq "$Wc_c" ||
  798.     echo 'Copyright: original size 954, current size' "$Wc_c"
  799. rm -f _shar_wnt_.tmp
  800. fi
  801. # ============= README ==============
  802. if test -f 'README' -a X"$1" != X"-c"; then
  803.     echo 'x - skipping README (File already exists)'
  804.     rm -f _shar_wnt_.tmp
  805. else
  806. > _shar_wnt_.tmp
  807. echo 'x - extracting README (Text)'
  808. sed 's/^X//' << 'SHAR_EOF' > 'README' &&
  809. X
  810. X                               BIBVIEW 
  811. X            (graphical interface for BibTeX program)
  812. X         by Holger Martin, Peter Urban, Armin Liebl 
  813. X          liebla@informatik.tu-muenchen.de
  814. X
  815. X
  816. X
  817. What "bibview" is:
  818. ------------------
  819. X
  820. X    The program "bibview" is a graphical interface for manipulating
  821. X    BiBTeX databases. It supports the user in making new entries,
  822. X    searching for entries and moving entries from one BiB to another.
  823. X    It is possible to work with more than one BiB simultaneously. 
  824. X    bibview is implemented with Xt and Athena Widgets.
  825. X    There are six types of windows in bibview:
  826. X    The main window contains menus for customizing bibview and
  827. X    for working with BiBs on the file level.
  828. X    The bibliography window (one for every open BiB) contains commands
  829. X    for manipulating the BiB.
  830. X    The list window (at most one for every open BiB) shows a list of
  831. X    entries. It displays the fields author, title, type and year.
  832. X    The card window (at most one for every entry) helps editing an entry. 
  833. X    It contains boxes for each field of the entry (according to the type).
  834. X    The fields can be edited by putting the mouse cursor into the field.
  835. X    Macros in fields and the symbol for concatenation ('#') are marked
  836. X    with a preceding '@'.
  837. X
  838. X
  839. Installing bibview:
  840. -------------------
  841. X
  842. X    bibview was tested on a HP 9000/710 running HP/UX, 
  843. X    DECstation 2100 and MicroVax II running ULTRIX and
  844. X    on a SUN running SunOS 4.1.
  845. X    To install bibview, type "xmkmf" and then "make". 
  846. X    Good luck!
  847. X    To create the German version, insert -DGERMAN.
  848. X
  849. X
  850. Questions, comments, hacked source code: 
  851. ----------------------------------------
  852. Armin Liebl
  853. liebla@informatik.tu-muenchen.de
  854. X
  855. SHAR_EOF
  856. chmod 0640 README ||
  857. echo 'restore of README failed'
  858. Wc_c="`wc -c < 'README'`"
  859. test 1698 -eq "$Wc_c" ||
  860.     echo 'README: original size 1698, current size' "$Wc_c"
  861. rm -f _shar_wnt_.tmp
  862. fi
  863. # ============= patchlevel.h ==============
  864. if test -f 'patchlevel.h' -a X"$1" != X"-c"; then
  865.     echo 'x - skipping patchlevel.h (File already exists)'
  866.     rm -f _shar_wnt_.tmp
  867. else
  868. > _shar_wnt_.tmp
  869. echo 'x - extracting patchlevel.h (Text)'
  870. sed 's/^X//' << 'SHAR_EOF' > 'patchlevel.h' &&
  871. #define VERSION 1
  872. #define PATCHLEVEL 0
  873. SHAR_EOF
  874. chmod 0644 patchlevel.h ||
  875. echo 'restore of patchlevel.h failed'
  876. Wc_c="`wc -c < 'patchlevel.h'`"
  877. test 39 -eq "$Wc_c" ||
  878.     echo 'patchlevel.h: original size 39, current size' "$Wc_c"
  879. rm -f _shar_wnt_.tmp
  880. fi
  881. # ============= gui_help.c ==============
  882. if test -f 'gui_help.c' -a X"$1" != X"-c"; then
  883.     echo 'x - skipping gui_help.c (File already exists)'
  884.     rm -f _shar_wnt_.tmp
  885. else
  886. > _shar_wnt_.tmp
  887. echo 'x - extracting gui_help.c (Text)'
  888. sed 's/^X//' << 'SHAR_EOF' > 'gui_help.c' &&
  889. /*********************************************************************/
  890. /*  bibView: Administration of bibTex-Databases                      */
  891. /*           (Verwaltung von bibTeX-Literaturdatenbanken)            */
  892. /*                                                                   */
  893. /*  Module:  gui_help.c                                              */
  894. /*                                                                   */
  895. /*             GUI Help Window                                       */
  896. /*                                                                   */
  897. /*  Author:  Armin Liebl ,  liebla@informatik.tu-muenchen.de         */
  898. /*                                                                   */
  899. /*  History:                                                         */
  900. /*    07.15.92  PMU  created                                         */
  901. /*    05.26.92       Version 1.0 released                            */
  902. /*                                                                   */
  903. /*  Copyright 1992 TU MUENCHEN                                       */
  904. /*    See ./Copyright for complete rights and liability information. */
  905. /*                                                                   */
  906. /*********************************************************************/
  907. X
  908. #include <stdio.h>
  909. #include <X11/Intrinsic.h>
  910. #include <X11/StringDefs.h>
  911. #include <X11/Xaw/Paned.h>
  912. #include <X11/Xaw/Form.h>
  913. #include <X11/Xaw/Box.h>
  914. #include <X11/Xaw/List.h>
  915. #include <X11/Xaw/Text.h>
  916. #include <X11/Xaw/AsciiText.h>
  917. #include <X11/Xaw/Viewport.h>
  918. #include <X11/Xaw/Command.h>
  919. #include <X11/Xaw/MenuButton.h>
  920. #include <X11/Xaw/SimpleMenu.h>
  921. #include <X11/Xaw/SmeBSB.h>
  922. #include <X11/Xaw/SmeLine.h>
  923. #include "bibview.h"
  924. X
  925. X
  926. /* imported global variables */
  927. /* ------------------------- */
  928. extern Widget topLevel;
  929. extern Pixmap helpIconPixmap;
  930. X
  931. /* macros and definitions */
  932. /* ---------------------- */
  933. X
  934. X
  935. /* local function prototypes */
  936. /* ------------------------- */
  937. Widget helpShell[6];
  938. X
  939. /* exported variables */
  940. /* ------------------ */
  941. X
  942. X
  943. /* local global variables */
  944. /* ---------------------- */
  945. static int hlp[6] = {FALSE,FALSE,FALSE,FALSE,FALSE,FALSE};
  946. static int exists[6] = {FALSE,FALSE,FALSE,FALSE,FALSE,FALSE};
  947. X
  948. void hlpOpenHelpWin(int nummer, char *string1, char *string2);
  949. void hlpQuitHelpCmd(Widget w, XtPointer clientData, XtPointer callData);
  950. X
  951. X
  952. X
  953. X
  954. /*********************************************************************/
  955. /* hlpOpenHelpWin:                                                   */
  956. /*    Opens shell for Help-Window                                    */
  957. /*********************************************************************/
  958. void
  959. hlpOpenHelpWin(int nummer, char *string1, char *string2)
  960. X
  961. {
  962. Widget helpWin, cmdBox, close, file;
  963. X   
  964. X   if (exists[nummer-1])
  965. X     {XtPopup(helpShell[nummer-1], XtGrabNone);
  966. X      return;
  967. X      }
  968. X   
  969. X   /* create popup shell for new file */
  970. X   helpShell[nummer-1] = XtVaCreatePopupShell("helpShell",
  971. X          topLevelShellWidgetClass, topLevel, 
  972. X          XtNtitle, string1,
  973. X          XtNiconName, string1,
  974. X          XtNiconPixmap, helpIconPixmap, NULL);
  975. X   helpWin = XtVaCreateManagedWidget("helpWin",
  976. X          panedWidgetClass, helpShell[nummer-1], NULL);
  977. X
  978. X   /* create command buttons */
  979. X   cmdBox = XtVaCreateManagedWidget("commandBox", 
  980. X          boxWidgetClass, helpWin, NULL);
  981. X   close  = XtVaCreateManagedWidget("close", 
  982. X              commandWidgetClass, cmdBox, NULL);
  983. X   file   = XtVaCreateManagedWidget("helpText", 
  984. X              asciiTextWidgetClass, helpWin, 
  985. X          XtNtype, XawAsciiString,
  986. X          XtNstring, string2,
  987. X          XtNscrollHorizontal, XawtextScrollWhenNeeded,
  988. X          XtNscrollVertical, XawtextScrollWhenNeeded, NULL);
  989. X   exists[nummer-1]=TRUE;
  990. X   XtAddCallback(close, XtNcallback, hlpQuitHelpCmd,(XtPointer)nummer);
  991. X   XtPopup(helpShell[nummer-1], XtGrabNone);
  992. X   return;
  993. }
  994. X
  995. X
  996. /*********************************************************************/
  997. /* hlpOpenHelpWin:                                                   */
  998. /*    Opens shell for Help-Window                                    */
  999. /*********************************************************************/
  1000. void
  1001. hlpOpenHelpWinCmd(Widget w, XtPointer clientData, XtPointer callData)
  1002. {
  1003. #ifdef GERMAN
  1004. X   char *line1   = "Ueberblick";
  1005. #else
  1006. X   char *line1   = "Survey";
  1007. #endif
  1008. X
  1009. #ifdef GERMAN
  1010. X   char *line2   = "Hauptfenster";
  1011. #else
  1012. X   char *line2   = "Main Window";
  1013. #endif
  1014. X
  1015. #ifdef GERMAN
  1016. X   char *line3   = "Bibliographiefenster";
  1017. #else
  1018. X   char *line3   = "Bibliography Window";
  1019. #endif
  1020. X
  1021. #ifdef GERMAN
  1022. X   char *line4   = "Listenfenster";
  1023. #else
  1024. X   char *line4   = "List window";
  1025. #endif
  1026. X
  1027. #ifdef GERMAN
  1028. X   char *line5   = "Kartenfenster";
  1029. #else
  1030. X   char *line5   = "CardWindow";
  1031. #endif
  1032. X
  1033. #ifdef GERMAN
  1034. X   char *line6   = "Andere Fenster";
  1035. #else
  1036. X   char *line6   = "Other Windows";
  1037. #endif
  1038. X
  1039. #ifdef GERMAN
  1040. X   char *string1 = "BIBVIEW - Eine graphische Benutzerschnittstelle\n\
  1041. \tzur Verwaltung von BiBTeX-Literaturdatenbanken\n\n\
  1042. AUFRUF\n\
  1043. bibview  [Standardoptionen] [-file <Dateiname>] [-rcfile <Konfdatei>]\n\n\
  1044. DESCRIPTION\n\
  1045. Bibview erleichtert die Verwaltung von BibTeX-Literaturdatenbanken\n\
  1046. (im folgenden als BiB bezeichnet). Der Benutzer wird beim\n\
  1047. Eintragen von Daten, bei der Suche nach Eintraegen und beim\n\
  1048. Kopieren von Eintraegen zwischen verschiedenen BiBs unterstuetzt.\n\
  1049. Es kann gleichzeitig mit mehreren BiBs gearbeitet werden. \n\
  1050. \n\
  1051. Es gibt sieben verschiedene Fensterarten in bibview:\n\
  1052. \n\
  1053. Das Hauptfenster (main window) enthaelt Menues zum Einstellen von\n\
  1054. Optionen und zum Arbeiten mit BiBs auf Dateiebene.\n\
  1055. \n\
  1056. Das Bibliographiefenster (bibliography window) (eines pro geoeffneter\n\
  1057. BiB) enthaelt Kommandos zum Bearbeiten der BiB.\n\
  1058. \n\
  1059. Das Listenfenster (list window) (maximal eines pro geoeffneter BiB)\n\
  1060. zeigt eine Liste von Eintraegen. Die Felder Autor, Titel, Typ\n\
  1061. und Jahr werden gezeigt.\n\
  1062. \n\
  1063. Das Kartenfenster (card window) (maximal eines pro Eintrag)\n\
  1064. dient zum Editieren der Eintraege. Es enthaelt Boxen fuer alle\n\
  1065. Felder des Eintrags (je nach dem Typ des Eintrags).\n\
  1066. Ein Feld kann editiert werden, wenn sich der Maus-Cursor in der\n\
  1067. entsprechenden Box befindet.\n\
  1068. Makros in Feldern und das Symbol fuer Konkatenation ('#') sind\n\
  1069. durch das Zeichen '@' gekennzeichnet. Die von BibTeX geforderten\n\
  1070. Felder sind durch fette Linien markiert.\n\
  1071. Ein Kartenfenster wird nach dem Anklicken des entsprechenden Eintrags\n\
  1072. im Listenfenster (mit der linken Maustaste) oder nach der Auswahl\n\
  1073. des Typs im Neu-Menue des Bibliographiefensters geoeffnet.\n\
  1074. \n\
  1075. Im Annote-Fenster (annote window) (maximal eines pro Eintrag) \n\
  1076. kann das Annote-Feld eines Eintrags editiert werden. \n\
  1077. \n\
  1078. Im Makrofenster (macro window) (maximal eines pro BiB) koennen die \n\
  1079. STRING- and PREAMBLE-Teile  einer BiB editiert werden. \n\
  1080. \n\
  1081. Das Fehlerfenster (error window) (maximal eines pro BiB) erscheint,\n\
  1082. falls in einer BiB Syntaxfehler aufgetreten sind. Die Zeile mit\n\
  1083. dem Fehler ist durch eine Balken markiert. Die Datei kann editiert\n\
  1084. und erneut geoeffnet werden.\n\n\
  1085. OPTIONEN\n\
  1086. \n\
  1087. Standardoptionen:\n\
  1088. \n\
  1089. Die Standardoptionen sind\n\
  1090. -display, -geometry, -iconic and others.\n\
  1091. \n\
  1092. -file <Dateiname>:\n\
  1093. \n\
  1094. Die BiBTeX Literaturdatenbank <Dateiname> wird geladen .\n\
  1095. \n\
  1096. -rcfile <Konfdatei>:\n\
  1097. \n\
  1098. Anstelle der Datei .bibviewrc im Homedirectory des Benutzers\n\
  1099. wird die Datei <Konfdatei> verwendet.\n\
  1100. \n\n\
  1101. EINSCHRAENKUNGEN\n\
  1102. Bei Dateien mit mehr als 1000 Eintraegen kann es aufgrund eines\n\
  1103. Fehlers bei bestimmten Servern zum Absturz kommen.\n\
  1104. Es ist nur eine Sortierung nach dem BiBTeX-Schluessel moeglich.\n\
  1105. \n\
  1106. Vorschlaege fuer weitere Features sind willkommen.\n\
  1107. \n\
  1108. COPYRIGHT\n\
  1109. Copyright 1992 Technische Universitaet Muenchen\n\
  1110. \n\
  1111. AUTOREN\n\
  1112. Holger Martin, Peter Urban and Armin Liebl.\n\
  1113. Fehlermeldungen und Erweiterungsvorschlaege bitte an\n\n\
  1114. \tliebla@informatik.tu-muenchen.de";
  1115. #else  
  1116. X   char *string1 = "BIBVIEW - an X based graphical user interface\n\
  1117. \tfor manipulating BiBTeX databases\n\n\
  1118. SYNOPSIS\n\
  1119. bibview  [standard options] [-file <bib file>] [-rcfile <conf file>]\n\n\
  1120. DESCRIPTION\n\
  1121. Bibview facilitates the manipulation of BiBTeX databases (in the \n\
  1122. following called BiB). It supports the user in making new entries,\n\
  1123. searching for entries and moving entries from one BiB to another.\n\
  1124. It is possible to work with more than one BiB simultaneously. \n\
  1125. \n\
  1126. There are seven types of windows in bibview:\n\
  1127. \n\
  1128. The main window contains menus for customizing bibview and\n\
  1129. for working with BiBs on the file level.\n\
  1130. \n\
  1131. The bibliography window (one for every open BiB) contains commands\n\
  1132. for manipulating the BiB.\n\
  1133. \n\
  1134. The list window (at most one for every open BiB) shows a list of\n\
  1135. entries. It displays the fields author, title, type and year.\n\
  1136. \n\
  1137. The card window (at most one for every entry) helps editing an \n\
  1138. entry.  It contains boxes for each field of the entry (according \n\
  1139. to the type).\n\
  1140. The fields can be edited by putting the mouse cursor into the field.\n\
  1141. Macros in fields and the symbol for concatenation ('#') are marked\n\
  1142. by a preceding '@'. The required fields are marked by bold lines.\n\
  1143. A card window is displayed after clicking an entry in the list menu\n\
  1144. (left mouse button) or selecting a type in the `New` menu of a\n\
  1145. bibliography window.\n\
  1146. \n\
  1147. The annote window (at most one for every entry) helps editing \n\
  1148. the annote field of an entry. \n\
  1149. \n\
  1150. The macro window (at most one for every open BiB) helps editing \n\
  1151. the STRING and PREAMBLE parts of a BiB. \n\
  1152. \n\
  1153. The error window (at most one for every BiB) is displayed\n\
  1154. if a BiB cannot be opened because of syntax errors. The line with\n\
  1155. the error is marked. The file can be edited and opened again.\n\n\
  1156. OPTIONS\n\
  1157. \n\
  1158. standard options:\n\
  1159. \n\
  1160. The standard options are\n\
  1161. -display, -geometry, -iconic and others.\n\
  1162. \n\
  1163. -file <bib file>:\n\
  1164. \n\
  1165. The BiBTeX database <bib file> is loaded at the start of bibview.\n\
  1166. \n\
  1167. -rcfile <conf file>:\n\
  1168. \n\
  1169. Instead of the file .bibviewrc in the home directory of the user\n\
  1170. the file <conf file> is used.\n\
  1171. \n\n\
  1172. LIMITATIONS\n\
  1173. There may be problems with files containing more than ca. 1000\n\
  1174. entries. \n\
  1175. The consistency check could be more sophisticated.\n\
  1176. Entries are sorted only by BiBTeX key.\n\
  1177. \n\
  1178. Ideas for more features are welcome.\n\
  1179. \n\
  1180. COPYRIGHT\n\
  1181. Copyright 1992 Technische Universitaet Muenchen\n\
  1182. \n\
  1183. AUTHORS\n\
  1184. Holger Martin, Peter Urban and Armin Liebl.\n\
  1185. Send bug reports and ideas for enhancement to\n\n\
  1186. \tliebla@informatik.tu-muenchen.de";
  1187. #endif  
  1188. X
  1189. #ifdef GERMAN
  1190. char *string2 = "HAUPTFENSTER\n\
  1191. \n\
  1192. Das Hauptfenster erscheint beim Starten von bibview.\n\
  1193. Es enthaelt die folgenden Menues:\n\
  1194. \n\
  1195. DATEI:  Laden und Speichern von BiBs. Der Auswahl von Dateinamen \n\
  1196. erfolgt ueber eine Fileselect-Box. Das DATEI-Menue bietet die\n\
  1197. folgende Kommandos:\n\
  1198. \tNeu             - Erzeugen einer neuen BiB.\n\
  1199. \tOeffnen         - Einlesen einer existierenden BiB.\n\
  1200. \tSchliessen      - Schliessen einer geoeffneten BiB.\n\
  1201. \tSpeichern       - Abspeichern einer  geoeffneten BiB.\n\
  1202. \tSpeichern unter - Abspeichern einer geoeffneten BiB unter\n\
  1203. \t                  neuem Namen.\n\
  1204. \tBeenden         - Beenden einer bibview-Sitzung.\n\
  1205. \n\
  1206. DIENSTE:\n\
  1207. Das DIENSTE-Menue enthaelt die folgenden Kommandos:\n\
  1208. \n\
  1209. Konsistenzcheck - \n\
  1210. \tEintraege, die nicht alle von BibTeX fuer den entsprechenden\n\
  1211. \tTyp geforderten Felder aufweisen, werden im Listenfenster\n\
  1212. \tangezeigt.\n\
  1213. \n\
  1214. Mischen - \
  1215. Alle Eintraege einer BiB werden in eine andere BiB \n\
  1216. \teingefuegt. Eintraege mit gleichem Schluessel werden \n\
  1217. \tignoriert.\n\
  1218. \n\
  1219. Druck in Datei - \
  1220. Eine LaTeX-Datei mit den Datensaetzen der BiB \n\
  1221. \twird erzeugt. \n\
  1222. \n\
  1223. Makros editieren- \n\
  1224. \tDas Makrofenster zum Editieren der Makros einer BiB\n\
  1225. \twird geoeffnet\n\
  1226. \n\
  1227. Konfiguration laden- \n\
  1228. \tEine Konfigurationsdatei wird geladen. Der Options-Teil\n\
  1229. \tder Konfigurationsdatei wird nicht ausgewertet.\n\
  1230. \n\
  1231. OPTIONEN: \n\
  1232. Das OPTIONEN-Menue dient zum Aendern der voreingestellten\n\
  1233. Optionen.\n\
  1234. \n\
  1235. Warnton bei Fehler -\n\
  1236. \tIm Falle eines Fehlers ertoent ein Warnton \n\
  1237. \t(Voreinstellung: TRUE).\n\
  1238. \n\
  1239. Sicherungskopien - \n\
  1240. \tVor dem Abspeichern einer BiB wird eine Sicherungskopie\n\
  1241. \tmit der Endung .bak erzeugt (Voreinstellung: TRUE).\n\
  1242. \n\
  1243. Icons auf Desktop - \n\
  1244. \tIcons vom Listenfenster und von Kartenfenstern werden auf\n\
  1245. \tdem zugehoerigen Bibliographiefenster abgelegt\n\
  1246. \t(Voreinstellung: FALSE).\n\
  1247. \tDiese Option funktioniert nicht bei allen Window-Managern.\n\
  1248. \n\
  1249. Autom. Ueberpruefung - \n\
  1250. \tBeim Laden einer neuen BiB findet ein Konsistenzcheck statt \n\
  1251. \t(Voreinstellung: TRUE).\n\
  1252. \n\
  1253. Zwingende Felder - \n\
  1254. \tEin Eintrag kann nur abgespeichert werden,\n\
  1255. \twenn alle von BiBTeX geforderten Felder ausgefuellt sind\n\
  1256. \t(Voreinstellung: FALSE).\n\
  1257. \n\
  1258. \n\
  1259. FENSTER: \n\
  1260. \n\
  1261. Kaskadieren - \n\
  1262. \tDie Fenster, die zur selben BiB gehoeren \n\
  1263. \t(Bibliographiefenster, Makrofenster, Kartenfenster) werden\n\
  1264. \tzusammen gruppiert.\n\
  1265. \tDas funktioniert nicht bei allen Window-Managern.\n\
  1266. \n\
  1267. HILFE: Oeffnen eines Fensters mit dem entsprechenden Hilfetext.";
  1268. #else
  1269. char *string2 = "MAIN WINDOW\n\
  1270. \n\
  1271. The main window is displayed when bibview is started.\n\
  1272. It offers the following menus:\n\
  1273. \n\
  1274. FILE:  Load and save BiBs. For choosing a name a file select box \n\
  1275. is displayed. The FILE menu consists of the following commands:\n\
  1276. \tNew\t - Create a new BiB.\n\
  1277. \tOpen\t - Read an existing BiB.\n\
  1278. \tClose\t - Close an open BiB.\n\
  1279. \tSave\t - Save an open BiB.\n\
  1280. \tSave as\t - Save an open BiB and select a new name for it.\n\
  1281. \tQuit\t - Quit a bibview session.\n\
  1282. \n\
  1283. SERVICES:\n\
  1284. The SERVICES menu consists of the following commands:\n\
  1285. \n\
  1286. Consistency Check - \n\
  1287. \tEntries that don't contain all required fields\n\
  1288. \tfor that type are shown in the list window.\n\
  1289. \t(More sophisticated tests should be implemented.)\n\
  1290. \n\
  1291. Unify - \
  1292. Insert all entries of one BiB in another. Entries with\n\
  1293. \tconflicting keys are ignored.\n\
  1294. \n\
  1295. Print - \
  1296. A LaTeX file with the entries of a BiB is created. \n\
  1297. \n\
  1298. Edit Macros - \n\
  1299. \tOpen macro window for editing the macros of a BiB.\n\
  1300. \n\
  1301. Load Configuration - \n\
  1302. \tLoad a configuration file. \n\
  1303. \n\
  1304. OPTIONS: \n\
  1305. The OPTIONS menu serves for changing default options\n\
  1306. \n\
  1307. Beep on Errors -\n\
  1308. \tBeep in case of an error (default: TRUE).\n\
  1309. \n\
  1310. Backup - \n\
  1311. \tBefore writing a BiB on disk, a backup of the file with the\n\
  1312. \tending '.bak' is created (default: TRUE).\n\
  1313. \n\
  1314. Icons on Desktop - \n\
  1315. \tIcons of list and card windows are layed down\n\
  1316. \ton the corresponding bibliography window (default: FALSE).\n\
  1317. \tThis option doesn't work with all window managers.\n\
  1318. \n\
  1319. Autom. Check - \n\
  1320. \tA consistency check takes place if a new BiB is\n\
  1321. \tloaded (default: TRUE).\n\
  1322. \n\
  1323. Required Fields - \n\
  1324. \tAn entry can only be saved if it contains all\n\
  1325. \tfields required by BiBTeX (default: FALSE).\n\
  1326. \n\
  1327. \n\
  1328. WINDOW: \n\
  1329. \n\
  1330. Cascade - \n\
  1331. \tThe windows belonging to the same BiB (bibliography window,\n\
  1332. \tmacro window, card windows) are grouped together.\n\
  1333. \tThis doesn't work with all window managers.\n\
  1334. \n\
  1335. HELP: Show help information.";
  1336. #endif
  1337. X
  1338. #ifdef GERMAN
  1339. char *string3 = "BIBLIOGRAPHIEFENSTER\n\
  1340. \n\
  1341. Der Menuebalken des Bibliographiefensters enthaelt Funktionen\n\
  1342. zum Bearbeiten der entsprechenden BiB:\n\
  1343. \n\
  1344. Neu:\t\
  1345. Einfuegen eines neuen Eintrags in die BiB. Der Typ des\n\
  1346. \tEintrags wird von einem Pulldown-Menue gewaehlt. Daraufhin\n\
  1347. \terscheint ein Kartenfenster, das an den Typ angepasst ist.\n\
  1348. \n\
  1349. Suchen: \
  1350. Suche nach Eintraegen, die bestimmte Bedingungen erfuellen\n\
  1351. \tEin Fenster erscheint, in dem fuer jedes Feld\n\
  1352. \tein regulaerer Ausdruck eingegeben werden kann.\n\
  1353. \tDas Ergebnis der Suche (alle Eintraege, bei denen die \n\
  1354. \tFelder mit den angegebenen regulaeren Ausdruecken \n\
  1355. \tuebereinstimmen) wird im Listenfenster gezeigt und kann\n\
  1356. \tweiterverarbeitet werden.\n\
  1357. \n\
  1358. Liste:\t\
  1359. Alle Eintraege der BiB werden im Listenfenster gezeigt. \n\
  1360. \tNach dem Anklicken eines Eintrags mit der linken Maus-Taste\n\
  1361. \terscheint ein Kartenfenster.\n\
  1362. \n\
  1363. Makros: \
  1364. Das Makrofenster zum Editieren der STRING- und PREAMBLE-Teile\n\
  1365. \teiner BiB wird geoeffnet.\n\
  1366. \n\
  1367. Drucken:    Eine LaTeX-Datei mit den Eintraegen der BiB wird erzeugt.\n\
  1368. \n\
  1369. Speichern:  Abspeichern der BiB. \n\
  1370. \n\
  1371. Schliessen: Schliessen der BiB. Falls Eintraege veraendert wurden\n\
  1372. X        oder neue Eintraege erzeugt wurden, ohne dass die BiB\n\
  1373. X        gepeichert wurde, erfolgt eine Warnung.\n\
  1374. \n\
  1375. Fenster:    Die Fenster, die zur BiB gehoeren (Bibliographiefenster,\n\
  1376. X            Makrofenster, Kartenfenster), werden zusammen gruppiert.\n\
  1377. X            Das funktioniert nicht bei allen Window-Managern.";
  1378. #else
  1379. char *string3 = "BIBLIOGRAPHY WINDOW\n\
  1380. \n\
  1381. The menu bar of the bibliography window contains functions for\n\
  1382. manipulating the corresponding BiB:\n\
  1383. \n\
  1384. New:\t\
  1385. Create a new entry. The type of the entry must be chosen\n\
  1386. \tfrom a pulldown menu.\n\
  1387. \n\
  1388. Search: \
  1389. Search for all entries that fullfill certain\n\
  1390. conditions. \n\
  1391. \tA window is displayed in which for every field a \n\
  1392. \tregular expression can be entered. The result of the search \n\
  1393. \t(the entries that match all regular expressions)\n\
  1394. \tis shown in the list window.\n\
  1395. \n\
  1396. List:\t\
  1397. All entries of the BiB are shown in the list window. \n\
  1398. \tThe card window is displayed after clicking the \n\
  1399. \tcorresponding entry with the left mouse button.\n\
  1400. \n\
  1401. Macros: \
  1402. The macro window for editing STRING und PREAMBLE\n\
  1403. \tmacros is displayed.\n\
  1404. \n\
  1405. Print:\t\
  1406. A LaTeX file with the entries of the list is created\n\
  1407. \n\
  1408. Save: \t\
  1409. Save the BiB on disk. The BiB remains loaded.\n\
  1410. \n\
  1411. Close:\t\
  1412. Close the BiB.\n\
  1413. \n\
  1414. Window:\t\
  1415. \tThe windows belonging to the BiB (bibliography window,\n\
  1416. \tmacro window, card windows) are grouped together.\n\
  1417. \tThis doesn't work with all window managers.";
  1418. #endif
  1419. X
  1420. #ifdef GERMAN
  1421. char *string4 = "LISTENFENSTER\n\n\
  1422. Ein Listenfenster erscheint nach dem Anklicken des Menuepunkts \n\
  1423. \"Liste\" im Bibliographiefenster, als Ergebnis einer Suche oder\n\
  1424. als Anzeige von fehlerhaften Eintraegen nach einem Konsistenzcheck.\n\
  1425. Der Menuebalken des Listenfenster enthaelt die folgenden Kommandos:\n\
  1426. \n\
  1427. Drucken:     Eine LaTeX-Datei mit den Eintraegen der Liste wird\n\
  1428. X         erzeugt.\n\
  1429. X             Der Dateiname wird mit einer Fileselect-Box\n\
  1430. X         ausgewaehlt.\n\
  1431. \n\
  1432. Speichern:   Die Eintraege der Liste werden als neue BiB gespeichert.\n\
  1433. \n\
  1434. Schliessen:  Das Listenfenster wird geschlossen.";
  1435. #else
  1436. char *string4 = "LIST WINDOW\n\n\
  1437. The list window is displayed after clicking the menu \n\
  1438. item list of the bibliography window, as result of a search\n\
  1439. or as result of a consistency check. The menu bar of the list window\n\
  1440. offers the following commands:\n\
  1441. \n\
  1442. Print:\t\
  1443. A LaTeX file with the entries of the list is created.\n\
  1444. \n\
  1445. Save:\t\
  1446. The entries of the list are saved as a new BiB.\n\
  1447. \n\
  1448. Close:\t\
  1449. The list window is closed.";
  1450. #endif
  1451. X
  1452. #ifdef GERMAN
  1453. char *string5 = "KARTENFENSTER\n\
  1454. \n\
  1455. Der Menuebalken des Kartenfensters enthaelt die folgenden\n\
  1456. Kommandos:\n\
  1457. \n\
  1458. Benutzerdaten: Das Kartenfenster wird um die Felder, die vom \n\
  1459. X           Benutzer definiert wurden, erweitert.\n\
  1460. \n\
  1461. Annote:        Ein Fenster wird geoeffnet, in dem das \n\
  1462. X           Annote-Feld bequem editiert werden kann.\n\
  1463. \n\
  1464. Loeschen:      Der Eintrag wird aus der BiB entfernt.\n\
  1465. \n\
  1466. Speichern:     Der Eintrag wird in der BiB gespeichert.\n\
  1467. \n\
  1468. Kopieren:      Der Eintrag wird in eine andere BiB kopiert.\n\
  1469. \n\
  1470. Schliessen:    Schliessen des Kartenfensters.";
  1471. #else
  1472. char *string5 = "CARD WINDOW\n\
  1473. \n\
  1474. The menu bar of the card window offers the following commands:\n\
  1475. \n\
  1476. User Data: \n\
  1477. \tThe card window is extended with the\n\
  1478. \tfields defined by the user.\n\
  1479. \n\
  1480. Delete:\t\
  1481. The entry is deleted from the BiB.\n\
  1482. \n\
  1483. Save: \t\
  1484. The entry is saved in the BiB.\n\
  1485. \n\
  1486. Copy: \t\
  1487. The entry is copied in another BiB.\n\
  1488. \n\
  1489. Close: \t\
  1490. Close the card window.";
  1491. #endif
  1492. X
  1493. #ifdef GERMAN
  1494. char *string6 = "ANDERE FENSTER\n\n\
  1495. Annote-Fenster\n\
  1496. \n\
  1497. Der Menuebalken des Annote-Fenster enthaelt die folgenden\n\
  1498. Kommandos:\n\
  1499. Speichern:   Speichern des Annote-Feldes eines Eintrags.\n\
  1500. Schliessen:  Schliessen des Annote-Fensters, ohne den Inhalt zu \n\
  1501. X         speichern.\n\
  1502. \n\n\
  1503. Makrofenster\n\
  1504. \n\
  1505. Der Menuebalken des Makrofensters enthaelt die folgenden\n\
  1506. Kommandos:\n\
  1507. Speichern:   Speichern der MAKRO- und PREAMBLE-Teile des \n\
  1508. X         Makrofensters.\n\
  1509. Schliessen:  Schliessen des Makrofensters, ohne den Inhalt zu \n\
  1510. X         speichern.  Falls Aenderungen vorgenommen wurden,\n\
  1511. X         erfolgt eine Rueckfrage.\n\
  1512. \n\n\
  1513. Fehlerfenster\n\
  1514. \n\
  1515. Das Fehlerfenster dient zum Korrigieren von Syntaxfehlern.\n\
  1516. Der Menuebalken des Fehlerfensters enthaelt die folgenden\n\
  1517. Kommandos:\n\
  1518. Speichern:   Speichern des Fehlerfensters.\n\
  1519. Schliessen:  Schliessen des Fehlerfensters, ohne den Inhalt zu\n\
  1520. SHAR_EOF
  1521. true || echo 'restore of gui_help.c failed'
  1522. fi
  1523. echo 'End of  part 18'
  1524. echo 'File gui_help.c is continued in part 19'
  1525. echo 19 > _shar_seq_.tmp
  1526. exit 0
  1527. -- 
  1528. Senior Systems Scientist        mail: dcmartin@msi.com
  1529. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  1530. 796 North Pastoria Avenue        at&t: 408/522-9236
  1531. Sunnyvale, California 94086        fax: 408/732-0831
  1532.