#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <getopt.h>
#include "dancer-xml.h"
#include "config.h"
Defines | |
#define | _GNU_SOURCE |
Functions | |
static void | clear_counter (int min) |
clear some counter | |
static int | replace_external_entity (const char *s) |
static int | convert_print (const char *s, int verbatim) |
remove exceeding space, and remove special-chars | |
static const char * | getatrstring (dxml_element *e, const char *attr) |
static int | get_paratype (dxml_element *b, int verbatim) |
handle para-type ones which can contain PCDATA | |
static int | get_bookchapter (dxml_element *b, int paraenter) |
Handle chapter and sect*. | |
static int | maybe_label_start (dxml_element *b) |
Add a label and self-link. | |
static void | maybe_label_end (int labelt) |
ends a label conditionally. | |
static int | get_table (dxml_element *b_parent) |
Process table element. | |
static int | get_itemizedlist (dxml_element *b) |
Process itemized list. | |
static int | get_bothtypes (dxml_element *b, int inlinetype) |
Something that appears inside the para elements and outside the para elements. | |
static int | recursebook (dxml_element *b) |
Handle book element, and check for each chapter in the book. | |
int | main (int argc, char **argv) |
Variables | |
int | counter_chapter [5] = {0,0,0,0,0} |
chapter counter array | |
const int | c_chapter = 0 |
const int | c_sect1 = 1 |
const int | c_sect2 = 2 |
const int | c_sect3 = 3 |
#define _GNU_SOURCE |
static void clear_counter | ( | int | min | ) | [static] |
clear some counter
min | the minimum counter number |
static int convert_print | ( | const char * | s, | |
int | verbatim | |||
) | [static] |
remove exceeding space, and remove special-chars
s | The string to print |
verbatim | preserve carriage returns? |
static int get_bookchapter | ( | dxml_element * | b, | |
int | paraenter | |||
) | [static] |
Handle chapter and sect*.
whether label was defined. (locally used for maybe_label_start)
static int get_bothtypes | ( | dxml_element * | b, | |
int | inlinetype | |||
) | [static] |
Something that appears inside the para elements and outside the para elements.
0 on no-match
inlinetype | 1 if it is inside para |
static int get_itemizedlist | ( | dxml_element * | b | ) | [static] |
Process itemized list.
static int get_paratype | ( | dxml_element * | b, | |
int | verbatim | |||
) | [static] |
handle para-type ones which can contain PCDATA
verbatim | whether it is in screen env. or not. |
static int get_table | ( | dxml_element * | b_parent | ) | [static] |
Process table element.
static const char* getatrstring | ( | dxml_element * | e, | |
const char * | attr | |||
) | [static] |
int main | ( | int | argc, | |
char ** | argv | |||
) |
static void maybe_label_end | ( | int | labelt | ) | [static] |
ends a label conditionally.
labelt | whether to require end of label |
static int maybe_label_start | ( | dxml_element * | b | ) | [static] |
Add a label and self-link.
Needs to be accompanied with maybe_label_end, and the return value of this function needs to be sent there.
1 if need to terminate the label exists.
static int recursebook | ( | dxml_element * | b | ) | [static] |
Handle book element, and check for each chapter in the book.
static int replace_external_entity | ( | const char * | s | ) | [static] |
const int c_chapter = 0 |
const int c_sect1 = 1 |
const int c_sect2 = 2 |
const int c_sect3 = 3 |
int counter_chapter[5] = {0,0,0,0,0} |
chapter counter array