Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: notesnews 0.1 (unido 12/05/84); site unido.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!mcvax!unido!hmm From: hmm@unido.UUCP Newsgroups: net.sources Subject: Notes seqfile editor Message-ID: Date: Wed, 17-Apr-85 11:47:00 EST Article-I.D.: unido.nf11800001 Posted: Wed Apr 17 11:47:00 1985 Date-Received: Sat, 20-Apr-85 03:03:42 EST Sender: notes@unido.UUCP Lines: 166 Nf-ID: #N:unido:11800001:000:3408 Nf-From: unido!hmm Apr 17 14:47:00 1985 Here is a simple C program to edit notes' sequencer-files. Sorry, I was too lazy to write a man page for it. The synopsis is: edseq sequencer-file ... Edit one or more sequencer-files with your favorite editor. edseq -x sequencer-file ... Extract the contents of the sequencer files in a readable form edseq -c sequencer-file Create a sequencer-file from the standard input. The readable input/output format consists of line like this: YYYY/MM/DD HH:MM notesfile_name To install it, put it into the source directory of notes and add 2 lines to the makefile: edseq: edseq.c cc edseq.c -o edseq Then make edseq and copy it to the utilities directory. If you want to, you can add "edseq" in the makefile's lines for util, install etc. Send bugs and fixes to: Hans-Martin Mosner Universitaet Dortmund (Germany) ihnp4!hpfcla!hpbbn!unido!hmm {decvax,philabs}!mcvax!unido!hmm This is not in shar format, just the plain C program. ======== Cut here ====== Cut here ====== Cut here ====== Cut here ====== #include #include "parms.h" #include "structs.h" /* Edit a sequencer-file. */ #define EDIT 1 #define XTRACT 2 #define CREATE 3 struct seq_f entry; FILE *fp, *tmp; char tmpname[]="/tmp/edseqXXXXXX"; char *editor; char line[80]; main(argc, argv) char **argv; { int i; int mode = EDIT; if ((editor=getenv("NFED"))==NULL) if ((editor=getenv("EDITOR"))==NULL) editor=EDITOR; mktemp(tmpname); for (i=1; i