W3C home > Mailing lists > Public > www-lib@w3.org > July to September 1999

AW: Question about usage of HText-Callbacks - Have a very specific problem ...

From: Michael Maretzke <michael@ibs.debis.de>
Date: Tue, 3 Aug 1999 06:39:07 -0400 (EDT)
To: "Raffaele Sena" <raff@nuvomedia.com>, <www-lib-request@w3.org>
Message-ID: <011d01bedda5$25e26950$6f4aa2c2@develop8.ibs.debis.de>
Hey, Raffaele !

Thanx for your answer.

>     If you set the right callback (see libwww/Library/Examples/showtags.c)
>     you will be called for the open and close tag, with parameters
> specifying
>     which tag is being processed (as an enumerated that you can use to
> access
>     tag specific information) and its attributes.
Yeah that's right. I get all the information attached to this specific tag.
But this call to the callback is a kind of stateless. I've to convert the
HTML-page into another kind of language similar to HTML but much simpler.
This language have to be transferred to an interpreter via a defined
memory structure. This structure must be filled.
Therefor I've to store the plain text surrounded by specific tags. By this
time I store this plain-text-information in an allocated memory block
(allocated via malloc) and access this block via a static char**. This is
not very fine programming. Use of global variables is not the best way in
my eyes.
In the endelement-callbackfunction I build the structure and pass it to
the interpreter.
But there's no other way to access these kind of data ?

Some other callbacks e.g. in WIN-32-API allow to pass a void* to any
kind of data structures. In libwww ?

> -- Raffaele
Thanx. RU Michael.

Life's unfair - but root password helps!
Received on Tuesday, 3 August 1999 22:53:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:51 UTC