home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sources / misc / 3781 < prev    next >
Encoding:
Text File  |  1992-07-30  |  37.2 KB  |  1,050 lines

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