当前位置: 首页>>代码示例>>C++>>正文


C++ print_text函数代码示例

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


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

示例1: mdoc_ap_pre

static int
mdoc_ap_pre(MDOC_ARGS)
{

	h->flags |= HTML_NOSPACE;
	print_text(h, "\\(aq");
	h->flags |= HTML_NOSPACE;
	return(1);
}
开发者ID:cemeyer,项目名称:freebsd-base-graphics,代码行数:9,代码来源:mdoc_html.c

示例2: print

/* parent depends on dep which is satisfied by pkg */
static void print(const char *parentname, const char *pkgname,
		const char *depname, tdepth *depth, int last)
{
	if(graphviz) {
		print_graph(parentname, pkgname, depname);
	} else {
		print_text(pkgname, depname, depth, last);
	}
}
开发者ID:DavidEGrayson,项目名称:MSYS2-pacman,代码行数:10,代码来源:pactree.c

示例3: mdoc_in_pre

static int
mdoc_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,代码来源:mdoc_html.c

示例4: store_continuation

static void store_continuation(struct tid_data *tid,
					const uint8_t *data, uint16_t size)
{
	if (size > MAX_CONT_SIZE) {
		print_text(COLOR_ERROR, "invalid continuation size");
		return;
	}
	memcpy(tid->cont, data, size);
	print_continuation(data, size);
}
开发者ID:ghent360,项目名称:bluez,代码行数:10,代码来源:sdp.c

示例5: print_text1

/*----------------------------------------------------------------------
      printf style formatting with one arg for printer

 Args: line -- The printf control string
       a1   -- The 1st argument for printf
 ----*/
void
print_text1(char *line, char *a1)
{
    char buf[64000];

    if(!ps_global->print->err && snprintf(buf, sizeof(buf), line, a1) < 0)
      ps_global->print->err = 1;
    else
      print_text(buf);
}
开发者ID:nysan,项目名称:alpine,代码行数:16,代码来源:print.c

示例6: whatnow

/* If flag = 0 (default): check if s existed in 1.39.15 and print verbosely
 * the answer.
 * If flag > 0: silently return n+1 if function changed, 0 otherwise.
 *   (where n is the index of s in whatnowlist).
 * If flag < 0: -flag-1 is the index in whatnowlist
 */
int
whatnow(char *s, int flag)
{
  int n;
  char *def;
  whatnow_t wp;
  entree *ep;

  if (flag < 0) { n = -flag; flag = 0; }
  else
  {
    if (flag && strlen(s)==1) return 0; /* special case "i" and "o" */
    if (!is_identifier(s) || !is_entry_intern(s,funct_old_hash,NULL))
    {
      if (flag) return 0;
      pari_err(talker,"as far as I can recall, this function never existed");
    }
    n = 0;
    do
      def = (oldfonctions[n++]).name;
    while (def && strcmp(def,s));
    if (!def)
    {
      int m=0;
      do
        def = (functions_oldgp[m++]).name;
      while (def && strcmp(def,s));
      n += m - 1;
    }
  }

  wp=whatnowlist[n-1]; def=wp.name;
  if (def == SAME)
  {
    if (flag) return 0;
    pari_err(talker,"this function did not change");
  }
  if (flag) return n;

  if (def == REMOV)
    pari_err(talker,"this function was suppressed");
  if (!strcmp(def,"x*y"))
  {
    pariprintf("  %s is now called *.\n\n",s);
    pariprintf("    %s%s ===> %s%s\n\n",s,wp.oldarg,wp.name,wp.newarg);
    return 1;
  }
  ep = is_entry(wp.name);
  if (!ep) pari_err(bugparier,"whatnow");
  pariputs("New syntax: "); term_color(c_ERR);
  pariprintf("%s%s ===> %s%s\n\n",s,wp.oldarg,wp.name,wp.newarg);
  term_color(c_HELP);
  print_text(ep->help); pariputc('\n');
  term_color(c_NONE); return 1;
}
开发者ID:BENGMN,项目名称:soen490,代码行数:61,代码来源:whatnow.c

示例7: 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

示例8: print_continuation

