home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume31 / bam / part01 < prev    next >
Encoding:
Text File  |  1992-07-30  |  37.0 KB  |  1,045 lines

  1. Newsgroups: comp.sources.misc
  2. From: sbo@vlsi.polymtl.ca (Stephane Boucher)
  3. Subject:  v31i057:  bam - [OpenLook|Athena] menu system for [GNU|Epoch|Lucid] Emacs, Part01/07
  4. Message-ID: <csm-v31i057=bam.232156@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 67cf01552da1d8877fb9feb93d9c959c
  6. Date: Fri, 31 Jul 1992 04:22:40 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: sbo@vlsi.polymtl.ca (Stephane Boucher)
  10. Posting-number: Volume 31, Issue 57
  11. Archive-name: bam/part01
  12. Environment: Lex, Yacc, SunOS 4.x with XView or BSD Unix with Athena Widget
  13. Supersedes: bam: Volume 27, Issue 68-69
  14.  
  15. Overview
  16. ********
  17.  
  18. (For those who already know bam, the main changes are: added
  19. support for athena, highly, improved elisp interface, new
  20. and improved menus)
  21.  
  22. This is BAM (Born Again Menus) a menu system for GNU
  23. Emacs.  It provides a GUI front-end to GNU Emacs.  In it's
  24. current state, it is not a full fledge GUI, but it is easilly
  25. customizable and extensible.  Note however that this package
  26. does not provide direct mouse support in the Emacs window (i.e.
  27. no scrollbar, no cut-and-paste, no pop-up menu, ...).
  28.  
  29. It is most useful to ease the transition from other
  30. text-editors to GNU Emacs, since basic commands are mouse
  31. selectable.  First-timers won't be overwhelmed by GNU Emacs
  32. apparent complexity and system administrator will spend less
  33. time repeating all the time "Press `C-h i m emacs RET' and
  34. RTFM" (Dream on... :-)
  35.  
  36. Note that it is still used, despite the availability of
  37. Lucid Emacs because, among other things, it is currently the
  38. only menu system (to the authors knowledge) for emacs that
  39. has pushpin so you can keep your menus open (only available
  40. with the Xview version).
  41.  
  42. Also, if you stay with the standard Emacs (GNU Emacs 18.58)
  43. you have the hability to have the base menu as part of the
  44. Emacs window (only available with Athena).
  45.  
  46. None of the above require any changes to Emacs' sources.
  47.  
  48. Enjoy.
  49. -Stephane, Hans and the other contributors.
  50.  
  51. #! /bin/sh
  52. # This is a shell archive.  Remove anything before this line, then unpack
  53. # it by saving it into a file and typing "sh file".  To overwrite existing
  54. # files, type "sh file -c".  You can also feed this as standard input via
  55. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  56. # will see the following message at the end:
  57. #        "End of archive 1 (of 7)."
  58. # Contents:  bam-2.0 bam-2.0/FindWindow.h bam-2.0/GrabAndManage.h
  59. #   bam-2.0/GrabAndManageP.h bam-2.0/athena.h
  60. #   bam-2.0/bam-defaults.el-dist bam-2.0/bemacs-dist bam-2.0/config.h
  61. #   bam-2.0/emacs_init-dist bam-2.0/frame.c bam-2.0/menu.icon
  62. #   bam-2.0/menus bam-2.0/menus bam-2.0/menus.c bam-2.0/menus/ex1
  63. #   bam-2.0/menus/ex1.el bam-2.0/menus/latex.el bam-2.0/menusxv.c
  64. #   bam-2.0/paths.h-dist bam-2.0/send.c bam-2.0/strstore.h
  65. #   bam-2.0/trial.el bam-2.0/utils bam-2.0/utils
  66. #   bam-2.0/utils/strdup.c
  67. # Wrapped by sbo@froh on Mon Jul 27 20:11:47 1992
  68. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  69. if test ! -d 'bam-2.0' ; then
  70.     echo shar: Creating directory \"'bam-2.0'\"
  71.     mkdir 'bam-2.0'
  72. fi
  73. if test -f 'bam-2.0/FindWindow.h' -a "${1}" != "-c" ; then 
  74.   echo shar: Will not clobber existing file \"'bam-2.0/FindWindow.h'\"
  75. else
  76. echo shar: Extracting \"'bam-2.0/FindWindow.h'\" \(1072 characters\)
  77. sed "s/^X//" >'bam-2.0/FindWindow.h' <<'END_OF_FILE'
  78. X/*   bam - the Born Again Menus for GNU Emacs.
  79. X   Copyright (C) 1992 Hans Olsson.
  80. X
  81. X    This program is free software; you can redistribute it and/or modify
  82. X    it under the terms of the GNU General Public License as published by
  83. X    the Free Software Foundation; either version 1, or (at your option)
  84. X    any later version.
  85. X
  86. X    This program is distributed in the hope that it will be useful,
  87. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  88. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  89. X    GNU General Public License for more details.
  90. X
  91. X    You should have received a copy of the GNU General Public License
  92. X    along with this program; if not, write to the Free Software
  93. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  94. X
  95. X  In other words, you are welcome to use, share and improve this program.
  96. X  You are forbidden to forbid anyone else to use, share and improve
  97. X  what you give them.   Help stamp out software-hoarding!
  98. X*/
  99. X/* $Id: FindWindow.h,v 1.1 1992/07/02 00:59:46 sbo Exp $ */
  100. X
  101. Xextern Window Window_With_Name();
  102. X
  103. END_OF_FILE
  104. if test 1072 -ne `wc -c <'bam-2.0/FindWindow.h'`; then
  105.     echo shar: \"'bam-2.0/FindWindow.h'\" unpacked with wrong size!
  106. fi
  107. # end of 'bam-2.0/FindWindow.h'
  108. fi
  109. if test -f 'bam-2.0/GrabAndManage.h' -a "${1}" != "-c" ; then 
  110.   echo shar: Will not clobber existing file \"'bam-2.0/GrabAndManage.h'\"
  111. else
  112. echo shar: Extracting \"'bam-2.0/GrabAndManage.h'\" \(1964 characters\)
  113. sed "s/^X//" >'bam-2.0/GrabAndManage.h' <<'END_OF_FILE'
  114. X/*
  115. X   Public header file for the GrabAndManage Widget
  116. X
  117. X   The GrabAndManage Widget finds another applications window
  118. X   and reparents it so it will become its own window.
  119. X*/
  120. X
  121. X
  122. X#ifndef _GrabAndManage_h
  123. X#define _GrabAndManage_h
  124. X
  125. X/****************************************************************
  126. X *
  127. X * GrabAndManage widget
  128. X *
  129. X ****************************************************************/
  130. X
  131. X/* Core Resources:
  132. X
  133. X Name             Class        RepType        Default Value
  134. X ----             -----        -------        -------------
  135. X background         Background        Pixel        XtDefaultBackground
  136. X border             BorderColor    Pixel        XtDefaultForeground
  137. X borderWidth         BorderWidth    Dimension    1
  138. X destroyCallback     Callback        Pointer        NULL
  139. X height             Height        Dimension       window height
  140. X mappedWhenManaged   MappedWhenManaged    Boolean        True
  141. X sensitive         Sensitive        Boolean        True
  142. X width             Width        Dimension    window widht
  143. X x             Position        Position    0
  144. X y             Position        Position    0
  145. X   GrabAndManage specific resources:
  146. X
  147. X windowName          WindowName         String          NULL
  148. X winSelectString     WinSelectString    String          "click on window to manage"
  149. X winX                Position           Position        0
  150. X winY                Position           Position        0
  151. X winWidth            Width              Dimension       0
  152. X winHeight           Height             Dimension       0
  153. X
  154. X*/
  155. X
  156. Xtypedef struct _GrabAndManageClassRec *GrabAndManageWidgetClass;
  157. Xtypedef struct _GrabAndManageRec *GrabAndManageWidget;
  158. X
  159. X/* Resource names, special for the GrabAndManageWidget */
  160. X
  161. X#define XtNwindowName     "windowName"
  162. X#define XtCWindowName     "WindowName"
  163. X#define XtNwinSelectString   "winSelectString"
  164. X#define XtCWinSelectString   "WinSelectString"
  165. X#define XtNwinX           "winX"
  166. X#define XtNwinY           "winY"
  167. X#define XtNwinWidth       "winWidth"
  168. X#define XtNwinHeight      "winHeight"
  169. X
  170. X/* declare the class constant */
  171. X
  172. Xextern WidgetClass grabAndManageWidgetClass;
  173. X
  174. X#endif /* _GrabAndManage_h */
  175. END_OF_FILE
  176. if test 1964 -ne `wc -c <'bam-2.0/GrabAndManage.h'`; then
  177.     echo shar: \"'bam-2.0/GrabAndManage.h'\" unpacked with wrong size!
  178. fi
  179. # end of 'bam-2.0/GrabAndManage.h'
  180. fi
  181. if test -f 'bam-2.0/GrabAndManageP.h' -a "${1}" != "-c" ; then 
  182.   echo shar: Will not clobber existing file \"'bam-2.0/GrabAndManageP.h'\"
  183. else
  184. echo shar: Extracting \"'bam-2.0/GrabAndManageP.h'\" \(927 characters\)
  185. sed "s/^X//" >'bam-2.0/GrabAndManageP.h' <<'END_OF_FILE'
  186. X/* 
  187. X   Private header file for the GrabAndManageWidget
  188. X*/
  189. X
  190. X#ifndef _GrabAndManageP_h
  191. X#define _GrabAndManageP_h
  192. X#include "GrabAndManage.h"
  193. X#include <X11/CoreP.h>
  194. X
  195. Xtypedef struct {
  196. X    int empty;
  197. X} GrabAndManageClassPart;
  198. X
  199. Xtypedef struct _GrabAndManageClassRec {
  200. X    CoreClassPart    core_class;
  201. X    GrabAndManageClassPart    GrabAndManage_class;
  202. X} GrabAndManageClassRec;
  203. X
  204. Xextern GrabAndManageClassRec grabAndManageClassRec;
  205. X
  206. Xtypedef struct _GrabAndManagePart {
  207. X    /* resources */
  208. X    String  window_name;  /* name of the window to grab */
  209. X    String  select_string;  /* prompt for window selection */
  210. X    /* private state */
  211. X    Window  app_window;
  212. X    Dimension  app_border_width;
  213. X    /* public state */
  214. X    Position winX,winY; 
  215. X    Dimension winWidth,winHeight;
  216. X} GrabAndManagePart;
  217. X
  218. Xtypedef struct _GrabAndManageRec {
  219. X    CorePart    core;
  220. X    GrabAndManagePart    grabAndManage;
  221. X} GrabAndManageRec;
  222. X
  223. X#endif /* _GrabAndManageP_h */
  224. X
  225. END_OF_FILE
  226. if test 927 -ne `wc -c <'bam-2.0/GrabAndManageP.h'`; then
  227.     echo shar: \"'bam-2.0/GrabAndManageP.h'\" unpacked with wrong size!
  228. fi
  229. # end of 'bam-2.0/GrabAndManageP.h'
  230. fi
  231. if test -f 'bam-2.0/athena.h' -a "${1}" != "-c" ; then 
  232.   echo shar: Will not clobber existing file \"'bam-2.0/athena.h'\"
  233. else
  234. echo shar: Extracting \"'bam-2.0/athena.h'\" \(1086 characters\)
  235. sed "s/^X//" >'bam-2.0/athena.h' <<'END_OF_FILE'
  236. X/*   bam - the Born Again Menus for GNU Emacs.
  237. X   Copyright (C) 1992 Hans Olsson.
  238. X
  239. X    This program is free software; you can redistribute it and/or modify
  240. X    it under the terms of the GNU General Public License as published by
  241. X    the Free Software Foundation; either version 1, or (at your option)
  242. X    any later version.
  243. X
  244. X    This program is distributed in the hope that it will be useful,
  245. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  246. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  247. X    GNU General Public License for more details.
  248. X
  249. X    You should have received a copy of the GNU General Public License
  250. X    along with this program; if not, write to the Free Software
  251. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  252. X
  253. X  In other words, you are welcome to use, share and improve this program.
  254. X  You are forbidden to forbid anyone else to use, share and improve
  255. X  what you give them.   Help stamp out software-hoarding!
  256. X*/
  257. X/* $Id: athena.h,v 1.1 1992/07/02 01:00:58 sbo Exp $ */
  258. X
  259. Xextern int window_main_loop();
  260. Xextern int do_init();
  261. END_OF_FILE
  262. if test 1086 -ne `wc -c <'bam-2.0/athena.h'`; then
  263.     echo shar: \"'bam-2.0/athena.h'\" unpacked with wrong size!
  264. fi
  265. # end of 'bam-2.0/athena.h'
  266. fi
  267. if test -f 'bam-2.0/bam-defaults.el-dist' -a "${1}" != "-c" ; then 
  268.   echo shar: Will not clobber existing file \"'bam-2.0/bam-defaults.el-dist'\"
  269. else
  270. echo shar: Extracting \"'bam-2.0/bam-defaults.el-dist'\" \(1528 characters\)
  271. sed "s/^X//" >'bam-2.0/bam-defaults.el-dist' <<'END_OF_FILE'
  272. X;   bam - the Born Again Menus for GNU Emacs.
  273. X;   Copyright (C) 1992 Stephane Boucher, Hans Olsson.
  274. X;
  275. X;    This program is free software; you can redistribute it and/or modify
  276. X;    it under the terms of the GNU General Public License as published by
  277. X;    the Free Software Foundation; either version 1, or (at your option)
  278. X;    any later version.
  279. X;
  280. X;    This program is distributed in the hope that it will be useful,
  281. X;    but WITHOUT ANY WARRANTY; without even the implied warranty of
  282. X;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  283. X;    GNU General Public License for more details.
  284. X;
  285. X;    You should have received a copy of the GNU General Public License
  286. X;    along with this program; if not, write to the Free Software
  287. X;    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  288. X;
  289. X;  In other words, you are welcome to use, share and improve this program.
  290. X;  You are forbidden to forbid anyone else to use, share and improve
  291. X;  what you give them.   Help stamp out software-hoarding!
  292. X
  293. X;-*-emacs-lisp-*-
  294. X(defvar bam-exec-dir "/usr/local/bin"
  295. X  "*Directory where the bam executable resides.")
  296. X
  297. X(defvar bam-menus-path (list "/usr/local/lib/bam")
  298. X  "*List of directories where the menus reside.")
  299. X
  300. X(defvar bam-bitmaps-path (list "/usr/lib/X11/bitmaps")
  301. X  "*List of directories where the system's bitmaps reside.
  302. XIf there's more than one directory, each directory should be
  303. Xseperated by a ':' with no spaces.")
  304. X
  305. X(defvar bam-version "%%VERSION%%")
  306. X
  307. X(setq bam-widget "%%WIDGET_KIT%%")
  308. X
  309. X(provide 'bam-defaults)
  310. END_OF_FILE
  311. if test 1528 -ne `wc -c <'bam-2.0/bam-defaults.el-dist'`; then
  312.     echo shar: \"'bam-2.0/bam-defaults.el-dist'\" unpacked with wrong size!
  313. fi
  314. # end of 'bam-2.0/bam-defaults.el-dist'
  315. fi
  316. if test -f 'bam-2.0/bemacs-dist' -a "${1}" != "-c" ; then 
  317.   echo shar: Will not clobber existing file \"'bam-2.0/bemacs-dist'\"
  318. else
  319. echo shar: Extracting \"'bam-2.0/bemacs-dist'\" \(129 characters\)
  320. sed "s/^X//" >'bam-2.0/bemacs-dist' <<'END_OF_FILE'
  321. X#!/bin/sh
  322. X# $Id: bemacs-dist,v 1.1 1992/07/27 23:06:26 sbo Exp $
  323. X
  324. Xemacs -l /usr/local/elisp/emacs_init -wn "Emacs `date +%T`" $*
  325. END_OF_FILE
  326. if test 129 -ne `wc -c <'bam-2.0/bemacs-dist'`; then
  327.     echo shar: \"'bam-2.0/bemacs-dist'\" unpacked with wrong size!
  328. fi
  329. # end of 'bam-2.0/bemacs-dist'
  330. fi
  331. if test -f 'bam-2.0/config.h' -a "${1}" != "-c" ; then 
  332.   echo shar: Will not clobber existing file \"'bam-2.0/config.h'\"
  333. else
  334. echo shar: Extracting \"'bam-2.0/config.h'\" \(1158 characters\)
  335. sed "s/^X//" >'bam-2.0/config.h' <<'END_OF_FILE'
  336. X/*   bam - the Born Again Menus for GNU Emacs.
  337. X   Copyright (C) 1992 Stephane Boucher.
  338. X
  339. X    This program is free software; you can redistribute it and/or modify
  340. X    it under the terms of the GNU General Public License as published by
  341. X    the Free Software Foundation; either version 1, or (at your option)
  342. X    any later version.
  343. X
  344. X    This program is distributed in the hope that it will be useful,
  345. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  346. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  347. X    GNU General Public License for more details.
  348. X
  349. X    You should have received a copy of the GNU General Public License
  350. X    along with this program; if not, write to the Free Software
  351. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  352. X
  353. X  In other words, you are welcome to use, share and improve this program.
  354. X  You are forbidden to forbid anyone else to use, share and improve
  355. X  what you give them.   Help stamp out software-hoarding!
  356. X*/
  357. X#ifndef _CONFIG_H_
  358. X#define _CONFIG_H_
  359. X
  360. X#include <limits.h>
  361. X
  362. X#ifdef _POSIX_PATH_MAX
  363. X#define MAX_FILE_NAME_LEN  _POSIX_PATH_MAX
  364. X#else
  365. X#define MAX_FILE_NAME_LEN 128
  366. X#endif
  367. X
  368. X#endif
  369. END_OF_FILE
  370. if test 1158 -ne `wc -c <'bam-2.0/config.h'`; then
  371.     echo shar: \"'bam-2.0/config.h'\" unpacked with wrong size!
  372. fi
  373. # end of 'bam-2.0/config.h'
  374. fi
  375. if test -f 'bam-2.0/emacs_init-dist' -a "${1}" != "-c" ; then 
  376.   echo shar: Will not clobber existing file \"'bam-2.0/emacs_init-dist'\"
  377. else
  378. echo shar: Extracting \"'bam-2.0/emacs_init-dist'\" \(1180 characters\)
  379. sed "s/^X//" >'bam-2.0/emacs_init-dist' <<'END_OF_FILE'
  380. X;-*-emacs-lisp-*-
  381. X
  382. X(if (eq window-system 'x)
  383. X    (progn
  384. X      (setq load-path (cons "/usr/local/elisp" load-path))
  385. X
  386. X      ;; get ready to load various menus
  387. X      (require 'bam)
  388. X
  389. X      ;; In certain case, you might want to tell where the
  390. X      ;; executable file "bam" is located. 
  391. X      ;; To do this, use (setq *bam-exec-dir* "/some/where")
  392. X      ;; Note however that under normal conditions you should
  393. X      ;; not have to modify this.
  394. X
  395. X      ;; If you add your custom menus, you should add the path
  396. X      ;; of these menus to *bam-menus-path*.
  397. X      ;; e.g. 
  398. X      ;; (setq bam-menus-path
  399. X      ;;       (cons "/your/custom/menu/path" bam-menus-path))
  400. X
  401. X      ;; If you use custom bitmaps, you should add the path
  402. X      ;; of these bitmaps to bam-bitmaps-path.
  403. X      ;; e.g. 
  404. X      ;; (setq bam-bitmaps-path 
  405. X      ;;       (cons "/your/custom/bitmaps/path" bam-bitmaps-path))
  406. X
  407. X      ;; Load various menus
  408. X      (bam-load-menu "emacs-base-ol")
  409. X      (bam-load-menu "ex1")
  410. X      (bam-load-menu "latex")
  411. X
  412. X      ;; Pop various menus
  413. X      (bam-open-menu "emacs-base-ol")
  414. X      ;; Add the following if you need them
  415. X      ;;(bam-open-menu "ex1")
  416. X      ;;(bam-open-menu "latex")
  417. X))
  418. END_OF_FILE
  419. if test 1180 -ne `wc -c <'bam-2.0/emacs_init-dist'`; then
  420.     echo shar: \"'bam-2.0/emacs_init-dist'\" unpacked with wrong size!
  421. fi
  422. # end of 'bam-2.0/emacs_init-dist'
  423. fi
  424. if test -f 'bam-2.0/frame.c' -a "${1}" != "-c" ; then 
  425.   echo shar: Will not clobber existing file \"'bam-2.0/frame.c'\"
  426. else
  427. echo shar: Extracting \"'bam-2.0/frame.c'\" \(1540 characters\)
  428. sed "s/^X//" >'bam-2.0/frame.c' <<'END_OF_FILE'
  429. X/*   bam - the Born Again Menus for GNU Emacs.
  430. X   Copyright (C) 1992 Stephane Boucher.
  431. X
  432. X    This program is free software; you can redistribute it and/or modify
  433. X    it under the terms of the GNU General Public License as published by
  434. X    the Free Software Foundation; either version 1, or (at your option)
  435. X    any later version.
  436. X
  437. X    This program is distributed in the hope that it will be useful,
  438. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  439. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  440. X    GNU General Public License for more details.
  441. X
  442. X    You should have received a copy of the GNU General Public License
  443. X    along with this program; if not, write to the Free Software
  444. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  445. X
  446. X  In other words, you are welcome to use, share and improve this program.
  447. X  You are forbidden to forbid anyone else to use, share and improve
  448. X  what you give them.   Help stamp out software-hoarding!
  449. X*/
  450. X/* $Id: frame.c,v 1.2 1992/03/30 20:50:26 sbo Exp $ */
  451. X
  452. X#include "bam.h"
  453. X
  454. XNotify_value baseFrameInterposer(frame, event, arg, type)
  455. X     Frame frame;
  456. X     Event *event;
  457. X     Notify_arg arg;
  458. X     Notify_event_type type;
  459. X{
  460. X  Notify_value value;
  461. X  Panel panel;
  462. X  
  463. X  if (event_action(event)==WIN_RESIZE) {
  464. X    printf("Resizing...");
  465. X    panel=(Panel)xv_get(frame, FRAME_NTH_SUBWINDOW, 1, NULL);
  466. X    window_fit(panel);
  467. X    frame_fit_all(frame);
  468. X    printf("done.\n");
  469. X  }
  470. X  else {
  471. X    value=notify_next_event_func(frame, event, arg, type);
  472. X  }
  473. X
  474. X  return(value);
  475. X}
  476. END_OF_FILE
  477. if test 1540 -ne `wc -c <'bam-2.0/frame.c'`; then
  478.     echo shar: \"'bam-2.0/frame.c'\" unpacked with wrong size!
  479. fi
  480. # end of 'bam-2.0/frame.c'
  481. fi
  482. if test -f 'bam-2.0/menu.icon' -a "${1}" != "-c" ; then 
  483.   echo shar: Will not clobber existing file \"'bam-2.0/menu.icon'\"
  484. else
  485. echo shar: Extracting \"'bam-2.0/menu.icon'\" \(263 characters\)
  486. sed "s/^X//" >'bam-2.0/menu.icon' <<'END_OF_FILE'
  487. X#define menu_width 13
  488. X#define menu_height 15
  489. Xstatic char menu_bits[] = {
  490. X   0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x1a, 0x00, 0x62, 0x00, 0x82, 0x01,
  491. X   0x02, 0x06, 0x82, 0x01, 0x62, 0x00, 0x1a, 0x00, 0x06, 0x00, 0x00, 0x00,
  492. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  493. END_OF_FILE
  494. if test 263 -ne `wc -c <'bam-2.0/menu.icon'`; then
  495.     echo shar: \"'bam-2.0/menu.icon'\" unpacked with wrong size!
  496. fi
  497. # end of 'bam-2.0/menu.icon'
  498. fi
  499. if test ! -d 'bam-2.0/menus' ; then
  500.     echo shar: Creating directory \"'bam-2.0/menus'\"
  501.     mkdir 'bam-2.0/menus'
  502. fi
  503. if test ! -d 'bam-2.0/menus' ; then
  504.     echo shar: Creating directory \"'bam-2.0/menus'\"
  505.     mkdir 'bam-2.0/menus'
  506. fi
  507. if test -f 'bam-2.0/menus.c' -a "${1}" != "-c" ; then 
  508.   echo shar: Will not clobber existing file \"'bam-2.0/menus.c'\"
  509. else
  510. echo shar: Extracting \"'bam-2.0/menus.c'\" \(1862 characters\)
  511. sed "s/^X//" >'bam-2.0/menus.c' <<'END_OF_FILE'
  512. X/*   bam - the Born Again Menus for GNU Emacs.
  513. X   Copyright (C) 1992 Stephane Boucher.
  514. X
  515. X    This program is free software; you can redistribute it and/or modify
  516. X    it under the terms of the GNU General Public License as published by
  517. X    the Free Software Foundation; either version 1, or (at your option)
  518. X    any later version.
  519. X
  520. X    This program is distributed in the hope that it will be useful,
  521. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  522. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  523. X    GNU General Public License for more details.
  524. X
  525. X    You should have received a copy of the GNU General Public License
  526. X    along with this program; if not, write to the Free Software
  527. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  528. X
  529. X  In other words, you are welcome to use, share and improve this program.
  530. X  You are forbidden to forbid anyone else to use, share and improve
  531. X  what you give them.   Help stamp out software-hoarding!
  532. X*/
  533. X/* $Id: menus.c,v 1.6 1992/07/02 00:57:44 sbo Exp $ */
  534. X
  535. X#include "bam.h"
  536. X
  537. X
  538. Xvoid printMenuDataStruct(prefixString, PmenuData, suffixString)
  539. X     char *prefixString;
  540. X     MenuData *PmenuData;
  541. X     char *suffixString;
  542. X{
  543. X  fprintf(debugFp, "%s\n", prefixString);
  544. X  fprintf(debugFp, "attr.pushpin: %d\n", PmenuData->attr.pushpin);
  545. X  fprintf(debugFp, "attr.title: \"%s\"\n", PmenuData->attr.title);
  546. X  fprintf(debugFp, "defaultChoice: %d\n", PmenuData->defaultChoice);
  547. X  fprintf(debugFp, "curItem: %d\n", PmenuData->curItem);
  548. X  fprintf(debugFp, "id: %lX\n", (long)(PmenuData->id));
  549. X  fprintf(debugFp, "prevCur: %lX\n", (long)(PmenuData->prevCur));
  550. X  fprintf(debugFp, "%s\n", suffixString);
  551. X}
  552. X
  553. X
  554. Xvoid initMenuData(PmenuData)
  555. X     MenuData *PmenuData;
  556. X{
  557. X  PmenuData->attr.pushpin  = TRUE;
  558. X  PmenuData->attr.title    = NULL;
  559. X  PmenuData->curItem       = 1;
  560. X  PmenuData->defaultChoice = 1;
  561. X}
  562. X
  563. END_OF_FILE
  564. if test 1862 -ne `wc -c <'bam-2.0/menus.c'`; then
  565.     echo shar: \"'bam-2.0/menus.c'\" unpacked with wrong size!
  566. fi
  567. # end of 'bam-2.0/menus.c'
  568. fi
  569. if test -f 'bam-2.0/menus/ex1' -a "${1}" != "-c" ; then 
  570.   echo shar: Will not clobber existing file \"'bam-2.0/menus/ex1'\"
  571. else
  572. echo shar: Extracting \"'bam-2.0/menus/ex1'\" \(834 characters\)
  573. sed "s/^X//" >'bam-2.0/menus/ex1' <<'END_OF_FILE'
  574. X# $Id: ex1,v 1.6 1992/03/31 16:56:50 sbo Exp $
  575. X
  576. XFRAME
  577. XTITLE "Emacs Menu example 1"
  578. XICON_LABEL "Ex1"
  579. X    PANEL
  580. X        BUTTON "Menu button 1" "(message \"button action 1\")"
  581. X        MENU
  582. X        TITLE "Menu 1"    
  583. X            BITMAP "c10pinin" "(message \"This is a bitmap item\")"
  584. X            TEXT "Text item" "(message \"This is a text item\")"
  585. X            BITMAP "stones" "(message \"action bitmap\")"
  586. X        END
  587. X        BUTTON "Menu Button 2" "(message \"button action 2\")"
  588. X        MENU
  589. X        TITLE "Menu 2"
  590. X            TEXT "text item 2" "(message \"text item action\")"
  591. X            MENU
  592. X                TEXT "item 3" "(message \"action\")"
  593. X                TEXT "item 4" "(message \"action\")"
  594. X            END
  595. X            BITMAP "grune" "(message \"action bitmap\")"
  596. X            MENU PUSHPIN FALSE
  597. X            TITLE "Menu 3"
  598. X                TEXT "item 5" "(message \"action\")"
  599. X                TEXT "item 6" "(message \"action\")"
  600. X            END
  601. X            BITMAP "nights" "(message \"action bitmap\")"
  602. X         END
  603. X    END
  604. XEND
  605. END_OF_FILE
  606. if test 834 -ne `wc -c <'bam-2.0/menus/ex1'`; then
  607.     echo shar: \"'bam-2.0/menus/ex1'\" unpacked with wrong size!
  608. fi
  609. # end of 'bam-2.0/menus/ex1'
  610. fi
  611. if test -f 'bam-2.0/menus/ex1.el' -a "${1}" != "-c" ; then 
  612.   echo shar: Will not clobber existing file \"'bam-2.0/menus/ex1.el'\"
  613. else
  614. echo shar: Extracting \"'bam-2.0/menus/ex1.el'\" \(1107 characters\)
  615. sed "s/^X//" >'bam-2.0/menus/ex1.el' <<'END_OF_FILE'
  616. X;   bam - the Born Again Menus for GNU Emacs.
  617. X;   Copyright (C) 1992 Stephane Boucher.
  618. X;
  619. X;    This program is free software; you can redistribute it and/or modify
  620. X;    it under the terms of the GNU General Public License as published by
  621. X;    the Free Software Foundation; either version 1, or (at your option)
  622. X;    any later version.
  623. X;
  624. X;    This program is distributed in the hope that it will be useful,
  625. X;    but WITHOUT ANY WARRANTY; without even the implied warranty of
  626. X;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  627. X;    GNU General Public License for more details.
  628. X;
  629. X;    You should have received a copy of the GNU General Public License
  630. X;    along with this program; if not, write to the Free Software
  631. X;    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  632. X;
  633. X;  In other words, you are welcome to use, share and improve this program.
  634. X;  You are forbidden to forbid anyone else to use, share and improve
  635. X;  what you give them.   Help stamp out software-hoarding!
  636. X
  637. X; $Id: ex1.el,v 1.8 1992/04/01 16:56:49 sbo Exp $
  638. X
  639. X(bam-set-menu-args "ex1" '(-Wp 0 0 -Wt 7x14 -Ws 1000 300))
  640. END_OF_FILE
  641. if test 1107 -ne `wc -c <'bam-2.0/menus/ex1.el'`; then
  642.     echo shar: \"'bam-2.0/menus/ex1.el'\" unpacked with wrong size!
  643. fi
  644. # end of 'bam-2.0/menus/ex1.el'
  645. fi
  646. if test -f 'bam-2.0/menus/latex.el' -a "${1}" != "-c" ; then 
  647.   echo shar: Will not clobber existing file \"'bam-2.0/menus/latex.el'\"
  648. else
  649. echo shar: Extracting \"'bam-2.0/menus/latex.el'\" \(1729 characters\)
  650. sed "s/^X//" >'bam-2.0/menus/latex.el' <<'END_OF_FILE'
  651. X;   bam - the Born Again Menus for GNU Emacs.
  652. X;   Copyright (C) 1992 Stephane Boucher.
  653. X;
  654. X;    This program is free software; you can redistribute it and/or modify
  655. X;    it under the terms of the GNU General Public License as published by
  656. X;    the Free Software Foundation; either version 1, or (at your option)
  657. X;    any later version.
  658. X;
  659. X;    This program is distributed in the hope that it will be useful,
  660. X;    but WITHOUT ANY WARRANTY; without even the implied warranty of
  661. X;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  662. X;    GNU General Public License for more details.
  663. X;
  664. X;    You should have received a copy of the GNU General Public License
  665. X;    along with this program; if not, write to the Free Software
  666. X;    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  667. X;
  668. X;  In other words, you are welcome to use, share and improve this program.
  669. X;  You are forbidden to forbid anyone else to use, share and improve
  670. X;  what you give them.   Help stamp out software-hoarding!
  671. X
  672. X; $Id: latex.el,v 1.10 1992/07/27 22:56:24 sbo Exp $
  673. X
  674. X(bam-set-menu-args "latex" (append (bam-font-option "7x14")
  675. X                   (bam-geometry-option 0 0 1000 300)))
  676. X(bam-set-mode-hook "latex" 'LaTeX-mode-hook)
  677. X
  678. X(defun latex-env-insrt (environment)
  679. X  "*Insert a LaTeX '\\begin{...}' '\\end{...}'environment, leaving the point in
  680. X the middle."
  681. X  (interactive "sEnter the environment name:")
  682. X  (strings-to-buffer
  683. X      (concat "\\begin{" environment "}\n")
  684. X      (concat "\n\\end{" environment "}\n")))
  685. X
  686. X(defun latex-env-and-item-insrt (environment)
  687. X  "*Insert a LaTeX '\\begin{...}' '\\end{...}'environment, plus '\\item'."
  688. X  (interactive "sEnter the environment name:")
  689. X  (latex-env-insrt environment)
  690. X  (strings-to-buffer "\\item " "\n"))
  691. END_OF_FILE
  692. if test 1729 -ne `wc -c <'bam-2.0/menus/latex.el'`; then
  693.     echo shar: \"'bam-2.0/menus/latex.el'\" unpacked with wrong size!
  694. fi
  695. # end of 'bam-2.0/menus/latex.el'
  696. fi
  697. if test -f 'bam-2.0/menusxv.c' -a "${1}" != "-c" ; then 
  698.   echo shar: Will not clobber existing file \"'bam-2.0/menusxv.c'\"
  699. else
  700. echo shar: Extracting \"'bam-2.0/menusxv.c'\" \(1965 characters\)
  701. sed "s/^X//" >'bam-2.0/menusxv.c' <<'END_OF_FILE'
  702. X/*   bam - the Born Again Menus for GNU Emacs.
  703. X   Copyright (C) 1992 Stephane Boucher.
  704. X
  705. X    This program is free software; you can redistribute it and/or modify
  706. X    it under the terms of the GNU General Public License as published by
  707. X    the Free Software Foundation; either version 1, or (at your option)
  708. X    any later version.
  709. X
  710. X    This program is distributed in the hope that it will be useful,
  711. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  712. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  713. X    GNU General Public License for more details.
  714. X
  715. X    You should have received a copy of the GNU General Public License
  716. X    along with this program; if not, write to the Free Software
  717. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  718. X
  719. X  In other words, you are welcome to use, share and improve this program.
  720. X  You are forbidden to forbid anyone else to use, share and improve
  721. X  what you give them.   Help stamp out software-hoarding!
  722. X*/
  723. X/* $Id: menusxv.c,v 1.1 1992/07/01 21:41:20 sbo Exp $ */
  724. X
  725. X#include "bam.h"
  726. X
  727. Xint setMenu(parentFrame, PmenuData, defaultTitle)
  728. X     Frame parentFrame;
  729. X     MenuData *PmenuData;
  730. X     char *defaultTitle;
  731. X{
  732. X  int retVal=0;     /* No error by default */
  733. X  char *pinUpMenuTitle=NULL;
  734. X  char *title;
  735. X
  736. X  /* Set the title of the menu */
  737. X
  738. X  if (PmenuData->attr.title!=NULL) 
  739. X    /* Use the value to override the default title 
  740. X       given in parameter */
  741. X    title=PmenuData->attr.title;
  742. X
  743. X  else if (title!=NULL)
  744. X    /* Use the default value given in parameter */
  745. X    title=defaultTitle;
  746. X
  747. X  else
  748. X    title="";
  749. X
  750. X  xv_set(PmenuData->id, MENU_TITLE_ITEM, title, NULL);
  751. X
  752. X  /* Generate a pushpin if needed */
  753. X  if (PmenuData->attr.pushpin==TRUE) {
  754. X
  755. X       xv_set(PmenuData->id, 
  756. X          MENU_GEN_PIN_WINDOW, 
  757. X          parentFrame, 
  758. X          title,
  759. X          NULL);
  760. X  }
  761. X  else if (PmenuData->attr.pushpin==FALSE) {
  762. X  }
  763. X  else {
  764. X    /* an invalid value for pushpin */
  765. X    retVal=-1;
  766. X  }
  767. X
  768. X  return(retVal);
  769. X}
  770. END_OF_FILE
  771. if test 1965 -ne `wc -c <'bam-2.0/menusxv.c'`; then
  772.     echo shar: \"'bam-2.0/menusxv.c'\" unpacked with wrong size!
  773. fi
  774. # end of 'bam-2.0/menusxv.c'
  775. fi
  776. if test -f 'bam-2.0/paths.h-dist' -a "${1}" != "-c" ; then 
  777.   echo shar: Will not clobber existing file \"'bam-2.0/paths.h-dist'\"
  778. else
  779. echo shar: Extracting \"'bam-2.0/paths.h-dist'\" \(1153 characters\)
  780. sed "s/^X//" >'bam-2.0/paths.h-dist' <<'END_OF_FILE'
  781. X/*   bam - the Born Again Menus for GNU Emacs.
  782. X   Copyright (C) 1992 Stephane Boucher.
  783. X
  784. X    This program is free software; you can redistribute it and/or modify
  785. X    it under the terms of the GNU General Public License as published by
  786. X    the Free Software Foundation; either version 1, or (at your option)
  787. X    any later version.
  788. X
  789. X    This program is distributed in the hope that it will be useful,
  790. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  791. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  792. X    GNU General Public License for more details.
  793. X
  794. X    You should have received a copy of the GNU General Public License
  795. X    along with this program; if not, write to the Free Software
  796. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  797. X
  798. X  In other words, you are welcome to use, share and improve this program.
  799. X  You are forbidden to forbid anyone else to use, share and improve
  800. X  what you give them.   Help stamp out software-hoarding!
  801. X*/
  802. X/* -*-c-*- */
  803. X/* $Id: paths.h-dist,v 1.3 1992/07/02 00:57:44 sbo Exp $ */
  804. X
  805. X#ifndef _PATHS_H_
  806. X#define _PATHS_H_
  807. X
  808. X#define DEFAULT_BITMAPS_PATH "/usr/lib/X11/bitmaps"
  809. X
  810. X#endif
  811. END_OF_FILE
  812. if test 1153 -ne `wc -c <'bam-2.0/paths.h-dist'`; then
  813.     echo shar: \"'bam-2.0/paths.h-dist'\" unpacked with wrong size!
  814. fi
  815. # end of 'bam-2.0/paths.h-dist'
  816. fi
  817. if test -f 'bam-2.0/send.c' -a "${1}" != "-c" ; then 
  818.   echo shar: Will not clobber existing file \"'bam-2.0/send.c'\"
  819. else
  820. echo shar: Extracting \"'bam-2.0/send.c'\" \(1649 characters\)
  821. sed "s/^X//" >'bam-2.0/send.c' <<'END_OF_FILE'
  822. X/*   bam - the Born Again Menus for GNU Emacs.
  823. X   Copyright (C) 1992 Stephane Boucher.
  824. X
  825. X    This program is free software; you can redistribute it and/or modify
  826. X    it under the terms of the GNU General Public License as published by
  827. X    the Free Software Foundation; either version 1, or (at your option)
  828. X    any later version.
  829. X
  830. X    This program is distributed in the hope that it will be useful,
  831. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  832. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  833. X    GNU General Public License for more details.
  834. X
  835. X    You should have received a copy of the GNU General Public License
  836. X    along with this program; if not, write to the Free Software
  837. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  838. X
  839. X  In other words, you are welcome to use, share and improve this program.
  840. X  You are forbidden to forbid anyone else to use, share and improve
  841. X  what you give them.   Help stamp out software-hoarding!
  842. X*/
  843. X/* $Id: send.c,v 1.9 1992/03/31 16:40:16 sbo Exp $ */
  844. X
  845. X#include <stdio.h>
  846. X#include <varargs.h>
  847. X
  848. X#include "bam.h"
  849. X
  850. X
  851. Xvoid sendToEmacs(stringIndex) 
  852. X     int stringIndex;
  853. X{
  854. X  fprintf(stdout, "%s", strStoreGet(stringIndex));
  855. X  fflush(stdout);
  856. X}
  857. X
  858. Xvoid sendErrorToEmacs(va_alist)
  859. Xva_dcl
  860. X{
  861. X  char tmpStr[4096+1];     /* Temporary string to 
  862. X                  construct the error
  863. X                  string to send to emacs */
  864. X  va_list pvar;
  865. X  char *format;
  866. X
  867. X  sprintf(tmpStr, "Menu \\\"%s\\\"\n\t", menuFile);
  868. X
  869. X  va_start(pvar);
  870. X  format=va_arg(pvar, char *);
  871. X  vsprintf(&(tmpStr[strlen(tmpStr)]), format, pvar);
  872. X  va_end(pvar);
  873. X
  874. X  fprintf(stdout, errorFormat, tmpStr);
  875. X
  876. X  fflush(stdout);
  877. X}
  878. X
  879. X
  880. X
  881. END_OF_FILE
  882. if test 1649 -ne `wc -c <'bam-2.0/send.c'`; then
  883.     echo shar: \"'bam-2.0/send.c'\" unpacked with wrong size!
  884. fi
  885. # end of 'bam-2.0/send.c'
  886. fi
  887. if test -f 'bam-2.0/strstore.h' -a "${1}" != "-c" ; then 
  888.   echo shar: Will not clobber existing file \"'bam-2.0/strstore.h'\"
  889. else
  890. echo shar: Extracting \"'bam-2.0/strstore.h'\" \(1313 characters\)
  891. sed "s/^X//" >'bam-2.0/strstore.h' <<'END_OF_FILE'
  892. X/*   bam - the Born Again Menus for GNU Emacs.
  893. X   Copyright (C) 1992 Stephane Boucher.
  894. X
  895. X    This program is free software; you can redistribute it and/or modify
  896. X    it under the terms of the GNU General Public License as published by
  897. X    the Free Software Foundation; either version 1, or (at your option)
  898. X    any later version.
  899. X
  900. X    This program is distributed in the hope that it will be useful,
  901. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  902. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  903. X    GNU General Public License for more details.
  904. X
  905. X    You should have received a copy of the GNU General Public License
  906. X    along with this program; if not, write to the Free Software
  907. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  908. X
  909. X  In other words, you are welcome to use, share and improve this program.
  910. X  You are forbidden to forbid anyone else to use, share and improve
  911. X  what you give them.   Help stamp out software-hoarding!
  912. X*/
  913. X/* $Id: strstore.h,v 1.3 1992/03/30 20:50:13 sbo Exp $ */
  914. X
  915. X#include <malloc.h>
  916. X#include <stdio.h>
  917. X
  918. X#define STR_STORE_ERR -1
  919. X#define STR_STORE_OK   0
  920. X#define INITIAL_STR_STORE_VECTOR_SIZE 1024
  921. X#define TRUE  (1)
  922. X#define FALSE (0)
  923. X
  924. Xint strStorePut();
  925. Xchar *strStoreGet();
  926. Xint strStoreFree();
  927. Xint strStoreOpen();
  928. Xint strStoreClose();
  929. X
  930. X
  931. END_OF_FILE
  932. if test 1313 -ne `wc -c <'bam-2.0/strstore.h'`; then
  933.     echo shar: \"'bam-2.0/strstore.h'\" unpacked with wrong size!
  934. fi
  935. # end of 'bam-2.0/strstore.h'
  936. fi
  937. if test -f 'bam-2.0/trial.el' -a "${1}" != "-c" ; then 
  938.   echo shar: Will not clobber existing file \"'bam-2.0/trial.el'\"
  939. else
  940. echo shar: Extracting \"'bam-2.0/trial.el'\" \(1114 characters\)
  941. sed "s/^X//" >'bam-2.0/trial.el' <<'END_OF_FILE'
  942. X;   bam - the Born Again Menus for GNU Emacs.
  943. X;   Copyright (C) 1992 Stephane Boucher.
  944. X;
  945. X;    This program is free software; you can redistribute it and/or modify
  946. X;    it under the terms of the GNU General Public License as published by
  947. X;    the Free Software Foundation; either version 1, or (at your option)
  948. X;    any later version.
  949. X;
  950. X;    This program is distributed in the hope that it will be useful,
  951. X;    but WITHOUT ANY WARRANTY; without even the implied warranty of
  952. X;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  953. X;    GNU General Public License for more details.
  954. X;
  955. X;    You should have received a copy of the GNU General Public License
  956. X;    along with this program; if not, write to the Free Software
  957. X;    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  958. X;
  959. X;  In other words, you are welcome to use, share and improve this program.
  960. X;  You are forbidden to forbid anyone else to use, share and improve
  961. X;  what you give them.   Help stamp out software-hoarding!
  962. X
  963. X; $Id: trial.el,v 1.2 1992/07/02 00:57:44 sbo Exp $
  964. X
  965. X(bam-load-menu "emacs-base-ol")
  966. X(bam-open-menu "emacs-base-ol")
  967. END_OF_FILE
  968. if test 1114 -ne `wc -c <'bam-2.0/trial.el'`; then
  969.     echo shar: \"'bam-2.0/trial.el'\" unpacked with wrong size!
  970. fi
  971. # end of 'bam-2.0/trial.el'
  972. fi
  973. if test ! -d 'bam-2.0/utils' ; then
  974.     echo shar: Creating directory \"'bam-2.0/utils'\"
  975.     mkdir 'bam-2.0/utils'
  976. fi
  977. if test ! -d 'bam-2.0/utils' ; then
  978.     echo shar: Creating directory \"'bam-2.0/utils'\"
  979.     mkdir 'bam-2.0/utils'
  980. fi
  981. if test -f 'bam-2.0/utils/strdup.c' -a "${1}" != "-c" ; then 
  982.   echo shar: Will not clobber existing file \"'bam-2.0/utils/strdup.c'\"
  983. else
  984. echo shar: Extracting \"'bam-2.0/utils/strdup.c'\" \(1181 characters\)
  985. sed "s/^X//" >'bam-2.0/utils/strdup.c' <<'END_OF_FILE'
  986. X/*   bam - the Born Again Menus for GNU Emacs.
  987. X   Copyright (C) 1992 Stephane Boucher.
  988. X
  989. X    This program is free software; you can redistribute it and/or modify
  990. X    it under the terms of the GNU General Public License as published by
  991. X    the Free Software Foundation; either version 1, or (at your option)
  992. X    any later version.
  993. X
  994. X    This program is distributed in the hope that it will be useful,
  995. X    but WITHOUT ANY WARRANTY; without even the implied warranty of
  996. X    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  997. X    GNU General Public License for more details.
  998. X
  999. X    You should have received a copy of the GNU General Public License
  1000. X    along with this program; if not, write to the Free Software
  1001. X    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1002. X
  1003. X  In other words, you are welcome to use, share and improve this program.
  1004. X  You are forbidden to forbid anyone else to use, share and improve
  1005. X  what you give them.   Help stamp out software-hoarding!
  1006. X*/
  1007. X#include <string.h>
  1008. X
  1009. Xchar *strdup(str)
  1010. Xchar *str;
  1011. X{
  1012. X  char *newStr;
  1013. X
  1014. X  if ((newStr=(char *)
  1015. X              malloc(sizeof(char)*strlen(str))) != NULL) {
  1016. X    strcpy(newStr, str);
  1017. X  }
  1018. X  return(newStr);
  1019. X}
  1020. END_OF_FILE
  1021. if test 1181 -ne `wc -c <'bam-2.0/utils/strdup.c'`; then
  1022.     echo shar: \"'bam-2.0/utils/strdup.c'\" unpacked with wrong size!
  1023. fi
  1024. # end of 'bam-2.0/utils/strdup.c'
  1025. fi
  1026. echo shar: End of archive 1 \(of 7\).
  1027. cp /dev/null ark1isdone
  1028. MISSING=""
  1029. for I in 1 2 3 4 5 6 7 ; do
  1030.     if test ! -f ark${I}isdone ; then
  1031.     MISSING="${MISSING} ${I}"
  1032.     fi
  1033. done
  1034. if test "${MISSING}" = "" ; then
  1035.     echo You have unpacked all 7 archives.
  1036.     rm -f ark[1-9]isdone
  1037. else
  1038.     echo You still need to unpack the following archives:
  1039.     echo "        " ${MISSING}
  1040. fi
  1041. ##  End of shell archive.
  1042. exit 0
  1043.  
  1044. exit 0 # Just in case...
  1045.