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


C++ pprintf函数代码示例

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


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

示例1: pprintf

void IFFT::help() {
    pprintf("-ifft performs an inverse dft on the current image, whose values are"
            " complex. The input and output are images with 2*c channels, where"
            " channel 2*i is the real part of the i\'th channel, and channel 2*i+1"
            " is the imaginary part of the i'th channel.\n"
            "\n"
            "Usage: ImageStack -load a.tga -fftcomplex -save freq.tga\n\n");
}
开发者ID:mit-gfx,项目名称:ImageStack,代码行数:8,代码来源:DFT.cpp

示例2: lcd_printf

//  added 28/01/2011 [email protected]
void lcd_printf(char *fmt, ...)
{
	va_list args;

	va_start(args, fmt);
	pprintf(lcd_write, fmt, args);
	va_end(args);
}
开发者ID:jimgregory,项目名称:pinguino-libraries,代码行数:9,代码来源:lcdlib.c

示例3: decl

void decl(void) {
    char decl_type[MAXTOKEN];
    decl_type[0] = '\0';
    gettoken();
    type(decl_type);
    dcl();
    pprintf("%s\n", decl_type);
}
开发者ID:ytlvy,项目名称:codinghighway,代码行数:8,代码来源:dclparser2.c

示例4: com_asetemail

/*
 * asetemail
 *
 * Usage: asetemail player [address]
 *
 *   Sets the email address of the player to the address given.  If the
 *   address is omited, then the player's email address is cleared.  The
 *   person's email address is revealed to them when they use the "finger"
 *   command, but no other users -- except admins -- will have another
 *   player's email address displayed.
 */
int com_asetemail(int p, param_list param)
{
  struct player *pp = &player_globals.parray[p];
  int p1, connected;
  char *oldemail;

  if (!FindPlayer(p, param[0].val.word, &p1, &connected))
    return COM_OK;

  if (!check_admin2(p, p1)) {
    pprintf(p, "You can only set email addr for players below your adminlevel.\n");
    if (!connected)
      player_remove(p1);
    return COM_OK;
  }
  if (player_globals.parray[p1].emailAddress) {
    oldemail = strdup(player_globals.parray[p1].emailAddress);
    free(player_globals.parray[p1].emailAddress);
  } else {
    oldemail = strdup("");
  }

  if (param[1].type == TYPE_NULL) {
    player_globals.parray[p1].emailAddress = NULL;
    pprintf(p, "Email address for %s removed\n", player_globals.parray[p1].name);
    pcommand(p, "addcomment %s Email address removed.\n", player_globals.parray[p1].name);

  } else {
    player_globals.parray[p1].emailAddress = strdup(param[1].val.word);
    pprintf(p, "Email address of %s changed to \"%s\".\n", player_globals.parray[p1].name, param[1].val.word);
    pcommand(p, "addcomment %s Email address changed from %s to %s.\n", player_globals.parray[p1].name, oldemail, player_globals.parray[p1].emailAddress);
  }
  free(oldemail);
  player_save(p1);
  if (connected) {
    if (param[1].type == TYPE_NULL) {
      pprintf_prompt(p1, "\n\n%s has removed your email address.\n\n", pp->name);
    } else {
      pprintf_prompt(p1, "\n\n%s has changed your email address.\n\n", pp->name);
    }
  } else {
    player_remove(p1);
  }
  return COM_OK;
}
开发者ID:SKAcz,项目名称:bics-current,代码行数:56,代码来源:adminproc.c

示例5: init_linemon

