register struct ctk_widget *lptr;
add_pagewidget(char *text, unsigned char type,	       unsigned char border){    static unsigned char len, maxwidth;  register unsigned char *webpageptr;  static void *dataptr;  register struct ctk_widget *lptr;  len = strlen(text);  if(len + border == 0) {    return NULL;  }    maxwidth = WWW_CONF_WEBPAGE_WIDTH - (1 + 2 * border);    /* If the text of the link is too long so that it does not fit into     the width of the current window, counting from the current x     coordinate, we first try to jump to the next line. */  if(len + x > maxwidth) {    output_word(ISO_nl);  }  /* If the text of the link still is too long, we just chop it off!     XXX: this is not really the right thing to do, we should probably     either make the link a multiline button, or add multiple     buttons. But this will do for now. */  if(len > maxwidth) {    text[maxwidth] = 0;    len = maxwidth;  }  dataptr = NULL;    if(starty == 0) {    webpageptr = &webpage[(WWW_CONF_WEBPAGE_HEIGHT - 1) *			  WWW_CONF_WEBPAGE_WIDTH + x];    /* To save memory, we'll copy the widget text to the web page       drawing area and reference it from there. */    webpageptr[0] = 0;    webpageptr += border;    strncpy(webpageptr, text, len);    webpageptr[len] = 0;    webpageptr[len + border] = ' ';    if(pagewidgetptr < WWW_CONF_MAX_NUMPAGEWIDGETS) {      dataptr = &pagewidgetattribs[pagewidgetptr];      lptr = &pagewidgets[pagewidgetptr];            switch(type) {      case CTK_WIDGET_HYPERLINK:	CTK_HYPERLINK_NEW((struct ctk_hyperlink *)lptr, x,			  WWW_CONF_WEBPAGE_HEIGHT + 2, len,			  webpageptr, dataptr);	break;      case CTK_WIDGET_BUTTON:	CTK_BUTTON_NEW((struct ctk_button *)lptr, x,		       WWW_CONF_WEBPAGE_HEIGHT + 2, len,		       webpageptr);	((struct formattribs *)dataptr)->inputvalue = webpageptr;	break;      case CTK_WIDGET_TEXTENTRY:	CTK_TEXTENTRY_NEW((struct ctk_textentry *)lptr,			  x, WWW_CONF_WEBPAGE_HEIGHT + 2, len, 1,			  webpageptr, len);	((struct formattribs *)dataptr)->inputvalue = webpageptr;	break;	      }      CTK_WIDGET_ADD(&mainwindow, lptr);      ++pagewidgetptr;    }  }  /* Increase the x coordinate with the length of the link text plus     the extra space behind it and the CTK button markers. */  x += len + 1 + 2 * border;  if(x >= WWW_CONF_WEBPAGE_WIDTH) {    inc_y();    x = 0;  }  return dataptr;}