本文整理汇总了C++中put_crlf函数的典型用法代码示例。如果您正苦于以下问题:C++ put_crlf函数的具体用法?C++ put_crlf怎么用?C++ put_crlf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了put_crlf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例7: put_newlines
/*
** put_new_lines(count)
**
** Send a number of newlines. (nel)
*/
void
put_newlines(int n)
{
while (n-- > 0) {
put_crlf();
}
}
示例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();
}
}
示例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();
}
}
示例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);
}
}
}
示例11: ptextln
void
ptextln(const char *s)
{ /* print the text using ptext() then add a CR
LF */
ptext(s);
put_crlf();
}
示例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);
}
示例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);
}
示例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);
}
示例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();
}
}