static int
init_linemon(
	     queue_t *q
	     )
{
	register queue_t *dq;
  
	dq = WR(q);
	/*
	 * we ARE doing very bad things down here (basically stealing ISR
	 * hooks)
	 *
	 * so we chase down the STREAMS stack searching for the driver
	 * and if this is a known driver we insert our ISR routine for
	 * status changes in to the ExternalStatus handling hook
	 */
	while (dq->q_next)
	{
		dq = dq->q_next;		/* skip down to driver */
	}

	/*
	 * find appropriate driver dependent routine
	 */
	if (dq->q_qinfo && dq->q_qinfo->qi_minfo)
	{
		register char *dname = dq->q_qinfo->qi_minfo->mi_idname;

		pprintf(DD_INSTALL, "init_linemon: driver is \"%s\"\n", dname);

#ifdef sun
		if (dname && !strcmp(dname, "zs"))
		{
			return init_zs_linemon(dq, q);
		}
		else
#endif
		{
			pprintf(DD_INSTALL, "init_linemon: driver \"%s\" not suitable for CD monitoring\n", dname);
			return 0;
		}
	}
	pprintf(DD_INSTALL, "init_linemon: cannot find driver\n");
	return 0;
}
开发者ID:kangaroo,项目名称:freebsd,代码行数:45,代码来源:parsesolaris.c

示例6: com_asetbug

/*
 * asetbug
 *
 * Usage: asetbug handle rating won lost drew RD
 *
 *   This command allows admins to set a user's statistics for Bughouse
 *   games.  The parameters are self-explanatory: rating, # of wins,
 *   # of losses, # of draws, and ratings deviation.
 */
int com_asetbug(int p, param_list param)
{
  int p1, connected;

  if (!FindPlayer(p, param[0].val.word, &p1, &connected))
    return COM_OK;

  if (CheckPFlag(p1, PFLAG_REG)) {
    SetRating(p1, param, &player_globals.parray[p1].bug_stats);
    player_save(p1);
    pprintf(p, "Bughouse rating for %s modified.\n", player_globals.parray[p1].name);
  } else
    pprintf(p, "%s is unregistered. Can't modify rating.\n", player_globals.parray[p1].name);

  if (!connected)
    player_remove(p1);
  return COM_OK;
}
开发者ID:SKAcz,项目名称:bics-current,代码行数:27,代码来源:adminproc.c

示例7: netif_proc

static int netif_proc(struct proc_file *pf, void *arg) {
  struct netif *netif;
  
  for (netif = netif_list; netif != NULL; netif = netif->next) {
    pprintf(pf, "%s: addr %a mask %a gw %a\n", netif->name, &netif->ipaddr, &netif->netmask, &netif->gw);
  }

  return 0;
}
开发者ID:HarryR,项目名称:sanos,代码行数:9,代码来源:netif.c

示例8: pprintf

void DimensionReduction::help() {
    pprintf("-dimensionreduction takes a dimensionality and projects all points on"
            " the image onto a linear subspace of best fit with that number of"
            " dimensions. It is useful if you know an image should be low"
            " dimensional (eg a sunset is mostly shades or red), and components"
            " orthogonal to that dimension are unwanted (eg chromatic"
            " abberation).\n\n"
            "Usage: ImageStack -load sunset.jpg -dimensionreduction 2 -save fixed.jpg\n\n");
}
开发者ID:CommonLibrary,项目名称:ImageStack,代码行数:9,代码来源:Statistics.cpp

示例9: sys_converged

static int sys_converged (equation_system *sys, double *llbak,
			  gretlopt opt, PRN *prn, int *err)
{
    double crit, tol = 0.0;
    int met = 0;

    if (sys->method == SYS_METHOD_SUR || 
	sys->method == SYS_METHOD_WLS) {
	double ll = sur_loglik(sys);

	tol = SYS_LL_TOL;
	crit = ll - *llbak;

	if (opt & OPT_V) {
	    pprintf(prn, "Iteration %3d, ll = %#.8g\n", sys->iters, ll);
	}
	if (crit <= tol) {
	    met = 1;
	} else if (sys->iters < SYS_MAX_ITER) {
	    *llbak = ll;
	} 
    } else if (sys->method == SYS_METHOD_3SLS) {
	tol = SYS_BDIFF_TOL;
	crit = sys->bdiff;
	if (opt & OPT_V) {
	    pprintf(prn, "Iteration %3d, criterion = %g\n", sys->iters, crit);
	}
	if (crit <= tol) {
	    met = 1;
	} 
    }

    if (met && tol > 0 && (opt & OPT_V)) {
	pprintf(prn, "Tolerance of %g is met\n", tol);
    }

    if (!met && sys->iters >= SYS_MAX_ITER) {
	pprintf(prn, "Reached %d iterations without meeting "
		"tolerance of %g\n", sys->iters, tol);
	*err = E_NOCONV;
    }	

    return met;
}
开发者ID:HelioGuilherme66,项目名称:gretl,代码行数:44,代码来源:sysest.c

