本文整理汇总了C++中print_tagq函数的典型用法代码示例。如果您正苦于以下问题:C++ print_tagq函数的具体用法?C++ print_tagq怎么用?C++ print_tagq使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_tagq函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: html_mdoc
void
html_mdoc(void *arg, const struct roff_man *mdoc)
{
struct html *h;
struct roff_node *n;
struct tag *t;
h = (struct html *)arg;
n = mdoc->first->child;
if ((h->oflags & HTML_FRAGMENT) == 0) {
print_gen_decls(h);
print_otag(h, TAG_HTML, "");
if (n->type == ROFFT_COMMENT)
print_gen_comment(h, n);
t = print_otag(h, TAG_HEAD, "");
print_mdoc_head(&mdoc->meta, h);
print_tagq(h, t);
print_otag(h, TAG_BODY, "");
}
mdoc_root_pre(&mdoc->meta, h);
t = print_otag(h, TAG_DIV, "c", "manual-text");
print_mdoc_nodelist(&mdoc->meta, n, h);
print_tagq(h, t);
mdoc_root_post(&mdoc->meta, h);
print_tagq(h, NULL);
}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:28,代码来源:mdoc_html.c
示例2: mdoc_rv_pre
static int
mdoc_rv_pre(MDOC_ARGS)
{
struct htmlpair tag;
struct tag *t;
int nchild;
if (n->prev)
print_otag(h, TAG_BR, 0, NULL);
PAIR_CLASS_INIT(&tag, "fname");
nchild = n->nchild;
if (nchild > 0) {
print_text(h, "The");
for (n = n->child; n; n = n->next) {
t = print_otag(h, TAG_B, 1, &tag);
print_text(h, n->string);
print_tagq(h, t);
h->flags |= HTML_NOSPACE;
print_text(h, "()");
if (n->next == NULL)
continue;
if (nchild > 2) {
h->flags |= HTML_NOSPACE;
print_text(h, ",");
}
if (n->next->next == NULL)
print_text(h, "and");
}
if (nchild > 1)
print_text(h, "functions return");
else
print_text(h, "function returns");
print_text(h, "the value\\~0 if successful;");
} else
print_text(h, "Upon successful completion,"
" the value\\~0 is returned;");
print_text(h, "otherwise the value\\~\\-1 is returned"
" and the global variable");
PAIR_CLASS_INIT(&tag, "var");
t = print_otag(h, TAG_B, 1, &tag);
print_text(h, "errno");
print_tagq(h, t);
print_text(h, "is set to indicate the error.");
return(0);
}
开发者ID:cemeyer,项目名称:freebsd-base-graphics,代码行数:55,代码来源:mdoc_html.c
示例3: print_gen_head
void
print_gen_head(struct html *h)
{
struct htmlpair tag[4];
struct tag *t;
tag[0].key = ATTR_CHARSET;
tag[0].val = "utf-8";
print_otag(h, TAG_META, 1, tag);
/*
* Print a default style-sheet.
*/
t = print_otag(h, TAG_STYLE, 0, NULL);
print_text(h, "table.head, table.foot { width: 100%; }\n"
"td.head-rtitle, td.foot-os { text-align: right; }\n"
"td.head-vol { text-align: center; }\n"
"table.foot td { width: 50%; }\n"
"table.head td { width: 33%; }\n"
"div.spacer { margin: 1em 0; }\n");
print_tagq(h, t);
if (h->style) {
tag[0].key = ATTR_REL;
tag[0].val = "stylesheet";
tag[1].key = ATTR_HREF;
tag[1].val = h->style;
tag[2].key = ATTR_TYPE;
tag[2].val = "text/css";
tag[3].key = ATTR_MEDIA;
tag[3].val = "all";
print_otag(h, TAG_LINK, 4, tag);
}
}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:34,代码来源:html.c
示例4: man_root_post
static void
man_root_post(MAN_ARGS)
{
struct htmlpair tag;
struct tag *t, *tt;
PAIR_CLASS_INIT(&tag, "foot");
t = print_otag(h, TAG_TABLE, 1, &tag);
tt = print_otag(h, TAG_TR, 0, NULL);
PAIR_CLASS_INIT(&tag, "foot-date");
print_otag(h, TAG_TD, 1, &tag);
assert(man->date);
print_text(h, man->date);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag, "foot-os");
print_otag(h, TAG_TD, 1, &tag);
if (man->source)
print_text(h, man->source);
print_tagq(h, t);
}
开发者ID:jashank,项目名称:freebsd,代码行数:25,代码来源:man_html.c
示例5: print_text
void
print_text(struct html *h, const char *word)
{
if ( ! (HTML_NOSPACE & h->flags)) {
/* Manage keeps! */
if ( ! (HTML_KEEP & h->flags)) {
if (HTML_PREKEEP & h->flags)
h->flags |= HTML_KEEP;
putchar(' ');
} else
printf(" ");
}
assert(NULL == h->metaf);
if (HTMLFONT_NONE != h->metac)
h->metaf = HTMLFONT_BOLD == h->metac ?
print_otag(h, TAG_B, 0, NULL) :
print_otag(h, TAG_I, 0, NULL);
assert(word);
if ( ! print_encode(h, word, 0))
if ( ! (h->flags & HTML_NONOSPACE))
h->flags &= ~HTML_NOSPACE;
if (h->metaf) {
print_tagq(h, h->metaf);
h->metaf = NULL;
}
h->flags &= ~HTML_IGNDELIM;
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:32,代码来源:html.c
示例6: man_root_post
/* ARGSUSED */
static void
man_root_post(MAN_ARGS)
{
struct htmlpair tag[3];
struct tag *t, *tt;
PAIR_SUMMARY_INIT(&tag[0], "Document Footer");
PAIR_CLASS_INIT(&tag[1], "foot");
PAIR_INIT(&tag[2], ATTR_WIDTH, "100%");
t = print_otag(h, TAG_TABLE, 3, tag);
PAIR_INIT(&tag[0], ATTR_WIDTH, "50%");
print_otag(h, TAG_COL, 1, tag);
print_otag(h, TAG_COL, 1, tag);
tt = print_otag(h, TAG_TR, 0, NULL);
PAIR_CLASS_INIT(&tag[0], "foot-date");
print_otag(h, TAG_TD, 1, tag);
assert(man->date);
print_text(h, man->date);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag[0], "foot-os");
PAIR_INIT(&tag[1], ATTR_ALIGN, "right");
print_otag(h, TAG_TD, 2, tag);
if (man->source)
print_text(h, man->source);
print_tagq(h, t);
}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:32,代码来源:man_html.c
示例7: eqn_box
static void
eqn_box(struct html *p, const struct eqn_box *bp)
{
struct tag *t;
t = EQNFONT_NONE == bp->font ? NULL :
print_otag(p, fontmap[(int)bp->font], 0, NULL);
if (bp->left)
print_text(p, bp->left);
if (bp->text)
print_text(p, bp->text);
if (bp->first)
eqn_box(p, bp->first);
if (NULL != t)
print_tagq(p, t);
if (bp->right)
print_text(p, bp->right);
if (bp->next)
eqn_box(p, bp->next);
}
开发者ID:Hooman3,项目名称:minix,代码行数:25,代码来源:eqn_html.c
示例8: man_root_pre
static void
man_root_pre(MAN_ARGS)
{
struct tag *t, *tt;
char *title;
assert(man->title);
assert(man->msec);
mandoc_asprintf(&title, "%s(%s)", man->title, man->msec);
t = print_otag(h, TAG_TABLE, "c", "head");
tt = print_otag(h, TAG_TR, "");
print_otag(h, TAG_TD, "c", "head-ltitle");
print_text(h, title);
print_stagq(h, tt);
print_otag(h, TAG_TD, "c", "head-vol");
if (NULL != man->vol)
print_text(h, man->vol);
print_stagq(h, tt);
print_otag(h, TAG_TD, "c", "head-rtitle");
print_text(h, title);
print_tagq(h, t);
free(title);
}
开发者ID:mulichao,项目名称:freebsd,代码行数:27,代码来源:man_html.c
示例9: mdoc_fa_pre
static int
mdoc_fa_pre(MDOC_ARGS)
{
const struct roff_node *nn;
struct tag *t;
if (n->parent->tok != MDOC_Fo) {
print_otag(h, TAG_VAR, "cT", "Fa");
return 1;
}
for (nn = n->child; nn; nn = nn->next) {
t = print_otag(h, TAG_VAR, "cT", "Fa");
print_text(h, nn->string);
print_tagq(h, t);
if (nn->next) {
h->flags |= HTML_NOSPACE;
print_text(h, ",");
}
}
if (n->child && n->next && n->next->tok == MDOC_Fa) {
h->flags |= HTML_NOSPACE;
print_text(h, ",");
}
return 0;
}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:28,代码来源:mdoc_html.c
示例10: man_root_pre
static void
man_root_pre(MAN_ARGS)
{
struct htmlpair tag;
struct tag *t, *tt;
char *title;
assert(man->title);
assert(man->msec);
mandoc_asprintf(&title, "%s(%s)", man->title, man->msec);
PAIR_CLASS_INIT(&tag, "head");
t = print_otag(h, TAG_TABLE, 1, &tag);
print_otag(h, TAG_TBODY, 0, NULL);
tt = print_otag(h, TAG_TR, 0, NULL);
PAIR_CLASS_INIT(&tag, "head-ltitle");
print_otag(h, TAG_TD, 1, &tag);
print_text(h, title);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag, "head-vol");
print_otag(h, TAG_TD, 1, &tag);
if (NULL != man->vol)
print_text(h, man->vol);
print_stagq(h, tt);
PAIR_CLASS_INIT(&tag, "head-rtitle");
print_otag(h, TAG_TD, 1, &tag);
print_text(h, title);
print_tagq(h, t);
free(title);
}
开发者ID:jashank,项目名称:freebsd,代码行数:35,代码来源:man_html.c
示例11: print_tblclose
void
print_tblclose(struct html *h)
{
assert(h->tblt);
print_tagq(h, h->tblt);
h->tblt = NULL;
}
开发者ID:2asoft,项目名称:freebsd,代码行数:8,代码来源:tbl_html.c
示例12: man_alt_pre
static int
man_alt_pre(MAN_ARGS)
{
const struct man_node *nn;
int i, savelit;
enum htmltag fp;
struct tag *t;
if ((savelit = mh->fl & MANH_LITERAL))
print_otag(h, TAG_BR, 0, NULL);
mh->fl &= ~MANH_LITERAL;
for (i = 0, nn = n->child; nn; nn = nn->next, i++) {
t = NULL;
switch (n->tok) {
case MAN_BI:
fp = i % 2 ? TAG_I : TAG_B;
break;
case MAN_IB:
fp = i % 2 ? TAG_B : TAG_I;
break;
case MAN_RI:
fp = i % 2 ? TAG_I : TAG_MAX;
break;
case MAN_IR:
fp = i % 2 ? TAG_MAX : TAG_I;
break;
case MAN_BR:
fp = i % 2 ? TAG_MAX : TAG_B;
break;
case MAN_RB:
fp = i % 2 ? TAG_B : TAG_MAX;
break;
default:
abort();
/* NOTREACHED */
}
if (i)
h->flags |= HTML_NOSPACE;
if (TAG_MAX != fp)
t = print_otag(h, fp, 0, NULL);
print_man_node(man, nn, mh, h);
if (t)
print_tagq(h, t);
}
if (savelit)
mh->fl |= MANH_LITERAL;
return(0);
}
开发者ID:jashank,项目名称:freebsd,代码行数:56,代码来源:man_html.c
示例13: print_paragraph
void
print_paragraph(struct html *h)
{
struct tag *t;
struct htmlpair tag;
PAIR_CLASS_INIT(&tag, "spacer");
t = print_otag(h, TAG_DIV, 1, &tag);
print_tagq(h, t);
}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:10,代码来源:html.c
示例14: print_tbl
void
print_tbl(struct html *h, const struct tbl_span *sp)
{
const struct tbl_head *hp;
const struct tbl_dat *dp;
struct htmlpair tag;
struct tag *tt;
/* Inhibit printing of spaces: we do padding ourselves. */
if (NULL == h->tblt)
html_tblopen(h, sp);
assert(h->tblt);
h->flags |= HTML_NONOSPACE;
h->flags |= HTML_NOSPACE;
tt = print_otag(h, TAG_TR, 0, NULL);
switch (sp->pos) {
case (TBL_SPAN_HORIZ):
/* FALLTHROUGH */
case (TBL_SPAN_DHORIZ):
PAIR_INIT(&tag, ATTR_COLSPAN, "0");
print_otag(h, TAG_TD, 1, &tag);
break;
default:
dp = sp->first;
for (hp = sp->head; hp; hp = hp->next) {
print_stagq(h, tt);
print_otag(h, TAG_TD, 0, NULL);
if (NULL == dp)
break;
if (TBL_CELL_DOWN != dp->layout->pos)
if (dp->string)
print_text(h, dp->string);
dp = dp->next;
}
break;
}
print_tagq(h, tt);
h->flags &= ~HTML_NONOSPACE;
if (TBL_SPAN_LAST & sp->flags) {
assert(h->tbl.cols);
free(h->tbl.cols);
h->tbl.cols = NULL;
print_tblclose(h);
}
}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:55,代码来源:tbl_html.c
示例15: print_tbl
void
print_tbl(struct html *h, const struct tbl_span *sp)
{
const struct tbl_dat *dp;
struct htmlpair tag;
struct tag *tt;
int ic;
/* Inhibit printing of spaces: we do padding ourselves. */
if (h->tblt == NULL)
html_tblopen(h, sp);
assert(h->tblt);
h->flags |= HTML_NONOSPACE;
h->flags |= HTML_NOSPACE;
tt = print_otag(h, TAG_TR, 0, NULL);
switch (sp->pos) {
case TBL_SPAN_HORIZ:
case TBL_SPAN_DHORIZ:
PAIR_INIT(&tag, ATTR_COLSPAN, "0");
print_otag(h, TAG_TD, 1, &tag);
break;
default:
dp = sp->first;
for (ic = 0; ic < sp->opts->cols; ic++) {
print_stagq(h, tt);
print_otag(h, TAG_TD, 0, NULL);
if (dp == NULL || dp->layout->col > ic)
continue;
if (dp->layout->pos != TBL_CELL_DOWN)
if (dp->string != NULL)
print_text(h, dp->string);
dp = dp->next;
}
break;
}
print_tagq(h, tt);
h->flags &= ~HTML_NONOSPACE;
if (sp->next == NULL) {
assert(h->tbl.cols);
free(h->tbl.cols);
h->tbl.cols = NULL;
print_tblclose(h);
}
}
开发者ID:2asoft,项目名称:freebsd,代码行数:54,代码来源:tbl_html.c
示例16: print_man
static void
print_man(MAN_ARGS)
{
struct tag *t, *tt;
struct htmlpair tag;
PAIR_CLASS_INIT(&tag, "mandoc");
if ( ! (HTML_FRAGMENT & h->oflags)) {
print_gen_decls(h);
t = print_otag(h, TAG_HTML, 0, NULL);
tt = print_otag(h, TAG_HEAD, 0, NULL);
print_man_head(man, n, mh, h);
print_tagq(h, tt);
print_otag(h, TAG_BODY, 0, NULL);
print_otag(h, TAG_DIV, 1, &tag);
} else
t = print_otag(h, TAG_DIV, 1, &tag);
print_man_nodelist(man, n, mh, h);
print_tagq(h, t);
}
开发者ID:jashank,项目名称:freebsd,代码行数:22,代码来源:man_html.c
示例17: print_metaf
static void
print_metaf(struct html *h, enum mandoc_esc deco)
{
enum htmlfont font;
switch (deco) {
case (ESCAPE_FONTPREV):
font = h->metal;
break;
case (ESCAPE_FONTITALIC):
font = HTMLFONT_ITALIC;
break;
case (ESCAPE_FONTBOLD):
font = HTMLFONT_BOLD;
break;
case (ESCAPE_FONTBI):
font = HTMLFONT_BI;
break;
case (ESCAPE_FONT):
/* FALLTHROUGH */
case (ESCAPE_FONTROMAN):
font = HTMLFONT_NONE;
break;
default:
abort();
/* NOTREACHED */
}
if (h->metaf) {
print_tagq(h, h->metaf);
h->metaf = NULL;
}
h->metal = h->metac;
h->metac = font;
switch (font) {
case (HTMLFONT_ITALIC):
h->metaf = print_otag(h, TAG_I, 0, NULL);
break;
case (HTMLFONT_BOLD):
h->metaf = print_otag(h, TAG_B, 0, NULL);
break;
case (HTMLFONT_BI):
h->metaf = print_otag(h, TAG_B, 0, NULL);
print_otag(h, TAG_I, 0, NULL);
break;
default:
break;
}
}
开发者ID:Stichting-MINIX-Research-Foundation,项目名称:minix,代码行数:51,代码来源:html.c
示例18: mdoc_fd_pre
static int
mdoc_fd_pre(MDOC_ARGS)
{
struct tag *t;
char *buf, *cp;
synopsis_pre(h, n);
if (NULL == (n = n->child))
return 0;
assert(n->type == ROFFT_TEXT);
if (strcmp(n->string, "#include")) {
print_otag(h, TAG_CODE, "cT", "Fd");
return 1;
}
print_otag(h, TAG_CODE, "cT", "In");
print_text(h, n->string);
if (NULL != (n = n->next)) {
assert(n->type == ROFFT_TEXT);
if (h->base_includes) {
cp = n->string;
if (*cp == '<' || *cp == '"')
cp++;
buf = mandoc_strdup(cp);
cp = strchr(buf, '\0') - 1;
if (cp >= buf && (*cp == '>' || *cp == '"'))
*cp = '\0';
t = print_otag(h, TAG_A, "cThI", "In", buf);
free(buf);
} else
t = print_otag(h, TAG_A, "cT", "In");
print_text(h, n->string);
print_tagq(h, t);
n = n->next;
}
for ( ; n; n = n->next) {
assert(n->type == ROFFT_TEXT);
print_text(h, n->string);
}
return 0;
}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:50,代码来源:mdoc_html.c
示例19: print_metaf
static void
print_metaf(struct html *h, enum mandoc_esc deco)
{
enum htmlfont font;
switch (deco) {
case ESCAPE_FONTPREV:
font = h->metal;
break;
case ESCAPE_FONTITALIC:
font = HTMLFONT_ITALIC;
break;
case ESCAPE_FONTBOLD:
font = HTMLFONT_BOLD;
break;
case ESCAPE_FONTBI:
font = HTMLFONT_BI;
break;
case ESCAPE_FONT:
case ESCAPE_FONTROMAN:
font = HTMLFONT_NONE;
break;
default:
abort();
}
if (h->metaf) {
print_tagq(h, h->metaf);
h->metaf = NULL;
}
h->metal = h->metac;
h->metac = font;
switch (font) {
case HTMLFONT_ITALIC:
h->metaf = print_otag(h, TAG_I, 0, NULL);
break;
case HTMLFONT_BOLD:
h->metaf = print_otag(h, TAG_B, 0, NULL);
break;
case HTMLFONT_BI:
h->metaf = print_otag(h, TAG_B, 0, NULL);
print_otag(h, TAG_I, 0, NULL);
break;
default:
break;
}
}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:49,代码来源:html.c
示例20: print_eqn
void
print_eqn(struct html *p, const struct eqn *ep)
{
struct htmlpair tag;
struct tag *t;
PAIR_CLASS_INIT(&tag, "eqn");
t = print_otag(p, TAG_MATH, 1, &tag);
p->flags |= HTML_NONOSPACE;
eqn_box(p, ep->root);
p->flags &= ~HTML_NONOSPACE;
print_tagq(p, t);
}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:15,代码来源:eqn_html.c
注:本文中的print_tagq函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论