-/* $Id: roff.c,v 1.12 2008/11/27 16:54:58 kristaps Exp $ */
+/* $Id: roff.c,v 1.13 2008/11/27 17:27:50 kristaps Exp $ */
/*
* Copyright (c) 2008 Kristaps Dzonsons <kristaps@kth.se>
*
while (*buf && '\"' != *buf)
buf++;
if (0 == *buf) {
- roff_err(tree, p, argv[i], "unclosed "
+ roff_err(tree, argv[i], "unclosed "
"quote in argument "
"list for `%s'",
toknames[tok]);
assert(i > 0);
if (ROFF_MAXARG == i && *buf) {
- roff_err(tree, p, p, "too many arguments for `%s'", toknames
+ roff_err(tree, p, "too many arguments for `%s'", toknames
[tok]);
return(0);
}
if (ROFF_EXIT == type) {
roffnode_free(tok, tree);
- return((*tree->cb->roffblkout)(tok));
+ return((*tree->cb->roffblkout)(tree->args, tok));
}
i = 0;
if (NULL == roffnode_new(tok, tree))
return(0);
- if ( ! (*tree->cb->roffin)(tok, argcp, argvp))
+ if ( ! (*tree->cb->roffin)(tree->args, tok, argcp, argvp))
return(0);
if ( ! (ROFF_PARSED & tokens[tok].flags)) {
/* TODO: print all tokens. */
- if ( ! ((*tree->cb->roffout)(tok)))
+ if ( ! ((*tree->cb->roffout)(tree->args, tok)))
return(0);
- return((*tree->cb->roffblkin)(tok));
+ return((*tree->cb->roffblkin)(tree->args, tok));
}
while (*argv) {
argv++;
}
- if ( ! ((*tree->cb->roffout)(tok)))
+ if ( ! ((*tree->cb->roffout)(tree->args, tok)))
return(0);
- return((*tree->cb->roffblkin)(tok));
+ return((*tree->cb->roffblkin)(tree->args, tok));
}
argcp[i] = ROFF_ARGMAX;
argvp[i] = NULL;
- if ( ! (*tree->cb->roffin)(tok, argcp, argvp))
+ if ( ! (*tree->cb->roffin)(tree->args, tok, argcp, argvp))
return(0);
if ( ! (ROFF_PARSED & tokens[tok].flags)) {
/* TODO: print all tokens. */
- return((*tree->cb->roffout)(tok));
+ return((*tree->cb->roffout)(tree->args, tok));
}
while (*argv) {
argv++;
}
- return((*tree->cb->roffout)(tok));
+ return((*tree->cb->roffout)(tree->args, tok));
}