• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ put_crlf函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ShowTaskInfo

void ShowTaskInfo(Serial *serial, unsigned int argc, char **argv)
{
    putHeader(serial, "Task Info");

    serial->put_s("Status\tPri\tStackHR\tTask#\tName");
    put_crlf(serial);

    /*
     * Memory info from vTaskList can be misleading.  See
     * http://www.freertos.org/uxTaskGetSystemState.html for
     * more detail about how it works and value meanings.
     */
    char *taskList = (char *) portMalloc(1024);
    if (NULL != taskList) {
        vTaskList(taskList);
        serial->put_s(taskList);
        portFree(taskList);
    } else {
        serial->put_s("Out of Memory!");
    }
    put_crlf(serial);

    put_crlf(serial);
    serial->put_s("[Note] StackHR: If StackHR < 0; then stack smash");
    put_crlf(serial);
}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro-firmware-mk1,代码行数:26,代码来源:baseCommands.c


示例2: verify_time

/*
**	verify_time()
**
**	verify that the time tests are ready to run.
**	If the baud rate is not set then compute it.
*/
void
verify_time(void)
{
	int status, ch;

	if (tty_can_sync == SYNC_FAILED) {
		return;
	}
	probe_enq_ok();
	put_crlf();
	if (tty_can_sync == SYNC_TESTED) {
		put_crlf();
		if (ACK_terminator >= 0) {
			ptext("ACK terminating character: ");
			temp[0] = ACK_terminator;
			temp[1] = '\0';
			ptextln(expand(temp));
		} else {
			sprintf(temp, "Fixed length ACK, %d characters",
				ACK_length);
			ptextln(temp);
		}
	}
	if (tty_baud_rate == 0) {
		sync_home(&sync_test_list[0], &status, &ch);
	}
}
开发者ID:madhavsuresh,项目名称:DragonFlyBSD,代码行数:33,代码来源:sync.c


示例3: putHeader

static void putHeader(const Serial *serial, const char *str)
{
    put_crlf(serial);
    serial->put_s("- - - ");
    serial->put_s(str);
    serial->put_s(" - - -");
    put_crlf(serial);
}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro-firmware-mk1,代码行数:8,代码来源:baseCommands.c


示例4: show_welcome

void show_welcome(Serial *serial){
	put_crlf(serial);
	size_t len = strlen(welcomeMsg);
	send_header(serial, len);
	serial->put_s(welcomeMsg);
	put_crlf(serial);
	send_header(serial, len);
	put_crlf(serial);
	show_help(serial);
}
开发者ID:jrwiebe,项目名称:RaceCapture-Pro_firmware,代码行数:10,代码来源:command.c


示例5: ShowStats

void ShowStats(Serial *serial, unsigned int argc, char **argv){

	serial->put_s("== Memory Info ==\r\n");
	unsigned long heap = (unsigned long)_heap_address;
	unsigned long lastPointer = getLastPointer();
	serial->put_s("Heap address         :");
	put_uint(serial, heap);
	put_crlf(serial);
	serial->put_s("Last pointer address :");
	put_uint(serial, lastPointer);
	put_crlf(serial);
	serial->put_s("Heap size            :");
	put_uint(serial, (unsigned int)&_CONFIG_HEAP_SIZE);
	put_crlf(serial);
	serial->put_s("Estimated Usage      :");
	put_uint(serial, lastPointer - heap);
	put_crlf(serial);
	serial->put_s("== Lua Info ==\r\n");
	lua_State *L = getLua();
	lua_gc(L,LUA_GCCOLLECT,0);
	serial->put_s("Lua Top              :");
	put_int(serial, lua_gettop(L));
	put_crlf(serial);
	serial->put_s("Lua GC Count         :");
	put_int(serial, lua_gc(L,LUA_GCCOUNT,0));
	put_crlf(serial);
	serial->put_s("== Misc ==\r\n");
	serial->put_s("sizeof LoggerConfig  :");
	put_int(serial, sizeof(LoggerConfig));
	put_crlf(serial);
	serial->put_s("sizeof SampleRecord  :");
	put_int(serial, sizeof(SampleRecord));
	put_crlf(serial);
}
开发者ID:smig23,项目名称:RaceCapture-Pro_firmware,代码行数:34,代码来源:baseCommands.c


示例6: funkey_meta

