home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-03-03 | 58.7 KB | 1,558 lines |
- Newsgroups: comp.sources.misc
- From: markd@werple.apana.org.au (Mark Delany)
- Subject: v35i117: ipick - an interactive filter to pick lines, Part01/05
- Message-ID: <csm-v35i117=ipick.132123@sparky.IMD.Sterling.COM>
- X-Md4-Signature: 074f52d8938b546f66e2119c52af909c
- Date: Thu, 4 Mar 1993 19:21:59 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: markd@werple.apana.org.au (Mark Delany)
- Posting-number: Volume 35, Issue 117
- Archive-name: ipick/part01
- Environment: UNIX, Curses
-
- ipick is a curses based filter to "Interactively PICK" lines from
- stdin to create a subset written to stdout. There are many commands to
- select, unselect, scroll, navigate and search through the data. There
- is a default set key bindings which provide a reasonable subset from
- emacs, more and vi (this prog is ecumenical). Additionally you can
- create your own bindings.
-
- The only goal of ipick is to be a general purpose, easy to use,
- interactive filter. Importantly, ipick has been designed so that you
- can safely use it as the interactive component of all those neat
- pipelines you'd *like* to give to your unix-naive users.
- --------
- #! /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.
- # Contents: ipick ipick/README ipick/Artistic ipick/COPYING
- # ipick/INSTALL ipick/MANIFEST ipick/PORTING ipick/Makefile
- # ipick/main.mk ipick/config ipick/language ipick/examples
- # ipick/HISTORY ipick/TODO ipick/config.h ipick/patchlevel.h
- # ipick/config/3b1 ipick/config/aux ipick/config/bsd386
- # ipick/config/bsd43
- # Wrapped by markd@bushwire on Sun Feb 28 10:06:37 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 1 (of 5)."'
- if test ! -d 'ipick' ; then
- echo shar: Creating directory \"'ipick'\"
- mkdir 'ipick'
- fi
- if test -f 'ipick/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/README'\"
- else
- echo shar: Extracting \"'ipick/README'\" \(7386 characters\)
- sed "s/^X//" >'ipick/README' <<'END_OF_FILE'
- X Ipick Kit, Version 1.1
- X
- X Copyright (c) 1992, 1993 by Mark Delany
- X All rights reserved.
- X
- X This program is free software; you can redistribute it and/or
- X modify it under the terms of either:
- X
- X a) the GNU General Public License as published by the Free
- X Software Foundation; either version 2, or (at your option) any
- X later version, or
- X
- X b) the "Artistic License" which comes with this Kit.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
- X the GNU General Public License or the Artistic License for more
- X details.
- X
- X You should have received a copy of the Artistic License with this
- X Kit, in the file named "Artistic". If not, I'll be glad to provide
- X one.
- X
- X You should also have received a copy of the GNU General Public
- X License with this kit, in the file named "COPYING". If not, write
- X to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
- X 02139, USA.
- X
- X
- X
- XIntroduction
- X============
- X
- XThis file contains:
- X
- X o a brief description of ipick (there is a manpage)
- X o what's new in this release
- X o acknowledgements
- X
- XSee INSTALL for details on how to make and install ipick.
- X
- XSee PORTING for details on what to do if your machine isn't supported.
- X
- X
- XWhat is ipick?
- X==============
- X
- Xipick is a curses based filter to "Interactively PICK" lines from
- Xstdin to create a subset written to stdout. There are many commands to
- Xselect, unselect, scroll, navigate and search through the data. There
- Xis a default set key bindings which provide a reasonable subset from
- Xemacs, more and vi (this prog is ecumenical). Additionally you can
- Xcreate your own bindings.
- X
- XThe only goal of ipick is to be a general purpose, easy to use,
- Xinteractive filter. Importantly, ipick has been designed so that you
- Xcan safely use it as the interactive component of all those neat
- Xpipelines you'd *like* to give to your unix-naive users.
- X
- X [By way of comparison to ni, ipick has many more bells and
- X whistles including: multiple line selections, online help,
- X searching, titles extracted from the upstream commands, Xterm
- X mouse support, shelling and piping, restricted mode,
- X configurable bindings, etc. Additionally, ipick does not
- X require temporary files. However, ipick relies on a
- X downstream filter to parse the output while ni provides some
- X built-in filtering.]
- X
- XThe idea is that oftentimes it is a non-trivial process to accurately
- Xfilter stdin with grep/awk/perl/whatever. I stress the accuracy part
- Xas getting a filter *almost* perfect is easy, getting it perfect is
- Xnot. With ipick you can construct simple filters that do most of the
- Xwork for you and use the interactive component (that's you :-) to
- Xcomplete or confirm the process.
- X
- X
- XThink about how you typically build a pipeline for the following
- Xrequests:
- X
- X1. ``Kill my awk process, it's hung my terminal.''
- X2. ``Remove my print job, I've run the wrong report.''
- X3. ``Extract a subset of files from a tar file.''
- X
- Xipick is ideal in these situations as it let's you build a pipeline
- Xthat achieves the desired result interactively in a single, simple
- Xeasy-to-use operation.
- X
- XIn general, ipick is good glue whenever you use "Identifier Driven
- XCommand Pairs".
- X
- XWhat are "Identifier Driven Command Pairs"?
- X
- XThey are complementary commands where one command generates a listing
- Xof unique identifer entries and the second command acts on those
- Xidentied entries. Examples?
- X
- Xps/kill, lpq/lprm, atq/atrm, tar t/tar x, ipcs/ipcrm, ls/rm, ls/vi, etc.
- X
- X
- XTypically ipick is used as part of a predefined pipeline (alias or
- Xfunction depending on your shell). One example that I use a lot is:
- X
- XExample: 1
- X
- Xkill -9 `ps|ipick -T1|awk '{ print $1 }'`
- X
- XThis provides a screen display of the ps output from which the user
- Xselects the specific lines. The selected lines are passed to awk to
- Xselect just the pid from each line, which in turn is passed back to
- Xkill.
- X
- X
- XExample: 2
- X
- Xlpq | grep `whoami` | ipick -t"Pick Print jobs to remove" | \
- X awk '{ print $3 }' | xargs lprm
- X
- X
- XThis is the type of pipeline that you give to your users. It lists the
- Xprint jobs in the queue and lets them pick those to remove with lprm.
- X
- X
- XExample: 3
- X
- X tar t | ipick | xargs tar xv
- X
- XThis very useful example provides a list of files from the tar file
- Xfrom which a subset is selected to extract. (Note this example has a
- Xnumber of limitations in it's current form).
- X
- X
- XExample: 4
- X
- XThis is a more complete solution to Example 3 and it's pretty close to my
- Xfavourite function. If you have lots of .tar files that you need to extract
- Xbits from then this may become your favourite too (Just change /dev/rmt8 to
- Xyour systems default tape and "Bob's your uncle".)
- X
- Xtar tvf ${1:-/dev/rmt8} | sed -e 's./$..' |
- X ipick -t " Pick files to extract from ${1:-/dev/rmt8}" |
- X cut -c42- | xargs -i -t tar xvf ${1:-/dev/rmt8} {}
- X
- X
- XExample: 5
- X
- Xrm -ri `ls -la | tail +2l | ipick -t"Select files to delete" | cut -45-`
- X
- XThis pipeline lets you pick a set of files to remove with rm.
- X
- X
- XExample: 6
- X
- X cp `ls | ipick` /somewhere/or/other/.
- X
- XPick files to copy from the local directory to another location.
- X
- X
- XWhat's new at 1.1
- X=================
- X
- XThis is the second release of ipick (1.0 was a Beta release to
- Xalt.sources). New features at this release are:
- X
- X1) RC files.
- X
- X I finally succumbed. If present, ipick loads a system-wide .rc
- X file then a user-specific .rc file. All you can do at the
- X moment in these files is define key bindings and include files
- X that contain the same thing.
- X
- X
- X2) Bindings specific help.
- X
- X The online help now displays the actually keybindings active
- X rather than all possible.
- X
- X
- X3) Language support.
- X
- X All text messages are now located in a single source file so
- X new language files can be easily generated. All you have to do
- X is copy language/english to language/whatever and provide the
- X translation. Simple! Ahem, cough. Any translations greatfully
- X received!
- X
- X
- X4) Re-arrangement of some options (-v, -R, -V, -s)
- X
- X
- X5) Removal of special signal processing to abort long running
- X commands - it was a silly idea and painful to implement.
- X
- X
- X6) Title string can now have escape characters. Especially useful
- X should be \n and \t.
- X
- X
- X7) There were no bugs reported so I've introduced a few.
- X
- X
- X
- XAcknowledgements
- X================
- X
- XI am indebted to the following people for making ipick *much* better
- Xthan it originally was.
- X
- XFor completely re-vamping the manpage:
- X
- XDaviD W. Sanderson <dws@ssec.wisc.edu>
- X
- Xwith additional manpage improvements from:
- X
- XRich Salz <rsalz@osf.org>
- X
- XFor providing the german text messages:
- X
- XPeter Funk <pf@artcom0.north.de>
- X
- XFor permission to plagiarize his Artistic license and copyright intro:
- X
- XLarry Wall <lwall@netlabs.com>
- X
- X
- XFor providing suggestions and testing portability on their systems:
- X
- XDoug Acker <dla@se05.wg2.waii.com>
- XJohn Alsop <jalsop@seachg.com>
- XPhilip Copeland <p_copela@csd.bristol-poly.ac.uk>
- XJoseph M DeAngelo <wrkgrp!tardis!jmd@uunet.uu.net>
- XAndy Dougherty <doughera@lafcol.lafayette.edu>
- XAndrew Herbert <andrew@werple.apana.org.au>
- XKenneth Jacker <khj@cs.cs.appstate.edu>
- XDavid Raz <draz@ee.technion.ac.il>
- XRich Salz <rsalz@osf.org>
- XDaviD W. Sanderson <dws@ssec.wisc.edu>
- XJo Stockley <jo@88open.org>
- XPetri Wessman <petri@cerebus.inter.fi>
- X
- X
- XAuthor
- X======
- X
- XMark Delany <markd@werple.apana.org.au>
- X
- XMelbourne,
- XAustralia
- END_OF_FILE
- if test 7386 -ne `wc -c <'ipick/README'`; then
- echo shar: \"'ipick/README'\" unpacked with wrong size!
- fi
- # end of 'ipick/README'
- fi
- if test -f 'ipick/Artistic' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/Artistic'\"
- else
- echo shar: Extracting \"'ipick/Artistic'\" \(5182 characters\)
- sed "s/^X//" >'ipick/Artistic' <<'END_OF_FILE'
- X
- X
- X
- X
- X The "Artistic License"
- X
- X Preamble
- X
- XThe intent of this document is to state the conditions under which a
- XPackage may be copied, such that the Copyright Holder maintains some
- Xsemblance of artistic control over the development of the package,
- Xwhile giving the users of the package the right to use and distribute
- Xthe Package in a more-or-less customary fashion, plus the right to make
- Xreasonable modifications.
- X
- XDefinitions:
- X
- X "Package" refers to the collection of files distributed by the
- X Copyright Holder, and derivatives of that collection of files
- X created through textual modification.
- X
- X "Standard Version" refers to such a Package if it has not been
- X modified, or has been modified in accordance with the wishes
- X of the Copyright Holder.
- X
- X "Copyright Holder" is whoever is named in the copyright or
- X copyrights for the package.
- X
- X "You" is you, if you're thinking about copying or distributing
- X this Package.
- X
- X "Reasonable copying fee" is whatever you can justify on the
- X basis of media cost, duplication charges, time of people involved,
- X and so on. (You will not be required to justify it to the
- X Copyright Holder, but only to the computing community at large
- X as a market that must bear the fee.)
- X
- X "Freely Available" means that no fee is charged for the item
- X itself, though there may be fees involved in handling the item.
- X It also means that recipients of the item may redistribute it
- X under the same conditions they received it.
- X
- X1. You may make and give away verbatim copies of the source form of the
- XStandard Version of this Package without restriction, provided that you
- Xduplicate all of the original copyright notices and associated disclaimers.
- X
- X2. You may apply bug fixes, portability fixes and other modifications
- Xderived from the Public Domain or from the Copyright Holder. A Package
- Xmodified in such a way shall still be considered the Standard Version.
- X
- X3. You may otherwise modify your copy of this Package in any way, provided
- Xthat you insert a prominent notice in each changed file stating how and
- Xwhen you changed that file, and provided that you do at least ONE of the
- Xfollowing:
- X
- X a) place your modifications in the Public Domain or otherwise make them
- X Freely Available, such as by posting said modifications to Usenet or
- X an equivalent medium, or placing the modifications on a major archive
- X site such as uunet.uu.net, or by allowing the Copyright Holder to include
- X your modifications in the Standard Version of the Package.
- X
- X b) use the modified Package only within your corporation or organization.
- X
- X c) rename any non-standard executables so the names do not conflict
- X with standard executables, which must also be provided, and provide
- X a separate manual page for each non-standard executable that clearly
- X documents how it differs from the Standard Version.
- X
- X d) make other distribution arrangements with the Copyright Holder.
- X
- X4. You may distribute the programs of this Package in object code or
- Xexecutable form, provided that you do at least ONE of the following:
- X
- X a) distribute a Standard Version of the executables and library files,
- X together with instructions (in the manual page or equivalent) on where
- X to get the Standard Version.
- X
- X b) accompany the distribution with the machine-readable source of
- X the Package with your modifications.
- X
- X c) accompany any non-standard executables with their corresponding
- X Standard Version executables, giving the non-standard executables
- X non-standard names, and clearly documenting the differences in manual
- X pages (or equivalent), together with instructions on where to get
- X the Standard Version.
- X
- X d) make other distribution arrangements with the Copyright Holder.
- X
- X5. You may charge a reasonable copying fee for any distribution of this
- XPackage. You may charge any fee you choose for support of this Package.
- XYou may not charge a fee for this Package itself. However,
- Xyou may distribute this Package in aggregate with other (possibly
- Xcommercial) programs as part of a larger (possibly commercial) software
- Xdistribution provided that you do not advertise this Package as a
- Xproduct of your own.
- X
- X6. The scripts and library files supplied as input to or produced as
- Xoutput from the programs of this Package do not automatically fall
- Xunder the copyright of this Package, but belong to whomever generated
- Xthem, and may be sold commercially, and may be aggregated with this
- XPackage.
- X
- X7. C subroutines supplied by you and linked into this Package in order
- Xto emulate subroutines and variables of the language defined by this
- XPackage shall not be considered part of this Package, but are the
- Xequivalent of input as in Paragraph 6, provided these subroutines do
- Xnot change the language in any way that would cause it to fail the
- Xregression tests for the language.
- X
- X8. The name of the Copyright Holder may not be used to endorse or promote
- Xproducts derived from this software without specific prior written permission.
- X
- X9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
- XIMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- XWARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- X
- X The End
- END_OF_FILE
- if test 5182 -ne `wc -c <'ipick/Artistic'`; then
- echo shar: \"'ipick/Artistic'\" unpacked with wrong size!
- fi
- # end of 'ipick/Artistic'
- fi
- if test -f 'ipick/COPYING' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/COPYING'\"
- else
- echo shar: Extracting \"'ipick/COPYING'\" \(17982 characters\)
- sed "s/^X//" >'ipick/COPYING' <<'END_OF_FILE'
- X GNU GENERAL PUBLIC LICENSE
- X Version 2, June 1991
- X
- X Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- X 675 Mass Ave, Cambridge, MA 02139, USA
- X Everyone is permitted to copy and distribute verbatim copies
- X of this license document, but changing it is not allowed.
- X
- X Preamble
- X
- X The licenses for most software are designed to take away your
- Xfreedom to share and change it. By contrast, the GNU General Public
- XLicense is intended to guarantee your freedom to share and change free
- Xsoftware--to make sure the software is free for all its users. This
- XGeneral Public License applies to most of the Free Software
- XFoundation's software and to any other program whose authors commit to
- Xusing it. (Some other Free Software Foundation software is covered by
- Xthe GNU Library General Public License instead.) You can apply it to
- Xyour programs, too.
- X
- X When we speak of free software, we are referring to freedom, not
- Xprice. Our General Public Licenses are designed to make sure that you
- Xhave the freedom to distribute copies of free software (and charge for
- Xthis service if you wish), that you receive source code or can get it
- Xif you want it, that you can change the software or use pieces of it
- Xin new free programs; and that you know you can do these things.
- X
- X To protect your rights, we need to make restrictions that forbid
- Xanyone to deny you these rights or to ask you to surrender the rights.
- XThese restrictions translate to certain responsibilities for you if you
- Xdistribute copies of the software, or if you modify it.
- X
- X For example, if you distribute copies of such a program, whether
- Xgratis or for a fee, you must give the recipients all the rights that
- Xyou have. You must make sure that they, too, receive or can get the
- Xsource code. And you must show them these terms so they know their
- Xrights.
- X
- X We protect your rights with two steps: (1) copyright the software, and
- X(2) offer you this license which gives you legal permission to copy,
- Xdistribute and/or modify the software.
- X
- X Also, for each author's protection and ours, we want to make certain
- Xthat everyone understands that there is no warranty for this free
- Xsoftware. If the software is modified by someone else and passed on, we
- Xwant its recipients to know that what they have is not the original, so
- Xthat any problems introduced by others will not reflect on the original
- Xauthors' reputations.
- X
- X Finally, any free program is threatened constantly by software
- Xpatents. We wish to avoid the danger that redistributors of a free
- Xprogram will individually obtain patent licenses, in effect making the
- Xprogram proprietary. To prevent this, we have made it clear that any
- Xpatent must be licensed for everyone's free use or not licensed at all.
- X
- X The precise terms and conditions for copying, distribution and
- Xmodification follow.
- X
- X GNU GENERAL PUBLIC LICENSE
- X TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- X
- X 0. This License applies to any program or other work which contains
- Xa notice placed by the copyright holder saying it may be distributed
- Xunder the terms of this General Public License. The "Program", below,
- Xrefers to any such program or work, and a "work based on the Program"
- Xmeans either the Program or any derivative work under copyright law:
- Xthat is to say, a work containing the Program or a portion of it,
- Xeither verbatim or with modifications and/or translated into another
- Xlanguage. (Hereinafter, translation is included without limitation in
- Xthe term "modification".) Each licensee is addressed as "you".
- X
- XActivities other than copying, distribution and modification are not
- Xcovered by this License; they are outside its scope. The act of
- Xrunning the Program is not restricted, and the output from the Program
- Xis covered only if its contents constitute a work based on the
- XProgram (independent of having been made by running the Program).
- XWhether that is true depends on what the Program does.
- X
- X 1. You may copy and distribute verbatim copies of the Program's
- Xsource code as you receive it, in any medium, provided that you
- Xconspicuously and appropriately publish on each copy an appropriate
- Xcopyright notice and disclaimer of warranty; keep intact all the
- Xnotices that refer to this License and to the absence of any warranty;
- Xand give any other recipients of the Program a copy of this License
- Xalong with the Program.
- X
- XYou may charge a fee for the physical act of transferring a copy, and
- Xyou may at your option offer warranty protection in exchange for a fee.
- X
- X 2. You may modify your copy or copies of the Program or any portion
- Xof it, thus forming a work based on the Program, and copy and
- Xdistribute such modifications or work under the terms of Section 1
- Xabove, provided that you also meet all of these conditions:
- X
- X a) You must cause the modified files to carry prominent notices
- X stating that you changed the files and the date of any change.
- X
- X b) You must cause any work that you distribute or publish, that in
- X whole or in part contains or is derived from the Program or any
- X part thereof, to be licensed as a whole at no charge to all third
- X parties under the terms of this License.
- X
- X c) If the modified program normally reads commands interactively
- X when run, you must cause it, when started running for such
- X interactive use in the most ordinary way, to print or display an
- X announcement including an appropriate copyright notice and a
- X notice that there is no warranty (or else, saying that you provide
- X a warranty) and that users may redistribute the program under
- X these conditions, and telling the user how to view a copy of this
- X License. (Exception: if the Program itself is interactive but
- X does not normally print such an announcement, your work based on
- X the Program is not required to print an announcement.)
- X
- XThese requirements apply to the modified work as a whole. If
- Xidentifiable sections of that work are not derived from the Program,
- Xand can be reasonably considered independent and separate works in
- Xthemselves, then this License, and its terms, do not apply to those
- Xsections when you distribute them as separate works. But when you
- Xdistribute the same sections as part of a whole which is a work based
- Xon the Program, the distribution of the whole must be on the terms of
- Xthis License, whose permissions for other licensees extend to the
- Xentire whole, and thus to each and every part regardless of who wrote it.
- X
- XThus, it is not the intent of this section to claim rights or contest
- Xyour rights to work written entirely by you; rather, the intent is to
- Xexercise the right to control the distribution of derivative or
- Xcollective works based on the Program.
- X
- XIn addition, mere aggregation of another work not based on the Program
- Xwith the Program (or with a work based on the Program) on a volume of
- Xa storage or distribution medium does not bring the other work under
- Xthe scope of this License.
- X
- X 3. You may copy and distribute the Program (or a work based on it,
- Xunder Section 2) in object code or executable form under the terms of
- XSections 1 and 2 above provided that you also do one of the following:
- X
- X a) Accompany it with the complete corresponding machine-readable
- X source code, which must be distributed under the terms of Sections
- X 1 and 2 above on a medium customarily used for software interchange; or,
- X
- X b) Accompany it with a written offer, valid for at least three
- X years, to give any third party, for a charge no more than your
- X cost of physically performing source distribution, a complete
- X machine-readable copy of the corresponding source code, to be
- X distributed under the terms of Sections 1 and 2 above on a medium
- X customarily used for software interchange; or,
- X
- X c) Accompany it with the information you received as to the offer
- X to distribute corresponding source code. (This alternative is
- X allowed only for noncommercial distribution and only if you
- X received the program in object code or executable form with such
- X an offer, in accord with Subsection b above.)
- X
- XThe source code for a work means the preferred form of the work for
- Xmaking modifications to it. For an executable work, complete source
- Xcode means all the source code for all modules it contains, plus any
- Xassociated interface definition files, plus the scripts used to
- Xcontrol compilation and installation of the executable. However, as a
- Xspecial exception, the source code distributed need not include
- Xanything that is normally distributed (in either source or binary
- Xform) with the major components (compiler, kernel, and so on) of the
- Xoperating system on which the executable runs, unless that component
- Xitself accompanies the executable.
- X
- XIf distribution of executable or object code is made by offering
- Xaccess to copy from a designated place, then offering equivalent
- Xaccess to copy the source code from the same place counts as
- Xdistribution of the source code, even though third parties are not
- Xcompelled to copy the source along with the object code.
- X
- X 4. You may not copy, modify, sublicense, or distribute the Program
- Xexcept as expressly provided under this License. Any attempt
- Xotherwise to copy, modify, sublicense or distribute the Program is
- Xvoid, and will automatically terminate your rights under this License.
- XHowever, parties who have received copies, or rights, from you under
- Xthis License will not have their licenses terminated so long as such
- Xparties remain in full compliance.
- X
- X 5. You are not required to accept this License, since you have not
- Xsigned it. However, nothing else grants you permission to modify or
- Xdistribute the Program or its derivative works. These actions are
- Xprohibited by law if you do not accept this License. Therefore, by
- Xmodifying or distributing the Program (or any work based on the
- XProgram), you indicate your acceptance of this License to do so, and
- Xall its terms and conditions for copying, distributing or modifying
- Xthe Program or works based on it.
- X
- X 6. Each time you redistribute the Program (or any work based on the
- XProgram), the recipient automatically receives a license from the
- Xoriginal licensor to copy, distribute or modify the Program subject to
- Xthese terms and conditions. You may not impose any further
- Xrestrictions on the recipients' exercise of the rights granted herein.
- XYou are not responsible for enforcing compliance by third parties to
- Xthis License.
- X
- X 7. If, as a consequence of a court judgment or allegation of patent
- Xinfringement or for any other reason (not limited to patent issues),
- Xconditions are imposed on you (whether by court order, agreement or
- Xotherwise) that contradict the conditions of this License, they do not
- Xexcuse you from the conditions of this License. If you cannot
- Xdistribute so as to satisfy simultaneously your obligations under this
- XLicense and any other pertinent obligations, then as a consequence you
- Xmay not distribute the Program at all. For example, if a patent
- Xlicense would not permit royalty-free redistribution of the Program by
- Xall those who receive copies directly or indirectly through you, then
- Xthe only way you could satisfy both it and this License would be to
- Xrefrain entirely from distribution of the Program.
- X
- XIf any portion of this section is held invalid or unenforceable under
- Xany particular circumstance, the balance of the section is intended to
- Xapply and the section as a whole is intended to apply in other
- Xcircumstances.
- X
- XIt is not the purpose of this section to induce you to infringe any
- Xpatents or other property right claims or to contest validity of any
- Xsuch claims; this section has the sole purpose of protecting the
- Xintegrity of the free software distribution system, which is
- Ximplemented by public license practices. Many people have made
- Xgenerous contributions to the wide range of software distributed
- Xthrough that system in reliance on consistent application of that
- Xsystem; it is up to the author/donor to decide if he or she is willing
- Xto distribute software through any other system and a licensee cannot
- Ximpose that choice.
- X
- XThis section is intended to make thoroughly clear what is believed to
- Xbe a consequence of the rest of this License.
- X
- X 8. If the distribution and/or use of the Program is restricted in
- Xcertain countries either by patents or by copyrighted interfaces, the
- Xoriginal copyright holder who places the Program under this License
- Xmay add an explicit geographical distribution limitation excluding
- Xthose countries, so that distribution is permitted only in or among
- Xcountries not thus excluded. In such case, this License incorporates
- Xthe limitation as if written in the body of this License.
- X
- X 9. The Free Software Foundation may publish revised and/or new versions
- Xof the General Public License from time to time. Such new versions will
- Xbe similar in spirit to the present version, but may differ in detail to
- Xaddress new problems or concerns.
- X
- XEach version is given a distinguishing version number. If the Program
- Xspecifies a version number of this License which applies to it and "any
- Xlater version", you have the option of following the terms and conditions
- Xeither of that version or of any later version published by the Free
- XSoftware Foundation. If the Program does not specify a version number of
- Xthis License, you may choose any version ever published by the Free Software
- XFoundation.
- X
- X 10. If you wish to incorporate parts of the Program into other free
- Xprograms whose distribution conditions are different, write to the author
- Xto ask for permission. For software which is copyrighted by the Free
- XSoftware Foundation, write to the Free Software Foundation; we sometimes
- Xmake exceptions for this. Our decision will be guided by the two goals
- Xof preserving the free status of all derivatives of our free software and
- Xof promoting the sharing and reuse of software generally.
- X
- X NO WARRANTY
- X
- X 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
- XFOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
- XOTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
- XPROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
- XOR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- XMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
- XTO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
- XPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
- XREPAIR OR CORRECTION.
- X
- X 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
- XWILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
- XREDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
- XINCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
- XOUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
- XTO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
- XYOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
- XPROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
- XPOSSIBILITY OF SUCH DAMAGES.
- X
- X END OF TERMS AND CONDITIONS
- X
- X Appendix: How to Apply These Terms to Your New Programs
- X
- X If you develop a new program, and you want it to be of the greatest
- Xpossible use to the public, the best way to achieve this is to make it
- Xfree software which everyone can redistribute and change under these terms.
- X
- X To do so, attach the following notices to the program. It is safest
- Xto attach them to the start of each source file to most effectively
- Xconvey the exclusion of warranty; and each file should have at least
- Xthe "copyright" line and a pointer to where the full notice is found.
- X
- X <one line to give the program's name and a brief idea of what it does.>
- X Copyright (C) 19yy <name of author>
- X
- X This program is free software; you can redistribute it and/or modify
- X it under the terms of the GNU General Public License as published by
- X the Free Software Foundation; either version 2 of the License, or
- X (at your option) any later version.
- X
- X This program is distributed in the hope that it will be useful,
- X but WITHOUT ANY WARRANTY; without even the implied warranty of
- X MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- X GNU General Public License for more details.
- X
- X You should have received a copy of the GNU General Public License
- X along with this program; if not, write to the Free Software
- X Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- XAlso add information on how to contact you by electronic and paper mail.
- X
- XIf the program is interactive, make it output a short notice like this
- Xwhen it starts in an interactive mode:
- X
- X Gnomovision version 69, Copyright (C) 19yy name of author
- X Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- X This is free software, and you are welcome to redistribute it
- X under certain conditions; type `show c' for details.
- X
- XThe hypothetical commands `show w' and `show c' should show the appropriate
- Xparts of the General Public License. Of course, the commands you use may
- Xbe called something other than `show w' and `show c'; they could even be
- Xmouse-clicks or menu items--whatever suits your program.
- X
- XYou should also get your employer (if you work as a programmer) or your
- Xschool, if any, to sign a "copyright disclaimer" for the program, if
- Xnecessary. Here is a sample; alter the names:
- X
- X Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- X `Gnomovision' (which makes passes at compilers) written by James Hacker.
- X
- X <signature of Ty Coon>, 1 April 1989
- X Ty Coon, President of Vice
- X
- XThis General Public License does not permit incorporating your program into
- Xproprietary programs. If your program is a subroutine library, you may
- Xconsider it more useful to permit linking proprietary applications with the
- Xlibrary. If this is what you want to do, use the GNU Library General
- XPublic License instead of this License.
- END_OF_FILE
- if test 17982 -ne `wc -c <'ipick/COPYING'`; then
- echo shar: \"'ipick/COPYING'\" unpacked with wrong size!
- fi
- # end of 'ipick/COPYING'
- fi
- if test -f 'ipick/INSTALL' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/INSTALL'\"
- else
- echo shar: Extracting \"'ipick/INSTALL'\" \(2346 characters\)
- sed "s/^X//" >'ipick/INSTALL' <<'END_OF_FILE'
- X How to make and install ipick
- X =============================
- X
- X
- Xipick is known to work on:
- X
- X o AIX 3.1, 3.1.5 & 3.2
- X o AT&T 3b1 (7300 & UnixPC)
- X o AT&T Unix Sys V 3.1 (on a Prime EXL 325)
- X o A/UX 2.0.1
- X o BSD4.3
- X o DG/UX 5.4.1 (Aviion)
- X o Encore Multimax
- X o Gould PowerNode (in the AT&T universe)
- X o HP-UX 8.02
- X o Interactive 3.2.2 (ISC2.2)
- X o Linux 0.96c pl1 (gcc 2.2.2b)
- X o Motorola 88k systems: R32V3 (SVR3.2), R40V2 (SVR4)
- X o Mt/Xinu MORE/bsd
- X o NCR Tower V.3
- X o OSF/1, Version 1.0.4
- X o SCO Unix 3.2
- X o SCO Xenix 386
- X o SunOS 4.1, 4.1.2
- X o SVR4 (UHC 4.0 Version 2.0)
- X o ULTRIX 4.2
- X
- XIn other words, a reasonable cross-section of the genus "Unixen
- XVarietus". Consequently you should have few problems making ipick even
- Xif your system isn't listed above.
- X
- X
- XHow to make ipick
- X-----------------
- X
- XIf you are familiar with net sources, edit the Makefile and run "make
- Xinstall". ipick is configured for SunOS, english and /usr/local/bin out
- Xof the box.
- X
- XIf you are new to net sources, do the following:
- X
- X
- X1) Unshar
- X
- X
- X2) Nominate the appropriate config file in the Makefile.
- X
- X Select the appropriate file from the ./config directory that
- X matches your system. Often this will be either "vanilla" for
- X modern unixen or "svr3" for the more ancient varieties.
- X
- X If none of the existing config files work for you system, read
- X PORTING for information on how to create a unique config file
- X (it's relatively easy: copy config/TEMPLATE and edit).
- X
- X
- X3) Optionally modify the Makefile to:
- X
- X o change the location of the system default .rc file.
- X
- X o change the destination for the executable and manpage.
- X
- X o change the default language (english or german)
- X
- X
- X4) Run "make" or "make install"
- X
- X "make install" copies the executable and manpage.
- X
- X5) If ipick is used by non-technocrats, you may want to
- X ensure that your termcap/terminfo definition has the
- X relevant function keys defined (see the manpage for
- X those used).
- X
- X Additionally, you may want to create a system-wide .rc file
- X the name of which is defined at "make" time (defaults to
- X /usr/local/lib/ipickrc)
- X
- XApart from termcap/terminfo, ipick has no special run-time system
- Xrequirements and does not insist on any external files. However, ipick
- Xwill process both a system-wide .rc file and a user specific .rc file
- Xif present.
- X
- X======================================================================
- END_OF_FILE
- if test 2346 -ne `wc -c <'ipick/INSTALL'`; then
- echo shar: \"'ipick/INSTALL'\" unpacked with wrong size!
- fi
- # end of 'ipick/INSTALL'
- fi
- if test -f 'ipick/MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/MANIFEST'\"
- else
- echo shar: Extracting \"'ipick/MANIFEST'\" \(3341 characters\)
- sed "s/^X//" >'ipick/MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X----------------------------------------------------------
- Xipick 1 Parent directory
- Xipick/README 1 Introduction to ipick
- Xipick/Artistic 1 Alternative Copyright notice
- Xipick/COPYING 1 GNU Copyright notice
- Xipick/INSTALL 1 Instructions on how to install ipick
- Xipick/MANIFEST 1 This list of files
- Xipick/PORTING 1 Possible porting issues and suggestions
- Xipick/Makefile 1 Top level make file constructs xmakefile
- Xipick/main.mk 1 Basis for constructing xmakefile
- Xipick/config 1 Directory of system configs
- Xipick/language 1 Directory of language files
- Xipick/examples 1 Some shell functions to get you started
- Xipick/HISTORY 1 History of changes to ipick
- Xipick/TODO 1 Possible future directions
- Xipick/config.h 1 Include file which decodes ./config/$CONFIG
- Xipick/patchlevel.h 1 Current patchlevel of ipick
- Xipick/ipick.h 2 Common #include file
- Xipick/misc.c 2 Miscellaneous routines for ipick
- Xipick/command.c 2 Process each input command
- Xipick/curses.c 3 Handles all screen output
- Xipick/data.c 2 the main data structure of ipick (commands)
- Xipick/fileio.c 3 Handles all file/stream I/O
- Xipick/help.c 2 Online help module
- Xipick/keyboard.c 3 Handle all keyboard input and bindings
- Xipick/main.c 3 Startup and utility routines
- Xipick/rc.c 4 Read and decode the .rc files
- Xipick/port.c 2 Support routines for old unixen
- Xipick/ipickrc 3 Definition of builtin ipick bindings
- Xipick/ipick.1 4 Man page
- Xipick/config/TEMPLATE 4 Basis for making a new config file
- Xipick/config/3b1 1 AT&T 3b1 (7300 and UnixPC)
- Xipick/config/aux 1 A/UX 2.0.1
- Xipick/config/bsd386 1 BSD 386
- Xipick/config/bsd43 1 BSD 4.3
- Xipick/config/gould 2 Gould PowerNode UTX/32 - AT&T universe
- Xipick/config/hpux 3 HP-UX 8.02
- Xipick/config/interactive 3 Interactive 3.2.2 (ISC2.2) using cc
- Xipick/config/interactive-gcc 4 Interactive 3.2.2 (ISC2.2) using gcc
- Xipick/config/linux 4 Linux 0.96c pl1 with gcc 2.2.2b
- Xipick/config/mtxinu 4 Mt Xinu MORE/bsd
- Xipick/config/sunos4 4 SunOS using terminfo
- Xipick/config/sunos4-tcap 4 SunOS using termcap
- Xipick/config/svr3 4 Bog standard old Unix (AT&T SysV 3.1)
- Xipick/config/ultrix 4 ULTRIX 4.2 on a Decstation with cursesX.h
- Xipick/config/vanilla 4 Bog standard modern Unix (Ha!)
- Xipick/config/xenix386 4 SCO Xenix 386 using MSC
- Xipick/config/xenix386-gcc 4 SCO Xenix 386 using gcc
- Xipick/language/english 5 English version of run-time messages
- Xipick/language/german 5 German version of run-time messages
- Xipick/examples/README 4 Intro to the examples directory
- Xipick/examples/ikillps 4 Interactive kill using 'ps'
- Xipick/examples/ikillpt 4 Interactive kill using 'pt'
- Xipick/examples/ilprm 4 Interactive removal of lpd print jobs
- Xipick/examples/imenu 4 A simple interactive menu interface
- Xipick/examples/irm 4 Remove files interactively
- Xipick/examples/itarx 4 Interactively extraction of a tar file
- END_OF_FILE
- if test 3341 -ne `wc -c <'ipick/MANIFEST'`; then
- echo shar: \"'ipick/MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'ipick/MANIFEST'
- fi
- if test -f 'ipick/PORTING' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/PORTING'\"
- else
- echo shar: Extracting \"'ipick/PORTING'\" \(3493 characters\)
- sed "s/^X//" >'ipick/PORTING' <<'END_OF_FILE'
- XRead this file if you have to create a new config file for your
- Xsystem.
- X
- XWhen creating a system-unique config file, use ./config/TEMPLATE as a
- Xguide and then mail the working version to the author so that it can
- Xbe added to the next distribution. The ./config/TEMPLATE file has
- Xembedded instructions, which should be sufficient for the experienced
- Xnet.sources user. If you are not so experienced, then this file gives
- Xa little more background on what can be achieved with the config file.
- X
- X
- XThere are only three portability problems that the config file can
- Xsolve. These are:
- X
- X o a function that your library does not have
- X o an include file that's not present on your system
- X o SIGWINCH isn't supported by your OS
- X
- X[Actually, there are additionally two special cases: Your system used
- XXcurses.h instead of curses.h or your system has tigetstr()]
- X
- XAny other problem is unlikely to be solved by the config file, so in
- Xthese cases, let the author know - he is keen to fix such problems.
- X
- XRemember, if the make fails, try and fix it through the config file
- Xrather than the Makefile or the source.
- X
- X
- XPossible portability issues
- X===========================
- X
- XIpick is a simple program, it wants of little. The only thing it
- Xreally needs above and beyond the basics is a reasonable curses
- Xlibrary, and thus an underlying termcap or terminfo library. All other
- Xfunctionality is bound to be on most Unix systems.
- X
- XWell, I bet that's not entirely true. What follows is a list of what
- Xis possibly missing from *some* systems. In most cases a *sufficient*
- Xsubstitute exists in port.c which is activated via the appropriate
- Xsetting in the config file. In the extreme however, you may have to do
- Xsome work yourself.
- X
- X
- XMissing functions
- X-----------------
- X
- XIn many cases, if a function is missing from your library, a (barely)
- Xsufficient substitute can be found in port.c Always use the library
- Xfunctions in preference to those in port.c as the port.c versions are
- Xcrude and slow.
- X
- XThe config file controls which port.c routines to activate. Possible
- Xfunctions are: beep(), standout(), standend(), strdup(), strpbrk(),
- Xstrstr(), tgetstr() and newterm() (but see later discussion).
- X
- X
- X--
- X
- XThe one function that is not supplied in port.c that may be missing is
- Xgetopt(). Amazing but true, some suppliers still don't have this in
- Xtheir libraries! Solution 1: Complain to your supplier. Solution 2:
- XGet a clone version from your neighbourhood archive site.
- X
- X--
- X
- XAnother function that can cause problems is newterm()
- X
- XWhile there is a hack version in port.c that uses initscr(), it will
- Xtypically be insufficient for ipick's needs. Ipick calls newterm() to
- Xhandle SIGWINCH.
- X
- XThe problem is that initscr() can often not be called multiple times
- Xper program invocation - presumably because of some state it holds.
- X
- XThe only choice if you don't have newterm() but do have SIGWINCH and
- Xyour initscr() barfs on multiple calls is to disable the SIGWINCH
- Xhandling via the config file.
- X
- X
- XMissing include files
- X---------------------
- X
- XThis is one area where Unix really needs to get it's act together as
- Xthis is a pig's breakfast!
- X
- XAll includes are controlled by the config file, so once one module
- Xcompiles, all modules should.
- X
- XMany - but not all - of the include files are used solely to pull in
- Xprototypes, so in many cases you can turn off the include and rely on
- Xipick's definition and it will still work. A typical example of this
- Xis <stdlib.h> and getenv().
- X
- XThis is discussed in greater depth in ./config/TEMPLATE
- END_OF_FILE
- if test 3493 -ne `wc -c <'ipick/PORTING'`; then
- echo shar: \"'ipick/PORTING'\" unpacked with wrong size!
- fi
- # end of 'ipick/PORTING'
- fi
- if test -f 'ipick/Makefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/Makefile'\"
- else
- echo shar: Extracting \"'ipick/Makefile'\" \(1756 characters\)
- sed "s/^X//" >'ipick/Makefile' <<'END_OF_FILE'
- X#################################################
- X# Change the following to suit your needs #
- X#################################################
- X
- X# CONFIG defines the parameters file in the ./config directory. If
- X# you're lucky, your system will already have an appropriate file.
- X# Otherwise, have a look at config/TEMPLATE for ideas and when you get
- X# a working version for your system, please mail a copy back to the
- X# author so that others may benefit from your effort.
- X
- XCONFIG = sunos4
- X
- X
- X# Choose the language file in language/ Currently only english and
- X# german are present, but feel free to generate new ones :-)
- X
- XLANGUAGE = english
- X
- X
- X# Destination directories for the executable and man page.
- X
- XDESTDIR = /usr/local/bin
- XMANDIR = /usr/local/man/man1
- X
- X# Default system-wide .rc file for ipick You can comment this out if you
- X# don't want ipick to ever look for it (Saves an fopen() per invocation).
- X
- XSYSTEM_RCFILE = /usr/local/lib/ipickrc
- X
- X
- X#################################################
- X# DO NOT CHANGE ANYTHING AFTER THIS COMMENT #
- X#################################################
- X
- X
- XSHELL = /bin/sh
- X
- X# The idea is to construct the real makefile from ./config/$(CONFIG)
- X# and main.mk Why? To avoid using include in the makefile - sigh.
- X
- X
- XMAKEARGS = DESTDIR=$(DESTDIR) MANDIR=$(MANDIR) CONFIG=$(CONFIG) \
- X SYSTEM_RCFILE="$(SYSTEM_RCFILE)" LANGUAGE=$(LANGUAGE)
- X
- XMAKEACT = make -f xmakefile $@ $(MAKEARGS)
- X
- Xall: xmakefile; $(MAKEACT)
- Xinstall: xmakefile; $(MAKEACT)
- Xkit: xmakefile; $(MAKEACT)
- Xlint: xmakefile; $(MAKEACT)
- X
- X
- Xxmakefile: Makefile main.mk ./config/$(CONFIG)
- X @echo
- X @echo Constructing xmakefile with ./config/$(CONFIG)
- X cat ./config/$(CONFIG) main.mk >xmakefile
- X @echo
- X
- Xclean: xmakefile
- X make -f xmakefile clean
- X rm -f xmakefile
- END_OF_FILE
- if test 1756 -ne `wc -c <'ipick/Makefile'`; then
- echo shar: \"'ipick/Makefile'\" unpacked with wrong size!
- fi
- # end of 'ipick/Makefile'
- fi
- if test -f 'ipick/main.mk' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/main.mk'\"
- else
- echo shar: Extracting \"'ipick/main.mk'\" \(1632 characters\)
- sed "s/^X//" >'ipick/main.mk' <<'END_OF_FILE'
- X#################################################
- X# DO NOT EDIT THIS FILE #
- X#################################################
- X
- XSHELL = /bin/sh
- X
- XSRC = language.c command.c curses.c data.c fileio.c help.c \
- X keyboard.c main.c misc.c port.c rc.c
- X
- XOBJS = $(SRC:.c=.o)
- X
- XINCS = config.h ipick.h patchlevel.h
- X
- XCFLAGS = $(P_CFLAGS) $(P_NO_FLAGS) $(P_USE_FLAGS) $(P_INCLUDES) \
- X -DCONFIG='"$(CONFIG)"' -DLANGUAGE='"$(LANGUAGE)"' \
- X -DSYSTEM_RCFILE='"$(SYSTEM_RCFILE)"'
- X
- X# -DTESTING Turns on keyboard dump and exit
- X
- X# -DNO_DEFAULT_BINDINGS Is this ever useful? Only removes 1K bytes on a Sparc
- X
- XLDFLAGS = $(P_LDFLAGS) $(P_LIBS)
- X
- XLINTFLAGS = $(P_NO_FLAGS) $(P_USE_FLAGS) $(P_INCLUDES) \
- X -DCONFIG='"$(CONFIG)"' -DLANGUAGE='"$(LANGUAGE)"'
- X
- Xall: ipick
- X
- Xinstall: $(DESTDIR)/ipick $(MANDIR)/ipick.1
- X
- X$(DESTDIR)/ipick: ipick
- X cp $? $@
- X
- X
- X$(MANDIR)/ipick.1: ipick.1
- X cp $? $@
- X
- X
- Xipick: $(OBJS)
- X $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $@
- X
- X
- X$(OBJS): Makefile ipick.h xmakefile
- X
- Xipick.h: config.h patchlevel.h
- X
- Xkit:
- X rm -rf Part??
- X (cd ..; makekit -s60k -nipick/Part -iipick/MANIFEST -h2 -oipick/MANIFEST -p -t"Check Makefile then run 'make'")
- X
- X
- X# This lint is for SunOS 5bin lint. Of course the flags are bound to be
- X# different for your version of lint.
- X
- Xlint:
- X $(LINT) $(LINTFLAGS) $(SRC)
- X
- X
- X# language.c is copied rather than linked to avoid accidental modifications
- X
- Xlanguage.c: language/$(LANGUAGE) xmakefile
- X @echo
- X @echo Constructing language.c from language/$(LANGUAGE)
- X rm -f language.c language.o
- X cp language/$(LANGUAGE) language.c
- X @echo
- X
- Xclean:
- X rm -f $(OBJS) core a.out ipick
- X rm -f Part??
- X rm -f *.BAK
- X rm -f language.c language.o
- END_OF_FILE
- if test 1632 -ne `wc -c <'ipick/main.mk'`; then
- echo shar: \"'ipick/main.mk'\" unpacked with wrong size!
- fi
- # end of 'ipick/main.mk'
- fi
- if test ! -d 'ipick/config' ; then
- echo shar: Creating directory \"'ipick/config'\"
- mkdir 'ipick/config'
- fi
- if test ! -d 'ipick/language' ; then
- echo shar: Creating directory \"'ipick/language'\"
- mkdir 'ipick/language'
- fi
- if test ! -d 'ipick/examples' ; then
- echo shar: Creating directory \"'ipick/examples'\"
- mkdir 'ipick/examples'
- fi
- if test -f 'ipick/HISTORY' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/HISTORY'\"
- else
- echo shar: Extracting \"'ipick/HISTORY'\" \(2731 characters\)
- sed "s/^X//" >'ipick/HISTORY' <<'END_OF_FILE'
- X1.0 B1 6 Jul 92 Mailed to testers from alt.sources.d
- X
- X1.0 B2 8 Jul 92 Put in rudimentary xterm mouse support
- X Changed Makefile a bit (but left include in)
- X Fixed newterm, getenv, cursesX.h
- X
- X1.0 B3 22 Jul 92 Re-arranged Makefile and config directory
- X so include in Make is no longer needed.
- X nonl() added.
- X Fiddled with command.c to reduce code duplication.
- X Rearranged commands to have set ('s') and clear
- X ('c') rather than toggle. Also have 'visible'
- X and 'all' as line ranges.
- X Added pipe command (of current line).
- X Numerous minor changes suggested by testers.
- X DWS supplied a competent manpage.
- X Removed resetterm, et al.
- X Removed Meta commands.
- X Defined prototypes if #include is missing.
- X
- X1.0 G1 1 Aug 92 Simplified Makefile - again!
- X Fixed realloc() prototype.
- X Use DWS's latest man page
- X Cursor can now be positioned over relevant data
- X Search now searches within the line
- X Tab & Backtab commands added.
- X
- X----------------------------------------------------------------------
- X1.0 G1 2 Aug 92 Posted to alt.sources
- X----------------------------------------------------------------------
- X
- X1.0 G2 20 Aug 92 Moved all text messages to separate language
- X file so that different languages can be
- X defined. Initiated because Peter Funk
- X <pf@artcom0.north.de> sent a German version of
- X help.c
- X
- X Added the -i[nvert] based on a suggestion by
- X Peter Funk <pf@artcom0.north.de>
- X
- X1.1 B1 24 Aug 92 Started 1.1
- X Added .ipickrc and system-wide rc files
- X Online help now displays actual keybindings
- X Changed -v to -V and -i to -v to be consistent
- X with grep et al. -v now means invert the process
- X of selection while -V gives version etc.
- X
- X Removed -s option it was silly and painful.
- X Added -R disable raw mode as raw mode is now
- X the default. This is so that ^X^C and Meta
- X keys can work by default.
- X
- X A new command "abort" has been added with the
- X default binding of ^C.
- X
- X -a option now defaults min and max to 1 if -m
- X and -M are not present. Thus "ipick -a" now
- X means the same as "ipick -a -m1 -M1"
- X
- X Key binding order is now: internal, system,
- X .ipickrc newer bindings over-ride older ones.
- X
- X Title strings (-t only) are decoded the same
- X as keybindings, thus \n \t et al can usefully
- X be employed, but results are undefined if \e
- X etc are used as it depends on curses to ignore
- X them, which mine does, but do all?
- X
- X1.1 B2 1 Feb 93 Resumed 1.1
- X Added GNU Copyright as an alternative
- X Fixed bug in reverse search
- X Completed man page
- X
- X1.1 28 Feb 93 New manpage and german text for posting
- X Replaced my copyright with the Artistic
- X Licence from the perl package.
- X Create the examples directory with some
- X real working examples.
- END_OF_FILE
- if test 2731 -ne `wc -c <'ipick/HISTORY'`; then
- echo shar: \"'ipick/HISTORY'\" unpacked with wrong size!
- fi
- # end of 'ipick/HISTORY'
- fi
- if test -f 'ipick/TODO' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/TODO'\"
- else
- echo shar: Extracting \"'ipick/TODO'\" \(1073 characters\)
- sed "s/^X//" >'ipick/TODO' <<'END_OF_FILE'
- XBugs
- X----
- X
- XFeatures
- X--------
- X
- Xo Have a trailer section similar to the title lines
- X
- Xo Allow un-numbered blank lines - especially useful for
- X menu usage.
- X
- Xo Word commands as in \Eb \Ef?
- X
- Xo NN of YY+ glitch still not liked
- X
- Xo Maybe look at xmc to decide cookie gaps in Selection column.
- X
- Xo Consider marks and pop. But it's only useful for big files...
- X
- Xo If there is something on the net nicer than vendor specific
- X regexp (eg: regcmp or re_exec or compile) I'll use it. But
- X is an re search *really* useful?
- X
- Xo People are bound to ask for pre-set states or command line
- X commands such as +45, /pattern or some such. Perhaps,
- X ipick -c"g45 /fff"
- X
- Xo Probably should stop scroll-right '>' from scrolling when
- X there is no data to the right. But then what if they scroll
- X then page? Do the emacs trick of having a goal-column?
- X
- Xo Xterm is a cancer. I bet HILITE is on the agenda in the
- X not too distant future.
- X
- Xo Should the pipe command be given the line or all of the data?
- X Currently it's just the current line. Perhaps || for all of
- X the data and |* for all selected lines?
- END_OF_FILE
- if test 1073 -ne `wc -c <'ipick/TODO'`; then
- echo shar: \"'ipick/TODO'\" unpacked with wrong size!
- fi
- # end of 'ipick/TODO'
- fi
- if test -f 'ipick/config.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/config.h'\"
- else
- echo shar: Extracting \"'ipick/config.h'\" \(1409 characters\)
- sed "s/^X//" >'ipick/config.h' <<'END_OF_FILE'
- X/* $Id: config.h,v 1.1 1993/02/27 21:48:01 markd Exp $
- X *
- X * Decode the config definitions and pull in all necessary .h files
- X *
- X * Copyright (c) 1993, Mark Delany
- X *
- X * You may distribute under the terms of either the GNU General Public
- X * License or the Artistic License, as specified in the README file.
- X *
- X * $Log: config.h,v $
- X * Revision 1.1 1993/02/27 21:48:01 markd
- X * Initial revision
- X *
- X */
- X
- X#ifdef USE_CURSESX_H
- X#include <cursesX.h>
- X#else
- X#include <curses.h> /* How to get curses include */
- X#endif
- X
- X#include <signal.h> /* For signal() and SIG* #defines */
- X#include <errno.h> /* for errno and EINTR */
- X
- X#ifdef NO_ERRNO
- Xextern int errno;
- X#endif
- X
- X#ifndef NO_OPTOPT
- Xextern int optopt;
- X#endif
- X
- X/*
- X * In many cases, the subsequent #includes can be cut and the prog
- X * will probably still compile and run.
- X */
- X
- X#include <ctype.h> /* isprint, iscntrl protos */
- X
- X/*
- X * stdlib.h has getenv() *and* malloc proto-types. So only include
- X * malloc.h if there is no stdlib.h
- X */
- X
- X#ifndef NO_STDLIB_H
- X#include <stdlib.h>
- X#else
- X#ifndef NO_MALLOC_H
- X#include <malloc.h>
- X#endif
- X#endif
- X
- X#ifndef NO_STRING_H
- X#include <string.h> /* For strncpy() et al protos */
- X#endif
- X
- X#ifndef NO_MEMORY_H
- X#include <memory.h> /* For memcpy protos */
- X#endif
- X
- X#ifndef NO_LIMITS_H
- X#include <limits.h> /* CHAR_BIT defines bits per byte */
- X#else
- X#define CHAR_BIT 8
- X#endif
- X
- X#include <pwd.h> /* Everyone has this right!? */
- END_OF_FILE
- if test 1409 -ne `wc -c <'ipick/config.h'`; then
- echo shar: \"'ipick/config.h'\" unpacked with wrong size!
- fi
- # end of 'ipick/config.h'
- fi
- if test -f 'ipick/patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/patchlevel.h'\"
- else
- echo shar: Extracting \"'ipick/patchlevel.h'\" \(392 characters\)
- sed "s/^X//" >'ipick/patchlevel.h' <<'END_OF_FILE'
- X/* $Id: patchlevel.h,v 1.1 1993/02/27 21:48:01 markd Exp $
- X *
- X * Self-evident?
- X *
- X * Copyright (c) 1993, Mark Delany
- X *
- X * You may distribute under the terms of either the GNU General Public
- X * License or the Artistic License, as specified in the README file.
- X *
- X * $Log: patchlevel.h,v $
- X * Revision 1.1 1993/02/27 21:48:01 markd
- X * Initial revision
- X *
- X */
- X
- X#define PATCHLEVEL 0
- END_OF_FILE
- if test 392 -ne `wc -c <'ipick/patchlevel.h'`; then
- echo shar: \"'ipick/patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'ipick/patchlevel.h'
- fi
- if test -f 'ipick/config/3b1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/config/3b1'\"
- else
- echo shar: Extracting \"'ipick/config/3b1'\" \(232 characters\)
- sed "s/^X//" >'ipick/config/3b1' <<'END_OF_FILE'
- X# For: AT&T 3b1 (7300 & UnixPC)
- X# From: Andy Dougherty <doughera@lafcol.lafayette.edu>
- X
- XP_LIBS = -lcurses
- XP_CFLAGS = -O
- XP_NO_FLAGS = -DNO_LIMITS_H -DNO_STDLIB_H -DNO_STRSTR -DNO_STRDUP \
- X -DNO_PROTOTYPES
- X
- X# Maybe? -DNO_STRPBRK
- X
- X
- END_OF_FILE
- if test 232 -ne `wc -c <'ipick/config/3b1'`; then
- echo shar: \"'ipick/config/3b1'\" unpacked with wrong size!
- fi
- # end of 'ipick/config/3b1'
- fi
- if test -f 'ipick/config/aux' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/config/aux'\"
- else
- echo shar: Extracting \"'ipick/config/aux'\" \(187 characters\)
- sed "s/^X//" >'ipick/config/aux' <<'END_OF_FILE'
- X# For: A/UX 2.0.1
- X# From: Kenneth Jacker <khj@cs.cs.appstate.edu>
- X
- XP_CFLAGS =
- XP_LIBS = -lcurses
- XP_NO_FLAGS = -DNO_STDLIB_H -DNO_PROTOTYPES -DNO_STRSTR -DNO_STRDUP
- X
- X# Maybe? -DNO_STRPBRK
- END_OF_FILE
- if test 187 -ne `wc -c <'ipick/config/aux'`; then
- echo shar: \"'ipick/config/aux'\" unpacked with wrong size!
- fi
- # end of 'ipick/config/aux'
- fi
- if test -f 'ipick/config/bsd386' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/config/bsd386'\"
- else
- echo shar: Extracting \"'ipick/config/bsd386'\" \(125 characters\)
- sed "s/^X//" >'ipick/config/bsd386' <<'END_OF_FILE'
- X# For: BSD 386
- X
- XP_NO_FLAGS = -DNO_STDLIB_H -DNO_MALLOC_H -DNO_BEEP -DNO_NEWTERM
- XP_CFLAGS = -O
- XP_LIBS = -lcurses -ltermcap
- END_OF_FILE
- if test 125 -ne `wc -c <'ipick/config/bsd386'`; then
- echo shar: \"'ipick/config/bsd386'\" unpacked with wrong size!
- fi
- # end of 'ipick/config/bsd386'
- fi
- if test -f 'ipick/config/bsd43' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'ipick/config/bsd43'\"
- else
- echo shar: Extracting \"'ipick/config/bsd43'\" \(247 characters\)
- sed "s/^X//" >'ipick/config/bsd43' <<'END_OF_FILE'
- X# For: BSD 4.3
- X# From: DaviD W. Sanderson <dws@ssec.wisc.edu>
- X
- XP_NO_FLAGS = -DNO_STDLIB_H -DNO_MALLOC_H -DNO_LIMITS_H \
- X-DNO_BEEP -DNO_STRSTR -DNO_STRDUP -DNO_NEWTERM -DNO_ERRNO
- X
- X# Maybe? -DNO_STRPBRK
- X
- XP_CFLAGS = -O
- XP_LIBS = -lcurses -ltermcap
- END_OF_FILE
- if test 247 -ne `wc -c <'ipick/config/bsd43'`; then
- echo shar: \"'ipick/config/bsd43'\" unpacked with wrong size!
- fi
- # end of 'ipick/config/bsd43'
- fi
- echo shar: End of archive 1 \(of 5\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 5 archives.
- echo "Check Makefile then run 'make'"
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
-
- exit 0 # Just in case...
-