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


C++ putstr函数代码示例

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


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

示例1: diag_sd_verify_data

static int diag_sd_verify_data(u8* origin, u8* data, u32 len, int sector)
{
	int err_cnt = 0;
	u32 i;

	for (i = 0; i < len; i++) {
		if (origin[i] != data[i]) {
			err_cnt++;
			putstr("\r\nSector ");
			putdec(i / SECTOR_SIZE + sector);
			putstr(" byte ");
			putdec(i % SECTOR_SIZE);
			putstr(" failed data origin: 0x");
			puthex(origin[i]);
			putstr(" data: 0x");
			puthex(data[i]);
			putstr("\r\n");
		}
	}

	return err_cnt;
}
开发者ID:ShawnOfMisfit,项目名称:ambarella,代码行数:22,代码来源:diag_sd.c

示例2: help

int help(int argc, const char** argv) {
    shell_func func;

    //Check if they are trying to find help for a particular command
    if (argc > 1) {
        func = get_help(argv[1]);

        if (func == NULL) {
            putstr("Sorry no help exists for the command '");
            putstr(argv[1]);
            putstr("'\n");
        } else {
            func(argc, (const char **)argv);
        }
    } else {
        //List all possible commands
        putstr("Available commands:");
        putoptions(get_commands(""));
        putch('\n');
    }
    return 0;
}
开发者ID:jordanbray,项目名称:CECS-525-in-C-shell,代码行数:22,代码来源:help.c

示例3: prtdbl

pascal int prtdbl(double dbl, int width, int precision, char E)
{
    static char buf[200];
    int nn;

    if (width > 199)
       width = 199;
    if (width < -199)
       width = -199;
    nn = sprtdbl(buf, dbl, width, precision, E);
    putstr(buf,width);
    return nn;
}
开发者ID:robfinch,项目名称:Cores,代码行数:13,代码来源:prtdbl.c

示例4: main

void main(void)
{
	int i;

	TRISD = 0b00000111;				// All SCK, SDI, D_C, _SCE and _RES are output pins.
	initlcd();	
	putstr(" PCD-8544 LCD ");		// A test message.... Also a new year's greeting. :)
	cursorxy(0,1);					// Next line.
	putstr("Graphical Demo");

	for(;;)
	{
		for(i=0;i<num_of_points;i++)
		{
			plot_pt[i] = (char)(rand() % 256);			// Generate random numbers. Default is 0-255.
		}
		plotline(plot_pt, num_of_points, 255, 10, 2);	// Plot the smooth(er) line graph.
		plotbars(plot_pt, num_of_points, 255, 10, 4);	// Plot the bar graph version with the same points.

//		DelayS(5);	// Remark this line if you want to see some really blazing fast plotting. :)
	}
}
开发者ID:bluefix,项目名称:picsdr,代码行数:22,代码来源:nokia3310.c

示例5: addtopl

void addtopl(char *s)
{
    curs(tlx, tly);

    if((tlx + strlen(s)) > COLNO) {
        putsym('\n');
    }

    putstr(s);
    tlx = curx;
    tly = cury;
    flags.topl = 1;
}
开发者ID:tcadigan,项目名称:hack_1.0,代码行数:13,代码来源:hack.topl.c

示例6: deliver_by_window

static void
deliver_by_window (struct qtmsg *qt_msg, int how)
{
        long    size;
        winid datawin = create_nhwindow(how);

        for (size = 0; size < qt_msg->size; size += (long)strlen(in_line)) {
            (void) dlb_fgets(in_line, 80, msg_file);
            convert_line();
            putstr(datawin, 0, out_line);
        }
        display_nhwindow(datawin, true);
        destroy_nhwindow(datawin);
}
开发者ID:thejoshwolfe,项目名称:nethack,代码行数:14,代码来源:questpgr.c

示例7: inventory

void inventory(void) {
	clear(NULL);
	fgcolor(NULL, C_WHITE);
	putstr(NULL, 1, 1, "Inventory");
	/*
	item_t *item = inv->head;
	if (item == NULL) {
		fgcolor(NULL, C_GREY);
		putstr(NULL, 1, 3, "Empty");
	}
	else {
		int y = 3;
		while (item != NULL) {
			putstr(NULL, 1, y++, item->name);
			item = item->next;
		}
	}
	*/
	fgcolor(NULL, C_GREY);
	putstr(NULL, 1, 23, "[? for help]");
	update();
	getkey();
}
开发者ID:jdp,项目名称:psionrl,代码行数:23,代码来源:game.c

示例8: main

void main(void)    
{   

  char  txtbuf[16]="";
   
  Init_Dev();  
  PORTB=0x00;
  putstr("\nLongQiu s.&t. Co. Ltd.");    
  putstr("\nhttp://shop36265907.taobao.com");
  Dly_ms(1000);   
  PORTB=0xFF;
  EnableInterrupts;    
  for(;;)
  {     
    Dly_ms(500);
//----------PWM0---------------------------------- 
    sprintf(txtbuf,"\nFrequence: %d0Hz",PWMPER1);  
    putstr(txtbuf); 
    sprintf(txtbuf,"\n duty circle: %d%%",(PWMPER1-PWMDTY1)*100/PWMDTY1);
    putstr(txtbuf);        
    PORTB_PB0=~PORTB_PB0;        
  }//for(;;)
} //main
开发者ID:danbao,项目名称:SmartCar,代码行数:23,代码来源:demoXSPWM.c

