There have been some offline discussions about integrating X*Press News
with Usenet software like C-News, so Richard Schall suggested that
I post this. Public discussion shouldn't hurt (too much :-).
I've edited the quote marks (>) to try to make it clear which is
in response to what.
rs 0> were Richard's original questions in response to my "bug" report.
seb 1> were my answers
rs 2> were his responses to my answers
seb 3> are my current comments
Selden
=======
rs 2>From: IN%"rschaal@phx.mcd.mot.com" 14-FEB-1994 14:33:19.04
rs 2>To: IN%"SEB@LNS62.LNS.CORNELL.EDU"
rs 2>CC:
rs 2>Subj: More on C-News/MAIL Dependency
rs 2>
seb 3>[mail headers deleted]
rs 2>
rs 2>First off, I wonder if it would be a good idea to take the discussion of news
rs 2>reader deployment public - ie through the list. I have been in correspondence
rs 2>with Brian Smithson and Ralph Chapman on this subject as well. If you agree,
rs 2>then go ahead and post this response to the mailing list.
seb 3> herewith.
rs 2>According to Selden E. Ball, Jr.:
seb 1> Richard,
seb 1> You wrote
rs 0>It appears that your gcc compiler is a bit on the drainbamaged side.
seb 1> I recall someone mentioning that Fred Fish (the person who
seb 1> produces the Amiga freely redistributable software CD-ROMs)
seb 1> is advertising a reward for someone to get several gcc features to work.
seb 1> I believe that VARARGS is one of them. gdb is another :-(
rs 0>I presume you were able to use the MD5 code?
seb 1> That's a rash presumption, I fear.
seb 1> When I tried to test the software on Sunday afternoon, there seemed to
seb 1> be something wrong with our local X*Press feed. I could see
seb 1> text when I ran a terminal emulator, but both the December and February
seb 1> versions of x (run with -V) seemed to detect only time stamps.
seb 1> They both reported checksum errors and complained about invalid article
seb 1> delimiters.
rs 2>I think X*Press was busy moving their computer. It should settle out soon.
rs 2>The MD5 software has a separate make - try "make test" from the "Makefile".
rs 2>That will separately compile md5 and execute an internal test. You want to
rs 2>insure that that will work before trusting it in "x".
seb 3> ok, I'll try that this evening. (Feb 14th)
seb 1> Sigh.
rs 0>How about simply setting them up as definitions in the Makefile?
rs 0>Let me know if you can change your makefile, and what it should read...
seb 1> I'm using gnu make, so symbol definition commands are the same as in
seb 1> most versions of make. Except for the Amiga also needing the tree routines,
seb 1> the Unix makefile works "fine."
rs 2>I am planning on moving the defines into the makefile as :
rs 2> CFLAGS= -O -DMD5=1 -DUSE_VARARGS=1
rs 2>and pulling the definition for USE_VARARGS out of fill.c
seb 3> OK, that sounds reasonable.
seb 1> A problem with putting conditional definitions in a makefile is that changes
seb 1> to the makefile won't necessarily force recompilation of the sources.
seb 1> One also has to make a point of deleting all of the .o files.
seb 1> Changing an include file, on the other hand, would force recompilation,
seb 1> assuming that the dependencies were described correctly.
rs 2>Correct, but there is a "make clean" target as well.
rs 0>Do you have ANY standard include file which casts malloc? We have the
rs 0>following code in the beginning of strings.c....
seb 1> I'll do a grep through all of the includes on my Amiga. Maybe it's
seb 1> hidden somewhere. All I know for sure is that the "standard" include
seb 1> file isn't there.
seb 1> I thought about "stealing" a copy of malloc.h from somewhere else.
seb 1> When I discovered that the OSF/1 version does not actually define malloc
seb 1> (although it does define lots of other stuff), I decided that wouldn't
seb 1> be appropriate.
seb 1> Another sigh.
rs 2>I've seen it defined in stdlib.h and several other places over the years. Let
rs 2>me know how you think this should be addressed.
seb 3> thanks for the pointer.
rs 0>On another subject, have you gotten C-News working on the AMIGA?
seb 1> No, I haven't. I looked at it several times, and reluctantly came
seb 1> to the same conclusion each time: the amount of work necessary
seb 1> was going to be more than doing something specific for X*Press.
seb 1> Installing any news software requires mail, which requires installing UUCP.
seb 1> None of the UUCP packages that I've found install "trivially": they
seb 1> all require a lot of hand tuning. Their mail programs all seem to
seb 1> need a lot of UUCP's functionality.
rs 2>I have seen only a minimal dependency upon MAIL - usually for the purpose of
rs 2>sending error reports used in the code. The mail usually gets invoked as
rs 2>follows:
rs 2>
rs 2> MAIL user < text
rs 2>
rs 2> OR
rs 2>
rs 2> MAIL < text
rs 2>
rs 2>The second version relies on understanding the headers in the mail for delivery
rs 2>to the correct person.
rs 2>
rs 2>I would make a simple substitution, a shell script or really simple little
rs 2>program that would take stdin and append it to a file.
seb 3>That doesn't sound too unreasonable.
seb 1> Also, although my system has generous resources, it'd be nice if
seb 1> an X*Press reader could run on a minimal Amiga. E.G. the original XIS
seb 1> product ran on a 512K system with two floppies.
seb 1> Given the tiny size of x (30KB at the moment) this seems feasable.
seb 1> There's no way that CNews and UUCP could work in that environment, though.
rs 2>You're right there. I currently chew up about ten to twenty megabytes
rs 2>of disk with a full-flow X*Press C-News database that gets expired each night.
rs 0>If so, how do you inject the news articles?
seb 1> My current approach is simply to split the news file into individual
seb 1> articles named with the newsgroup and the rnews id number.
seb 1> (I was disappointed to find that the id number isn't unique among
seb 1> different newsgroups.)
rs 2>By rnews id number, did you mean the number that looks like:
rs 2>
rs 2> #! rnews 869
rs 2>
rs 2>or the one that looks like
rs 2>
rs 2> Timestamp based :
rs 2> Message-ID: <010203040506@xpressrs 2>
rs 2> or
rs 2> MD5 based :
rs 2> Message-ID: <8035d7c9012230036ef2c3e03034f2fd@xpressrs 2>
rs 2>
rs 2>The number after rnews is actually the size of the article that follows. There
rs 2>can be more than one article with the same timestamp in a group, and the MD5 ID
rs 2>is thought to be unique to the article.
seb 3> Oops. I was using the number from "#! rnews 869".
seb 3> I guess I'll have to do something different. :-)
seb 1> AmigaDOS also supports the concept of "filenotes", which are a textual
seb 1> comment field associated with each file. I'm currently putting
seb 1> the article subject in that field.
seb 1> The software to do this is written in Amiga REXX.
seb 1> I've been thinking about looking to see if x could be persuaded to
seb 1> write individual article files instead of concatenating articles for a
seb 1> specified time.
rs 2>That shouldn't be too hard to do.... Try taking the code in time_stamp() which
rs 2>does an fclose and rename:
rs 2><>-<>-<>-<>-<>-<>-<>-<>-<>
rs 2> if (newsfp != NULL) {
rs 2> fclose(newsfp);
rs 2> sprintf(nam1, "%s/xnews", spool_name);
rs 2> if (cnews_flag)
rs 2> sprintf(nam2, "%s/%d.xnews", spool_name, art_count++);
rs 2> else
rs 2> sprintf(nam2, "%s/xnews.%d", spool_name, art_count++);
rs 2>
rs 2> rename(nam1, nam2);
rs 2> newsfp = NULL;
rs 2> }
rs 2><>-<>-<>-<>-<>-<>-<>-<>-<>
rs 2>Copy the text into parse_article() in news.c at the very end of the subroutine.
rs 2>after:
rs 2> fflush(newsfp);
rs 2><>-<>-<>-<>-<>-<>-<>-<>-<>
rs 2>
rs 2>Give it a try, if you like it, send me the changes, and I'll include them for
rs 2>the March distribution. One suggestion that I'd make is to look at the idea of
rs 2>adding another command line option like -N which would control the number of
rs 2>articles per batch. In your case, you would make it 1.
seb 3> will do.
seb 1> Selden
seb 3> Selden E. Ball, Jr.
seb 3> Cornell University Voice: +1-607-255-0688
seb 3> Laboratory of Nuclear Studies FAX: +1-607-255-8062
seb 3> 230A Wilson Synchrotron Lab BITNET: SEB@CRNLNS
seb 3> Judd Falls & Dryden Road Internet: SEB@LNS61.TN.CORNELL.EDU
seb 3> Ithaca, NY, USA 14853-8001 HEPnet/SPAN: LNS61::SEB = 44283::SEB
rs 2>--
rs 2>Richard Schaal
rs 2>Motorola Computer Group
rs 2>M/S AZ43 DW278
rs 2>2900 South Diablo Way, Tempe, AZ 85252
rs 2>Voice: (602)438-3519 Fax: (602)438-3836
rs 2>E-Mail: rschaal@phx.mcd.mot.com
rs 2>"This is a great place to work.... there's a going away party every Friday!"