Back to index

tetex-bin  3.0
Functions
htex.h File Reference
#include "numbers.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int htex_parse_special (char *buffer, UNSIGNED_QUAD size)

Function Documentation

int htex_parse_special ( char *  buffer,
UNSIGNED_QUAD  size 
)

Definition at line 209 of file htex.c.

{
  int result = 0;
  char *key, *value;
  char *save = buffer;
  char *end = buffer + size;
  int htmltag;
  skip_white (&buffer, end);
  if (is_htex_special(&buffer, end)) {
    result = 1; /* Must be html special (doesn't mean it will succeed) */
    skip_white (&buffer, end);
    if (buffer < end && *(buffer++) == '<' ) {
      htmltag = parse_html_tag(&buffer, end);
      switch (htmltag) {
      case ANCHOR:
       parse_key_val (&buffer, end, &key, &value);
       if (key && value)
         html_start_anchor (key, value);
       break;
      case IMAGE:
       fprintf (stderr, "\nImage html tag not yet implemented\n");
       parse_key_val (&buffer, end, &key, &value);
       if (key) RELEASE (key);
       if (value) RELEASE (value);
       break;
      case BASE:
       parse_key_val (&buffer, end, &key, &value);
       if (key && value)
         html_set_base (value);
       if (key)
         RELEASE (key);
       break;
      case END_ANCHOR:
       html_end_anchor ();
       break;
      default:
       fprintf (stderr, "Invalid tag\n");
       dump (save, end);
      }
    }
    skip_white(&buffer, end);
    if (buffer >= end || *buffer != '>') {
      fprintf (stderr, "\nBadly terminated tag..\n");
    }
  }
  return result;
}

Here is the call graph for this function:

Here is the caller graph for this function: