Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hypertext link program?

0 views
Skip to first unread message

Mark McArthey

unread,
Jul 30, 1996, 3:00:00 AM7/30/96
to

Hi all,

I am looking for a method to incorporate hyperlinked text files into
a C program. This program will be used by clients to retrieve help
on various aspects of our system. I would like it to operate
much like the lynx browser currently does, but in a limited fashion.
I can see a need for the forward, back, select, and possibly
download options (and of course, quit). It would be easiest for
me to incorporate an already existing application that can achieve
my goal, but if anyone has any other suggestions I would be willing
to research them.

Thanks for the time,

--
Mark McArthey ` _ , '
mcar...@execpc.com - (o)o) -
-----------------------ooO'(_)--Ooo-


Nick Kew

unread,
Jul 31, 1996, 3:00:00 AM7/31/96
to mcar...@execpc.com

[mailed and posted]

From your mention of Lynx, I infer that a WWW-like setup may be an option.
Since WWW servers and browsers are so readily available, it makes a lot of
sense to use them (you can make it world-visible, stick it behind a firewall,
or choose various intermediate options according to policy).

That leaves you the question of generating hyperlinks. I suggest using
autoreferencing to generate links on-the-fly from a database (actually a
DBM keyed access file) of keywords.
(1) Generate a keyword for every struct, function, #define, const (and class,
template, etc in C++) definition and instantiation by automatically
parsing your code. You can optionally generate further keywords that
feature in comments, and refer to non-source-code documentation
or project management (eg RCS) configuration info.
(2) What you do to your source files is your concern. No special formatting,
preprocessing or extra comments required.
(3) When you *view* your files, they are rendered in a WWW browser as-is but
with every keyword expanded to an HTML link. The source file itself
is of course NOT changed by the viewing process!
(4) navigate and enjoy!

The (bare bones) perl code for autoreferencing C source code is:
$keystring = join ('|', keys %db) ;
while (<SOURCE_FILE>) {
/\b($keystring)\b/&expand($1,$db{$1})/goe ;
print ;
}
where expand() returns you an HTML link.

<shameless_plug>

This scheme would be a trivial application of the existing WebThing software.
I'll probably do it sometime, if noone else gets there first. If you want
it soon, email me to discuss it.

Using WebThing would also give you the benefit of its collaboration
(workgroups), conferencing and configuration control facilities.
(OK it's not quite RCS - but at least it does document locking and
versioning and maintains a full history.) So if it's of any interest,
you really can collaborate over the Web from different sites.

</shameless_plug>

Nick Kew.


0 new messages