Re: Inconsistent libwww (bug?)

"Mihai T. LAZARESCU" <mihai@ccmserv.polito.it> utters:
>I tried to add the html-to-plain conversion facility to w3c (ComLine)
>but the linker complains:
>ld: Undefined symbol
>   _HText_beginAnchor
> [... et cetera...]

The missinbg functions are callbacks from the HTML presenter.
The way that the library is structured also makes it impossible to
make a shared library out of it.

Henrik, would it be possible to replace these with pointers-to-functions
that the user can fill in at initialization time?  In my private version,
I've added the following HTextCallback.c module.  It would also cure
LAZARESCU's problem, since the missing routines are not called at run time
in the scenario that the message describes.

--- HTextCallback.c ---
#include "WWWUtil.h"
#include "HText.h"

#define PROXY(type,name,args,shortargs) \
type (*APP_ ## name) args; \
type name args { return APP_ ## name shortargs; }

#define PROXYVOID(name,args,shortargs) \
void (*APP_ ## name) args; \
void name args { APP_ ## name shortargs; }

PROXY(HText *,  HText_new2,      (HTRequest *            request,
				  HTParentAnchor *       anchor,
				  HTStream *             output_stream),
      (request, anchor, output_stream))

PROXYVOID(HText_beginAppend, (HText * text),

PROXYVOID(HText_endAppend, (HText * text),

PROXYVOID(HText_setStyle, (HText * text, HTStyle * style),
	  (text, style))

PROXYVOID(HText_appendCharacter, (HText * text, char ch),
	  (text, ch))

PROXYVOID(HText_appendText, (HText * text, CONST char * str),
	  (text, str))

PROXYVOID(HText_appendParagraph, (HText * text),

PROXYVOID(HText_beginAnchor, (HText * text, HTChildAnchor * anc),
	  (text, anc))

PROXYVOID(HText_endAnchor, (HText * text),

PROXYVOID(HText_appendImage, (
        HText *         text,
        HTChildAnchor * anc,
        CONST char *    alternative_text,
        CONST char *    alignment,
        BOOL            isMap),
	  (text, anc, alternative_text, alignment, isMap))

HTStyleSheet * styleSheet;
--- end of HTextCallback.c ---
73 de ke9tv/2, Kevin KENNY   GE Corporate Research & Development
kennykb@crd.ge.com           P. O. Box 8, Room KWC273
                             Schenectady, New York 12301-0008 USA

Follow-Ups: References: