rem: void HTMLParser(WMWidget *w, void *clientData, short type)
add: HTMLParser(WMWidget *w, void *clientData, short type)
context: void HTMLParser(WMWidget *w, void *clientData, short type){	static short init=1;  /* have we been here at least once before? */    char *stream = (char *) clientData;	WMText *tPtr = (WMText *)w;	WMScreen	*scr;	void *chunk;	char c;	#define MAX_TOKEN_SIZE 255	char token[MAX_TOKEN_SIZE+1];	#define MAX_TEXT_SIZE 1023	char text[MAX_TEXT_SIZE+1];	short mode=0;	short tk=0, txt=0;	short wasspace=0;    if(!tPtr || !stream)        return;	scr = (W_VIEW(tPtr))->screen;	cfmt.type = type;	if(init) { 		cfmt.actions = WMGetTextParserActions(tPtr);		cfmt.fonts = WMCreateBag(4); /* there sould always be at least 1 font... */		cfmt.cfont = WMSystemFontOfSize(scr, 12);		WMPutInBag(cfmt.fonts, (void *)cfmt.cfont);		cfmt.colors = WMCreateBag(4);		cfmt.ccolor = WMBlackColor(scr);		WMPutInBag(cfmt.colors, (void *)cfmt.ccolor);		cfmt.i = cfmt.b = cfmt.u = cfmt.ul = 0;		cfmt.align = WALeft;		cfmt.fmargin = cfmt.bmargin = 0;		cfmt.para = (cfmt.actions.createParagraph) (cfmt.fmargin, cfmt.bmargin, 			WMWidgetWidth(tPtr)-30, NULL, 0, cfmt.align);		(cfmt.actions.insertParagraph) (tPtr, cfmt.para, cfmt.type);		init = 0;	}#if 1	if(strlen(stream) == 1 && stream[0] == '\n') { 		/* sometimes if the text entered is a single char AND is a newline, 			the user prolly typed it */		cfmt.para = (cfmt.actions.createParagraph) (cfmt.fmargin, cfmt.bmargin, 			WMWidgetWidth(tPtr)-30, NULL, 0, cfmt.align);		(cfmt.actions.insertParagraph) (tPtr, cfmt.para, cfmt.type);		return;	}   #endif/**/	while( (c=*(stream++))) {//printf("%c", c);		if(c == '\n' || c =='\t')			//c = ' '; //continue;			continue;		if(c == ' ') {			if(wasspace) 				continue;			wasspace = 1;		}else wasspace = 0;		if(c == '<'  && !mode) { 			mode=1;			if(txt>0) { 				text[txt] = 0;				chunk = (cfmt.actions.createTChunk)(text, txt, cfmt.cfont, 					cfmt.ccolor, 0, (cfmt.u?1:0));				(cfmt.actions.insertChunk) (tPtr, chunk, cfmt.type);//printf("%s\n", text);			}			txt = 0;		} else if(c == '>' && mode) {			token[tk] = 0;			if(tk>0) parseToken(tPtr, token, tk);			mode=0; 			tk=0;		} else {			if(mode) {				if(tk < MAX_TOKEN_SIZE) token[tk++] = c;			} else if(txt < MAX_TEXT_SIZE) text[txt++] = c;		}	}	if(tk>0) { token[tk] = 0; parseToken(tPtr, token, tk);}	if(txt>0) {		text[txt] = 0;		//printf("%s\n", text);		chunk = (cfmt.actions.createTChunk)(text, txt, 			(WMFont *)WMGetFromBag(cfmt.fonts, 				WMGetBagItemCount(cfmt.fonts)-1), 			(WMColor *)WMGetFromBag(cfmt.colors,				WMGetBagItemCount(cfmt.colors)-1), 			0, (cfmt.u?1:0));		(cfmt.actions.insertChunk) (tPtr, chunk, cfmt.type);	}		}