示例10: function_noargs_error

static void function_noargs_error (const char *s, parser *p)
{
    parser_print_input(p);

    pprintf(p->prn, _("'%s': no argument was given"), s);
    pputc(p->prn, '\n');
    gretl_errmsg_sprintf(_("'%s': no argument was given"), s);

    p->err = E_ARGS;
}
开发者ID:agaurav,项目名称:QT-GRETL,代码行数:10,代码来源:genlex.c

示例11: gretl_array_print

int gretl_array_print (gretl_array *A, PRN *prn)
{
    if (A != NULL) {
	const char *s = gretl_type_get_name(A->type);

	pprintf(prn, _("Array of %s, length %d\n"), s, A->n);
    }

    return 0;
}
开发者ID:aylusltd,项目名称:gretl,代码行数:10,代码来源:gretl_array.c

示例12: pprintf

void ComplexDivide::help() {
    pprintf("-complexdivide divides the top image in the stack by the second image"
            " in the stack, using 2 \"complex\" images as its input - a \"complex\""
            " image is one where channel 2*n is the real part of the nth channel and"
            " channel 2*n + 1 is the imaginary part of the nth channel. Using zero"
            " arguments results in a straight division (a + bi) / (c + di). Using"
            " one argument results in a conjugate division (a - bi) / (c + di).\n"
            "\n"
            "Usage: ImageStack -load a.tga -load b.tga -complexdivide -save out.tga.\n");
}
开发者ID:bayanbatn,项目名称:cs478assignment2,代码行数:10,代码来源:Complex.cpp

示例13: pprintf

void FFTConvolve::help() {
    pprintf("-fftconvolve performs convolution in Fourier space. It is much faster"
            " than -convolve for large kernels. The two arguments are the boundary"
            " condition (zero, clamp, wrap, homogeneous) and the vector-vector"
            " multiplication used (inner, outer, elementwise). The defaults are wrap"
            " and outer respectively. See -convolve for a description of each"
            " option.\n"
            "\n"
            "Usage: ImageStack -load filter.tmp -load im.jpg -fftconvolve zero inner\n");
}
开发者ID:CommonLibrary,项目名称:ImageStack,代码行数:10,代码来源:DFT.cpp

示例14: pprintf

void GPSSensorWriter::Write(Print *p) {
  float lat;
  float lon;
  unsigned long age;
  gps_->f_get_position(&lat, &lon, &age);

  char buf[16]; // No %f in sprintf? What the fuck.
  char buf2[16];
  pprintf(p, "GPS: LAT: %s, LON: %s AGE: %lu\n", strf(buf, lat), strf(buf2, lon), age);
}
开发者ID:rehuffman,项目名称:TeensyLaunchPayload,代码行数:10,代码来源:serial_util.cpp

示例15: pprintf

void Poisson::help() {
    pprintf("-poisson assumes the stack contains gradients images in x and y, and"
            " attempts to find the image which fits those gradients best in a least"
            " squares sense. It uses a preconditioned conjugate gradient descent"
            " method. It takes one argument, which is required RMS error of the"
            " result. This defaults to 0.01 if not given.\n"
            "\n"
            "Usage: ImageStack -load dx.tmp dy.tmp \n"
            "                  -poisson 0.0001 -save out.tga\n\n");
}
开发者ID:daviddoria,项目名称:PatchMatchImageStack,代码行数:10,代码来源:Calculus.cpp


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