#include <config.h>
#include <ctype.h>
#include <string.h>
#include "mdvi.h"
#include "private.h"
Go to the source code of this file.
#define IS_PREFIX_DELIMITER |
( |
|
x) | |
(strchr(" \t\n:=", (x)) != NULL) |
static DviSpecial* find_special_prefix |
( |
const char * |
prefix) | |
|
|
static |
int mdvi_do_special |
( |
DviContext * |
dvi, |
|
|
char * |
string |
|
) |
| |
Definition at line 156 of file special.c.
165 if(!
string || !*
string)
169 while(*
string && isspace(*
string))
177 #ifdef WITH_REGEX_SPECIALS
178 if(sp->has_reg && !regexec(&sp->reg, ptr, 0, 0, 0))
197 "REGEX match with `%s' (arg `%s')\n",
203 "PREFIX match with `%s' (prefix `%s', arg `%s')\n",
204 sp->
label, prefix, ptr));
void mdvi_flush_specials |
( |
void |
) | |
|
Definition at line 213 of file special.c.
222 #ifdef WITH_REGEX_SPECIALS
int mdvi_register_special |
( |
const char * |
label, |
|
|
const char * |
prefix, |
|
|
const char * |
regex, |
|
|
DviSpecialHandler |
handler, |
|
|
int |
replace |
|
) |
| |
Definition at line 91 of file special.c.
112 #ifdef WITH_REGEX_SPECIALS
113 if(!newsp && sp->has_reg) {
117 if(
regex && regcomp(&sp->reg,
regex, REG_NOSUB) != 0) {
124 sp->has_reg = (
regex != NULL);
132 "New \\special handler `%s' with prefix `%s'\n",
int mdvi_unregister_special |
( |
const char * |
prefix) | |
|
Definition at line 137 of file special.c.
145 #ifdef WITH_REGEX_SPECIALS
static void register_builtin_specials |
( |
void |
) | |
|
|
static |
void sp_layer |
( |
DviContext * |
dvi, |
|
|
const char * |
prefix, |
|
|
const char * |
arg |
|
) |
| |
Definition at line 235 of file special.c.
237 if(
STREQ(
"push", arg))
239 else if(
STREQ(
"pop", arg)) {
245 }
else if(
STREQ(
"reset", arg))
SPECIAL |
( |
do_color_special |
) | |
|
struct { ... } builtins[] |
DviSpecialHandler handler |
int registered_builtins = 0 |
|
static |