这篇教程C++ term_newln函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中term_newln函数的典型用法代码示例。如果您正苦于以下问题:C++ term_newln函数的具体用法?C++ term_newln怎么用?C++ term_newln使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了term_newln函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: termp_an_pre/* ARGSUSED */static inttermp_an_pre(DECL_ARGS){ if (NULL == n->child) return(1); /* * If not in the AUTHORS section, `An -split' will cause * newlines to occur before the author name. If in the AUTHORS * section, by default, the first `An' invocation is nosplit, * then all subsequent ones, regardless of whether interspersed * with other macros/text, are split. -split, in this case, * will override the condition of the implied first -nosplit. */ if (n->sec == SEC_AUTHORS) { if ( ! (TERMP_ANPREC & p->flags)) { if (TERMP_SPLIT & p->flags) term_newln(p); return(1); } if (TERMP_NOSPLIT & p->flags) return(1); term_newln(p); return(1); } if (TERMP_SPLIT & p->flags) term_newln(p); return(1);}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:34,
示例2: synopsis_pre/* * This decides how to assert whitespace before any of the SYNOPSIS set * of macros (which, as in the case of Ft/Fo and Ft/Fn, may contain * macro combos). */static voidsynopsis_pre(struct termp *p, const struct mdoc_node *n){ /* * Obviously, if we're not in a SYNOPSIS or no prior macros * exist, do nothing. */ if (NULL == n->prev || ! (MDOC_SYNPRETTY & n->flags)) return; /* * If we're the second in a pair of like elements, emit our * newline and return. UNLESS we're `Fo', `Fn', `Fn', in which * case we soldier on. */ if (n->prev->tok == n->tok && MDOC_Ft != n->tok && MDOC_Fo != n->tok && MDOC_Fn != n->tok) { term_newln(p); return; } /* * If we're one of the SYNOPSIS set and non-like pair-wise after * another (or Fn/Fo, which we've let slip through) then assert * vertical space, else only newline and move on. */ switch (n->prev->tok) { case (MDOC_Fd): /* FALLTHROUGH */ case (MDOC_Fn): /* FALLTHROUGH */ case (MDOC_Fo): /* FALLTHROUGH */ case (MDOC_In): /* FALLTHROUGH */ case (MDOC_Vt): term_vspace(p); break; case (MDOC_Ft): if (MDOC_Fn != n->tok && MDOC_Fo != n->tok) { term_vspace(p); break; } /* FALLTHROUGH */ default: term_newln(p); break; }}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:56,
示例3: post_SHstatic voidpost_SH(DECL_ARGS){ switch (n->type) { case ROFFT_HEAD: term_newln(p); break; case ROFFT_BODY: term_newln(p); break; default: break; }}
开发者ID:ajinkya93,项目名称:OpenBSD,代码行数:15,
示例4: termp_bl_post/* ARGSUSED */static voidtermp_bl_post(DECL_ARGS){ if (MDOC_BLOCK == n->type) term_newln(p);}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:8,
示例5: post_HPstatic voidpost_HP(DECL_ARGS){ switch (n->type) { case ROFFT_BODY: term_newln(p); /* * Compatibility with a groff bug. * The .HP macro uses the undocumented .tag request * which causes a line break and cancels no-space * mode even if there isn't any output. */ if (n->child == NULL) term_vspace(p); p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->trailspace = 0; p->offset = mt->offset; p->rmargin = p->maxrmargin; break; default: break; }}
开发者ID:ajinkya93,项目名称:OpenBSD,代码行数:27,
示例6: termp_an_prestatic inttermp_an_pre(DECL_ARGS){ if (n->norm->An.auth == AUTH_split) { p->flags &= ~TERMP_NOSPLIT; p->flags |= TERMP_SPLIT; return(0); } if (n->norm->An.auth == AUTH_nosplit) { p->flags &= ~TERMP_SPLIT; p->flags |= TERMP_NOSPLIT; return(0); } if (n->child == NULL) return(0); if (p->flags & TERMP_SPLIT) term_newln(p); if (n->sec == SEC_AUTHORS && ! (p->flags & TERMP_NOSPLIT)) p->flags |= TERMP_SPLIT; return(1);}
开发者ID:jashank,项目名称:freebsd,代码行数:26,
示例7: termp_sp_prestatic inttermp_sp_pre(DECL_ARGS){ struct roffsu su; int i, len; switch (n->tok) { case MDOC_sp: if (n->child) { if ( ! a2roffsu(n->child->string, &su, SCALE_VS)) su.scale = 1.0; len = term_vspan(p, &su); } else len = 1; break; case MDOC_br: len = 0; break; default: len = 1; fn_prio = 0; break; } if (0 == len) term_newln(p); else if (len < 0) p->skipvsp -= len; else for (i = 0; i < len; i++) term_vspace(p); return 0;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:34,
示例8: pre_RSstatic intpre_RS(DECL_ARGS){ struct roffsu su; switch (n->type) { case MAN_BLOCK: term_newln(p); return(1); case MAN_HEAD: return(0); default: break; } n = n->parent->head; n->aux = SHRT_MAX + 1; if (n->child != NULL && a2roffsu(n->child->string, &su, SCALE_EN)) n->aux = term_hspan(p, &su); if (n->aux < 0 && (size_t)(-n->aux) > mt->offset) n->aux = -mt->offset; else if (n->aux > SHRT_MAX) n->aux = term_len(p, p->defindent); mt->offset += n->aux; p->offset = mt->offset; p->rmargin = p->maxrmargin; if (++mt->lmarginsz < MAXMARGINS) mt->lmargincur = mt->lmarginsz; mt->lmargin[mt->lmargincur] = mt->lmargin[mt->lmargincur - 1]; return(1);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:34,
示例9: termp_ss_post/* ARGSUSED */static voidtermp_ss_post(DECL_ARGS){ if (MDOC_HEAD == n->type) term_newln(p);}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:8,
示例10: termp_sh_poststatic voidtermp_sh_post(DECL_ARGS){ switch (n->type) { case ROFFT_HEAD: term_newln(p); break; case ROFFT_BODY: term_newln(p); p->offset = 0; break; default: break; }}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:16,
示例11: termp_ex_prestatic inttermp_ex_pre(DECL_ARGS){ int nchild; term_newln(p); term_word(p, "The"); nchild = n->nchild; for (n = n->child; n; n = n->next) { term_fontpush(p, TERMFONT_BOLD); term_word(p, n->string); term_fontpop(p); if (nchild > 2 && n->next) { p->flags |= TERMP_NOSPACE; term_word(p, ","); } if (n->next && NULL == n->next->next) term_word(p, "and"); } if (nchild > 1) term_word(p, "utilities exit//~0"); else term_word(p, "utility exits//~0"); term_word(p, "on success, and//~>0 if an error occurs."); p->flags |= TERMP_SENTENCE; return 0;}
开发者ID:belooussov,项目名称:mdocml,代码行数:33,
示例12: termp_ex_prestatic inttermp_ex_pre(DECL_ARGS){ struct roff_node *nch; term_newln(p); term_word(p, "The"); for (nch = n->child; nch != NULL; nch = nch->next) { term_fontpush(p, TERMFONT_BOLD); term_word(p, nch->string); term_fontpop(p); if (nch->next == NULL) continue; if (nch->prev != NULL || nch->next->next != NULL) { p->flags |= TERMP_NOSPACE; term_word(p, ","); } if (nch->next->next == NULL) term_word(p, "and"); } if (n->child != NULL && n->child->next != NULL) term_word(p, "utilities exit//~0"); else term_word(p, "utility exits//~0"); term_word(p, "on success, and//~>0 if an error occurs."); p->flags |= TERMP_SENTENCE; return 0;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:35,
示例13: termp_bl_poststatic voidtermp_bl_post(DECL_ARGS){ if (n->type == ROFFT_BLOCK) term_newln(p);}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:7,
示例14: termp_ss_poststatic voidtermp_ss_post(DECL_ARGS){ if (n->type == ROFFT_HEAD || n->type == ROFFT_BODY) term_newln(p);}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:7,
示例15: termp_lb_poststatic voidtermp_lb_post(DECL_ARGS){ if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags) term_newln(p);}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:7,
示例16: term_vspace/* * Asserts a vertical space (a full, empty line-break between lines). * Note that if used twice, this will cause two blank spaces and so on. * All data in the output buffer is flushed prior to the newline * assertion. */voidterm_vspace(struct termp *p){ term_newln(p); p->viscol = 0; (*p->endline)(p);}
开发者ID:Hooman3,项目名称:minix,代码行数:14,
示例17: termp_d1_prestatic inttermp_d1_pre(DECL_ARGS){ if (n->type != ROFFT_BLOCK) return 1; term_newln(p); p->offset += term_len(p, p->defindent + 1); return 1;}
开发者ID:gokzy,项目名称:netbsd-src,代码行数:10,
示例18: termp_d1_pre/* ARGSUSED */static inttermp_d1_pre(DECL_ARGS){ if (MDOC_BLOCK != n->type) return(1); term_newln(p); p->offset += term_len(p, p->defindent + 1); return(1);}
开发者ID:2015520,项目名称:SequoiaDB,代码行数:11,
示例19: term_vspace/* * Asserts a vertical space (a full, empty line-break between lines). * Note that if used twice, this will cause two blank spaces and so on. * All data in the output buffer is flushed prior to the newline * assertion. */voidterm_vspace(struct termp *p){ term_newln(p); p->viscol = 0; if (0 < p->skipvsp) p->skipvsp--; else (*p->endline)(p);}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:17,
示例20: pre_spstatic intpre_sp(DECL_ARGS){ char *s; size_t i, len; int neg; if ((NULL == n->prev && n->parent)) { switch (n->parent->tok) { case MAN_SH: /* FALLTHROUGH */ case MAN_SS: /* FALLTHROUGH */ case MAN_PP: /* FALLTHROUGH */ case MAN_LP: /* FALLTHROUGH */ case MAN_P: /* FALLTHROUGH */ return(0); default: break; } } neg = 0; switch (n->tok) { case MAN_br: len = 0; break; default: if (NULL == n->child) { len = 1; break; } s = n->child->string; if ('-' == *s) { neg = 1; s++; } len = a2height(p, s); break; } if (0 == len) term_newln(p); else if (neg) p->skipvsp += len; else for (i = 0; i < len; i++) term_vspace(p); return(0);}
开发者ID:mr-justin,项目名称:freebsd,代码行数:54,
示例21: roff_term_pre_brstatic voidroff_term_pre_br(ROFF_TERM_ARGS){ term_newln(p); if (p->flags & TERMP_BRIND) { p->tcol->offset = p->tcol->rmargin; p->tcol->rmargin = p->maxrmargin; p->trailspace = 0; p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->flags |= TERMP_NOSPACE; }}
开发者ID:jaredmcneill,项目名称:netbsd-src,代码行数:12,
示例22: termp_rv_prestatic inttermp_rv_pre(DECL_ARGS){ int nchild; term_newln(p); nchild = n->nchild; if (nchild > 0) { term_word(p, "The"); for (n = n->child; n; n = n->next) { term_fontpush(p, TERMFONT_BOLD); term_word(p, n->string); term_fontpop(p); p->flags |= TERMP_NOSPACE; term_word(p, "()"); if (n->next == NULL) continue; if (nchild > 2) { p->flags |= TERMP_NOSPACE; term_word(p, ","); } if (n->next->next == NULL) term_word(p, "and"); } if (nchild > 1) term_word(p, "functions return"); else term_word(p, "function returns"); term_word(p, "the value//~0 if successful;"); } else term_word(p, "Upon successful completion," " the value//~0 is returned;"); term_word(p, "otherwise the value//~//-1 is returned" " and the global variable"); term_fontpush(p, TERMFONT_UNDER); term_word(p, "errno"); term_fontpop(p); term_word(p, "is set to indicate the error."); p->flags |= TERMP_SENTENCE; return 0;}
开发者ID:belooussov,项目名称:mdocml,代码行数:52,
注:本文中的term_newln函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ term_vspace函数代码示例 C++ term_len函数代码示例 |