home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Garbo
/
Garbo.cdr
/
mac
/
source
/
netnwscd.sit
/
Readme
< prev
next >
Wrap
Text File
|
1990-10-22
|
6KB
|
146 lines
NetNews Starter Code Package (NNSCP) October 1990
===================================================
If you have picked up this code in hopes of finding a nifty new news reader
you will be disappointed and should probably stick with one of the HyperCard
based readers. If, on the other hand, you've thought about tinkering with a
news reader you may find this a useful starting point. The code requires
Think C 4.0 or later and MacTCP. While this code does produce a perfectly
acceptable new reader (I use it as my sole news reader), it is best viewed as
sample code. The user interface is cumbersome in parts and the code is not
robust enough to be considered a finished product. I call this code a starter
package because it implements a "news reader in the raw", base functionality,
ready to be customized with features of your design.
You may copy the NNSCP in whole or in part as long as you don't try to make
money off it, or pretend that you wrote it.
Disclaimer
===========
No warrantee of any kind, express or implied, is included with this software;
use at your own risk, responsibility for damages (if any) to anyone resulting
from the use of this software rests entirely with the user.
Copyright
=========
The file 'nntp.h' and most of 'nntp.c' is borrowed from the UN*X 'rn' program.
The TCP code is a reworking of various TCP programs which have been kicking
around the net. Everything else is original and is copyright ⌐ Tom Bereiter,
1990.
Author
======
comments, bugs, and such should be directed to:
Tom Bereiter
cs.utexas.edu!halley!twb
About this program:
===================
- news reader only (contains no code for posting)
- multi-window: group list, article lists, article windows
- group list displays either all groups or subscribed-to groups
- article list groups articles into 'threads' by subject
- article windows are subclasses of CEditDoc, so articles can be edited and
saved.
- uses only synchronous TCP calls
- it is not fully debugged
User documentation
==================
There isn't any. But, the user interface is intuitive enough you shouldn't
have any problems. Double-click on a group to open the article list. Double-
click on an article list line to open the article. The numbers in the left
column are the number of unread articles.
A file 'newsrc' is created which contains information on all subscribed-
to groups. The file is plain text, in the same format as a UN*X '.newsrc'
file. This also means that you can import a '.newsrc' simply by sticking it
in the same directory.
Why did I bother writing this?
==============================
My current project is a news reader/database which provides a consistent
interface for accessing both new news and referencing old articles. "News
with a memory, more user friendly than grep."
The first stage of the project was a vanilla news reader. The basic news
reader came up fast enough, seemed solid enough, and seemed general enough
that I thought others would find it useful.
I also hope to encourage, through example, the distribution of more Mac
source code.
Features I'd like to see:
=========================
- use async TCP to speed things up (e.g. read next group's subject list while
user is reading an article).
- both next/previous for either unread articles or any articles.
- way to reorder subscribed-to list (other than editing newsrc).
- posting
- full configuration dialog
- text searching for both lists and article docs.
- a proper 'Prefs' file rather than stealing the first line of 'newsrc'.
- join and xbin for comp.binaries.mac files
- do something with articles >32K better than truncating
- printing
Building the NNSCP
==================
These notes assume that you are a C programmer who is already familiar with the
Think C environment.
From the Think C package you need:
Ñ the core class files
Ñ the more class files for CColorWindow
Ñ CEditDoc and CEditPane files from the'TCL Demos:TinyEdit Folder'.
(Note: If you have a big screen you may want to change the width constant
in CEditPane::IEditPane from 432 to something larger, like 600).
Ñ qsort.c from 'C Libraries:sources'
From MacTCP you need:
Ñ dnr.c, MacTCPCommonTypes.h, TCPPB.h, GetMyIPAddr.h, and AddressXlation.h.
If this is the first Think C based MacTCP program you have compiled there is
a modest amount of porting needed to make these files work. I have included
a context diff, tcp.diffs, showing the changes I made to the files from the
MacTCP Evaluation Kit (1.0).
Help Think C find all the files (try Make and use Disk with quick check off), then
compile and run. The first time you run you will be asked for the name of your
news host. If you haven't imported a 'newsrc' file the Subscribed Groups list will
be empty--add groups from the 'All Groups' list. If you have trouble connecting to
your news host, make sure the problem is this program not your comm link by testing
with a HyperCard based news reader.
The following files are included with this distribution:
News.╣
News.╣.rsrc
Readme
tcp.diffs
News src:News.c
News src:CNewsApp.c
News src:CnewsApp.h
News src:CGroupList.c
News src:CGroupList.h
News src:CArticleList.c
News src:CArticleList.h
News src:CArticleDoc.c
News src:CArticleDoc.h
News src:CListWind.c
News src:CListWind.h
News src:newslists.c
News src:newslists.h
News src:bits.c
News src:bits.h
News src:nntp.c
News src:nntp.h
News src:tcpio.c
News src:utility.c
Known bugs
==========
- most error conditions have never been tested (e.g. out of memory)
- boundary checking for valid list items is inadequate
- List Manager's idea of clipping regions seems to be easily confused. There
are hacks in CLList::DelLine,SetLine to partially work around this.
- I have a slow news server that seems to require a delay between the
TCPCreate and the TCPOpen. Timeouts are either coded wrong or have no effect.
- can be confused by 'dead' news groups