home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-05-06 | 46.8 KB | 1,531 lines |
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # If this archive is complete, you will see the following message at the end:
- # "End of archive 19 (of 19)."
- # Contents: mush/Gnurc mush/Mailrc mush/advanced.mushrc
- # mush/bindings.h mush/config.h-dist mush/digestify mush/execute.c
- # mush/glob.h mush/lock.c mush/mail.icon.1 mush/mail.icon.2
- # mush/makefile.hpux mush/makefile.sys.v
- # Wrapped by argv@turnpike on Wed May 2 13:59:57 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'mush/Gnurc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/Gnurc'\"
- else
- echo shar: Extracting \"'mush/Gnurc'\" \(3198 characters\)
- sed "s/^X//" >'mush/Gnurc' <<'END_OF_FILE'
- X# .mushrc to simulate Gnu emacs (NOT Rmail!) for curses mode
- X# -- Bart Schaefer (schaefer@cse.ogc.edu)
- X#---------------------------------------------------------------------------
- X# Shortcomings:
- X# In compose mode, can't use C-h, C-r, C-w, DEL, etc.
- X# Ought to delete most of the default bindings. If you want remove the
- X# default bindings, you can:
- X# Run "mush -noinit" and do a "saveopts";
- X# Edit the saved file and change every "bind" to an "unbind";
- X# Remove all other extranous commands;
- X# Include the resulting list at the TOP of this file.
- X#---------------------------------------------------------------------------
- X#
- Xset no_reverse
- X#
- X# TTY setup -- you may want to customize this, because the old interrupt
- X# character and so on might not be reset correctly when mush exits.
- X#
- Xcmd ntty 'stty intr ^G dsusp undef stop undef start undef lnext undef'
- Xcmd rtty 'stty intr ^C dsusp ^Y stop ^S start ^Q lnext ^V'
- Xcmd exit 'rtty; \exit'
- Xcmd xit exit
- Xcmd x exit
- Xcmd quit 'update; exit'
- Xcmd q quit
- Xcmd curses 'ntty; \curses; rtty'
- X#
- X# Curses mode bindings
- X#
- X# Exiting -- try to make sure tty gets reset
- Xbind-macro '\CX\CC' '[line-mode]exit\n'
- Xbind-macro x [no-op]
- Xbind-macro X [no-op]
- Xbind-macro q [no-op]
- Xbind-macro Q [no-op]
- X# Files (folders)
- Xbind '\CX\CF' folder
- Xbind '\CX\CS' update
- Xbind-macro '\CXi' '[line-mode]merge '
- Xbind '\CX\CV' folder
- Xbind-macro '\CX\CW' '[save-list]*\n'
- X# Help
- Xbind '\CX\CH' help # Can't use just C-h, it's a prefix of the others
- Xbind-macro '\CHa' '[bind]_\n\n\CH' # List all curses commands
- Xbind-macro '\CHc' '[line-mode]bind ' # Show one binding
- Xbind-macro '\CHf' '[line-mode]? ' # Explain line-mode function
- X# Error Recovery -- very primitive, sorry
- Xbind '\CXu' undelete-list
- Xbind '\C_' undelete-list
- X# Searching -- sorry, can't be incremental
- X# also can't repeat with same key
- Xbind '\CS' search-next
- Xbind '\CR' search-back
- X# Motion (the important part)
- Xbind '\CB' back-msg
- Xbind '\Eb' back-msg
- Xbind '\CP' back-msg
- Xbind '\CF' next-msg
- Xbind '\Ef' next-msg
- Xbind '\CN' next-msg
- Xbind '\Ea' back-msg
- Xbind '\Ee' next-msg
- Xbind '\E[' top-page
- Xbind '\E]' bottom-page
- Xbind '\CX[' screen-back
- Xbind '\CX]' screen-next
- Xbind '\E<' first-msg
- Xbind '\E>' last-msg
- Xbind '\CV' screen-next
- Xbind '\Ev' screen-back
- X# Killing/deleting ("forward", i.e. at cursor, only)
- Xbind '\CD' delete
- Xbind '\Ed' delete
- Xbind '\CK' delete
- Xbind '\Ek' delete
- Xbind-macro '\CW' '[line-mode]delete [getstr] | set kill\n[no-op]'
- Xbind-macro '\CY' '[undelete-list]$kill\n'
- X# Marking -- somewhat limited because can't use C-SPC (C-@)
- Xbind-macro '\CX\CX' '[line-mode].|set mark\n[no-op]'
- Xbind-macro '\Eh' '[line-mode]h|set mark\n[no-op]'
- Xbind-macro '\CXCP' '[line-mode]h|set mark\n[no-op]'
- Xbind-macro '\CXh' '[line-mode]*|set mark\n[no-op]'
- X# Buffers -- treated same as folders
- Xbind '\CXb' folder
- Xbind-macro '\CX\CB' '[folder]?\n\CH' # List folders and back out
- Xbind-macro '\CXk' '[delete-list]*\n'
- X# Shells
- Xbind-macro '\E!'\
- X '[line-mode]rtty\n[shell-escape][getline][line-mode]ntty\n'
- Xbind-macro '\Ex!' '[line-mode]rtty;sh\n[line-mode]ntty\n'
- X# Macros
- X# Sorry, no appending to macros, and end with <RETURN> not `C-x )'
- Xbind '\CX(' bind-macro
- X#
- X# Lastly, actually reset the tty
- X#
- Xif iscurses
- X ntty
- Xendif
- END_OF_FILE
- if test 3198 -ne `wc -c <'mush/Gnurc'`; then
- echo shar: \"'mush/Gnurc'\" unpacked with wrong size!
- fi
- # end of 'mush/Gnurc'
- fi
- if test -f 'mush/Mailrc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/Mailrc'\"
- else
- echo shar: Extracting \"'mush/Mailrc'\" \(1955 characters\)
- sed "s/^X//" >'mush/Mailrc' <<'END_OF_FILE'
- X# .mushrc to cause Mush to emulate UCB Mail
- X# -- Bart Schaefer (schaefer@cse.ogi.edu)
- X#
- X# This file can be used as either the DEFAULT_RC or the ALT_DEF_RC (see
- X# config.h) but such use is NOT recommended. Instead, you should modify
- X# one of those files to "source" this file.
- X#
- X#----------------------------------------------------------------------------
- X# Shortcomings:
- X# Mush does not support the "noisy phone line" flags of Mail
- X# (-i command line option or "set ignore" to ignore RUBOUT characters)
- X# Mush will never remove a system mailbox (no "unset keep" equivalent)
- X# See comments below on (lack of) command prefix recognition
- X#----------------------------------------------------------------------------
- X#
- X# Set up prompting, headers
- X#
- Xset prompt='& '
- Xset mil_time date_received
- Xset hdr_format='%8.80a %D %M %-2N %5T %l/%c "%.29s"'
- X#
- X# Set up mailing/replying miscellaneous
- X#
- Xset indent_str = " "
- Xset reply_to_hdr auto_route
- X#
- X# Set up command interface
- X# Note that a full emulation is difficult, because Mush does not support
- X# command prefix recognition (e.g., Mail interprets "Rep" as "Reply").
- X#
- X# Don't barf if history doesn't work, but still do cmd expansion
- X#
- Xset nonobang
- X#
- X# This stuff is fine, but really needs prefix recognition.
- X#
- Xcmd Reply replysender
- Xcmd R replysender
- Xcmd alt alternates
- Xcmd chdir cd
- Xcmd chd cd
- Xcmd + next
- Xcmd ch cd
- Xcmd c copy
- Xcmd file folder
- Xcmd fi folder
- Xcmd hold preserve
- Xcmd ho hold
- Xcmd reply replyall
- Xcmd r replyall
- Xcmd retain "set show_hdrs='\!*'" # Not quite right, but ...
- Xcmd se set
- Xcmd shell sh
- Xcmd so source
- Xcmd un undelete
- Xcmd unread 'flags \!* U' # "unread" is undocumented in Mail
- Xcmd uns unset
- Xcmd vi v
- Xcmd z 'z \!* + | from -' # "z" changes current message in Mail
- Xcmd z+ z
- Xcmd z- 'z \!* -'
- X#
- X# You may want this file sourced, especially if you are not using the
- X# supplied Mushrc file as your DEFAULT_RC.
- X#
- X# set ALT_DEF_RC = "/usr/lib/Mail.rc"
- X# source $ALT_DEF_RC
- X# unset ALT_DEF_RC
- END_OF_FILE
- if test 1955 -ne `wc -c <'mush/Mailrc'`; then
- echo shar: \"'mush/Mailrc'\" unpacked with wrong size!
- fi
- # end of 'mush/Mailrc'
- fi
- if test -f 'mush/advanced.mushrc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/advanced.mushrc'\"
- else
- echo shar: Extracting \"'mush/advanced.mushrc'\" \(4967 characters\)
- sed "s/^X//" >'mush/advanced.mushrc' <<'END_OF_FILE'
- X# advanced.mushrc
- X# by Bart Schaefer
- X# with special thanks to Phil Lapsley <phil@east.Berkeley.EDU>, who
- X# provided the original files on which this example is based. Most of
- X# Phil's stuff is still here -- just reorganized and updated to use
- X# mush 6.4 features that were unavailable when Phil did the originals.
- X#
- X# This file is intended to demonstrate helpful ways to use the
- X# .mushrc, not advanced mush commands.
- X
- X# The variable $thisfolder is always set EXCEPT when the .mushrc file
- X# is read the first time. A test for non-existance of $thisfolder
- X# allows the same .mushrc file to be sourced repeatedly without
- X# redundant execution of the initialization commands.
- X#
- Xif ! $?thisfolder
- X # Ignore the usual stuff
- X ignore received via message-id status
- X # Hide folders in ~/.mail and save read mail in spool
- X set folder=~/.mail hold
- X # Remember a few commands, set up editors, act like a shell
- X set history=20 editor=ex visual=vi unix
- X # Prompt has folder name, message number, history number
- X set prompt="%f %m (!) & "
- X # Header summaries show name, date, and subject
- X set hdr_format="%25n %-15d %27s"
- X # Initialize the cmds below (see later comments)
- X set first_time=1
- X
- X # These two commands are used for automated "bursting" of the spool
- X # mailbox. This means that the messages are reorganized into new
- X # folders to be read in a prearranged order. See comments below.
- X #
- X # n brings up the next folder, not the next message
- X cmd n 'source ~/.mushrc'
- X # N gets the next folder without "bursting"
- X cmd N 'set first_time=0; source ~/.mushrc'
- X
- X # Delete messages by pattern-matching. Examples:
- X # del f mailer-daemon Delete mail from mailer-daemon
- X # del t mush-users Delete mail to mush-users
- X cmd del 'pick -i -\!* | delete'
- X # Forwarding
- X cmd for 'mail -f'
- X # Quick folder change
- X cmd F 'folder'
- X
- X # Some useful aliases
- X alias dheller 'The Mush God <argv@sun.com>'
- X alias barts 'Archangel Mushael <schaefer@cse.ogi.edu>'
- X
- X # On init, don't source beyond this point
- X exit
- Xendif # End of init section -- read on startup only
- X
- X# This part of the file handles "bursting". A burst is done when the
- X# n cmd is used the first time. This is most useful if you habitually
- X# have lots of mail when you first log in each morning; unwanted mail
- X# can be deleted, and other mail organized for you.
- X#
- X# The folders in this example bursting scheme are:
- X# mush-users anything to or cc'ed to mush-users
- X# stats daily stats
- X# root root mail other than daily stats
- X# Mail not falling into one of these categories is left in the system
- X# mailbox to be dealt with first.
- X#
- Xif $first_time
- X # Kill off some uucp garbage
- X pick -i -s "file c.* delete" | delete
- X pick -i -s "file .* can.t access" | delete
- X pick -i -s "remote access to path/file denied" | delete
- X # Nuke the boring usenet stuff
- X pick -i -f usenet | pick -i -s "uucp map for" | delete
- X pick -i -t usenet | pick -i -s "returned mail" | delete
- X pick -i -t usenet | pick -i -s "automatic test echo" | delete
- X pick -i -t "owner-post" | pick -i -s "unknown mailer" | delete
- X pick -i -s "usenet disk space report" | delete
- X pick -i -s "very old news articles" | delete
- X pick -i -s "uucp map for" | delete
- X # Wipe out some uninteresting daily stats
- X pick -i -s "the maid was here." | delete
- X pick -i -s "daily accounting" | delete
- X pick -i -t netsurvey | delete
- X # Get rid of these things for good. This isn't essential, but
- X # avoids complexity in the later "pick" commands.
- X update
- X # Save anything "to" or "cc" to mush-users in that folder.
- X pick -i -t mush-users | save +mush-users
- X pick -i -h cc mush-users | save +mush-users
- X # Also save interesting daily stat mail and generic root mail
- X pick -i -f root | pick -i -s stats | save +stats
- X pick -i -f root | pick -i -s report | save +stats
- X pick -i -f uucp | pick -i -s report | save +stats
- X pick -i -f root | pick -i -s summary | save +stats
- X pick -i -f root | pick -i -s munge | save +stats
- X pick -i -t root | save +root
- X # Again, make the changes permanent. Saved mail gets deleted.
- X # This won't work if you have $keepsave set.
- X update
- X
- X # Make sure we don't burst again needlessly.
- X set first_time=0
- X
- X # Stop sourcing here. Otherwise, we'd change folders without
- X # handling the mail left in the system mailbox.
- X exit
- Xendif
- X
- X# Finally, handle stepping through the folders one by one. This has been
- X# set up for sendmail, where the system mailbox is /usr/spool/mail/$USER,
- X# but could easily be modified for other mailers.
- X#
- X# $thisfolder:t returns the tail only of the folder name.
- X
- Xif $thisfolder:t == $USER
- X folder +stats
- X exit
- Xendif
- X
- Xif $thisfolder:t == stats
- X folder +mush-users
- X exit
- Xendif
- X
- Xif $thisfolder:t == mush-users
- X folder +root
- X exit
- Xendif
- X
- X# Default back to the system mailbox
- Xfolder %
- X
- X# End of advanced.mushrc
- END_OF_FILE
- if test 4967 -ne `wc -c <'mush/advanced.mushrc'`; then
- echo shar: \"'mush/advanced.mushrc'\" unpacked with wrong size!
- fi
- # end of 'mush/advanced.mushrc'
- fi
- if test -f 'mush/bindings.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/bindings.h'\"
- else
- echo shar: Extracting \"'mush/bindings.h'\" \(2947 characters\)
- sed "s/^X//" >'mush/bindings.h' <<'END_OF_FILE'
- X/* bindings.h -- command bindings */
- X
- X#define MAX_BIND_LEN 20 /* max length a string can be to bind to a command */
- X#define MAX_MACRO_LEN 256 /* max length of a macro bound to a command */
- X
- X/* to see if a key sequence matches, prefixes or misses a set binding */
- X#define NO_MATCH 0
- X#define MATCH 1
- X#define A_PREFIX_B 2
- X#define B_PREFIX_A 3
- X
- X/*
- X * Constants to define curses mode functions.
- X */
- X#ifdef NULL_MAP
- X#undef NULL_MAP
- X#endif /* NULL_MAP */
- X#define NULL_MAP (struct cmd_map *)0
- X
- X#define C_ERROR (-1L)
- X#define C_NULL 0L
- X#define C_GOTO_MSG 1L
- X#define C_WRITE_LIST 2L
- X#define C_WRITE_MSG 3L
- X#define C_SAVE_LIST 4L
- X#define C_SAVE_MSG 5L
- X#define C_COPY_LIST 6L
- X#define C_COPY_MSG 7L
- X#define C_DELETE_LIST 8L
- X#define C_DELETE_MSG 9L
- X#define C_UNDEL_LIST 10L
- X#define C_UNDEL_MSG 11L
- X#define C_REDRAW 12L
- X#define C_REVERSE 13L
- X#define C_NEXT_MSG 14L
- X#define C_PREV_MSG 15L
- X#define C_FIRST_MSG 16L
- X#define C_LAST_MSG 17L
- X#define C_TOP_PAGE 18L
- X#define C_BOTTOM_PAGE 19L
- X#define C_NEXT_SCREEN 20L
- X#define C_PREV_SCREEN 21L
- X#define C_SOURCE 22L
- X#define C_SAVEOPTS 23L
- X#define C_NEXT_SEARCH 24L
- X#define C_PREV_SEARCH 25L
- X#define C_CONT_SEARCH 26L
- X#define C_PRESERVE 27L
- X#define C_REV_SORT 28L
- X#define C_SORT 29L
- X#define C_QUIT_HARD 30L
- X#define C_QUIT 31L
- X#define C_EXIT_HARD 32L
- X#define C_EXIT 33L
- X#define C_UPDATE 34L
- X#define C_FOLDER 35L
- X#define C_SHELL_ESC 36L
- X#define C_CURSES_ESC 37L
- X#define C_PRINT_MSG 38L
- X#define C_CHDIR 39L
- X#define C_VAR_SET 40L
- X#define C_IGNORE 41L
- X#define C_ALIAS 42L
- X#define C_OWN_HDR 43L
- X#define C_VERSION 44L
- X#define C_MAIL_FLAGS 45L
- X#define C_MAIL 46L
- X#define C_REPLY_ALL 47L
- X#define C_REPLY_SENDER 48L
- X#define C_DISPLAY_NEXT 49L
- X#define C_DISPLAY_MSG 50L
- X#define C_TOP_MSG 51L
- X#define C_BIND_MACRO 52L
- X#define C_BIND 53L
- X#define C_UNBIND 54L
- X#define C_MAP_BANG 55L
- X#define C_MAP 56L
- X#define C_MACRO 57L
- X#define C_HELP 58L/* THIS MUST BE THE LAST ITEM */
- X
- Xstruct cmd_map {
- X /* long so glob_flags can be saved in mac_stack */
- X long m_cmd; /* the command this is mapped to */
- X char *m_str; /* the string user types (cbreak) */
- X char *x_str; /* the string executed if a macro */
- X struct cmd_map *m_next;
- X};
- X
- X#ifdef CURSES
- X
- X/*
- X * Pointers to the current active command or macro and to the map list.
- X * This ought to be handled by having getcmd() return struct cmd_map *,
- X * but curses_command() depends too heavily on getcmd() returning int.
- X */
- Xextern struct cmd_map *active_cmd, *cmd_map;
- X
- X#endif /* CURSES */
- X
- X/* This must be OUTSIDE the #ifdef CURSES -- needed in other modes */
- Xextern struct cmd_map *mac_hide;
- X
- X/*
- X * Special bracketing recognized within an executing
- X * macro as surrounding a curses function name
- X */
- X#define MAC_LONG_CMD '['
- X#define MAC_LONG_END ']'
- X#define MAC_GET_STR "getstr"
- X#define MAC_GET_LINE "getline"
- X#define MAX_LONG_CMD 32
- X
- X/*
- X * External declarations for map and map! purposes
- X */
- Xextern char *c_macro();
- Xextern struct cmd_map *line_map, *bang_map;
- END_OF_FILE
- if test 2947 -ne `wc -c <'mush/bindings.h'`; then
- echo shar: \"'mush/bindings.h'\" unpacked with wrong size!
- fi
- # end of 'mush/bindings.h'
- fi
- if test -f 'mush/config.h-dist' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/config.h-dist'\"
- else
- echo shar: Extracting \"'mush/config.h-dist'\" \(5391 characters\)
- sed "s/^X//" >'mush/config.h-dist' <<'END_OF_FILE'
- X/* config.h 1.1 (c) copyright 1986 (Dan Heller) */
- X
- X/* Default names and locations for files */
- X#define MAILRC ".mushrc"
- X#define ALTERNATE_RC ".mailrc"
- X#define DEFAULT_RC "/usr/lib/Mushrc"
- X#define ALT_DEF_RC "/usr/lib/Mail.rc"
- X#define COMMAND_HELP "/usr/lib/cmd_help"
- X#ifdef SUNTOOL
- X# define TOOL_HELP "/usr/lib/tool_help"
- X#endif /* SUNTOOL */
- X#define ALTERNATE_HOME "/tmp" /* Path must be read/write to EVERYONE */
- X#define EDFILE ".edXXXXXX" /* file/pathname added to user's "home" */
- X
- X/*
- X * Define INTERNAL_MALLOC and recompile if you have trouble with mush
- X * core-dumping due to malloc/free errors. Also, if you run a System 5
- X * variant, you might notice a performance improvement if you define this
- X * variable. It uses the malloc distributed by Larry Wall for perl v2.
- X */
- X/* #define INTERNAL_MALLOC /**/
- X
- X/*
- X * Define TIMEZONE if your system has neither the SysV external variable
- X * tzname nor the BSD timezone() function. The example below is for
- X * Gould BSD4.3 systems; others should define it as a string, e.g. "PST"
- X * If TIMEZONE is defined, DAYLITETZ can also be defined, e.g. "PDT"
- X */
- X/* #define TIMEZONE T->tm_zone /**/
- X
- X/* mail delivery system macros and defines... */
- X
- X/*
- X * If you are using MMDF, define MMDF here.
- X */
- X/* #define MMDF /**/
- X#ifdef MMDF
- X/*
- X * If MMDF delivers mail the user's home directory, define HOMEMAIL.
- X * Also check the definition of the delivery file name MAILFILE, below.
- X */
- X/* #define HOMEMAIL /**/
- X#define MAIL_DELIVERY "exec /usr/mmdf/bin/submit -mlnr"
- X#define VERBOSE_ARG "Ww"
- X#define MTA_EXIT 9 /* exit status for successful submit */
- X#else /* MMDF */
- X/*
- X * If you are not using MMDF, check these definitions.
- X */
- X#define MAIL_DELIVERY "/usr/lib/sendmail -i" /* "-i" works like "-oi" */
- X#define VERBOSE_ARG "-v" /* undef if none exists */
- X#define METOO_ARG "-m" /* man sendmail for more info. */
- X#define MTA_EXIT 0 /* exit status for successful mail delivery */
- X#endif /* MMDF */
- X
- X/* If your mail transfer agent uses something *besides* "From " to separate
- X * adjacent messages in a folder, define MSG_SEPARATOR to be this string.
- X * If that string is 4 ^A's, then the string would be "\001\001\001\001".
- X * With the exception of MMDF, below, you should OMIT a trailing newline
- X * from the setting of MSG_SEPARATOR.
- X * If you don't know what any of this means, leave it alone.
- X */
- X/* #define MSG_SEPARATOR "From " /**/
- X#ifdef MMDF
- X/*
- X * These values should be identical (respectively) to the contents of
- X * delim1 and delim2 in MMDFSRC/conf/yoursite/conf.c (sans newline).
- X */
- X#define MSG_SEPARATOR "\001\001\001\001\n"
- X#define END_MSG_SEP "\001\001\001\001\n"
- X/*
- X * You only need to define LCKDFLDIR if you have MMDF configured to use the
- X * locking routines in lib/util/lk_lock.c (ie., link(2)-based locking).
- X * Most of you WILL NOT need this, since you probably use one of the more
- X * sophisticated locking modules provided with MMDF. Remember to alter the
- X * Makefile so as to access the MMDF library at the link step.
- X */
- X/* #define LCKDFLDIR "/usr/spool/mmdf/lockfiles" /* (for example) */
- X#else /* !MMDF */
- X#ifdef M_XENIX
- X#define DOT_LOCK /* DOT_LOCK should be used for SCO Xenix */
- X#endif /* M_XENIX */
- X#endif /* MMDF */
- X
- X/* If your mailer does not understand commas between addresses, you should
- X * define NO_COMMAS. This includes pre-3.0 smail and default MTAs used on
- X * xenix, and sys-v systems.
- X * This does NOT apply to MMDF or sendmail.
- X */
- X/* #define NO_COMMAS /**/
- X
- X/*
- X * Most RFC822 compliant mailers (sendmail) will add the headers From:
- X * and Date: on outgoing mail. If the user or UA sends these headers,
- X * most MTAs will not append them automatically. However, there are
- X * certain MTAs which will not allow this -- these "picky mailers" will
- X * precede such headers with a '>' and make the headers very ugly and
- X * somewhat redundant or contradictory. It is advisable to set this
- X * *UNLESS* your MTA is not RFC822 compiant -- therefore you should NOT
- X * set this (xenix, sys-v).
- X */
- X/* #define PICKY_MAILER /**/
- X
- X/* Headers that will NOT be included when forwarding mail */
- X#define IGNORE_ON_FWD "status" /* comma or space separated list */
- X
- X#define MAXMSGS 1000 /* maximum number of messages we can read */
- X#define HDRSIZ BUFSIZ /* This should not be < BUFSIZ! (but can be >) */
- X
- X/* If your system supports the vprintf() functions, True for sys-v and
- X * later sun versions (3.0+ ?). Typically not true for BSD systems, but
- X * that will probably change in the future.
- X */
- X#if defined(SYSV) || defined(sun)
- X#define VPRINTF
- X#endif /* SYSV || sun */
- X
- X#define LS_COMMAND "ls"
- X#define FORTUNE "/usr/games/fortune"
- X#define LPR "lpr"
- X#define SIGNATURE ".signature"
- X#ifdef HOMEMAIL
- X#define MAILFILE "Mailbox" /* or whatever */
- X#else /* HOMEMAIL */
- X#define MAILDIR "/usr/spool/mail"
- X#endif /* HOMEMAIL */
- X
- X/* default settings for some variable strings */
- X#define DEF_PROMPT "Msg %m of %t: "
- X#define DEF_PAGER "more" /* set to "internal" to use internal pager */
- X#define DEF_SHELL "csh"
- X#define DEF_EDITOR "vi"
- X#define DEF_FOLDER "~/Mail" /* default Mail folder */
- X#define DEF_MBOX "~/mbox" /* default mbox */
- X#define DEF_INDENT_STR "> " /* indent included mail */
- X#define DEF_PRINTER "lp"
- X#define DEF_ESCAPE "~"
- X#define DEF_HDR_FMT "%25f %7d (%l/%c) \"%s\"" /* default hdr_format */
- X#define DEF_CURSES_HELP \
- X "display save mail reply next-msg back-msg screen-next screen-back"
- END_OF_FILE
- if test 5391 -ne `wc -c <'mush/config.h-dist'`; then
- echo shar: \"'mush/config.h-dist'\" unpacked with wrong size!
- fi
- # end of 'mush/config.h-dist'
- fi
- if test -f 'mush/digestify' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/digestify'\"
- else
- echo shar: Extracting \"'mush/digestify'\" \(3468 characters\)
- sed "s/^X//" >'mush/digestify' <<'END_OF_FILE'
- X#! ../bin/mush -F!
- X#
- X# Mush digestifier. Makes a folder or a list of messages into a digest.
- X#
- X# A "digest" is a collection of E-mail messages bundled together into a
- X# single message for ease of redistribution. The individual messages
- X# in the digest are called "articles". Each article has a small set of
- X# essential headers (usually From:, Date:, and Subject:) and is divided
- X# from the preceding and following articles by an "article separator"
- X# string (usually eight hyphens, "--------"). The Mush built-in command
- X# "undigest" unpacks most digests, including those made by this script.
- X#
- X# Usage:
- X# From your shell: digestify -f mailbox
- X# From within mush:
- X# First: cmd digest "set digest = '\!*' ; source digestify"
- X# Then: digest [msg-list]
- X# Or: message-selection-command | digest
- X#
- X# Note that by default it makes a digest of the ENTIRE folder!
- X#
- X
- X#
- X# Rudimentary sanity checks
- X#
- Xif ! $?version
- X echo "You must have Mush version 7.0 or higher to run this script"
- X exit
- Xendif
- Xif ! $?thisfolder
- X echo "You can't use this script as an init file; try using -F"
- X exit
- Xendif
- X
- X#
- X# Set up defaults
- X#
- Xif ! $?digest
- X set digest = *
- X if $?interact
- X unset interact # Assume non-interactive if no input list
- X endif
- Xelse
- X set interact # Note that this is interactive
- X if "X$digest" == X
- X set digest = * # Default to all messages for empty input
- X else
- X $digest | set digest # Pre-expand message numbers
- X endif
- Xendif
- X
- X#
- X# Suppress any "that isn't set" messages from "unset"
- X#
- Xif $?warning
- X set savewarn
- Xendif
- Xunset warning oldpre oldpost oldindent oldign oldshow
- X
- X#
- X# Save everything in case the user wants it back.
- X# Could wrap all this with "if $?interact" but this script
- X# might be read by "mush -F", in which case we need this.
- X#
- Xif $?pre_indent_str
- X set oldpre = "$pre_indent_str"
- Xendif
- Xif $?post_indent_str
- X set oldpost = "$post_indent_str"
- Xendif
- Xif $?indent_str
- X set oldindent = "$indent_str"
- Xendif
- Xif $?alwaysignore
- X set oldign = "$alwaysignore"
- Xendif
- Xif $?show_hdrs
- X set oldshow = "$show_hdrs"
- Xendif
- Xif $?quiet
- X set oldquiet = "$quiet"
- Xendif
- Xif $?no_expand
- X set savenoex
- Xendif
- X
- X#
- X# Prepare to form the digest.
- X#
- Xset indent_str no_expand alwaysignore=include quiet=await,newmail
- Xunset post_indent_str
- Xalias DIGEST $thisfolder # Any target in place of $thisfolder
- Xset pre_indent_str="--------" # Insert your digest separator here
- Xset show_hdrs=from,date,subject # Add any other headers you want
- X
- X#
- X# Now do it. All that work for a two-line operation ....
- X# NOTE: If you change DIGEST above, remove the "await" command here!
- X# Backslashes prevent any cmd expansion from confusing us.
- X#
- X\delete $digest
- X\mail -UH /dev/null -I $digest -s "Digest of $thisfolder" DIGEST; \await -T 1
- X
- X#
- X# Clean out the deleted stuff if not interactive
- X#
- Xif ! $?interact
- X \update
- Xendif
- X
- X#
- X# Be neat and put everything back the way it was.
- X#
- Xunset indent_str no_expand alwaysignore quiet pre_indent_str show_hdrs
- Xunalias DIGEST
- Xif $?savenoex
- X set no_expand
- Xendif
- Xif $?oldquiet
- X set quiet = "$oldquiet"
- Xendif
- Xif $?oldpre
- X set pre_indent_str = "$oldpre"
- Xendif
- Xif $?oldpost
- X set post_indent_str = "$oldpost"
- Xendif
- Xif $?oldindent
- X set indent_str = "$oldindent"
- Xendif
- Xif $?oldign
- X set alwaysignore = "$oldign"
- Xendif
- Xif $?oldshow
- X set show_hdrs = "$oldshow"
- Xendif
- Xunset oldpre oldpost oldindent oldign oldshow oldquiet nonoex digest
- Xif $?savewarn
- X unset savewarn
- X set warning
- Xendif
- END_OF_FILE
- if test 3468 -ne `wc -c <'mush/digestify'`; then
- echo shar: \"'mush/digestify'\" unpacked with wrong size!
- fi
- chmod +x 'mush/digestify'
- # end of 'mush/digestify'
- fi
- if test -f 'mush/execute.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/execute.c'\"
- else
- echo shar: Extracting \"'mush/execute.c'\" \(4203 characters\)
- sed "s/^X//" >'mush/execute.c' <<'END_OF_FILE'
- X/* execute.c (c) copyright 10/28/86 (Dan Heller) */
- X
- X#include "mush.h"
- X#ifdef BSD
- X#include <sys/wait.h>
- X#else
- X#ifndef SYSV
- X#include <wait.h>
- X#endif /* SYSV */
- X#endif /* BSD */
- X
- X#ifdef lint
- X#include <sys/resource.h>
- X#endif /* lint */
- X
- Xstatic jmp_buf execjbuf;
- X
- X#ifdef SUNTOOL
- X
- X/*ARGSUSED*/
- Xstatic
- XNotify_value
- Xmy_wait3(tty, pid, status, rusage)
- XTty tty;
- Xint pid;
- Xunion wait *status;
- Xstruct rusage *rusage;
- X{
- X extern Panel_item edit_item;
- X Textsw textsw = (Textsw)window_get(tty, WIN_CLIENT_DATA);
- X char *file = (char *)window_get(textsw, TEXTSW_CLIENT_DATA);
- X int i = 0;
- X
- X if (WIFSTOPPED(*status)) {
- X kill(pid, SIGCONT);
- X return (NOTIFY_IGNORED);
- X }
- X if (pid != exec_pid || exec_pid <= 0) /* if the editor didn't die, return */
- X return NOTIFY_DONE;
- X /* editor died -- reset exec_pid so no one thinks we're running */
- X exec_pid = 0;
- X (void) window_set(tty, TTY_ARGV, TTY_ARGV_DO_NOT_FORK, NULL);
- X wprint("Editor done.\n");
- X (void) window_set(tty_sw, WIN_SHOW, FALSE, NULL);
- X#ifdef SUN_4_0 /* SunOS 4.0+ */
- X (void) window_set(textsw,
- X WIN_SHOW, TRUE,
- X TEXTSW_FILE_CONTENTS, file,
- X NULL);
- X#else /* SUN_4_0 */
- X textsw_load_file(textsw, file, 1, 0, 0);
- X textsw_set(textsw, WIN_SHOW, TRUE, NULL);
- X#endif /* SUN_4_0 */
- X textsw_normalize_view(textsw, (Textsw_index)0);
- X (void) unlink(file);
- X set_comp_items(panel_get(edit_item, PANEL_PARENT_PANEL));
- X
- X return NOTIFY_DONE;
- X}
- X
- Xtool_edit_letter(textsw, argv)
- XTextsw textsw;
- Xchar **argv;
- X{
- X Rect *msg_rect = (Rect *)window_get(textsw, WIN_RECT);
- X
- X wprint("Starting \"%s\"...\n", *argv);
- X#ifdef SUN_4_0
- X window_set(textsw, WIN_SHOW, FALSE, NULL);
- X#else /* SUN_4_0 */
- X textsw_set(textsw, WIN_SHOW, FALSE, NULL);
- X#endif /* SUN_4_0 */
- X ttysw_output(tty_sw, "\f", 1); /* clear screen */
- X (void) window_set(tty_sw,
- X WIN_RECT, msg_rect,
- X TTY_ARGV, argv,
- X WIN_SHOW, TRUE,
- X NULL);
- X if ((exec_pid = (int) window_get(tty_sw, TTY_PID)) == -1) {
- X error("Couldn't execute %s", *argv);
- X return -1;
- X }
- X notify_set_wait3_func(tty_sw, my_wait3, exec_pid);
- X Debug("tty pid = %d\n", exec_pid);
- X return 0;
- X}
- X#endif /* SUNTOOL */
- X
- Xexecute(argv)
- Xchar **argv;
- X{
- X#ifdef SYSV
- X int status;
- X#else
- X union wait status;
- X#endif /* SYSV */
- X#ifdef SIGCONT
- X SIGRET (*oldstop)(), (*oldcont)();
- X#endif /* SIGCONT */
- X int pid;
- X SIGRET (*oldint)(), (*oldquit)();
- X
- X oldint = signal(SIGINT, SIG_IGN);
- X oldquit = signal(SIGQUIT, SIG_IGN);
- X#ifdef SIGCONT
- X oldstop = signal(SIGTSTP, SIG_DFL);
- X oldcont = signal(SIGCONT, SIG_DFL);
- X#endif /* SIGCONT */
- X turnon(glob_flags, IGN_SIGS);
- X
- X echo_on();
- X if (!setjmp(execjbuf)) {
- X if ((exec_pid = vfork()) == 0) {
- X (void) signal(SIGINT, SIG_DFL);
- X (void) signal(SIGQUIT, SIG_DFL);
- X (void) signal(SIGPIPE, SIG_DFL);
- X (void) closefileds(3); /* close all descriptors above 2 */
- X execvp(*argv, argv);
- X if (errno == ENOENT)
- X print("%s: command not found.\n", *argv);
- X else
- X error(*argv);
- X _exit(-1);
- X }
- X /* Parent's got to do something; sigchldcatcher may also be waiting.
- X * This loop will usually get broken by the longjmp() (except tool),
- X * but in certain circumstances sigchldcatcher isn't yet active.
- X */
- X while ((pid = wait(&status)) != -1 && pid != exec_pid)
- X Debug("The exec loop caught a signal? (pid = %d)\n", pid);
- X }
- X /* reset our ttymodes */
- X echo_off();
- X (void) signal(SIGINT, oldint);
- X (void) signal(SIGQUIT, oldquit);
- X#ifdef SIGCONT
- X (void) signal(SIGTSTP, oldstop);
- X (void) signal(SIGCONT, oldcont);
- X#endif /* SIGCONT */
- X turnoff(glob_flags, IGN_SIGS);
- X}
- X
- XSIGRET
- Xsigchldcatcher()
- X{
- X#ifdef SYSV
- X int status;
- X#else
- X union wait status;
- X#endif /* SYSV */
- X int pid;
- X
- X#ifdef BSD
- X while ((pid = wait3(&status, WNOHANG, (struct rusage *)0)) > 0) {
- X Debug("%d died...\n", pid);
- X if (pid == exec_pid)
- X break;
- X }
- X#else
- X#ifndef SYSV
- X while ((pid = wait2(&status, WNOHANG)) > 0 && pid != exec_pid)
- X Debug("%d died...\n", pid);
- X#else /* SYSV */
- X while ((pid = wait((int *)0)) > 0 && pid != exec_pid)
- X Debug("%d died...\n", pid);
- X#endif /* SYSV */
- X#endif /* BSD */
- X if (pid == exec_pid && pid > 0) {
- X exec_pid = 0;
- X longjmp(execjbuf, 1);
- X }
- X}
- END_OF_FILE
- if test 4203 -ne `wc -c <'mush/execute.c'`; then
- echo shar: \"'mush/execute.c'\" unpacked with wrong size!
- fi
- # end of 'mush/execute.c'
- fi
- if test -f 'mush/glob.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/glob.h'\"
- else
- echo shar: Extracting \"'mush/glob.h'\" \(1985 characters\)
- sed "s/^X//" >'mush/glob.h' <<'END_OF_FILE'
- X#ifdef BSD
- X#define DIRECTORY
- X#endif /* BSD */
- X
- X#ifdef DIRECTORY
- X#include <sys/dir.h>
- X#define dirent direct
- X#else /* !DIRECTORY */
- X
- X/*
- X * 4.2BSD directory access emulation for non-4.2 systems.
- X * Based upon routines in appendix D of Portable C and Unix System
- X * Programming by J. E. Lapin (Rabbit Software).
- X *
- X * No responsibility is taken for any error in accuracies inherent
- X * either to the comments or the code of this program, but if
- X * reported to me then an attempt will be made to fix them.
- X */
- X
- X#ifndef DEV_BSIZE
- X#define DEV_BSIZE 512 /* Device block size. */
- X#endif
- X
- X#define DIRBLKSIZ DEV_BSIZE
- X#define MAXNAMLEN 255 /* Name must be no longer than this. */
- X
- Xstruct dirent
- X{
- X long d_fileno ; /* Inode number of entry. */
- X short d_reclen ; /* Length of this record. */
- X short d_namlen ; /* Length of d_name string. */
- X char d_name[MAXNAMLEN + 1] ; /* Directory name. */
- X} ;
- X
- X/* The DIRSIZ macro gives the minimum record length that will hold the
- X * directory entry. This requires the amount of space in struct direct
- X * without the d_name field, plus enough space for the name with a
- X * terminating null byte (dp->d_namlen+1), rounded up to a 4 byte
- X * boundary.
- X */
- X
- X#undef DIRSIZ
- X#define DIRSIZ(dp) \
- X ((sizeof (struct dirent) - (MAXNAMLEN+1)) \
- X + (((dp)->d_namlen+1 + 3) &~ 3))
- X
- X/* Definitions for library routines operating on directories. */
- X
- Xtypedef struct _dirdesc
- X{
- X int dd_fd ;
- X long dd_loc ;
- X long dd_size ;
- X char dd_buf[DIRBLKSIZ] ;
- X} DIR ;
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif
- X
- Xextern DIR *opendir() ;
- Xextern struct dirent *readdir() ;
- Xextern long telldir() ;
- Xextern void seekdir() ;
- X#define rewinddir(dirp) seekdir((dirp), (long) 0)
- Xextern void closedir() ;
- X
- X#endif /* DIRECTORY */
- X
- X#define DELIM " \t;|"
- X#define META "/?*[{"
- X#define FMETA "?*[{"
- END_OF_FILE
- if test 1985 -ne `wc -c <'mush/glob.h'`; then
- echo shar: \"'mush/glob.h'\" unpacked with wrong size!
- fi
- # end of 'mush/glob.h'
- fi
- if test -f 'mush/lock.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/lock.c'\"
- else
- echo shar: Extracting \"'mush/lock.c'\" \(4593 characters\)
- sed "s/^X//" >'mush/lock.c' <<'END_OF_FILE'
- X/*
- X * lock.c -- deal with file locking on various architectures and UNIXs.
- X * dot_lock() creates a file with the same name as the parameter passed
- X * with the appendage ".lock" -- this is to be compatible with certain
- X * systems that don't use flock or lockf or whatever they have available
- X * that they don't use.
- X */
- X
- X#ifdef USG
- X#include <unistd.h>
- X#endif /* USG */
- X#include "mush.h"
- X#if defined(SYSV) && !defined(USG)
- X#include <sys/locking.h>
- X#endif /* SYSV && !USG */
- X
- X#ifdef DOT_LOCK
- Xextern int sgid;
- X#ifdef BSD
- Xextern int rgid;
- X#endif /* BSD */
- X
- Xdot_lock(filename)
- Xchar *filename;
- X{
- X char buf[MAXPATHLEN];
- X int lockfd, cnt = 0;
- X SIGRET (*oldint)(), (*oldquit)();
- X
- X#ifdef SYSV
- X /* Only the spoolfile needs to be dot_locked -- other files are
- X * handled by lock_fopen, below. To avoid collisions with 14-char
- X * file name limits, we allow dot_locking ONLY of the spoolfile.
- X */
- X if (strcmp(spoolfile, filename) != 0)
- X return 0;
- X#endif
- X#ifdef BSD
- X setregid(rgid, sgid);
- X#else /* BSD */
- X setgid(sgid);
- X#endif /* BSD */
- X#ifdef M_XENIX
- X (void) sprintf(buf, "/tmp/%.10s.mlk", login);
- X#else /* M_XENIX */
- X (void) sprintf(buf, "%s.lock", filename);
- X#endif /* M_XENIX */
- X on_intr();
- X while ((lockfd = open(buf, O_CREAT|O_WRONLY|O_EXCL, 0444)) == -1) {
- X if (errno != EEXIST) {
- X error("unable to lock %s", filename);
- X break;
- X }
- X if (cnt++ == 0)
- X print("%s already locked, waiting", filename);
- X else
- X print_more(".");
- X sleep(1);
- X if (ison(glob_flags, WAS_INTR)) {
- X print_more("\nAborted.\n");
- X break;
- X }
- X }
- X off_intr();
- X if (lockfd != -1) {
- X if (cnt)
- X print("done.\n");
- X (void) close(lockfd);
- X }
- X#ifdef BSD
- X setregid(sgid, rgid);
- X#else
- X setgid(getgid());
- X#endif /* BSD */
- X return lockfd == -1? -1 : 0;
- X}
- X#endif /* DOT_LOCK */
- X
- X#ifdef SYSV
- X
- X/*
- X * Define some BSD names for the SYSV world
- X */
- X#ifdef USG
- X#define LOCK_SH F_RDLCK
- X#define LOCK_EX F_WRLCK
- X#define LOCK_UN F_UNLCK
- X#else /* USG */
- X#define LOCK_SH LK_LOCK
- X#define LOCK_EX LK_LOCK
- X#define LOCK_UN LK_UNLCK
- X#endif /* USG */
- X#define LOCK_NB 0 /* Always non-blocking in this case */
- X
- X#ifdef HPUX
- X#undef EWOULDBLOCK
- X#endif /* HPUX */
- X#define EWOULDBLOCK EAGAIN
- X
- Xflock(fd, op)
- Xint fd, op;
- X{
- X#ifndef USG
- X (void) locking(fd, op, 0); /* old xenix (sys III) */
- X return 0;
- X#else
- X struct flock l;
- X
- X l.l_len = 0L;
- X l.l_start = 0L;
- X l.l_whence = 1;
- X l.l_type = op;
- X
- X return fcntl(fd, F_SETLK, &l);
- X#endif /* USG */
- X}
- X
- X#endif /* SYSV */
- X
- XFILE *
- Xlock_fopen(filename, mode)
- Xchar *filename;
- Xchar *mode;
- X{
- X FILE *mail_fp = NULL_FILE;
- X#ifndef LCKDFLDIR
- X int fd, lk;
- X int cnt = 0;
- X SIGRET (*oldint)(), (*oldquit)();
- X#else /* LCKDFLDIR */
- X extern FILE *lk_fopen();
- X#endif /* !LCKDFLDIR */
- X
- X if (debug && do_set(set_options, "deadlock")) {
- X (void) un_set(&set_options, "deadlock");
- X return NULL_FILE;
- X }
- X
- X#ifdef LCKDFLDIR
- X return lk_fopen(filename, mode, NULL, NULL, 0);
- X#else /* !LCKDFLDIR */
- X
- X#ifdef DOT_LOCK
- X if (dot_lock(filename) == 0)
- X#endif /* DOT_LOCK */
- X mail_fp = mask_fopen(filename, mode);
- X if (!mail_fp)
- X return NULL_FILE;
- X fd = fileno(mail_fp);
- X
- X if (mode[0] != 'r' || mode[1] == '+')
- X lk = LOCK_EX | LOCK_NB;
- X else
- X lk = LOCK_SH | LOCK_NB;
- X
- X on_intr();
- X while (isoff(glob_flags, WAS_INTR) && flock(fd, lk)) {
- X if (errno == EWOULDBLOCK) {
- X if (isoff(glob_flags, REDIRECT))
- X if (!cnt++)
- X print("\nwaiting to lock");
- X else
- X print(".");
- X } else {
- X error("Unable to lock \"%s\"", filename);
- X (void) fclose(mail_fp);
- X off_intr();
- X return NULL_FILE;
- X }
- X (void) fflush(stdout);
- X sleep(1);
- X }
- X if (cnt)
- X print("\n");
- X cnt = (ison(glob_flags, WAS_INTR) != 0);
- X off_intr();
- X if (cnt) {
- X (void) fclose(mail_fp);
- X return NULL_FILE;
- X }
- X return mail_fp;
- X#endif /* LCKDFLDIR */
- X}
- X
- X/*ARGSUSED*/
- Xclose_lock(filename, fp)
- Xchar *filename;
- XFILE *fp;
- X#ifdef LCKDFLDIR
- X{
- X return lk_fclose(fp, filename, NULL, NULL);
- X}
- X#else /* !LCKDFLDIR */
- X{
- X#ifdef DOT_LOCK
- X char buf[MAXPATHLEN];
- X#endif /* DOT_LOCK */
- X
- X fflush(fp);
- X#ifdef DOT_LOCK
- X#ifdef BSD
- X setregid(rgid, sgid);
- X#else
- X setgid(sgid);
- X#endif /* BSD */
- X#ifdef SYSV
- X if (strcmp(spoolfile, filename) == 0)
- X#endif /* SYSV */
- X#ifdef M_XENIX
- X (void) unlink(sprintf(buf, "/tmp/%.10s.mlk", login));
- X#else /* M_XENIX */
- X (void) unlink(sprintf(buf, "%s.lock", filename));
- X#endif /* M_XENIX */
- X#ifdef BSD
- X setregid(sgid, rgid);
- X#else
- X setgid(getgid());
- X#endif /* BSD */
- X#endif /* DOT_LOCK */
- X
- X (void) flock(fileno(fp), LOCK_UN);
- X return fclose(fp);
- X}
- X#endif /* LCKDFLDIR */
- END_OF_FILE
- if test 4593 -ne `wc -c <'mush/lock.c'`; then
- echo shar: \"'mush/lock.c'\" unpacked with wrong size!
- fi
- # end of 'mush/lock.c'
- fi
- if test -f 'mush/mail.icon.1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/mail.icon.1'\"
- else
- echo shar: Extracting \"'mush/mail.icon.1'\" \(1933 characters\)
- sed "s/^X//" >'mush/mail.icon.1' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x1FFF,0xFFFF,0xFE01,
- X 0x8000,0xFE00,0x0000,0x0181,0x8007,0x01C0,0x0000,0x0061,
- X 0x8018,0x0030,0x0000,0x0011,0x8020,0x7008,0x0000,0x0011,
- X 0x80C1,0xFC06,0x0000,0x0009,0x8101,0xFC01,0x0000,0x0009,
- X 0x8103,0xFE01,0x0000,0x0005,0x8203,0xFE00,0x8000,0x0005,
- X 0x8403,0xFE00,0x4000,0x0005,0x8401,0xFC00,0x4000,0x0005,
- X 0x8801,0xFC00,0x2000,0x0005,0x8800,0x7000,0x2000,0x0005,
- X 0x8800,0x0000,0x3000,0x0005,0x9000,0x0000,0x1000,0x0005,
- X 0x9000,0x0000,0x1000,0x0005,0x93FF,0xFFFF,0x9000,0x0025,
- X 0xA200,0x0000,0x9000,0x00E5,0xA200,0x0000,0x9000,0x03A5,
- X 0xA200,0x0000,0x9000,0x0625,0xA3FF,0xFFFF,0x9000,0x1C25,
- X 0xA000,0x0000,0x1000,0x3425,0xA000,0x0000,0x1000,0xC425,
- X 0xA000,0x0000,0x1003,0x8425,0xA000,0x0000,0x1006,0x0425,
- X 0xA000,0x0000,0x101C,0x0425,0xA000,0x0000,0x11F0,0x0425,
- X 0xA000,0x0000,0x13E0,0x0445,0xA000,0x0000,0x13E0,0x0585,
- X 0xA000,0x0000,0x13E0,0x0605,0xA000,0x0000,0x11C0,0x0405,
- X 0xA000,0x0000,0x1000,0x000D,0xA000,0x0000,0x1000,0x0011,
- X 0xA000,0x0000,0x1000,0x0021,0xA000,0x0000,0x1000,0x00C1,
- X 0xA000,0x0000,0x1000,0x0101,0xA000,0x0000,0x1000,0x0601,
- X 0xA000,0x0000,0x1000,0x0801,0xA000,0x0000,0x1000,0x3801,
- X 0xA000,0x0000,0x1000,0x4801,0xA000,0x0000,0x1000,0x8801,
- X 0xA000,0x0000,0x1003,0x0801,0xA000,0x0000,0x1004,0x0801,
- X 0xA000,0x0000,0x101C,0x0801,0xA000,0x0000,0x1024,0x0801,
- X 0xA000,0x0000,0x1044,0x0801,0xA000,0x0000,0x1184,0x0801,
- X 0xA000,0x0000,0x1204,0x0801,0xA000,0x0000,0x1404,0x0801,
- X 0xBFFF,0xFFFF,0xF804,0x0801,0x8000,0x0000,0x0004,0x0801,
- X 0x8000,0x0000,0x0004,0x0801,0x8000,0x0000,0x0004,0x0801,
- X 0x8000,0x0000,0x0004,0x0801,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- END_OF_FILE
- if test 1933 -ne `wc -c <'mush/mail.icon.1'`; then
- echo shar: \"'mush/mail.icon.1'\" unpacked with wrong size!
- fi
- # end of 'mush/mail.icon.1'
- fi
- if test -f 'mush/mail.icon.2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/mail.icon.2'\"
- else
- echo shar: Extracting \"'mush/mail.icon.2'\" \(1933 characters\)
- sed "s/^X//" >'mush/mail.icon.2' <<'END_OF_FILE'
- X/* Format_version=1, Width=64, Height=64, Depth=1, Valid_bits_per_item=16
- X */
- X 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0x8000,0x0000,0x0000,0x0001,
- X 0x8000,0x0000,0x0000,0x0001,0x8000,0x0000,0x00E0,0x0001,
- X 0x8000,0x0000,0x00DE,0x0001,0x8000,0x0000,0x00C1,0xE001,
- X 0x8000,0x0000,0x00C0,0x1801,0x8000,0x0000,0x00C0,0x0801,
- X 0x8000,0x0000,0x00C0,0x0801,0x8000,0x1FFF,0xFFC0,0x0E01,
- X 0x8000,0xFE00,0x00C0,0x0981,0x8007,0x01C0,0x00C0,0x0861,
- X 0x8018,0x0030,0x00C0,0x0811,0x8020,0x7008,0x00C0,0x0811,
- X 0x80C1,0xFC06,0x00C0,0x1809,0x8101,0xBC01,0x00C0,0x6009,
- X 0x8103,0x1E01,0x00C1,0x8005,0x8202,0x0E00,0x80C6,0x0005,
- X 0x8404,0x0400,0x40D8,0x0005,0x8408,0x0200,0x40E0,0x0005,
- X 0x8810,0x0100,0x20C0,0x0005,0x8820,0x6080,0x20C0,0x0005,
- X 0x8840,0x4040,0x30C0,0x0005,0x9081,0x3020,0x10C0,0x0005,
- X 0x9041,0x9C10,0x10C0,0x0005,0x93E0,0x8A0F,0x90C0,0x0005,
- X 0xA210,0x6404,0x90C0,0x0005,0xA208,0x3002,0x90C0,0x0005,
- X 0xA204,0x1401,0x90C0,0x0005,0xA3FF,0xFFFF,0x90C0,0x0005,
- X 0xA000,0x0000,0x10C0,0x0005,0xA000,0x0000,0x10C0,0x0005,
- X 0xA000,0x0000,0x10C0,0x0005,0xA000,0x0000,0x10C0,0x0005,
- X 0xA000,0x0000,0x10C0,0x0005,0xA000,0x0000,0x11C0,0x0005,
- X 0xA000,0x0000,0x13E0,0x0005,0xA000,0x0000,0x13E0,0x0005,
- X 0xA000,0x0000,0x13E0,0x0005,0xA000,0x0000,0x11C0,0x0005,
- X 0xA000,0x0000,0x1000,0x000D,0xA000,0x0000,0x1000,0x0011,
- X 0xA000,0x0000,0x1000,0x0021,0xA000,0x0000,0x1000,0x00C1,
- X 0xA000,0x0000,0x1000,0x0101,0xA000,0x0000,0x1000,0x0601,
- X 0xA000,0x0000,0x1000,0x0801,0xA000,0x0000,0x1000,0x3001,
- X 0xA000,0x0000,0x1000,0x4001,0xA000,0x0000,0x1000,0x8001,
- X 0xA000,0x0000,0x1003,0x8001,0xA000,0x0000,0x1004,0x8001,
- X 0xA000,0x0000,0x1018,0x8001,0xA000,0x0000,0x1020,0x8001,
- X 0xA000,0x0000,0x1060,0x8001,0xA000,0x0000,0x1180,0x8001,
- X 0xA000,0x0000,0x1280,0x8001,0xA000,0x0000,0x1480,0x8001,
- X 0xBFFF,0xFFFF,0xFC80,0x8001,0x8000,0x0000,0x0080,0x8001,
- X 0x8000,0x0000,0x0080,0x8001,0x8000,0x0000,0x0080,0x8001,
- X 0x8000,0x0000,0x0080,0x8001,0xFFFF,0xFFFF,0xFFFF,0xFFFF
- END_OF_FILE
- if test 1933 -ne `wc -c <'mush/mail.icon.2'`; then
- echo shar: \"'mush/mail.icon.2'\" unpacked with wrong size!
- fi
- # end of 'mush/mail.icon.2'
- fi
- if test -f 'mush/makefile.hpux' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/makefile.hpux'\"
- else
- echo shar: Extracting \"'mush/makefile.hpux'\" \(1687 characters\)
- sed "s/^X//" >'mush/makefile.hpux' <<'END_OF_FILE'
- X# Mush makefile for HP/UX.
- X#
- XHDRS1= mush.h config.h
- XHDRS2= strings.h options.h
- XHDRS3= bindings.h glob.h
- XHDRS4= version.h
- XSRCS1= commands.c dates.c execute.c expr.c folders.c \
- X hdrs.c init.c loop.c mail.c main.c misc.c msgs.c pick.c \
- X print.c setopts.c signals.c sort.c viewopts.c options.c lock.c
- XSRCS2= bind.c curs_io.c curses.c file.c strings.c macros.c \
- X addrs.c malloc.c glob.c
- X
- XOBJS1= commands.o dates.o execute.o expr.o folders.o \
- X hdrs.o init.o loop.o mail.o main.o misc.o msgs.o pick.o \
- X print.o setopts.o signals.o sort.o viewopts.o options.o lock.o
- XOBJS2= bind.o curs_io.o curses.o file.o strings.o macros.o \
- X addrs.o malloc.o glob.o
- X
- XHELP_FILES= README README-7.0 README-7.1 mush.1 cmd_help \
- X Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
- X
- X# If your HP-UX version is older than 6.5, you will need remove -DDIRECTORY
- X
- XHPFLAGS= -DHPUX -DSELECT -DDIRECTORY
- XCFLAGS= -O -DSYSV -DUSG -DCURSES -DREGCMP -DSIGRET=void $(HPFLAGS)
- XLDFLAGS=
- XLIBS= -lcurses -lPW -lmalloc
- XOTHERLIBS=
- X# Use some variant of this one if you #define MMDF in config.h
- X#OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
- XPROG= mush
- X
- X$(PROG): $(OBJS1) $(OBJS2)
- X @echo loading...
- X @$(CC) $(LDFLAGS) $(OBJS1) $(OBJS2) -o $(PROG) $(LIBS) $(OTHERLIBS)
- X
- X$(OBJS1): $(HDRS1) $(HDRS2)
- X$(OBJS2): $(HDRS1) $(HDRS2) $(HDRS3)
- Xloop.o: version.h
- X
- XBINDIR= /usr/local/bin
- XLIBDIR= /usr/local/lib
- XMRCDIR= /usr/lib
- XMANDIR= /usr/local/man/man1
- XMANEXT= 1
- X
- Xinstall: mush
- X cp mush $(BINDIR)
- X strip $(BINDIR)/mush
- X chmod 0755 $(BINDIR)/mush
- X cp mush.1 $(MANDIR)/mush.$(MANEXT)
- X chmod 0644 $(MANDIR)/mush.$(MANEXT)
- X cp cmd_help $(LIBDIR)
- X chmod 0644 $(LIBDIR)/cmd_help
- X cp Mushrc $(MRCDIR)/Mushrc
- X chmod 0644 $(MRCDIR)/Mushrc
- END_OF_FILE
- if test 1687 -ne `wc -c <'mush/makefile.hpux'`; then
- echo shar: \"'mush/makefile.hpux'\" unpacked with wrong size!
- fi
- # end of 'mush/makefile.hpux'
- fi
- if test -f 'mush/makefile.sys.v' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mush/makefile.sys.v'\"
- else
- echo shar: Extracting \"'mush/makefile.sys.v'\" \(1899 characters\)
- sed "s/^X//" >'mush/makefile.sys.v' <<'END_OF_FILE'
- X# Mush makefile for system V. Note: SIGRET should return void for normal
- X# sys-v, but Att PC users should *not* have it defined. See the README!!
- X#
- XHDRS1= mush.h config.h
- XHDRS2= strings.h options.h
- XHDRS3= bindings.h glob.h
- XHDRS4= version.h
- XSRCS1= commands.c dates.c execute.c expr.c folders.c \
- X hdrs.c init.c loop.c mail.c main.c misc.c msgs.c pick.c \
- X print.c setopts.c signals.c sort.c viewopts.c options.c lock.c
- XSRCS2= bind.c curs_io.c curses.c file.c strings.c macros.c \
- X addrs.c malloc.c glob.c
- X
- XOBJS1= commands.o dates.o execute.o expr.o folders.o \
- X hdrs.o init.o loop.o mail.o main.o misc.o msgs.o pick.o \
- X print.o setopts.o signals.o sort.o viewopts.o options.o lock.o
- XOBJS2= bind.o curs_io.o curses.o file.o strings.o macros.o \
- X addrs.o malloc.o glob.o
- X
- XHELP= README README-7.0 README-7.1 mush.1 cmd_help \
- X Mushrc Mailrc Gnurc sample.mushrc advanced.mushrc digestify
- X
- X# Sun OS systems who wish to compile with sys-v options:
- X# CC= /usr/5bin/cc
- X# CFLAGS= -O -DSYSV -DCURSES -DUSG -DDIRECTORY
- X# LIBS= -L/usr/5lib -lcurses
- X
- X# IRIX 3.2 systems (SGI Iris workstations) should add -DDIRECTORY to CFLAGS
- X
- XCFLAGS= -O -DSYSV -DUSG -DCURSES -DREGCMP -DSIGRET=void
- XLDFLAGS=
- XLIBS= -lcurses -lPW
- XOTHERLIBS=
- X# Use some variant of this one if you #define MMDF in config.h
- X#OTHERLIBS=/usr/src/mmdf/lib/libmmdf.a
- XPROG= mush
- X
- X$(PROG): $(OBJS1) $(OBJS2)
- X @echo loading...
- X @$(CC) $(LDFLAGS) $(OBJS1) $(OBJS2) -o $(PROG) $(LIBS) $(OTHERLIBS)
- X
- X$(OBJS1): $(HDRS1) $(HDRS2)
- X$(OBJS2): $(HDRS1) $(HDRS2) $(HDRS3)
- Xloop.o: version.h
- X
- XBINDIR= /usr/local/bin
- XLIBDIR= /usr/local/lib
- XMRCDIR= /usr/lib
- XMANDIR= /usr/local/man/man1
- XMANEXT= 1
- X
- Xinstall: mush
- X cp mush $(BINDIR)
- X strip $(BINDIR)/mush
- X chmod 0755 $(BINDIR)/mush
- X cp mush.1 $(MANDIR)/mush.$(MANEXT)
- X chmod 0644 $(MANDIR)/mush.$(MANEXT)
- X cp cmd_help $(LIBDIR)
- X chmod 0644 $(LIBDIR)/cmd_help
- X cp Mushrc $(MRCDIR)/Mushrc
- X chmod 0644 $(MRCDIR)/Mushrc
- END_OF_FILE
- if test 1899 -ne `wc -c <'mush/makefile.sys.v'`; then
- echo shar: \"'mush/makefile.sys.v'\" unpacked with wrong size!
- fi
- # end of 'mush/makefile.sys.v'
- fi
- echo shar: End of archive 19 \(of 19\).
- cp /dev/null ark19isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 19 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
-
-