static void print_continuation(const uint8_t *data, uint16_t size)
{
	if (data[0] != size - 1) {
		print_text(COLOR_ERROR, "invalid continuation state");
		packet_hexdump(data, size);
		return;
	}

	print_field("Continuation state: %d", data[0]);
	packet_hexdump(data + 1, size - 1);
}
开发者ID:ghent360,项目名称:bluez,代码行数:11,代码来源:sdp.c

示例9: print_man_head

static void
print_man_head(MAN_ARGS)
{
	char	*cp;

	print_gen_head(h);
	mandoc_asprintf(&cp, "%s(%s)", man->title, man->msec);
	print_otag(h, TAG_TITLE, "");
	print_text(h, cp);
	free(cp);
}
开发者ID:mulichao,项目名称:freebsd,代码行数:11,代码来源:man_html.c

示例10: 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

示例11: print_man_head

static void
print_man_head(MAN_ARGS)
{

	print_gen_head(h);
	assert(man->title);
	assert(man->msec);
	bufcat_fmt(h, "%s(%s)", man->title, man->msec);
	print_otag(h, TAG_TITLE, 0, NULL);
	print_text(h, h->buf);
}
开发者ID:jashank,项目名称:freebsd,代码行数:11,代码来源:man_html.c

示例12: mdoc_nd_pre

static int
mdoc_nd_pre(MDOC_ARGS)
{
	if (n->type != ROFFT_BODY)
		return 1;

	print_text(h, "\\(em");
	/* Cannot use TAG_SPAN because it may contain blocks. */
	print_otag(h, TAG_DIV, "cT", "Nd");
	return 1;
}
开发者ID:drscream,项目名称:illumos-joyent,代码行数:11,代码来源:mdoc_html.c

示例13: data_packet

static void data_packet(const void *data, uint8_t size)
{
	const uint8_t *ptr = data;
	uint8_t llid, length;
	bool nesn, sn, md;
	const char *str;

	if (size < 2) {
		print_text(COLOR_ERROR, "packet too short");
		packet_hexdump(data, size);
		return;
	}

	llid = ptr[0] & 0x03;
	nesn = !!(ptr[0] & 0x04);
	sn = !!(ptr[0] & 0x08);
	md = !!(ptr[0] & 0x10);
	length = ptr[1] & 0x1f;

	switch (llid) {
	case 0x01:
		if (length > 0)
			str = "Continuation fragement of L2CAP message";
		else
			str = "Empty message";
		break;
	case 0x02:
		str = "Start of L2CAP message";
		break;
	case 0x03:
		str = "Control";
		break;
	default:
		str = "Reserved";
		break;
	}

	print_field("LLID: %s (0x%2.2x)", str, llid);
	print_field("Next expected sequence number: %u", nesn);
	print_field("Sequence number: %u", sn);
	print_field("More data: %u", md);
	print_field("Length: %u", length);

	switch (llid) {
	case 0x03:
		llcp_packet(data + 2, size - 2);
		break;

	default:
		packet_hexdump(data + 2, size - 2);
		break;
	}
}
开发者ID:AlanApter,项目名称:steamlink-sdk,代码行数:53,代码来源:ll.c

示例14: verifier

int verifier(int nb_a_verifier){

int nbmodifiable=nb_a_verifier;

 while((nbmodifiable<1)||(nbmodifiable>10000)){
  print_text("Fais pas chier rentres un nombre valable ");
  print_newline();
  print_newline();
  nbmodifiable=read_int();
  print_newline();}

 return nbmodifiable;}
开发者ID:MaximeDouylliez,项目名称:DUT-Info,代码行数:12,代码来源:Jeux.c

示例15: comparer

 bool comparer(int nombre_a_comparer, int nb_genere_aleatoirement){
   bool gagne_ou_pas;
   if(nb_genere_aleatoirement < nombre_a_comparer){
     print_text("Le nombre mysterieux est plus petit que le nombre entré");
     print_newline();
     print_newline();
     gagne_ou_pas=false;}

   else if(nb_genere_aleatoirement > nombre_a_comparer){
     print_text("Le nombre mysterieux est plus grand que le nombre entré");
     print_newline();
     print_newline();
     gagne_ou_pas=false;}

   else{
     print_text("Vous avez gagné");
     print_newline();
     print_newline();
     gagne_ou_pas=true;}

   return gagne_ou_pas;}
开发者ID:MaximeDouylliez,项目名称:DUT-Info,代码行数:21,代码来源:Jeux.c


注:本文中的print_text函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。