示例9: redotoplin

void
redotoplin()
{
	home();
	if (strchr(toplines, '\n'))
		cl_end();
	putstr(toplines);
	cl_end();
	tlx = curx;
	tly = cury;
	flags.toplin = 1;
	if (tly > 1)
		more();
}
开发者ID:carriercomm,项目名称:BSDGames,代码行数:14,代码来源:hack.topl.c

示例10: envset

static void envset(char *a, char *b)
{
	int al = strlen(a);
	static char hptr[5];
	char *tp = sbrk(al + strlen(b) + 2);
	if (tp == (char *) -1) {
		putstr("out of memory.\n");
		return;
	}
	strcpy(tp, a);
	tp[al] = '=';
	strcpy(tp + al + 1, b);
	env[envn++] = tp;
}
开发者ID:aralbrec,项目名称:FUZIX,代码行数:14,代码来源:init.c

示例11: parse_inittab

/*
 *	Parse the init table, then set up the pointers after the processed
 *	data, and adjust the brk() value to allow for the tables
 */
static void parse_inittab(void)
{
	idata = inittab = sdata;
	while (sdata < sdata_end)
		parse_initline();
	/* Allocate space for the control arrays */
	initpid = (uint16_t *) idata;
	idata += 2 * initcount;
	initptr = (uint8_t **) idata;
	idata += sizeof(void *) * initcount;
	if (brk(idata) == -1)
		putstr("unable to return space\n");
	memset(initpid, 0, 2 * initcount);
	memset(initptr, 0, sizeof(uint8_t *) * initcount);
}
开发者ID:aralbrec,项目名称:FUZIX,代码行数:19,代码来源:init.c

示例12: ia_voir

void		ia_voir(t_world *world, t_cli *ia)
{
  int		i;
  t_card	pos;
  int		nb_case;

  putstr("\033[33mClient numero : ");
  print_nb(ia->numero);
  putstr(" voir\n\033[39m");
  pos.y = ia->pos.y;
  pos.x = ia->pos.x;
  pos.direction = ia->pos.direction;
  save_cmd(ia, MSG_DEB_VOIR, LEN_DEB_VOIR, 'W');
  i = 0;
  nb_case = 1;
  while (i <= ia->lvl)
    {
      look_rank(world, &pos, nb_case, ia);
      select_incr(world, &pos, nb_case + 1);
      nb_case += CASE_PER_LEVEL;
      i++;
    }
  save_cmd(ia, MSG_FIN_VOIR, LEN_FIN_VOIR, 'W');
}
开发者ID:Sun42,项目名称:Zappy,代码行数:24,代码来源:ia_voir.c

示例13: flush_window

/* ===========================================================================
 * Write the output window window[0..outcnt-1] and update bytes_out.
 * (Used for the decompressed data only.)
 */
void flush_window(void)
{
	unsigned n;
	uch *in, *out, ch;

	in = window;
	out = &output_data[output_ptr];
	for (n = 0; n < outcnt; n++)
		ch = *out++ = *in++;

	bytes_out += (ulg)outcnt;
	output_ptr += (ulg)outcnt;
	outcnt = 0;
	putstr(".");
}
开发者ID:camelguo,项目名称:linux-2.6-trimedia,代码行数:19,代码来源:misc.c

示例14: serial_load

unsigned int serial_load(void *dst)
{
	unsigned char *p = dst;
	unsigned int idle, len;

	putstr("Send binary now...");

	len = 0;
	while (len == 0) {
		for (idle = 0; (idle < 200000); idle++) {
			if (checkch()) {
				*p++ = getch();
				len++;
				idle = 0;
			}
		}
	}

	putstr("\nReceived 0x");
	putnum(len);
	putstr(" bytes\n");

	return len;
}
开发者ID:OPSF,项目名称:uClinux,代码行数:24,代码来源:flasher.c

示例15: text_Tests

void text_Tests(void)
{
	gfx_Cls() ;
	printf("Text Tests\n") ;
	putstr("Text Tests") ;

	txt_Attributes(BOLD + INVERSE + ITALIC + UNDERLINED) ;
	txt_Xgap(3) ;
	txt_Ygap(3) ;
	txt_BGcolour(YELLOW) ;
	txt_FGcolour(WHITE) ;
	txt_FontID(FONT3) ;
	txt_MoveCursor(5, 0) ;
	putstr("Hello There") ;

	txt_MoveCursor(6, 2) ;
	txt_Height(2) ;
	txt_Width(2) ;
	txt_Inverse(OFF) ;
	txt_Italic(OFF) ;
	txt_Opacity(TRANSPARENT) ;
	txt_Set(TEXT_COLOUR, LIME) ;
	txt_Underline(ON) ;
	txt_Bold(OFF) ;
	txt_Wrap(88) ;
	putstr("Hello There") ;
	txt_Height(1) ;
	txt_Width(1) ;
	putCH('z') ;
	txt_Wrap(0) ;              // reset
	printf("Char height= %d Width= %d\n", charheight('w'), charwidth('w') ) ;
	txt_BGcolour(BLACK) ;
	txt_FGcolour(LIME) ;
	txt_FontID(FONT3) ;
	txt_MoveCursor(0,0) ;      // reset
}
开发者ID:Plomion,项目名称:Picaso-Serial-C-Library,代码行数:36,代码来源:BIGDEMO.C


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