🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.sources.d
Article #50

Re: pick - a general-purpose file argument selector

#50
From: Daniel W. James
Date: Mon, 02 Nov 1992 00:01
62 lines
3538 bytes
-- First of all, I altered the Message header hoping that's all I need to
do to move this thread over to the discussion area.  Come on people, we're
all adults here, let's keep things where they belong!


gram@aim1.aztec.co.za (Graham Wheeler) writes:

:)>gram@aim1.aztec.co.za (Graham Wheeler) writes:

:)It has been pointed out to me that this is actually a bug in the C compiler,
:)as it should be doing this check anyway. Someone also suggested the
:)replacement:

:)	if (isascii(ch) && islower(ch)) ...

Seems this was allready done by the time it got to me.

:)as a more portable and correct patch.

:)If someone wants to do a BSD port, it shouldn't be difficult. A panel is
:)just a non-destructive (i.e. tiled) window, and the only reason I used
:)panels is so that I can pop the help window up and down. It would be easy
:)to use a plain curses window, and just refresh the whole screen after
:)viewing the help. The main reasons for using ETI/Curses are for the ability
:)to:

Hmm, I'll have to take a look again at the screen routines, as I don't
remember seing anything that wouldn't fly across any system with a curses
library of some sort available.  Well, most machines (speaking of a
port...)

I was feeling rather bored today, and dialed into the system at work, and
started doing some compiling (something my everyday administration chores
usually keep me from) and got stuck when I tried to compile pick.

Now this isn't the first time I've run into difficulties as I'm using a
rather old complier, but my knowledge if C is quite limited, and forces me
to all but give up if I can't resolve a problem immediatly.  I decided to
give this one a try.

Seems this program was written for a complier which comforms to ANSI, and
my complier favors K&R.  A program that was this small was somewhat easy
for me to tackle, and it allowed me to learn quite a bit about what I was
ding along the way.  I also got a little brave and created a separate
configuration file in which you can redefine the keyboard (I'm quite used
to vi's cursor keys, and found the U, D, L & R keys to be too spread out).

Along the way I also discovered a serious limitation of the program.  Being
that filenames are limited to 15 characters, that pretty much leaves
looking at alternate heirarchies out of the question, and I think I might
look into coming up with an alternate schema (other than to simply increase
the available characters in the Define).

Okay, now that I've told everyone everything they never wanted to know
about my Sunday afternoon...  With the author's permission, I'd like to
distribute the 'new' pick (I am currently dubbing it V1.2 due to a few
minor enhancements, as well as the portability fix).
-- 
_______________________________________________________________________________
  #include <stdisc.h>                       |  dan!ccpoabt@sactoh0.SAC.CA.US
      CCPOA Benefit Trust Fund              | ...!pacbell!sactoh0!ccpoabt!dwj
Technical Details
Message-ID: <1992Nov2.000130.5565@sactoh0.sac.ca.us>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!cbnewsk!cbnewsj!att-out!pacbell.com!pacbell!sactoh0!dwj
References: <gram.719573590@aim1> <gram.719575435@aim1> <gram.719773291@aim1>

Show Full Headers
Complete Article Headers
Newsgroups: alt.sources.d
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!uwm.edu!linac!att!cbnewsk!cbnewsj!att-out!pacbell.com!pacbell!sactoh0!dwj
From: dwj@sactoh0.sac.ca.us (Daniel W. James)
Subject: Re: pick - a general-purpose file argument selector
Message-ID: <1992Nov2.000130.5565@sactoh0.sac.ca.us>
Reply-To: ccpoabt!dan@sactoh0.SAC.CA.US
Organization: CCPOA Benefit Trust Fund
References: <gram.719573590@aim1> <gram.719575435@aim1> <gram.719773291@aim1>
Distribution: na
Date: Mon, 2 Nov 92 00:01:30 GMT
Lines: 62