🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.misc
Article #102

Re: Rolodex bugs

#102
From: Larry Lippman
Date: Thu, 10 Mar 1988 15:51
37 lines
2472 bytes
In article <443@sering.cwi.nl>, fmr@cwi.nl (Frank Rahmani) writes:
> ...
> This works fine for me under BSD4.3.

	I'm glad someone made it BSD-compatible, insofar as the curses
implementation is concerned.  Unfortunately, neither myself nor anyone
else in my organization had enough BSD experience to offer the correct
BSD options.

> A pity there isn't yet an option to
> add entries to rf_data (or did I miss something??)

	Actually, most users prefer to simply edit the database file
using vi or emacs.  I do have a shell/awk script which inserts new
entries in the database file (after verifying that no duplication exists),
but since it was a quick hack and was not "idiot-proof", I elected not to
include it with the comp.sources submission.  It's quite simple to write
a script using sed or awk for this purpose, and a script is indeed
appropriate here since execution speed is not important for adding new
entries.  Modifying existing entries using a script is a little trickier,
but not that big a deal (I find the entry to be modified and write it to
a temp file, then I write the database less the modified entry to a second
temp file; the temp file containing the single entry is modified using an
invocation of vi, followed by appending it to the other temp file, which
in turn overwrites the original database file.
	Since I wanted to keep rf(1L) "simple", I never felt like writing
the C code necessary to write/edit/update the database file; this would
probably require more code that the original rf.c module.
	Incidently, when I wrote rf(1L) in 1985, it was my first use of
curses(3X) under SVR2.  The program was an exercise which paid off well;
properly using curses was all downhill after I understood what was
necessary to write the program.

<>  Larry Lippman @ Recognition Research Corp., Clarence, New York
<>  UUCP:  {allegra|ames|boulder|decvax|rutgers|watmath}!sunybcs!kitty!larry
<>  VOICE: 716/688-1231        {hplabs|ihnp4|mtune|utzoo|uunet}!/
<>  FAX:   716/741-9635 {G1,G2,G3 modes}   "Have you hugged your cat today?" 
Technical Details
Message-ID: <2437@kitty.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!kitty!larry
References: <1081@mimir.dmt.oz> <443@sering.cwi.nl>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!kitty!larry
From: larry@kitty.UUCP (Larry Lippman)
Newsgroups: comp.bugs.misc
Subject: Re: Rolodex bugs
Message-ID: <2437@kitty.UUCP>
Date: 10 Mar 88 15:51:43 GMT
References: <1081@mimir.dmt.oz> <443@sering.cwi.nl>
Organization: Recognition Research Corp., Clarence, NY
Lines: 37
Summary: Updating rf(1L) database file