这篇教程C++ synopsis_pre函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中synopsis_pre函数的典型用法代码示例。如果您正苦于以下问题:C++ synopsis_pre函数的具体用法?C++ synopsis_pre怎么用?C++ synopsis_pre使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了synopsis_pre函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mdoc_vt_prestatic intmdoc_vt_pre(MDOC_ARGS){ if (n->type == ROFFT_BLOCK) { synopsis_pre(h, n); return 1; } else if (n->type == ROFFT_ELEM) { synopsis_pre(h, n); } else if (n->type == ROFFT_HEAD) return 0; print_otag(h, TAG_VAR, "cT", "Vt"); return 1;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:14,
示例2: termp_vt_prestatic inttermp_vt_pre(DECL_ARGS){ if (MDOC_ELEM == n->type) { synopsis_pre(p, n); return(termp_under_pre(p, pair, meta, n)); } else if (MDOC_BLOCK == n->type) { synopsis_pre(p, n); return(1); } else if (MDOC_HEAD == n->type) return(0); return(termp_under_pre(p, pair, meta, n));}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:15,
示例3: termp_vt_prestatic inttermp_vt_pre(DECL_ARGS){ if (n->type == ROFFT_ELEM) { synopsis_pre(p, n); return termp_under_pre(p, pair, meta, n); } else if (n->type == ROFFT_BLOCK) { synopsis_pre(p, n); return 1; } else if (n->type == ROFFT_HEAD) return 0; return termp_under_pre(p, pair, meta, n);}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:15,
示例4: mdoc_nm_prestatic intmdoc_nm_pre(MDOC_ARGS){ struct htmlpair tag; struct roffsu su; int len; switch (n->type) { case MDOC_ELEM: synopsis_pre(h, n); PAIR_CLASS_INIT(&tag, "name"); print_otag(h, TAG_B, 1, &tag); if (NULL == n->child && meta->name) print_text(h, meta->name); return(1); case MDOC_HEAD: print_otag(h, TAG_TD, 0, NULL); if (NULL == n->child && meta->name) print_text(h, meta->name); return(1); case MDOC_BODY: print_otag(h, TAG_TD, 0, NULL); return(1); default: break; } synopsis_pre(h, n); PAIR_CLASS_INIT(&tag, "synopsis"); print_otag(h, TAG_TABLE, 1, &tag); for (len = 0, n = n->child; n; n = n->next) if (MDOC_TEXT == n->type) len += html_strlen(n->string); if (0 == len && meta->name) len = html_strlen(meta->name); SCALE_HS_INIT(&su, len); bufinit(h); bufcat_su(h, "width", &su); PAIR_STYLE_INIT(&tag, h); print_otag(h, TAG_COL, 1, &tag); print_otag(h, TAG_COL, 0, NULL); print_otag(h, TAG_TBODY, 0, NULL); print_otag(h, TAG_TR, 0, NULL); return(1);}
开发者ID:cemeyer,项目名称:freebsd-base-graphics,代码行数:48,
示例5: termp_fn_pre/* ARGSUSED */static inttermp_fn_pre(DECL_ARGS){ size_t rmargin = 0; int pretty; pretty = MDOC_SYNPRETTY & n->flags; synopsis_pre(p, n); if (NULL == (n = n->child)) return(0); if (pretty) { rmargin = p->rmargin; p->rmargin = p->offset + term_len(p, 4); p->flags |= TERMP_NOBREAK | TERMP_HANG; } assert(MDOC_TEXT == n->type); term_fontpush(p, TERMFONT_BOLD); term_word(p, n->string); term_fontpop(p); if (pretty) { term_flushln(p); p->flags &= ~(TERMP_NOBREAK | TERMP_HANG); p->offset = p->rmargin; p->rmargin = rmargin; } p->flags |= TERMP_NOSPACE; term_word(p, "("); p->flags |= TERMP_NOSPACE; for (n = n->next; n; n = n->next) { assert(MDOC_TEXT == n->type); term_fontpush(p, TERMFONT_UNDER); if (pretty) p->flags |= TERMP_NBRWORD; term_word(p, n->string); term_fontpop(p); if (n->next) { p->flags |= TERMP_NOSPACE; term_word(p, ","); } } p->flags |= TERMP_NOSPACE; term_word(p, ")"); if (pretty) { p->flags |= TERMP_NOSPACE; term_word(p, ";"); term_flushln(p); } return(0);}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:61,
示例6: mdoc_cd_prestatic intmdoc_cd_pre(MDOC_ARGS){ synopsis_pre(h, n); print_otag(h, TAG_CODE, "cT", "Cd"); return 1;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:7,
示例7: mdoc_ft_prestatic intmdoc_ft_pre(MDOC_ARGS){ synopsis_pre(h, n); print_otag(h, TAG_VAR, "cT", "Ft"); return 1;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:7,
示例8: termp_fd_prestatic inttermp_fd_pre(DECL_ARGS){ synopsis_pre(p, n); return termp_bold_pre(p, pair, meta, n);}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:7,
示例9: termp_cd_prestatic inttermp_cd_pre(DECL_ARGS){ synopsis_pre(p, n); term_fontpush(p, TERMFONT_BOLD); return 1;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:8,
示例10: termp_ft_prestatic inttermp_ft_pre(DECL_ARGS){ /* NB: MDOC_LINE does not effect this! */ synopsis_pre(p, n); term_fontpush(p, TERMFONT_UNDER); return 1;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:9,
示例11: termp_nm_prestatic inttermp_nm_pre(DECL_ARGS){ const char *cp; if (n->type == ROFFT_BLOCK) { p->flags |= TERMP_PREKEEP; return 1; } if (n->type == ROFFT_BODY) { if (NULL == n->child) return 0; p->flags |= TERMP_NOSPACE; cp = NULL; if (n->prev->child != NULL) cp = n->prev->child->string; if (cp == NULL) cp = meta->name; if (cp == NULL) p->offset += term_len(p, 6); else p->offset += term_len(p, 1) + term_strlen(p, cp); return 1; } if (NULL == n->child && NULL == meta->name) return 0; if (n->type == ROFFT_HEAD) synopsis_pre(p, n->parent); if (n->type == ROFFT_HEAD && NULL != n->next && NULL != n->next->child) { p->flags |= TERMP_NOSPACE | TERMP_NOBREAK | TERMP_BRIND; p->trailspace = 1; p->rmargin = p->offset + term_len(p, 1); if (NULL == n->child) { p->rmargin += term_strlen(p, meta->name); } else if (n->child->type == ROFFT_TEXT) { p->rmargin += term_strlen(p, n->child->string); if (n->child->next) p->flags |= TERMP_HANG; } else { p->rmargin += term_len(p, 5); p->flags |= TERMP_HANG; } } term_fontpush(p, TERMFONT_BOLD); if (NULL == n->child) term_word(p, meta->name); return 1;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:54,
示例12: mdoc_fd_prestatic intmdoc_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,
示例13: termp_nm_pre/* ARGSUSED */static inttermp_nm_pre(DECL_ARGS){ if (MDOC_BLOCK == n->type) { p->flags |= TERMP_PREKEEP; return(1); } if (MDOC_BODY == n->type) { if (NULL == n->child) return(0); p->flags |= TERMP_NOSPACE; p->offset += term_len(p, 1) + (NULL == n->prev->child ? term_strlen(p, meta->name) : MDOC_TEXT == n->prev->child->type ? term_strlen(p, n->prev->child->string) : term_len(p, 5)); return(1); } if (NULL == n->child && NULL == meta->name) return(0); if (MDOC_HEAD == n->type) synopsis_pre(p, n->parent); if (MDOC_HEAD == n->type && n->next->child) { p->flags |= TERMP_NOSPACE | TERMP_NOBREAK; p->trailspace = 1; p->rmargin = p->offset + term_len(p, 1); if (NULL == n->child) { p->rmargin += term_strlen(p, meta->name); } else if (MDOC_TEXT == n->child->type) { p->rmargin += term_strlen(p, n->child->string); if (n->child->next) p->flags |= TERMP_HANG; } else { p->rmargin += term_len(p, 5); p->flags |= TERMP_HANG; } } term_fontpush(p, TERMFONT_BOLD); if (NULL == n->child) term_word(p, meta->name); return(1);}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:50,
示例14: termp_in_prestatic inttermp_in_pre(DECL_ARGS){ synopsis_pre(p, n); if (MDOC_SYNPRETTY & n->flags && MDOC_LINE & n->flags) { term_fontpush(p, TERMFONT_BOLD); term_word(p, "#include"); term_word(p, "<"); } else { term_word(p, "<"); term_fontpush(p, TERMFONT_UNDER); } p->flags |= TERMP_NOSPACE; return 1;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:18,
示例15: mdoc_in_prestatic intmdoc_in_pre(MDOC_ARGS){ struct tag *t; synopsis_pre(h, n); print_otag(h, TAG_CODE, "cT", "In"); /* * The first argument of the `In' gets special treatment as * being a linked value. Subsequent values are printed * afterward. groff does similarly. This also handles the case * of no children. */ if (NODE_SYNPRETTY & n->flags && NODE_LINE & n->flags) print_text(h, "#include"); print_text(h, "<"); h->flags |= HTML_NOSPACE; if (NULL != (n = n->child)) { assert(n->type == ROFFT_TEXT); if (h->base_includes) t = print_otag(h, TAG_A, "cThI", "In", n->string); else t = print_otag(h, TAG_A, "cT", "In"); print_text(h, n->string); print_tagq(h, t); n = n->next; } h->flags |= HTML_NOSPACE; print_text(h, ">"); for ( ; n; n = n->next) { assert(n->type == ROFFT_TEXT); print_text(h, n->string); } return 0;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:44,
示例16: termp_fo_prestatic inttermp_fo_pre(DECL_ARGS){ size_t rmargin = 0; int pretty; pretty = MDOC_SYNPRETTY & n->flags; if (n->type == ROFFT_BLOCK) { synopsis_pre(p, n); return 1; } else if (n->type == ROFFT_BODY) { if (pretty) { rmargin = p->rmargin; p->rmargin = p->offset + term_len(p, 4); p->flags |= TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG; } p->flags |= TERMP_NOSPACE; term_word(p, "("); p->flags |= TERMP_NOSPACE; if (pretty) { term_flushln(p); p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND | TERMP_HANG); p->offset = p->rmargin; p->rmargin = rmargin; } return 1; } if (NULL == n->child) return 0; /* XXX: we drop non-initial arguments as per groff. */ assert(n->child->string); term_fontpush(p, TERMFONT_BOLD); term_word(p, n->child->string); return 0;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:41,
示例17: mdoc_nm_prestatic intmdoc_nm_pre(MDOC_ARGS){ switch (n->type) { case ROFFT_HEAD: print_otag(h, TAG_TD, ""); /* FALLTHROUGH */ case ROFFT_ELEM: print_otag(h, TAG_CODE, "cT", "Nm"); return 1; case ROFFT_BODY: print_otag(h, TAG_TD, ""); return 1; default: break; } synopsis_pre(h, n); print_otag(h, TAG_TABLE, "c", "Nm"); print_otag(h, TAG_TR, ""); return 1;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:21,
示例18: mdoc_fo_prestatic intmdoc_fo_pre(MDOC_ARGS){ struct tag *t; if (n->type == ROFFT_BODY) { h->flags |= HTML_NOSPACE; print_text(h, "("); h->flags |= HTML_NOSPACE; return 1; } else if (n->type == ROFFT_BLOCK) { synopsis_pre(h, n); return 1; } if (n->child == NULL) return 0; assert(n->child->string); t = print_otag(h, TAG_CODE, "cT", "Fn"); print_text(h, n->child->string); print_tagq(h, t); return 0;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:24,
示例19: mdoc_fd_prestatic intmdoc_fd_pre(MDOC_ARGS){ struct htmlpair tag[2]; char buf[BUFSIZ]; size_t sz; int i; struct tag *t; synopsis_pre(h, n); if (NULL == (n = n->child)) return(0); assert(MDOC_TEXT == n->type); if (strcmp(n->string, "#include")) { PAIR_CLASS_INIT(&tag[0], "macro"); print_otag(h, TAG_B, 1, tag); return(1); } PAIR_CLASS_INIT(&tag[0], "includes"); print_otag(h, TAG_B, 1, tag); print_text(h, n->string); if (NULL != (n = n->next)) { assert(MDOC_TEXT == n->type); /* * XXX This is broken and not easy to fix. * When using -Oincludes, truncation may occur. * Dynamic allocation wouldn't help because * passing long strings to buffmt_includes() * does not work either. */ strlcpy(buf, '<' == *n->string || '"' == *n->string ? n->string + 1 : n->string, BUFSIZ); sz = strlen(buf); if (sz && ('>' == buf[sz - 1] || '"' == buf[sz - 1])) buf[sz - 1] = '/0'; PAIR_CLASS_INIT(&tag[0], "link-includes"); i = 1; if (h->base_includes) { buffmt_includes(h, buf); PAIR_HREF_INIT(&tag[i], h->buf); i++; } t = print_otag(h, TAG_A, i, tag); print_text(h, n->string); print_tagq(h, t); n = n->next; } for ( ; n; n = n->next) { assert(MDOC_TEXT == n->type); print_text(h, n->string); } return(0);}
开发者ID:cemeyer,项目名称:freebsd-base-graphics,代码行数:67,
示例20: mdoc_fn_prestatic intmdoc_fn_pre(MDOC_ARGS){ struct tag *t; char nbuf[BUFSIZ]; const char *sp, *ep; int sz, pretty; pretty = NODE_SYNPRETTY & n->flags; synopsis_pre(h, n); /* Split apart into type and name. */ assert(n->child->string); sp = n->child->string; ep = strchr(sp, ' '); if (NULL != ep) { t = print_otag(h, TAG_VAR, "cT", "Ft"); while (ep) { sz = MIN((int)(ep - sp), BUFSIZ - 1); (void)memcpy(nbuf, sp, (size_t)sz); nbuf[sz] = '/0'; print_text(h, nbuf); sp = ++ep; ep = strchr(sp, ' '); } print_tagq(h, t); } t = print_otag(h, TAG_CODE, "cT", "Fn"); if (sp) print_text(h, sp); print_tagq(h, t); h->flags |= HTML_NOSPACE; print_text(h, "("); h->flags |= HTML_NOSPACE; for (n = n->child->next; n; n = n->next) { if (NODE_SYNPRETTY & n->flags) t = print_otag(h, TAG_VAR, "cTs", "Fa", "white-space", "nowrap"); else t = print_otag(h, TAG_VAR, "cT", "Fa"); print_text(h, n->string); print_tagq(h, t); if (n->next) { h->flags |= HTML_NOSPACE; print_text(h, ","); } } h->flags |= HTML_NOSPACE; print_text(h, ")"); if (pretty) { h->flags |= HTML_NOSPACE; print_text(h, ";"); } return 0;}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:65,
注:本文中的synopsis_pre函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ syntax函数代码示例 C++ syncpt_to_dev函数代码示例 |