/*
**	funkey_meta(test_list, status, ch)
**
**	Test meta key (km) (smm) (rmm)
*/
static void
funkey_meta(
	       TestList * t,
	       int *state,
	       int *ch)
{
    if (has_meta_key) {
	int i, j, k, len;
	char outbuf[256];

	put_crlf();
	if (char_mask != ALLOW_PARITY) {
	    if (tty_meta_prep()) {
		ptext("\nHit any key to continue > ");
		(void) wait_here();
		put_crlf();
	    }
	}
	ptext("Begin meta key test. (km) (smm) (rmm)  Hit any key");
	ptext(" with the meta key.  The character will be");
	ptext(" displayed in hex.  If the meta key is working");
	ptext(" then the most significant bit will be set.  Type");
	ptextln(" 'end' to exit.");
	tty_raw(1, ALLOW_PARITY);
	tc_putp(meta_on);

	for (i = j = k = len = 0; i != 'e' || j != 'n' || k != 'd';) {
	    i = j;
	    j = k;
	    k = getchp(ALLOW_PARITY);
	    if (k == EOF) {
		break;
	    }
	    if ((len += 3) >= columns) {
		put_crlf();
		len = 3;
	    }
	    sprintf(outbuf, "%02X ", k);
	    put_str(outbuf);
	    k &= STRIP_PARITY;
	}
	tc_putp(meta_off);
	put_crlf();
	tty_set();
	put_crlf();
    } else {
	ptext("(km) Has-meta-key is not set.  ");
    }
    generic_done_message(t, state, ch);
}
开发者ID:ThomasDickey,项目名称:tack-snapshots,代码行数:55,代码来源:fun.c


示例7: put_newlines

