home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume19 / xmail / part01 < prev    next >
Encoding:
Text File  |  1993-04-27  |  56.7 KB  |  1,306 lines

  1. Newsgroups: comp.sources.x
  2. From: markham@cadence.com (Jeff Markham)
  3. Subject: v19i026:  xmail - X Window System interface to the mail program, Part01/10
  4. Message-ID: <csx-v19i026=xmail.142358@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: e74dbcf810afb81cf9552d18e33e2658
  6. Date: Wed, 10 Mar 1993 20:24:25 GMT
  7. Approved: chris@sparky.imd.sterling.com
  8.  
  9. Submitted-by: markham@cadence.com (Jeff Markham)
  10. Posting-number: Volume 19, Issue 26
  11. Archive-name: xmail/part01
  12. Environment: X11
  13. Supersedes: xmail: Volume 15, Issue 18-26
  14.  
  15. #!/bin/sh
  16. #! /bin/sh
  17. # This is a shell archive.  Remove anything before this line, then feed it
  18. # into a shell via "sh file" or similar.  To overwrite existing files,
  19. # type "sh file -c".
  20. # Contents:  README CHANGES confirm.c
  21. # Wrapped by chris@sparky on Wed Mar 10 14:17:43 1993
  22. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  23. echo If this archive is complete, you will see the following message:
  24. echo '          "shar: End of archive 1 (of 10)."'
  25. if test -f 'README' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'README'\"
  27. else
  28.   echo shar: Extracting \"'README'\" \(3728 characters\)
  29.   sed "s/^X//" >'README' <<'END_OF_FILE'
  30. X
  31. X  xmail - X Window System interface to the mail program
  32. X
  33. X  Copyright 1990,1991,1992 by National Semiconductor Corporation
  34. X  Permission to use, copy, modify, and distribute this software and its
  35. X  documentation for any purpose is hereby granted without fee, provided that
  36. X  the above copyright notice appear in all copies and that both that
  37. X  copyright notice and this permission notice appear in supporting
  38. X  documentation, and that the name of National Semiconductor Corporation not
  39. X  be used in advertising or publicity pertaining to distribution of the
  40. X  software without specific, written prior permission.
  41. X  NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  42. X  SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  43. X  WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  44. X  DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  45. X  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  46. X  EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  47. X  INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  48. X  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  49. X  OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  50. X  PERFORMANCE OF THIS SOFTWARE.
  51. X  Author:  Michael C. Wagnitz - National Semiconductor Corporation
  52. X  Support: See Below
  53. X
  54. X  IN-MEMORIUM
  55. X  Michael C. Wagnitz passed away recently. Michael had a deep love
  56. X  and appreciation for the X Windows community and the spirit of
  57. X  sharing and cooperation it embodies. 
  58. X
  59. X  DESCRIPTION
  60. X  xmail is an X-based interface to the Berkeley mail program.  This is
  61. X  version 1.5 of xmail.  This version of xmail depends heavily upon the
  62. X  installation of the application default resources file for the proper
  63. X  declaration of features and enhancements documented in the man pages.
  64. X  If the defaults file or the resource declarations are not installed or
  65. X  in some manner made accessable to the X11 resource database manager,
  66. X  xmail will operate in only a minimal fashion.  Please see the man page
  67. X  for additional details.
  68. X
  69. X  This version of xmail includes support for decompressing and displaying
  70. X  the content of an X-Face mail header, if such a header exists in the
  71. X  message being read.  This feature is a compile time option, and requires
  72. X  the existence of the compface library routines, which are NOT supplied
  73. X  with the xmail sources.    X-Face headers are compressed bitmap images,
  74. X  typically of the face of the person owning such a header.  The compressed
  75. X  header contains only printable characters, which allows it to be included
  76. X  in a mail message.  The USENIX FaceSaver project is typically the source
  77. X  for these bitmaps, which are compressed into X-Face header format using
  78. X  the compface software tools written and distributed by James Ashton
  79. X  <jaa@cs.su.oz.au>.  The compface library is also provided with the distri-
  80. X  bution of the faces software, written by Rich Burridge, and is available
  81. X  by email from his archive server <rb-archive-server@Aus.Sun.COM>.
  82. X
  83. X  A non-imake version of a make file is provided as make.file.  You may
  84. X  use this file to build xmail, or invoke M.I.T.'s imake facility to
  85. X  generate a Makefile.  If you use the make.file instead, you must ensure
  86. X  that the proper environment is defined for your particular architecture
  87. X  and operating system.
  88. X
  89. X
  90. X  SUPPORT
  91. X
  92. X  PLEASE report any bugs or enhancements to me at the address below, so
  93. X  changes can be incorporated in the sources and official patches posted.
  94. X
  95. X  Jeff Markham
  96. X  Cadence Design Systems        Domain: markham@cadence.com
  97. X  555 River Oaks Parkway Bldg. 4     Phone: 408/944-7679
  98. X  San Jose, Ca    95134
  99. END_OF_FILE
  100.   if test 3728 -ne `wc -c <'README'`; then
  101.     echo shar: \"'README'\" unpacked with wrong size!
  102.   fi
  103.   # end of 'README'
  104. fi
  105. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  106.   echo shar: Will not clobber existing file \"'CHANGES'\"
  107. else
  108.   echo shar: Extracting \"'CHANGES'\" \(43942 characters\)
  109.   sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  110. X
  111. X                                                              February, 1992
  112. X
  113. X   The following changes have been effected for Patchlevel 5 of xmail.
  114. X
  115. X   ALL known segmentation violations and related mysterious crashes HAVE BEEN
  116. XELIMINATED, largely in thanks to the wonderful software tool 'purify' by the
  117. XPure Software Corporation, of Los Altos, CA.  If you haven't yet seen this
  118. Xexcellent diagnostic tool, rush right out and get yourself a copy.  It IS the
  119. Xcats meow!
  120. X
  121. XAs part of the effort at eliminating problems with segmentation violations,
  122. Xseveral casts for XtMalloc() and XtFree() calls have been added, and I no
  123. Xlonger free the mail connection read buffer each time it is used.  Instead I
  124. Xsimply allow it to grow to the maximum size of a read ever performed on the
  125. Xmail pipe.
  126. X
  127. XLike previous versions of xmail, version 1.5 depends HEAVILY on the proper
  128. Xinstallation of the application defaults file in the appropriate directory.
  129. XIf you fail to install the new application defaults file, xmail will run, but
  130. Xonly in a restricted fashion, and many of the documented features will not be
  131. Xpresent.
  132. X
  133. XHelpText.c    - More changes to the formatting of text in the popup window.
  134. X
  135. XImakefile    - ADDED definitions for SIGACTION, for those systems which do
  136. X          not support the BSD sigvec function. ADDED the option to use
  137. X          REGEXP if your system supplies regexp.h.  The default will be
  138. X          to use re_comp() and re_exec() instead.  Also added a define
  139. X          to use BSD_SIGNALS, for SGI and similar machines with that
  140. X          requirement.
  141. X
  142. XMailwatch.c    - Added support for the 'q' keypress in the icon window to
  143. X          cause xmail to terminate.  Made necessary modifications to
  144. X          support the final released version of XPM 3.0 which is being
  145. X          provided with the X11R5 Contrib tape distribution.
  146. X
  147. Xactions.c    - Added a function to extract the folder variable value once
  148. X          only, in place of making multiple calls to GetMailEnv().
  149. X
  150. XMessage delivery can now be effected directly from the keyboard, by use of
  151. X<Meta>-key translations in the applications default file.
  152. X
  153. XHelp for most windows can now be
  154. Xcalled up using only the middle mouse button, although text windows which would
  155. Xotherwise accept text pasting still require the addition of the <Shift> key as
  156. Xwell.
  157. X
  158. X---------------------- end of changes for patchlevel 5 -----------------------
  159. X
  160. X                                                             September, 1991
  161. X
  162. X   The following changes have been effected for Patchlevel 4 of xmail.
  163. X
  164. X  Many more bugs have been fixed, and the overall size of the resident image
  165. Xmade even smaller, with the removal of the dependency on alloca and regex.c.
  166. XI have also made changes necessary to effect operation under X11 Release 5,
  167. Xand linted the sources to remove as many lint complaints as is practical.
  168. X
  169. XI believe with this version I have eliminated the various and sundry program
  170. Xcrashes at unexpected times and in wierd places.  The culprit was (of course)
  171. Xme, and violation of the rule: Don't feed your children dynamically allocated
  172. Xdata with a fork, as it can often cause you to choke and die.
  173. X
  174. XI have made extensive changes to the way in which the editor is invoked during
  175. Xmessage composition and the manner in which the message is delivered to the
  176. Xsendmail daemon.  Users may now begin a message composition, and immediately
  177. Xcontinue processing available messages.  Message composition will no longer
  178. Xchew up cpu cycles and message delivery will no longer leave a defunct (i.e.
  179. Xzombie) process hanging around to consume available process slots.
  180. X
  181. XLike the previous version (1.3) of xmail, this version depends heavily on the
  182. Xinstallation of the application defaults file in the appropriate directory.
  183. XThe declaration of SetAlias() actions for To:,Cc:, and Bcc: translations no
  184. Xlonger require the inclusion of the call to MenuPopup().  This means any 1.3
  185. Xversion of the application defaults file MUST be replaced with the new copy.
  186. X
  187. XIf you fail to install the new application defaults file, xmail will run, but
  188. Xonly in a restricted fashion, and many of the documented features will not be
  189. Xpresent.  This is because many of the resource declarations have been moved
  190. Xfrom the source code into the defaults file.  Also with this version, the
  191. Xspecification of colors and fonts are left to the choice of the user.  Some
  192. Xexample declarations are included in the defaults file, but they are commented
  193. Xout, so as not to effect the choices made by the user.  This means if you fail
  194. Xto specify color requirements on a color system, xmail will come up in black
  195. Xand white (except for the National Semiconductor logo in the title bar %^).
  196. X
  197. XHelpText.c    - Made several small changes to better format the text in the
  198. X          help window popup.  Also added corrections for the latest
  199. X          set of enhancements and bug fixes.
  200. X
  201. XImakefile    - Removed the definition for NO_WAIT3 as no longer necessary.
  202. X          Added several compiler options, to aid xmail specification.
  203. X          Define USE_DIRENT if readdir() uses <dirent.h> instead of
  204. X          <sys/dir.h>.  Define X_FACE and COMPFACE if you have the
  205. X          compface library installed and you want xmail to auto-
  206. X          matically display the X-Face: header, if found in a message.
  207. X          Define XPM if you have the Xpm version 3 library and want
  208. X          support for multi-colored icons.  Define LPT if you require
  209. X          att environment support for pseudo ports.  Define
  210. X          MAILBOX_DIRECTORY if your mail spool is located in other than
  211. X          the default /usr/spool/mail location.  (If not specified, the
  212. X          default will be used.)  Define DEFAULT_VISUAL if your copy of
  213. X          vi lies in some place other than /usr/ucb.  (If not specified,
  214. X          /usr/ucb/vi will be the default editor.)  Define
  215. X          DEFAULT_MAILER if your mail program is not the standard
  216. X          /usr/ucb/Mail.  CAUTION - Operation is NOT guaranteed with
  217. X          other mailers.
  218. X
  219. X          Dependencies have been included for those files which need
  220. X          to know if a particular compile option has been specified or
  221. X          not.  The dependencies have been COMMENTED OUT, because the
  222. X          imake Makefile rule would force a rebuild of the Makefile
  223. X          unless you add an Imakefile dependency to the Makefile rule.
  224. X          If you want the source file dependencies enabled, you need to
  225. X          edit the created Makefile, and add Imakefile as the dependency
  226. X          to the Makefile target, to prevent rebuilding the Makefile.
  227. X
  228. XMailwatch.c    - The mailhost variable was incorrectly referenced in tests for
  229. X          a NULL value.
  230. X
  231. X          Added the definition for MAXHOSTNAMELEN if it is not defined.
  232. X
  233. X          Replaced the attempt to determine the mail host name using
  234. X          sendmail with just the name of the current host.  This routine
  235. X          was bogus at best, and the change eliminates complaints from
  236. X          non-sendmail daemons that some sites are using.
  237. X
  238. X          Added optional support for XPM formatted icons, if the user
  239. X          has libXpm.a (and desires multi-colored icons %^).  Thanks
  240. X          go to Herve Soulard <soulard@sor.inria.fr> for the suggestion
  241. X          and assistance.
  242. X
  243. XXMail.ad    - I have now commented out the color specifications in the
  244. X          application defaults file, in order to not enforce default
  245. X          colors on users who wish to use their own generic definitions.
  246. X          This means that if you 1) don't uncomment these definitions
  247. X          when you install the file, or 2) specify colors in your
  248. X          personal default resources file, xmail will execute in black
  249. X          and white on a color monitor.  I have also eliminated the
  250. X          definitions of buttonFont and helpFont in this file, but have
  251. X          included a definition for *Font:.  The definition for the
  252. X          editorCommand resource has also been commented out, which
  253. X          allows the program to utilize the default VISUAL definition
  254. X          in the user's .mailrc file, unless they add a specification
  255. X          for editorCommand to replace the default action.
  256. X
  257. X          Added definitions for search forward and backward to the
  258. X          index window translations, to allow searching for multiple
  259. X          messages by author or subject.
  260. X
  261. X          Removed declarations for MenuPopup action in the translations
  262. X          for To:, Cc:, and Bcc: windows when executing SetAliases().
  263. X
  264. Xactions.c    - Change access to the "command_pattern" and "output_pattern"
  265. X          variables, in keeping with the correction of the global
  266. X          definitions of same.
  267. X
  268. X          I found that I was mislead in my beliefs that the pipe (|)
  269. X          command was universal in Berkeley mail.  Instead, it is
  270. X          a unique feature of Sun's version of mail.  This version of
  271. X          xmail has an alternative method of printing a message, for
  272. X          those systems that are not Sun compatible.
  273. X
  274. X          The main folder list is now sorted into alphabetical order.
  275. X          In the loop which checks each folder file for directory-ness,
  276. X          I changed the diropen() calls to use stat() instead.
  277. X
  278. X          Aliases (which are also now sorted) are now placed in order
  279. X          from left to right, top to bottom.
  280. X
  281. X          Both SetAliases and SetFolders now call XtPopupSpringLoaded,
  282. X          instead of having the MenuPopup call in their translation
  283. X          tables.  Menus are now only created if the list information
  284. X          truely exists.
  285. X
  286. X          Added support for X11 Release 5.
  287. X
  288. X          Folder button is now made insensitive while extracting the
  289. X          initial folders list, to show busy state, since the InputOnly
  290. X          busy cursor window does not map while the mouse button is
  291. X          depressed.
  292. X
  293. XcallMail.c    - SYSV ioctl calls incorrectly reference an undefined variable
  294. X          "tty", which should have been "slave".
  295. X
  296. X          Some systems did not like the test for return value from the
  297. X          ioctl calls.  The test(s) have been eliminated.
  298. X
  299. X          Removed the duplicate inclusion of the <sgtty.h> file.
  300. X
  301. X          Added the inclusion of signal.h, for those systems which do
  302. X          not already include it as part of the inclusion of param.h.
  303. X
  304. X          Loop on the attempt to establish master/slave connections in
  305. X          case the first attempt(s) fail but more possibilities exist.
  306. X
  307. X          Changed call arguments to callMail to eliminate mailargc as
  308. X          unnecessary.
  309. X
  310. Xcallbacks.c    - Changed the access to "command_pattern" and "output_pattern"
  311. X          variables, in keeping with the correction of the global
  312. X          definitions of same.
  313. X
  314. X          Changed the way I handled message delivery.  Instead of
  315. X          forking a process to perform the delivery, I now access the
  316. X          sendmail daemon directly.  I also prepend a greater than (>)
  317. X          symbol to any line of text which begins with the mail keyword
  318. X          ``From '', to prevent mail from believing it is the start of
  319. X          a new message.  Also fixed the case of Forwarding to include
  320. X          the greater than symbol on the first line of the forwarded
  321. X          message, which also begins with the word 'From '.
  322. X
  323. X          Fixed the routine which strips the actual addresses from the
  324. X          list of addressees (which might include full names as well)
  325. X          so that the sendmail command line is as brief as possible.  I
  326. X          have tested this with a wide variety of examples and line
  327. X          lengths, and no longer suffer from any core dumps.  This
  328. X          should resolve the problem some users have had with parsing
  329. X          aliases which included full name specifications.
  330. X
  331. X          Also finding that the "~[a|A]" commands are only available
  332. X          in Sun's version of mail, I have implemented a mechanism to
  333. X          use a .[Ss]ignature file, if no signature can be found in the
  334. X          user's .mailrc file and a .[Ss]ignature file exists in their
  335. X          home directory.  This method allows a user to have both a
  336. X          lower case .signature as well as an uppercase .Signature file
  337. X          if they so desire.
  338. X
  339. X          Removed the wait3() call for the mail child when terminating
  340. X          xmail.
  341. X
  342. X          Removed the duplicate inclusion of the <sys/time.h> file.
  343. X
  344. X          Removed the pointer declaration for the clock variable.
  345. X
  346. X          Added support for tilde referenced record files.
  347. X
  348. X          Changed the assumptions about .face file contents to include
  349. X          not adding the information if the user is also using the
  350. X          faces.sendmail script (as noted by its name in the environment
  351. X          definition for sendmail), and to insert the X-Face: header
  352. X          if the user's .face file does not contain it.
  353. X
  354. X          Fixed a bug in the Reply routine which caused a segmentation
  355. X          violation if the Return-Path: header did not contain chevrons.
  356. X
  357. X          Consolidated the functions which deliver the composition mail
  358. X          message to eliminate the need for global definitions of the
  359. X          header strings and the occasional crash caused by the delivery
  360. X          child having copies of those variables.
  361. X
  362. X          Added code to ensure that all included or forwarded messages
  363. X          with mail keyword 'From ' at the beginning of a line have a
  364. X          preceeding greater-than symbol to eliminate false triggers.
  365. X
  366. Xdefs.h        - Added support for R5 portability issues.
  367. X
  368. Xdirectory.c    - Sub-directory folder lists are now sorted alphabetically.
  369. X
  370. X          In the loop which checked each folder file for directory-ness,
  371. X          I replaced the diropen() calls with stat() calls instead.
  372. X
  373. X          To avoid problems later on with XtNameToWidget, folder names
  374. X          of directories which contain either a period or an asterisk
  375. X          do not cause generation a sub-menu.
  376. X
  377. Xenvirons.c    - In building the aliases list, I had not taken into account
  378. X          the fact that GetMailrc() returns a NULL if no aliases were
  379. X          defined.
  380. X          Added expansion routines to mail variable requests to
  381. X          the inclusion of process environment definitions.
  382. X
  383. X          Fixed a major bug in the alias parsing routines which could
  384. X          not handle an alias the decoded to a full name and address
  385. X          syntax as permitted by the RFC822 specifications.
  386. X
  387. X          Added a call to qsort the alias list.
  388. X
  389. X          Source'ing of files in the .mailrc file now received expanded
  390. X          environment variable definitions in filenames.
  391. X
  392. Xglobal.h    - Added the declaration for the endEdits() signal handler.
  393. X          Also removed global declarations for message header variables
  394. X          which no longer require global definition, and eliminated the
  395. X          declarations for waitC and xtermC cursors.
  396. X
  397. Xhandler.c    - Fixed a bug which caused non-expert users with deleted
  398. X          messages in a folder to have to complete a Confirmation
  399. X          response when terminating xmail from the iconic position.
  400. X          (The question was moot, as being iconic made it already
  401. X          too late to ask for confirmation of the deletes.)
  402. X
  403. X          Eliminated the static buffer for examining the contents of
  404. X          the title bar, when trying to determine if In_System_Folder.
  405. X
  406. Xmail.c        - Changed the way in which I control the message composition.
  407. X          The previous (1.3) method was horribly wasteful of cpu cycles,
  408. X          and didn't allow the user to continue reading other mail
  409. X          messages until after the editing session concluded.  The new
  410. X          method ensures only one message composition at a time occurs,
  411. X          and allows immediate continuation of other xmail functions.
  412. X
  413. X          Added an event handler to correct bug for warping of cursor
  414. X          to To: window when popping up the headers window transient.
  415. X          Users whose window manager decorates transients will now see
  416. X          the cursor in the To: window, instead of in the decoration.
  417. X
  418. X          Eliminated the call to wait3().  It is no longer needed.
  419. X
  420. X          Eliminated the full path xterm specification in the default
  421. X          edit command.  This because some users choose to install X11
  422. X          in a non-standard (/usr/bin/X11) location.
  423. X
  424. X          Changed the way I handled fork failures, now reporting the
  425. X          cause of the failure when trying to start an edit session.
  426. X
  427. Xparser.c    - Added code to eliminate bogus messages from the mail child,
  428. X          and to turn off a possible ``cmd'' definition in the .mailrc
  429. X          file, so as to be able to detect the inability to pipe a
  430. X          command to the printer.
  431. X
  432. X          Added an additional error message parse when trying to copy,
  433. X          write, or save a file to a bogus address which returns the
  434. X          message "Not a directory".
  435. X
  436. X          Added notation of file saved when using the write command.
  437. X
  438. X          Moved the function which marks a 'P'reserved message to the
  439. X          parser routine, in case the user is not in their system
  440. X          folder.
  441. X
  442. X          Changed the way I determine the mail prompt string from a
  443. X          static examination at first startup, to take what mail is
  444. X          actually giving me when the connection is established.  This
  445. X          eliminates the bug where some users declare a prompt string
  446. X          which translates differently than as declared (such as prompts
  447. X          with embedded quoted strings which do not include the quotes
  448. X          when mail echos the prompt).
  449. X
  450. X          I now clear the In_Bogus_Mail_File flag if restarting the
  451. X          mail connection, so the title bar will be properly updated.
  452. X
  453. Xregex.c        - This file has been eliminated, in favor of using the regexp
  454. X          routines.  You may safely delete this file from your sources.
  455. X
  456. Xutils.c        - Modified writeTo() to not include X-Face header strings in
  457. X          the displayed message text, if the user sets the *No_X_Hdr
  458. X          resource to True or uses the -nx command line option, and an
  459. X          X-Face header is included in the incoming message.
  460. X
  461. X          Replaced the previous mechanism for setting a wait cursor in
  462. X          the various windows with the FAQ'd example of creating an
  463. X          InputOnly window to prevent unwanted events while the program
  464. X          is busy.  Also fixed the problem of having the Cursor window
  465. X          Enter/LeaveNotify events force overwrite of the status info.
  466. X
  467. Xwindows.c    - Added a definition for Control_J to remove the extra text
  468. X          help window, for those workstation keyboards without a line-
  469. X          feed key.
  470. X
  471. Xxmail.c        - Eliminated internally defined default fonts, allowing the
  472. X          user to specify the fonts in their personal resource file.
  473. X
  474. X          Also added the command line/resource declaration for textFont
  475. X          in keeping with the definitions for buttonFont and helpFont.
  476. X          All three font specifications can now be obtained from the
  477. X          single generic declaration of *Font: in the resource file,
  478. X          or by using the command line option ``-fn'' or ``-font''.
  479. X
  480. X          I now parse command line arguments in an effort to eliminate
  481. X          bogus borderwidth specifications (negative or beyond practical
  482. X          limits) in an effort to keep the application from becoming
  483. X          non-functional due to incorrect sizing operations.
  484. X
  485. X          Increased size of mailargv vector by one to correct bug of
  486. X          not specifying mail program name as argv[0].  This fixes
  487. X          startup processing to not include header information because
  488. X          the '-N' flag was not being recognized.
  489. X
  490. Xxmailregex.h    - This file is no longer required, as part of the replacement
  491. X          of regex routines with regexp functionality.
  492. X
  493. Xxmailregexp.h    - This file replaces both xmailregex.h and regex.c as the means
  494. X          for parsing both command line and output messages.
  495. X
  496. Xxmail.man    - Made several changes to reflect improvements for xmail 1.4.
  497. X
  498. X
  499. XI'd like to thank all of the users who responded with bug fixes and suggestions
  500. Xfor the previous (1.3) version of xmail.  The list below identifies those
  501. Xindividuals who were first on their block to point out a failing of xmail 1.3.
  502. X
  503. XJohn Amanatides    <amana@allegra.att.com>
  504. X    Requested support for tilde defined record variables, and that aliases
  505. X    be presented in sorted order.
  506. X
  507. XJames Carlson    <carlson@mrx.webo.dg.com>
  508. X    Noted that the use of alloca calls in regex.c were highly unportable,
  509. X    and that signal.h needed to be included in callMail.c for SIGKILL,
  510. X    (for those sites that don't include signal.h as part of param.h).
  511. X
  512. XA. G. "Tony" Cohn    <agc@dcs.leeds.ac.uk>
  513. X    Encouraged me to add a sort of the folder lists, especially for the
  514. X    sub-levels.
  515. X
  516. XDonna Converse        <converse@expo.lcs.mit.edu>
  517. X    Pointed to the correct method of utilizing XtCallActionProc to replace
  518. X    the translation table declarations for MenuPopup actions.
  519. X
  520. XPierre Corriveau    <piec%bnrmtl.UUCP@Larry.McRCIM.McGill.EDU>
  521. X    Pointed out the lack of proper handling of message text lines that
  522. X    began with the keyword ``From ''.
  523. X
  524. XChris Crampton    <cmc@ecrc.de>
  525. X    Suggested that path dependencies be removed from the xterm invocation
  526. X    of the default visual editor.
  527. X
  528. XRichard Griffiths    <richard@xanth.b11.ingr.com>
  529. X    Suggested several corrections to the SYSV compilation as a result of
  530. X    his efforts at porting xmail to the Intergraph (Clipper) workstation.
  531. X
  532. XNick Holloway    <alfie@cs.warwick.ac.uk>
  533. X    Helped identify a major failure in the aliases routines that could not
  534. X    handle an alias which decoded into the full name and address of the
  535. X    recipient.
  536. X
  537. XThierry Leconte    <Thierry.Leconte@irisa.fr>
  538. X    Suggested a change to remove the X-Face header strings from the message
  539. X    text prior to displaying the message in the text window.
  540. X
  541. XCasey Leedom    <casey@gauss.llnl.gov>
  542. X    Suggested additional changes in the resource declarations to allow
  543. X    user preferences more latitude in specifying fonts and colors.
  544. X    He also noted some sites might not have a MAXHOSTNAMELEN definition,
  545. X    as well as the duplicate inclusion of the time.h file.  Casey was also
  546. X    the first person to provide me with the changes needed for R5.
  547. X
  548. XDj Walker-Morgan    <dj@micromuse.co.uk>
  549. X    Noted that environs.c aliases() could receive a NULL pointer when
  550. X    asking for the alias list.
  551. X
  552. XJohn Nelson    <jpn@genrad.com>
  553. X    Was the first to identify the inconsistent declarations for
  554. X    command_pattern and output_pattern global variables.
  555. X
  556. XIan Nixon    <nixon@asic.nsc.com>
  557. X    Was the first user to point out the gross waste of cpu cycles
  558. X    during the editor phase of the message composition process.
  559. X
  560. XGerry Roston    <gerry@cs.cmu.edu>
  561. X    Requested that support be included for .signature files, for those
  562. X    sites that aren't using Sun mail.
  563. X
  564. XArvind Sabharwal    <arvind@gmr.com>
  565. X    Noted the bug about the print command only working in Sun environments.
  566. X
  567. XBrian V. Smith    <envbvs@epb2.lbl.gov>
  568. X    Was first to note that some environments didn't like my test of the
  569. X    ioctl return status.
  570. X
  571. XHerve Soulard    <soulard@sor.inria.fr>
  572. X    Provided code examples and the suggestion that the mailbox icons would
  573. X    look better if presented in XPixmap format.
  574. X
  575. XMarkus Stumpf    <stumpf@dssystem1.informatik.tu-muenchen.de>
  576. X    Encouraged me to remove the bogus ``sendmail -bv'' attempt to determine
  577. X    the mail host identity.
  578. X
  579. X---------------------- end of changes for patchlevel 4 -----------------------
  580. X
  581. X                                                                 April, 1991
  582. X
  583. X   The following changes have been effected for Patchlevel 3 of xmail.
  584. X
  585. X  Many, many bugs have been fixed, and the overall size of the resident image
  586. Xhas been cut almost in half.  I also believe I have correct all memory leaks.
  587. X
  588. X  Support is now provided for displaying the content of an X-Face: header, as
  589. Xa compile time option.  If you currently have the compface library routines
  590. Xprovided by James Ashton, see the Imakefile and change the flags accordingly.
  591. XThe compface library routines are available from the Rich Burridge Archive
  592. XServer, at <rb-archive-server@Aus.Sun.COM>.  Send the one word subject "Help"
  593. Xif you have never used this archive-server before.  These routines are
  594. Xalso included as part of Rich Burridge's faces program, also available from
  595. Xthat same address.
  596. X
  597. X
  598. XImakefile:    Eliminated R3 support and changed number and type of defines
  599. X
  600. XHelpText.c:    Modified some text and added information messages for commands
  601. X
  602. XMailwatch.c:    Added support to display either user or mail host name in icon
  603. X        Changing the icon tag also changes the application title for
  604. X        window managers, for those cases when more than one copy of the
  605. X        program being run.  Removed support for X11R[23].
  606. X
  607. Xactions.c:    Removed support for X11R3.  Changed ``Send'' completion popup
  608. X        to use callbacks instead of action routines.  Eliminated need
  609. X        for DoAutograph() and DoDone() action routines.  Changed routine
  610. X        SelectionNumber() to use greater-than mark as reference instead
  611. X        of current insertion pointer, because forward/backward-page
  612. X        et.al. messed with current insertion pointer location.  Added
  613. X        support for WM_DELETE_WINDOW protocol requests to DoQuit().
  614. X        Added information messages for each command button.  Message
  615. X        content is triggered by enter/leave notify events, ala xrn.
  616. X        Cleaned up error messages to use XtError().  Consolidated
  617. X        various popup positioning routines into SetXY().  Changed
  618. X        SetCursor() from XtActionProc to void and moved it to utils.c
  619. X
  620. XcallMail.c:    Added (UNTESTED) support for non-BSD style communications.
  621. X        The additional code was taken from the X11R4 sources for xterm.
  622. X        Non-BSD routines are untested by the author, as I do not have
  623. X        access to a System-V environment.  Eliminated hanging of the
  624. X        parent (for approximately 15 seconds) on close of the slave
  625. X        connection due to child terminated for lack of mail before
  626. X        the parent could issue it's close statement.  Fixed the bug for
  627. X        not displaying tabs in messages.
  628. X
  629. Xcallbacks.c:    Call the alias() extraction routine recursively, to accommodate
  630. X        nested user aliases.  Also pass the recipient list to sendmail
  631. X        on the command line, in lieu of the ``-t'' option, to eliminate
  632. X        a bug which sometimes caused sendmail to think the author of
  633. X        the message was actually one of the recipients.  Add the USENIX
  634. X        X-Face: header to outgoing messages, if a ``.face'' file exists
  635. X        in the user's home directory.  Corrected a bug because System-V
  636. X        sprintf() does not return a pointer to the buffer.  Corrected
  637. X        redundant usage of XtNameToWidget() calls.  Changed occurrences
  638. X        for all of index() to strchr() to eliminate bug under SunOS_4+.
  639. X        Changed search for author in incoming messages to use ``From:'',
  640. X        ``Return-Path:'', and finally ``From '' header fields.  Changed
  641. X        control loop for confirms and ``Send'' completion popups so
  642. X        that they will be displayed even if the parent is obscured.
  643. X        Changed ``outfolder'' to work as documented in Mail man page.
  644. X        Fixed Done routine to not create header files when aborting a
  645. X        message composition.
  646. X
  647. Xdefs.h:        Eliminated some global variables and support for X11R3.  Added
  648. X        declaration for editorCommand resource, and support for those
  649. X        environments which do not include a wait3() system call.
  650. X
  651. Xdirectory.c:    Changed define declaration to USE_DIRENT, because structure
  652. X        dependency is not SUN_OS dependent.
  653. X
  654. Xenvirons.c:    Changed occurrences of index() to strchr().  Added support for
  655. X        braced and quoted environment variables.  Added recursive
  656. X        parsing of the .mailrc file for ``source''d files.  Added
  657. X        recursive parsing of the aliases for addresses, carbon, and
  658. X        blind copies.  Merged the extraction of aliases and set options
  659. X        from the mailrc file into one routine.  This routine now also
  660. X        supports continuation lines, and returns the LAST occurrence of
  661. X        the targeted set option.  This last point fixes a bug where the
  662. X        user declared a prompt string more than once in the mailrc
  663. X        file.  Mail would use the second one, while previous version of
  664. X        xmail were looking for the first and hanging indefinitely.
  665. X
  666. Xhandler.c:    Added info_handler() to write command button window explanation
  667. X        messages in the status window on enter/leave-notify events.
  668. X        Fixed bug in placing marker for current message.  Changed all
  669. X        occurrences of index() to strchr().  Fixed bug in index_handler
  670. X        when the current message index went to zero due to a loss of
  671. X        sync with the incoming text from Mail.  This would occur if the
  672. X        user pressed the read next/previous message keys too rapidly.
  673. X
  674. Xmail.c:        Added support for the editorCommand resource, ala xrn.  This
  675. X        resource allows the user to specify an ``sprintf''-able string
  676. X        which defines the editor to use when composing messages.  Users
  677. X        must supply two ``%s'' entry points, one for the name of the
  678. X        X display connection and one for the name of the edited file.
  679. X        Fallback to the previous VISUAL methodology, if editorCommand
  680. X        specification does not meet requirements.  Corrected a bug
  681. X        which prevented the ``Send'' popup from appearing if the parent
  682. X        shell was partially or totally obscured.  Made the ``Send''
  683. X        popup reusable, instead of destroying and recreating it each
  684. X        time.  Accommodated people who insist on setting a wide border.
  685. X
  686. Xnational.bm:    Resized the logo to a larger format, to better fit the titleBar.
  687. X
  688. Xparser.c:    Corrected a bug for those cases when the mail process would
  689. X        disappear unexpectedly.  Loss of connection no longer causes
  690. X        a runaway condition.  Fixed a bug in the START process which
  691. X        chewed up CPU seconds when started iconic.  Restored function-
  692. X        ality for the no-autoprint option, which also fixed a bug of
  693. X        occasionally seeing titlebar or status info in the text window
  694. X        when issuing read previous/next commands in rapid fashion.
  695. X
  696. Xrevtable.h:    Used in un-compressing X-Face headers.
  697. X
  698. Xutils.c:    Added support for proportionally spaced fonts, using routine
  699. X        figureWidth().  Added support for X-Face headers on in-coming
  700. X        messages.  If found, the X-Face will be displayed in the upper
  701. X        right-hand corner of the text window.  Modified Bell() routine
  702. X        to not replace message text in status window if previous text
  703. X        was for an error.
  704. X
  705. Xwindows.c:    Moved a majority of the action translation tables to the XMail
  706. X        class resource file, to allow the user more flexibility.
  707. X
  708. Xxmail.c:    Changed the startup procedure to not start in the system folder
  709. X        if starting iconic, to prevent ``newmail'' flag from being reset
  710. X        before the user has opened the icon for the first time.  Added
  711. X        separate font declarations for help, text, and button fonts.
  712. X        Added resources and command line options for disabling the new
  713. X        info feature and for specifying the editorCommand format string.
  714. X        Fixed calculations for overall shell size if user has specified
  715. X        a proportional font or wide borders, to keep xmail shell within
  716. X        root window boundaries.
  717. X
  718. XThe following persons have sent in suggestions, complaints, and/or patches
  719. Xwhich have contributed to the development of this patchlevel.  In most cases,
  720. XI was able to respond directly to the submitter using the address indicated.
  721. XIn some cases, mail would bounce and I could not reach them with a thank-you.
  722. XIn any case, I wish to express my deepest gratitude to all for their interest
  723. Xand assistance.  If I have inadvertently managed to leave someone's name off
  724. Xof this list, please forgive me (and thanks again).
  725. X
  726. XAlan M. Baum    <abaum@amb.cs.gmr.com>
  727. X    requested the ability to recursively parse an alias during ``Send''
  728. X
  729. XDana A. Chee    <dana@thumper.bellcore.com>
  730. X    one of many to request resources be moved to the application defaults
  731. X
  732. XDamian Chu    <dac@doc.imperial.ac.uk>
  733. X    forced me (%^) to add WM_DELETE_WINDOW protocol support  (thanks)
  734. XNed Danieley    <ndd@sunbar.mc.duke.edu>
  735. XFrank Peters    <fwp1@cc.msstate.edu>                and
  736. XThomas Oeser    <thomas%apgraph%ap542@ztivax.siemens.com>
  737. X    identified problems (non-RFC822 compliance) with address parsing
  738. X
  739. XNorm Jacobs    <jacobs@mot.com>
  740. X    provided suggested code patches for System-V socket connections
  741. X
  742. XCasey Leedom    <casey@gauss.llnl.gov>
  743. X    identified bugs in the translation tables and suggested the addition
  744. X    of the editorCommand resource specification
  745. X    
  746. XSteve Losen    <scl@virginia.edu>
  747. X    identified bugs in the translation and regular expressions tables
  748. X
  749. XAndrew McRae    <andrew@megadata.mega.oz.au>            and
  750. XPeter Morreale    <morreale@bierstadt.scd.ucar.edu>
  751. X    identified the existence of memory leaks in patchlevel 2
  752. X
  753. XFrans Meulenbroeks <meulenbr@cst.philips.nl>
  754. X    suggested the need to use the ``source'' command in .mailrc
  755. X
  756. XMarc H. Scholl    <scholl@inf.ethz.ch>
  757. X    suggested changes in the ``outfolder'' variable interpretation
  758. X
  759. XBrian V. Smith    <envbvs@epb2.lbl.gov>
  760. X    noted that the ``Send'' popup would not appear if the xmail parent
  761. X    window (or icon) was obscured
  762. X
  763. X
  764. X---------------------- end of changes for patchlevel 3 -----------------------
  765. X
  766. X                                                                August, 1990
  767. X
  768. X   The following changes have been effected for Patchlevel 2 of xmail.
  769. X
  770. X
  771. XImakefile:    Reordered R3 and R4 dependencies to allow for R4 make depend.
  772. X
  773. XHelpText.c:    Corrected some text and added help for text window key actions.
  774. X
  775. XMailwatch.c:    Added option to start icon in reverse video.  Also added
  776. X        option to display the username in the icon window, for those
  777. X        times when xmail processes for more than one user are desired.
  778. X
  779. Xactions.c:    Changed Newmail action to NOT automatically remove the
  780. X        current folder list when changing to the system mail folder.
  781. X        'Drop Folders' is now a separate action selectable within the
  782. X        Newmail command menu.  Fixed SetFolders routine to not prepend
  783. X        the home directory to folder names beginning with either a
  784. X        dot (.) or foreword slash (/).  Also added a COMMIT option
  785. X        to change of folder (when current folder has deleted mail)
  786. X        or cancel of composed message.  Commit option is tailorable
  787. X        by -e (expert) flag, 'Preserve' menu selection, and/or resource
  788. X        specification.  Re-edit of the current message composition is
  789. X        now supported within the 'Send' popup 'Deliver' sub-menu.
  790. X        Deletions in the 'Send' popup text fields will no longer force
  791. X        the cursor position to the end of the line.  Additional error
  792. X        messages from the mail program are also trapped.  To better
  793. X        support variations in 'Berkeley' mail, 'set no' commands are
  794. X        no changed to 'unset' commands.  Both forms are also parsed.
  795. X        To allow pasting of selected text within the various windows,
  796. X        message indexing is now indicated by a preceding greater-
  797. X        than symbol (>) instead of highlighting using the selection
  798. X        mechanism.
  799. X
  800. Xcallbacks.c:    Mechanisms for delivering mail messages are now forked to a
  801. X        child process if possible, instead of the previous synchronous
  802. X        system calls.  Better support for file and folder recipients
  803. X        to messages are also included.  Changes in folder or quitting
  804. X        with a modified folder are now confirmed, unless the expert
  805. X        flag has been specified.  Callbacks for re-editing message
  806. X        composition and for dropping the current folders list are also
  807. X        added.
  808. X
  809. Xconfirm.c:    This is a new routine which supplys the confirmation method.
  810. X
  811. Xdefs.h:        Changes to accommodate 'make depend' under X11R4 .vs. X11R3.
  812. X        Added command line option flag: expert.
  813. X
  814. Xdirectory.c:    Modified list display to be more box like, to help prevent
  815. X        the menu from running off the bottom of the screen.
  816. X
  817. Xenvirons.c:    Improved alias parsing routines to separate real people from
  818. X        file and folder names as recipients of mail messages.  Also
  819. X        expanded environment variables in GetMailEnv calls.
  820. X
  821. Xglobals.h:    Added definitions for new routines and flags.
  822. X
  823. Xhandler.c:    Removed widget privates dependencies in SystemFolder routine
  824. X        by correctly calling XtGetValues for the label of the widget.
  825. X
  826. Xicon.mail:    Modified bitmaps for both icons to allow for placing the
  827. X        username under the mailbox, when requested.
  828. X
  829. Xmail.c:        Added editMail routine to support re-edits of message text.
  830. X
  831. Xparser.c:    Added ability to export the match function to other routines
  832. X        for better handling of errors from mail.  Changed 'set no'
  833. X        calls to 'unset's, for support of SONY NEWS OS mail program.
  834. X        Changed message index highlighting to use the greater-than
  835. X        symbol (>) instead.  Revert to default mail prompt of received
  836. X        during startup, for case where user's .mailrc file fails to
  837. X        parse before the intended prompt can be set.
  838. X
  839. Xutils.c:    Changed message index selection highlighting to use symbol.
  840. X
  841. Xwindows.c:    Added new command menu options.  Provided for cut and paste
  842. X        operations in File and text windows.  Added second help
  843. X        window to text area for mapping of keyboard keys to command
  844. X        actions.  Added keyboard cursor motion commands to the Index
  845. X        and Text windows.  Added routine to parse the icon geometry.
  846. X
  847. Xxmail.c:    Added support for new options: -e (expert), -iconic, and
  848. X        -rv (reverse video on the icon).  Also default to no position
  849. X        (0,0) for icon if not explicitly specified.
  850. X
  851. Xxmail.man:    Many changes to document patchlevel 2 enhancements and fixes.
  852. X
  853. Xxmailregex.h:    Added support for use outside of the parser routines.  Also
  854. X        added additional error messages for users with problems in
  855. X        their environment or .mailrc file.
  856. X
  857. XXMail.ad:    Changed the color specifications in the applications defaults
  858. X        from names to hex values, to provide support when the server
  859. X        fails to parse color names (a rare but annoying occurrence).
  860. X        Added definitions for the new command menu buttons.
  861. X
  862. X
  863. XAgain, I'd like to thank the contributors of suggestions and actual patches.
  864. XI'd also like to thank those persons who sent in complaints and suggestions.
  865. XIf I somehow managed to forget some of those persons, I hope they can
  866. Xforgive me.
  867. X
  868. X*) Jeff Dauber was first to request the ability to re-edit new messages.
  869. X
  870. X*) Mark Scholl was responsible for requesting the addition of a Confirmation
  871. X   option.
  872. X
  873. X*) More illegal pointer combination fixes, the ParseIconGeometry() routine,
  874. X   and the expansion of environment variables within the GetMailEnv() routine
  875. X   were supplied by Christos Zoulas.
  876. X
  877. X*) Tom Dunigan and Peter Marshall both pointed out the error of my ways in
  878. X   handling RFC822 addresses, and supplied much needed help in making the
  879. X   corrections.
  880. X
  881. X*) Peter Marshal also initiated changes to allow a greater variety of editor
  882. X   choices, including better support for the emacs invocation.  He was also
  883. X   one of the first to complain about the delays during delivery of messages,
  884. X   which drove the efforts to fork off those tasks.
  885. X
  886. X*) David Elliott suggested the no-default icon position, the missing paste
  887. X   ability in the File window, and the need to support 'unset' versus 'set no'
  888. X   construct in mail.
  889. X
  890. X*) Suggestions from Casey Leedom precipitated the revision of the Makefile
  891. X   depends to provide better support for make depend under Sun and X11R4.
  892. X
  893. X*) Questions from John Meissen prompted modifications to the way the file
  894. X   handlers are modified when calling mail and forking edit children.  He also
  895. X   pointed out the probability of a MAIL environment variable pointing to
  896. X   the intended mail spool and made suggestions for changing the code.
  897. X
  898. X---------------------- end of changes for patchlevel 2 -----------------------
  899. X
  900. X                                                                   May, 1990
  901. X
  902. X   The following changes have been effected for Patchlevel 1 of xmail.
  903. X
  904. X
  905. XImakefile:    Made improvements in dependencies and SunOS defines.
  906. X        Removed requirement for linkage to system math library.
  907. X
  908. XHelpText.c:    Text revised and reformatted to better fit the help window
  909. X
  910. XMailwatch.c:    Corrected illegal pointer combinations and added resources
  911. X        to allow the user to specify the number of times to ring the
  912. X        bell when new mail has arrived.  Fixed new mail bell to ring
  913. X        only if flag is not already up.
  914. X
  915. XMailwatch.h:    Eliminated warning for duplicate XtNfile definition
  916. X
  917. Xactions.c:    Corrected illegal pointer combinations, added support for
  918. X        improved index handler and Blind carbon copies.  Also added
  919. X        support for .mailrc "printmail" definition, and improved error
  920. X        messages when attempting to select non-existent or undefined
  921. X        mail folders.  Used integer math instead of sqrt() function to
  922. X        calculate box dimensions for aliases list.
  923. X
  924. XcallMail.c:    Corrected attempts to write to read-only strings, and fixed
  925. X        case where fork child dies for improper command arguments or
  926. X        illegal or unfound image execution which tried to write error
  927. X        messages to the xmail pipe instead of the terminal screen.
  928. X        A dying child process now also terminates the xmail process.
  929. X
  930. Xcallbacks.c:    Added support for external sendmail function, improved index
  931. X        handler, and mail variable 'alwaysignore' which is now used
  932. X        to determine header levels for reply, forward, and printed
  933. X        messages.  If recipient selection fails to find a value for
  934. X        the <Return_Path:> to a message, the <From:> designate is now
  935. X        used, to eliminate failures to provide a <To:> addressee.
  936. X        Also fixed bug in replyalls which failed to pick up names from
  937. X        the original To: field when preparing addresses for the reply.
  938. X
  939. Xdefs.h:        Changed TITLE definition to accommodate use of PATCHLEVEL.
  940. X
  941. Xenvirons.c:    Alias support has been extended to include the word 'group'
  942. X        when manually extracting mail aliases from the user's .mailrc
  943. X        file.  Support has also been included for continuation lines.
  944. X        Mechanisms to expand the MAILRC environment variable definition
  945. X        have been eliminated, so that xmail behaves more like mail.
  946. X        Corrected a bug in getMailEnv to return 'True' for variables
  947. X        which have no additional value, such as 'hold' or 'autoprint'.
  948. X        Changed strchr() calls to index().
  949. X
  950. Xhandler.c:    Function icon_handler() has been added to switch xmail to a
  951. X        dummy mail folder whenever the application is iconified, and
  952. X        to switch back to the previous folder on de-iconification.
  953. X        Improved index_handler() to eliminate repaints of the index
  954. X        window for every deletion or undeletion.  Also added code to
  955. X        display as many new message headers as possible, to eliminate
  956. X        unnecessary scrolling of the index window.
  957. X
  958. Xmail.c:        Changed the fputs() to a write() to help eliminate i/o hanging,
  959. X        added Blind Carbon Copy support to the sendMail function, and
  960. X        added XMail class resources to the xterm message entry window.
  961. X        Changed strrchr() call declarations to rindex().
  962. X
  963. Xparser.c:    Eliminated multiple redraws of the index window during message
  964. X        deletions, and corrected index message markers for 'N'ew,
  965. X        'D'eleted, and undeleted mail messages.  Corrected a bug in the
  966. X        delete processing to not reread entire message and corrected a
  967. X        bug to erase index and text window datas if no current folder.
  968. X
  969. Xutils.c:    Added use of PATCHLEVEL in determining TITLE version revision
  970. X        and changed calls for strchr() to index().
  971. X
  972. Xwindows.c:    Changed name of "hold" button to "preserve", to better match
  973. X        error message text when used incorrectly, eliminated making
  974. X        the preserve button insensitive, to allow use of "set" menu
  975. X        in any folder, added a "set" menu to the "preserve" command
  976. X        button, to toggle mail variables, "alwaysignore", "autoprint",
  977. X        and "hold", and corrected character processing in the file
  978. X        window, to allow deletion and insertion within the line,
  979. X        instead of always at the end.  Added use of PATCHLEVEL in
  980. X        determining TITLE version revision
  981. X
  982. Xxmail.c:    added support for the -iconic command line option, corrected
  983. X        resource handling for iconGeometry, and improved default font
  984. X        handling for minimum dimensions of the xmail application window.
  985. X        Also fixed processing of geometry specifications for the top
  986. X        level window.  Update the 'what' database string to reflect
  987. X        current version.
  988. X
  989. X
  990. X
  991. XI would like to thank the many contributors of suggestions and actual patches.
  992. XI would also like to thank those persons who sent in complaints, as they were
  993. Xoften the predictors of the many other corrections and enhancements to xmail. 
  994. X
  995. X*) Message size tests in parser.c were extended to include support for DEC
  996. X   mail return on size requests, to prevent core dumps under Ultrix UWS 2.2
  997. X   thanks to patches from Dirk Grunwald <grunwald@foobar.Colorado.EDU>
  998. X
  999. X*) Corrections to Imakefile to eliminate the need to set SunOS dependency
  1000. X   flags manually were driven by suggestions from Casey Leedom
  1001. X   <casey@gauss.llnl.gov> and David Elliott <dce@smsc.sony.com>.
  1002. X
  1003. X*) The regular expressions definitions in xmailregex.h were corrected as a
  1004. X   result of suggestions from Casey Leedom.
  1005. X
  1006. X*) Suggestions from Casey Leedom, Mark Williams <msw@cpsc.UCalgary.CA>,
  1007. X   and Mark Scholl <scholl@inf.ethz.ch> helped identify a problem in the
  1008. X   communications links with mail.  writeMail() now uses a write instead
  1009. X   of fputs, and the connection parameters are set for APPEND instead of
  1010. X   non-blocking i/o, to eliminate run-away cpu cycles.
  1011. X
  1012. X*) Many, many illegal pointer combination errors were identified and corrected
  1013. X   by Christos Zoulas <christos@guillemin.EE.cornell.edu>
  1014. X
  1015. X*) Thanks go to Robert Viduya <robert@shangri-la.gatech.ude> for suggestions
  1016. X   and assistance in adding an icon handler to switch to a dummy mail folder
  1017. X   during iconification, to prevent collisions in mail if run from another
  1018. X   process while xmail is running.
  1019. X
  1020. X*) Support for an alternate sendmail function was provided after receiving
  1021. X   suggestions from Jim Blythe <jsblythe%uk.co.gec-mrc@nsfnet-relay.ac.uk>
  1022. X
  1023. X*) Blind carbon copy support and correction of several bugs were suggested
  1024. X   by Jeff Dauber <dauber@parns.nsc.com>
  1025. X
  1026. X*) Support for mail variables autoprint and hold were corrected thanks to
  1027. X   requests from Dwayne Lee <dwayne@asic.nsc.com>
  1028. X
  1029. END_OF_FILE
  1030.   if test 43942 -ne `wc -c <'CHANGES'`; then
  1031.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  1032.   fi
  1033.   # end of 'CHANGES'
  1034. fi
  1035. if test -f 'confirm.c' -a "${1}" != "-c" ; then 
  1036.   echo shar: Will not clobber existing file \"'confirm.c'\"
  1037. else
  1038.   echo shar: Extracting \"'confirm.c'\" \(6406 characters\)
  1039.   sed "s/^X//" >'confirm.c' <<'END_OF_FILE'
  1040. X/*
  1041. X * @(#)Confirm - a Yes/No confirmation window with optional prompt argument.
  1042. X *
  1043. X * From an idea contributed by Mitchell L. Model <mlm@odi.com> on 5-17-89
  1044. X *
  1045. X * Copyright 1990,1991,1992 by National Semiconductor Corporation
  1046. X *
  1047. X * Permission to use, copy, modify, and distribute this software and its
  1048. X * documentation for any purpose is hereby granted without fee, provided that
  1049. X * the above copyright notice appear in all copies and that both that
  1050. X * copyright notice and this permission notice appear in supporting
  1051. X * documentation, and that the name of National Semiconductor Corporation not
  1052. X * be used in advertising or publicity pertaining to distribution of the
  1053. X * software without specific, written prior permission.
  1054. X *
  1055. X * NATIONAL SEMICONDUCTOR CORPORATION MAKES NO REPRESENTATIONS ABOUT THE
  1056. X * SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS"
  1057. X * WITHOUT EXPRESS OR IMPLIED WARRANTY.  NATIONAL SEMICONDUCTOR CORPORATION
  1058. X * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
  1059. X * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN NO
  1060. X * EVENT SHALL NATIONAL SEMICONDUCTOR CORPORATION BE LIABLE FOR ANY SPECIAL,
  1061. X * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  1062. X * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  1063. X * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  1064. X * PERFORMANCE OF THIS SOFTWARE.
  1065. X *
  1066. X * Author:  Michael C. Wagnitz - National Semiconductor Corporation
  1067. X *
  1068. X */
  1069. X#include "global.h"
  1070. X
  1071. X#define    btnsepr    7
  1072. X
  1073. Xtypedef struct _result {
  1074. X            Bool    *popflg;
  1075. X            Bool    *var;
  1076. X            Widget    shell;
  1077. X               } *Result;
  1078. Xvoid
  1079. XProcessOneEvent(display)
  1080. XDisplay *display;
  1081. X{
  1082. X static XEvent event;
  1083. X
  1084. X XNextEvent(display, &event);
  1085. X XtDispatchEvent(&event);
  1086. X} /* ProcessOneEvent */
  1087. X
  1088. X
  1089. Xstatic Result
  1090. XMakeResult(shell, popflg, resultvar)
  1091. XBool *popflg, *resultvar;
  1092. XWidget shell;
  1093. X{
  1094. X Result rec = (Result) XtMalloc((unsigned) sizeof(struct _result));
  1095. X
  1096. X rec->popflg    = popflg;
  1097. X rec->var    = resultvar;
  1098. X rec->shell    = shell;
  1099. X
  1100. X return rec;
  1101. X} /* MakeResult */
  1102. X
  1103. X
  1104. X/* ARGSUSED */
  1105. X/*
  1106. X** ClearConfirm - get rid of the confirmation box.
  1107. X*/
  1108. Xvoid
  1109. XClearConfirm(w, val, result)
  1110. XWidget w;
  1111. XBool val;
  1112. XResult result;
  1113. X{
  1114. X XtPopdown(result->shell);
  1115. X XtDestroyWidget(result->shell);
  1116. X *result->popflg = FALSE;
  1117. X *result->var = val;
  1118. X} /* ClearConfirm */
  1119. X
  1120. X
  1121. X/* ARGSUSED */
  1122. XXtCallbackProc
  1123. XYes(w, closure, call_data)
  1124. XWidget w;
  1125. Xcaddr_t    closure;
  1126. Xcaddr_t call_data;            /* unused */
  1127. X{
  1128. X Result result = (Result) closure;
  1129. X
  1130. X ClearConfirm(w, TRUE, result);
  1131. X}
  1132. X
  1133. X
  1134. X/* ARGSUSED */
  1135. XXtCallbackProc
  1136. XNo(w, closure, call_data)
  1137. XWidget    w;
  1138. Xcaddr_t    closure;
  1139. Xcaddr_t    call_data;            /* unused */
  1140. X{
  1141. X Result result = (Result) closure;
  1142. X
  1143. X ClearConfirm(w, FALSE, result);
  1144. X} /* No */
  1145. X
  1146. X
  1147. X/*
  1148. X * Confirm - put up a window asking for confirmation.
  1149. X */
  1150. XBool
  1151. XConfirm(prompt)
  1152. Xchar*    prompt;
  1153. X{
  1154. X int        root_x, root_y, child_x, child_y;
  1155. X int        nargs, buttons, labelwidth, yeswidth, btnborder, btnwidth;
  1156. X Bool        popped_up = FALSE, result = FALSE;
  1157. X String        query = NULL;
  1158. X String        Translations = "<BtnDown>,<BtnUp>:\n";
  1159. X Window        root, child;
  1160. X Widget        shell, form, label, yes, no;
  1161. X Arg        args[4];
  1162. X Result        resultrec;
  1163. X
  1164. X/*
  1165. X** First, find out if expert flag is set.  If so, just return True.
  1166. X*/
  1167. X if (XMail.expert == TRUE)
  1168. X    return TRUE;
  1169. X/*
  1170. X** Find out where the mouse is, so we can put the confirmation
  1171. X** box right there.
  1172. X*/
  1173. X XQueryPointer(XtDisplay(toplevel), XtWindow(toplevel), &root, &child,
  1174. X          &root_x, &root_y, &child_x, &child_y, &buttons);
  1175. X /*
  1176. X ** Construct the confirmation box
  1177. X */
  1178. X shell=XtCreatePopupShell("Confirm",overrideShellWidgetClass,toplevel,args,0);
  1179. X
  1180. X XtSetArg(args[0], XtNtranslations, XtParseTranslationTable(Translations));
  1181. X XtSetArg(args[1], XtNborderWidth, 0);
  1182. X form = XtCreateManagedWidget("form", formWidgetClass, shell, args, 2);
  1183. X
  1184. X if (! prompt) label = NULL;
  1185. X else {
  1186. X    if (query = (String) XtMalloc((unsigned) strlen(prompt) + 2)) {
  1187. X       (void) strcpy(query, prompt);
  1188. X       (void) strcat(query, "?");
  1189. X       XtSetArg(args[0], XtNlabel, query);
  1190. X      } else XtSetArg(args[0], XtNlabel, "");
  1191. X
  1192. X    XtSetArg(args[1], XtNjustify, XtJustifyCenter);
  1193. X    XtSetArg(args[2], XtNborderWidth, 0);
  1194. X    label = XtCreateManagedWidget("prompt", labelWidgetClass, form, args, 3);
  1195. X    XtFree((String) query);        /* XtFree tests if target is null */
  1196. X   }
  1197. X
  1198. X nargs = 0;
  1199. X XtSetArg(args[nargs], XtNhorizDistance, btnsepr);        nargs++;
  1200. X if (prompt) {
  1201. X    XtSetArg(args[nargs], XtNfromVert, label);            nargs++;
  1202. X    XtSetArg(args[nargs], XtNvertDistance, 12);            nargs++;
  1203. X   }
  1204. X yes = XtCreateManagedWidget("yes", commandWidgetClass, form, args, nargs);
  1205. X
  1206. X nargs = 1;
  1207. X XtSetArg(args[nargs], XtNfromHoriz, yes);            nargs++;
  1208. X if (prompt) {
  1209. X    XtSetArg(args[nargs], XtNfromVert, label);            nargs++;
  1210. X    XtSetArg(args[nargs], XtNvertDistance, 12);            nargs++;
  1211. X   }
  1212. X no = XtCreateManagedWidget("no", commandWidgetClass, form, args, nargs);
  1213. X
  1214. X if (! label)
  1215. X    labelwidth = 0;
  1216. X else {
  1217. X    XtSetArg(args[0], XtNwidth, NULL); 
  1218. X    XtGetValues(label, args, ONE);
  1219. X    labelwidth = args[0].value;
  1220. X   }
  1221. X    
  1222. X XtSetArg(args[0], XtNwidth, NULL); 
  1223. X XtSetArg(args[1], XtNborder, NULL); 
  1224. X XtGetValues(yes, args, TWO);
  1225. X
  1226. X yeswidth = args[0].value;
  1227. X btnborder = args[1].value;
  1228. X
  1229. X btnwidth = (labelwidth - btnsepr - (2 * btnborder)) / 2;
  1230. X if (btnwidth < yeswidth) btnwidth = yeswidth;
  1231. X
  1232. X XtSetArg(args[0], XtNwidth, btnwidth); 
  1233. X XtSetValues(yes, args, ONE);
  1234. X XtSetValues(no, args, ONE);
  1235. X
  1236. X XtRealizeWidget(shell);
  1237. X
  1238. X XtSetArg(args[0], XtNwidth, NULL); 
  1239. X XtSetArg(args[1], XtNheight, NULL); 
  1240. X XtGetValues(shell, args, TWO);
  1241. X
  1242. X root_x -= args[0].value / 2;
  1243. X root_y -= args[1].value / 2;
  1244. X/*
  1245. X** Keep confirm popup within root window borders (don't place it off-screen)
  1246. X*/
  1247. X if (root_x + args[0].value > RootWidth)
  1248. X     root_x = RootWidth - args[0].value;
  1249. X if (root_x < 0) root_x = 0;
  1250. X
  1251. X if (root_y + args[0].value > RootHeight)
  1252. X     root_y = RootHeight - args[0].value;
  1253. X if (root_y < 0) root_y = 0;
  1254. X
  1255. X XtSetArg(args[0], XtNx, root_x); 
  1256. X XtSetArg(args[1], XtNy, root_y); 
  1257. X XtSetValues(shell, args, TWO);
  1258. X
  1259. X resultrec = MakeResult(shell, &popped_up, &result);
  1260. X XtAddCallback(yes, XtNcallback, Yes, resultrec);
  1261. X XtAddCallback(no, XtNcallback, No, resultrec);
  1262. X
  1263. X if (XMail.bellRing)            /* ring bell if not silenced by user */
  1264. X    XBell (XtDisplay (toplevel), 33);
  1265. X
  1266. X XtPopup(shell, XtGrabExclusive);
  1267. X
  1268. X popped_up = TRUE;
  1269. X
  1270. X while (popped_up) ProcessOneEvent(XtDisplay(shell));
  1271. X
  1272. X return result;
  1273. X} /* Confirm */
  1274. END_OF_FILE
  1275.   if test 6406 -ne `wc -c <'confirm.c'`; then
  1276.     echo shar: \"'confirm.c'\" unpacked with wrong size!
  1277.   fi
  1278.   # end of 'confirm.c'
  1279. fi
  1280. echo shar: End of archive 1 \(of 10\).
  1281. cp /dev/null ark1isdone
  1282. MISSING=""
  1283. for I in 1 2 3 4 5 6 7 8 9 10 ; do
  1284.     if test ! -f ark${I}isdone ; then
  1285.     MISSING="${MISSING} ${I}"
  1286.     fi
  1287. done
  1288. if test "${MISSING}" = "" ; then
  1289.     echo You have unpacked all 10 archives.
  1290.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1291. else
  1292.     echo You still must unpack the following archives:
  1293.     echo "        " ${MISSING}
  1294. fi
  1295. exit 0
  1296. exit 0 # Just in case...
  1297. -- 
  1298.   // chris@IMD.Sterling.COM            | Send comp.sources.x submissions to:
  1299. \X/  Amiga - The only way to fly!      |
  1300.  "It's intuitively obvious to the most |    sources-x@imd.sterling.com
  1301.   casual observer..."                  |
  1302.