您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ BUFPUTSL函数代码示例

51自学网 2021-06-01 19:53:46
  C++
这篇教程C++ BUFPUTSL函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中BUFPUTSL函数的典型用法代码示例。如果您正苦于以下问题:C++ BUFPUTSL函数的具体用法?C++ BUFPUTSL怎么用?C++ BUFPUTSL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了BUFPUTSL函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rndr_paragraph

static voidrndr_paragraph(struct buf *ob, struct buf *text, void *opaque){	struct xhtml_renderopt *options = opaque;	size_t i = 0;	if (ob->size) bufputc(ob, '/n');	if (!text || !text->size)		return;	while (i < text->size && isspace(text->data[i])) i++;	if (i == text->size)		return;	BUFPUTSL(ob, "<p>");	if (options->flags & XHTML_HARD_WRAP) {		size_t org;		while (i < text->size) {			org = i;			while (i < text->size && text->data[i] != '/n')				i++;			if (i > org)				bufput(ob, text->data + org, i - org);			if (i >= text->size)				break;			BUFPUTSL(ob, "<br/>/n");			i++;		}	} else {		bufput(ob, &text->data[i], text->size - i);	}	BUFPUTSL(ob, "</p>/n");	/* Close any open quotes at the end of the paragraph */	options->quotes.in_squote = 0;	options->quotes.in_dquote = 0;}
开发者ID:bnoordhuis,项目名称:upskirt,代码行数:42,


示例2: rndr_paragraph

static voidrndr_paragraph(struct buf *ob, const struct buf *text, void *opaque){	struct html_renderopt *options = opaque;	size_t i = 0;	if (ob->size) bufputc(ob, '/n');	if (!text || !text->size)		return;	while (i < text->size && isspace(text->data[i])) i++;	if (i == text->size)		return;	BUFPUTSL(ob, "<p>");	if (options->flags & HTML_HARD_WRAP) {		size_t org;		while (i < text->size) {			org = i;			while (i < text->size && text->data[i] != '/n')				i++;			if (i > org)				bufput(ob, text->data + org, i - org);			/*			 * do not insert a line break if this newline			 * is the last character on the paragraph			 */			if (i >= text->size - 1)				break;			rndr_linebreak(ob, opaque);			i++;		}	} else {		bufput(ob, &text->data[i], text->size - i);	}	BUFPUTSL(ob, "</p>/n");}
开发者ID:CyberMameCAN,项目名称:astedesign.github.com,代码行数:42,


示例3: latex_header

static voidlatex_header(struct buf *ob, struct buf *text, int level, void *opaque) {	if (ob->size) bufputc(ob, '/n');	switch(level) {		case 1:			BUFPUTSL(ob,"//section{");			break;		case 2:			BUFPUTSL(ob, "//subsection{");			break;		case 3:			BUFPUTSL(ob, "//subsubsection{");			break;		default:			fprintf(stderr, "Warning: ignoring header level %d/n",                                        level);	}	if (text) bufput(ob, text->data, text->size);	if (level >= 1 && level <= 3) BUFPUTSL(ob, "}/n");}
开发者ID:biowink,项目名称:MarkdownParser,代码行数:20,


示例4: rndr_image

static intrndr_image(struct buf *ob, const struct buf *link, const struct buf *title, const struct buf *alt, void *opaque){	struct html_renderopt *options = opaque;	if (!link || !link->size) return 0;	BUFPUTSL(ob, "<img src=/"");	escape_href(ob, link->data, link->size);	BUFPUTSL(ob, "/" alt=/"");	if (alt && alt->size)		escape_html(ob, alt->data, alt->size);	if (title && title->size) {		BUFPUTSL(ob, "/" title=/"");		escape_html(ob, title->data, title->size); }	bufputs(ob, USE_XHTML(options) ? "/"/>" : "/">");	return 1;}
开发者ID:beingryu,项目名称:sundown,代码行数:20,


示例5: rndr_autolink

/******************** * GENERIC RENDERER * ********************/static intrndr_autolink(struct buf *ob, const struct buf *link, enum mkd_autolink type, void *opaque){	struct html_renderopt *options = opaque;	if (!link || !link->size)		return 0;	if ((options->flags & HTML_SAFELINK) != 0 &&		!sd_autolink_issafe(link->data, link->size) &&		type != MKDA_EMAIL)		return 0;	BUFPUTSL(ob, "<a href=/"");	if (type == MKDA_EMAIL)		BUFPUTSL(ob, "mailto:");	escape_href(ob, link->data, link->size);	if (options->link_attributes) {		bufputc(ob, '/"');		options->link_attributes(ob, link, opaque);		bufputc(ob, '>');	} else {		BUFPUTSL(ob, "/">");	}	/*	 * Pretty printing: if we get an email address as	 * an actual URI, e.g. `mailto:[email
C++ BUF_MEM_grow函数代码示例
C++ BUFFER_TRACE函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。