/*
**	put_new_lines(count)
**
**	Send a number of newlines. (nel)
*/
void
put_newlines(int n)
{
	while (n-- > 0) {
		put_crlf();
	}
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:12,代码来源:output.c


示例8: crum_os

/*
**	crum_os(test_list, status, ch)
**
**	(cup) test Cursor position on overstrike terminals
*/
static void
crum_os(
	struct test_list *t,
	int *state,
	int *ch)
{
	int i;

	if (cursor_address && over_strike) {
		put_clear();
		for (i = 0; i < columns - 2; i++) {
			tc_putch('|');
		}
		for (i = 1; i < lines - 2; i++) {
			put_crlf();
			tc_putch('_');
		}
		for (i = 0; i < columns - 2; i++) {
			tputs(TPARM_2(cursor_address, 0, i), lines, tc_putch);
			tc_putch('+');
		}
		for (i = 0; i < lines - 2; i++) {
			tputs(TPARM_2(cursor_address, i, 0), lines, tc_putch);
			tc_putch(']');
			tc_putch('_');
		}
		go_home();
		put_newlines(3);
		ptext("    All the characters should look the same.  ");
		generic_done_message(t, state, ch);
		put_clear();
	}
}
开发者ID:Claruarius,项目名称:stblinux-2.6.37,代码行数:38,代码来源:crum.c


示例9: show_cap_results

/*
**	show_cap_results(index)
**
**	Display the previous results
*/
static void
show_cap_results(
	int x)
{
	struct test_results *r;		/* a result */
	int delay;

	if ((r = pads[x])) {
		sprintf(temp, "(%s)", strnames[x]);
		ptext(temp);
		while (r) {
			sprintf(temp, "$<%d>", r->delay / 1000);
			put_columns(temp, strlen(temp), 10);
			r = r->next;
		}
		r = pads[x];
		while (r) {
			if (r->reps > 1) {
				delay = r->delay / (r->reps * 100);
				sprintf(temp, "$<%d.%d*>", delay / 10, delay % 10);
				put_columns(temp, strlen(temp), 10);
			}
			r = r->next;
		}
		put_crlf();
	}
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:32,代码来源:control.c


示例10: line_pattern

static void
line_pattern(void)
{				/* put up a pattern that will help count the
				   number of lines */
    int i;

    put_clear();
    if (over_strike) {
	for (i = 0; i < 100; i++) {
	    int j;

	    if (i) {
		put_crlf();
	    }
	    for (j = i / 10; j; j--) {
		put_this(' ');
	    }
	    put_this('0' + ((i + 1) % 10));
	}
    } else {			/* I assume it will scroll */
	for (i = 100; i; i--) {
	    sprintf(temp, "\r\n%d", i);
	    put_str(temp);
	}
    }
}
开发者ID:ThomasDickey,项目名称:tack-snapshots,代码行数:26,代码来源:fun.c


示例11: ptextln

void
ptextln(const char *s)
{				/* print the text using ptext() then add a CR
				   LF */
	ptext(s);
	put_crlf();
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:7,代码来源:output.c


示例12: ShowTaskInfo

void ShowTaskInfo(Serial *serial, unsigned int argc, char **argv){

	serial->put_s("Task Info");
	put_crlf(serial);
	serial->put_s("Status\tPri\tStack\tTask#\tName");
	put_crlf(serial);
	char *taskList = (char *)portMalloc(1024);
	if (NULL != taskList){
		vTaskList(taskList);
		serial->put_s(taskList);
		portFree(taskList);
	}
	else{
		serial->put_s("Out of Memory!");
	}
	put_crlf(serial);
}
开发者ID:smig23,项目名称:RaceCapture-Pro_firmware,代码行数:17,代码来源:baseCommands.c


示例13: subtest_msgr

/*
**	subtest_msgr(test_list, status, ch)
**
**	(msgr) move in sgr mode
*/
static void
subtest_msgr(
	struct test_list *t,
	int *state,
	int *ch)
{
	int i;

	if (cursor_address &&
		((enter_standout_mode && exit_standout_mode) ||
		(enter_alt_charset_mode && exit_alt_charset_mode))) {
		put_crlf();
		i = line_count + 1;
		tputs(tparm(cursor_address, i, 0), lines, tc_putch);
		put_mode(enter_alt_charset_mode);
		put_crlf();
		/*
		   some versions of the wy-120 can not clear lines or
		   screen when in alt charset mode.  If (el) and (ed)
		   are defined then I can test them.  If they are not
		   defined then they can not break (msgr)
		*/
		tc_putp(clr_eos);
		tc_putp(clr_eol);
		put_mode(exit_alt_charset_mode);
		put_mode(enter_standout_mode);
		putchp('X');
		tputs(tparm(cursor_address, i + 2, 1), lines, tc_putch);
		putchp('X');
		tputs(tparm(cursor_address, i + 3, 2), lines, tc_putch);
		putchp('X');
		tputs(tparm(cursor_address, i + 4, 3), lines, tc_putch);
		putchp('X');
		put_mode(exit_standout_mode);
		put_crlf();
		tc_putp(clr_eos);	/* OK if missing */
		put_crlf();
		ptextln("If you see a diagonal line of standout X's then (msgr) should be true.  If any of the blanks are standout then (msgr) should be false.");
		sprintf(temp, "(msgr) Move-in-SGR-mode is %s in the data base",
			move_standout_mode ? "true" : "false");
		ptextln(temp);
	} else {
		ptextln("(smso) (rmso) (smacs) (rmacs) missing; (msgr) Move-in-SGR-mode not tested.");
	}
	generic_done_message(t, state, ch);
}
开发者ID:enthought,项目名称:ncurses-5.5,代码行数:51,代码来源:modes.c


示例14: GetVersion

void GetVersion(Serial *serial, unsigned int argc, char **argv)
{
    putHeader(serial, "Version Info");
    put_nameString(serial, "major", MAJOR_REV_STR);
    put_nameString(serial, "minor", MINOR_REV_STR);
    put_nameString(serial, "bugfix", BUGFIX_REV_STR);
    put_nameString(serial, "serial", cpu_get_serialnumber());
    put_crlf(serial);
}
开发者ID:autosportlabs,项目名称:RaceCapture-Pro-firmware-mk1,代码行数:9,代码来源:baseCommands.c


示例15: page_loop

/*
**	page_loop()
**
**	send CR/LF or go home and bump letter
*/
void
page_loop(void)
{
	if (line_count + 2 >= lines) {
		NEXT_LETTER;
		go_home();
	} else {
		put_crlf();
	}
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:15,代码来源:control.c


示例16: ExecLuaInterpreter

void ExecLuaInterpreter(Serial *serial, unsigned int argc, char **argv)
{

    g_interactive_mode = 1;
    serial->put_s("Entering Lua Interpreter. enter 'exit' to leave");
    put_crlf(serial);

    lua_State *L = getLua();

    cmd_context *cmdContext = get_command_context();
    char * luaLine = cmdContext->lineBuffer;

    int result;
    while(1) {
        serial->put_s("> ");
        interactive_read_line(serial, luaLine, cmdContext->lineBufferSize);
        if (strcmp(luaLine,"exit") == 0) break;
        lockLua();
        lua_gc(L,LUA_GCCOLLECT,0);
        result = luaL_loadbuffer(L, luaLine, strlen(luaLine), "");
        if (0 != result) {
            serial->put_s("error: (");
            serial->put_s(lua_tostring(L,-1));
            serial->put_s(")");
            put_crlf(serial);
            lua_pop(L,1);
        } else {
            lua_pushvalue(L,-1);
            result = lua_pcall(L,0,0,0);
            if (0 != result) {
                serial->put_s("error: (");
                serial->put_s(lua_tostring(L,-1));
                serial->put_s(")");
                put_crlf(serial);
                lua_pop(L,1);
            }
            lua_pop(L,1);
        }
        unlockLua();
    }
    g_interactive_mode = 0;
}
开发者ID:meikeric,项目名称:RaceCapture-Pro_firmware,代码行数:42,代码来源:luaCommands.c


示例17: subtest_ul

/*
**	subtest_ul(test_list, status, ch)
**
**	test transparent underline (ul)
*/
static void
subtest_ul(
	struct test_list *t,
	int *state,
	int *ch)
{
	if (!over_strike) {
		/* (ul) is used only if (os) is reset */
		put_crlf();
		sprintf(temp, "This text should %sbe underlined.",
			transparent_underline ? "" : "not ");
		uprint(temp);
		put_crlf();
		ptextln("If the above line is not underlined the (ul) should be false.");
		sprintf(temp, "(ul) Transparent-underline is %s in the data base",
			transparent_underline ? "true" : "false");
		ptextln(temp);
		generic_done_message(t, state, ch);
	}
}
开发者ID:enthought,项目名称:ncurses-5.5,代码行数:25,代码来源:modes.c


示例18: show_help

static void show_help(Serial *serial){
	serial->put_s("Available Commands:");
	put_crlf(serial);
	put_crlf(serial);

	const cmd_t * cmd = commands;
	while (cmd->cmd != NULL){
		serial->put_s(cmd->cmd);
		int padding = menuPadding - strlen(cmd->cmd);
		while (padding-- > 0) serial->put_s(" ");
		serial->put_s(": ");
		serial->put_s(cmd->help);
		serial->put_s(" ");
		serial->put_s("Usage: ");
		serial->put_s(cmd->cmd);
		serial->put_s(" ");
		serial->put_s(cmd->paramHelp);
		put_crlf(serial);
		cmd++;
	}
}
开发者ID:jrwiebe,项目名称:RaceCapture-Pro_firmware,代码行数:21,代码来源:command.c


示例19: dump_test_stats

/*
**	dump_test_stats(test_list, status, ch)
**
**	Dump the statistics about the last test
*/
void
dump_test_stats(
	struct test_list *t,
	int *state,
	int *ch)
{
	int i, j;
	char tbuf[32];
	int x[32];

	put_crlf();
	if (tx_source && tx_source->caps_done) {
		cap_index(tx_source->caps_done, x);
		if (x[0] >= 0) {
			sprintf(temp, "Caps summary for (%s)",
				tx_source->caps_done);
			ptextln(temp);
			for (i = 0; x[i] >= 0; i++) {
				show_cap_results(x[i]);
			}
			put_crlf();
		}
	}
	sprintf(tbuf, "%011u", usec_run_time);
	sprintf(temp, "Test time: %d.%s, characters per second %d, characters %d",
		usec_run_time / 1000000, &tbuf[5], tx_cps, tx_characters);
	ptextln(temp);
	for (i = 0; i < txp; i++) {
		if ((j = get_string_cap_byvalue(tx_cap[i])) >= 0) {
			sprintf(tbuf, "(%s)", strnames[j]);
		} else {
			strcpy(tbuf, "(?)");
		}
		sprintf(temp, "%8d  %3d  $<%3d>  %8s %s",
			tx_count[i], tx_affected[i], tx_delay[i],
			tbuf, expand(tx_cap[i]));
		putln(temp);
	}
	generic_done_message(t, state, ch);
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:45,代码来源:control.c


示例20: put_columns

void
put_columns(const char *s, int len, int w)
{				/* put out s in column format */
	int l;

	if (char_count + w > columns) {
		put_crlf();
	}
	l = char_count % w;
	if (l) {
		while (l < w) {
			putchp(' ');
			l++;
		}
	}
	if (char_count && char_count + len >= columns) {
		put_crlf();
	}
	l = char_count;
	put_str(s);
	char_count = l + len;
}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:22,代码来源:output.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ put_dev_sector函数代码示例发布时间:2022-05-30
下一篇:
C++ put_cred函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap