larry@kitty.UUCP (04/13/87)
The Net has been good to me as far as providing some good source programs. I figured it's about time I made some contribution. While much of my software is either proprietary or too specialized to be of any general use, I do have a few source programs which may be of interest. The first program is called rf(1L). It is a simple database program written in C which stores names, addresses, telephone numbers, and other data. It functions not unlike a "rotary file" for fast access, which is why it is called ``rf''. In its present form it will search for a record by individual name, or by organization name. Any size search string may be used as the key; command line parsing is intelligent enough such that quotes are unnecessary if the search string contains embedded whitespace. The output is displayed in a neat page-oriented fashion using curses, with a paging control where multiple matches are encountered. The database file is easily configured using any editor. The database file format is also designed so that it may be easily accessed by awk or sed for mailing list or other special applications. By setting an option flag, the program will access a system-wide database, or a private database file in the user's home directory. While the program could have been written using awk and tput, it is substantially faster using C. In keeping with the recent discussion about writing "new" UNIX functions, the increased speed is THE reason for writing it in C. Typical search and display (9,600 baud) time on a 3B2 for one record from a 30 kilobyte database file is < 2.0 seconds; this includes curses overhead - so it's pretty fast (the entire database file is always searched to detect multiple matches). The program is reasonably well commented, is intentionally written to be easily modified, and is reasonably well protected against users doing "dumb" things. The program runs on three different Sys V versions, and should probably run under BSD since it contains its own string search function and does not use getopt; the curses use is not particularly exotic. If there is enough interest, I will post it to the Net. <> Larry Lippman @ Recognition Research Corp., Clarence, New York <> UUCP: {allegra|ames|boulder|decvax|rocksanne|watmath}!sunybcs!kitty!larry <> VOICE: 716/688-1231 {hplabs|ihnp4|mtune|seismo|utzoo}!/ <> FAX: 716/741-9635 {G1,G2,G3 modes} "Have you hugged your cat today?"
larry@kitty.UUCP (04/15/87)
In article <1699@kitty.UUCP>, larry@kitty.UUCP (Larry Lippman) writes: > The first program is called rf(1L). It is a simple database > program written in C which stores names, addresses, telephone numbers, > and other data. It functions not unlike a "rotary file" for fast access, > which is why it is called ``rf''. I have received an overwhelming response from people who would like to have this program. Thanks to all who have written and expressed their appreciation! In view of the imminent demise of net.sources, I have sent the program shar to the mod.sources moderator for posting. Since this will be the first time that I have posted a full source program to the Net, I am looking forward to having my programming style criticized by 200,000 experts... :-) :-) :-) Enjoy! <> Larry Lippman @ Recognition Research Corp., Clarence, New York <> UUCP: {allegra|ames|boulder|decvax|rocksanne|watmath}!sunybcs!kitty!larry <> VOICE: 716/688-1231 {hplabs|ihnp4|mtune|seismo|utzoo}!/ <> FAX: 716/741-9635 {G1,G2,G3 modes} "Have you hugged your cat today?"
allbery@ncoast.UUCP (04/19/87)
As quoted from <1704@kitty.UUCP> by larry@kitty.UUCP (Larry Lippman): +--------------- | In view of the imminent demise of net.sources, I have sent the | program shar to the mod.sources moderator for posting. +--------------- Please note that net.sources is not disappearing, it is getting a name change and a facelift. It is now called comp.sources.misc and is semi-moderated. (Meaning that discussion sent to it will be silently moved to comp.sources.d, leaving the sources to be posted.) ++Brando -- -------------------- Moderator for comp.sources.misc ---------------------- Brandon S. Allbery cbatt!cwruecmp!ncoast!allbery ``Aha! A fair Tridelta Industries ncoast!allbery%case.CSNET@relay.cs.net maiden!'' 7350 Corporate Blvd. MCIMail: BALLBERY ``Sorry, Mentor, OH 44060 +01 216 255 1080 neither.''