本文整理汇总了C++中outc函数的典型用法代码示例。如果您正苦于以下问题:C++ outc函数的具体用法?C++ outc怎么用?C++ outc使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了outc函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: int_berganti
int int_berganti(void)
{
char a;
//if ( FIO0PIN & GPIO_INT )
if (I2C_INT_PIN & GPIO_INT )
{
//return 1;
// cek keypad yang ditekan
out("KEY \r\n");
if (i2c_read_register(0x68, 0x68, &a))
{
out("\r\n Read failed !\r\n");
}
else
{
out(" Read OK =");
a = a + '0';
outc((char) a);
out(" \r\n");
}
}
else
return 0;
}
开发者ID:hericz,项目名称:atinom_banyu,代码行数:25,代码来源:bitbang_i2c.c
示例2: bl_print
BLAPI_PROTO
bl_print(lua_State* L)
{
bl_addstr(L);
outc('\n');
return 0;
}
开发者ID:Fdhvdu,项目名称:pttbbs,代码行数:7,代码来源:bbslua.c
示例3: i2c_stop
void i2c_stop(void)
{
int tot;
SDA_out();
delay();
SCL_set(); // jadi in, akan H jika tidak streching
#if 1
/* cek jika clock strecting */
tot = 0;
while ( !SCL_read() )
{
delay();
#ifdef DEBUG_TSC
outc('b');
#endif
tot++;
if (tot > 100) return -1;
}
delay();
#endif
SCL_set();
delay();
SDA_set();
delay();
SDA_in();
}
开发者ID:hericz,项目名称:atinom_banyu,代码行数:29,代码来源:bitbang_i2c.c
示例4: i2c_start
void i2c_start(void)
{
int tot;
SCL_set(); // jadi in
#if 1
/* cek jika clock strecting */
tot = 0;
while ( !SCL_read() )
{
delay();
#ifdef DEBUG_TSC
outc('a');
#endif
tot++;
if (tot > 100) return -1;
}
delay();
#endif
SDA_out();
SDA_set();
delay();
SCL_set(); // in
delay();
SDA_clr();
delay();
SCL_out();
SCL_clr();
delay();
}
开发者ID:hericz,项目名称:atinom_banyu,代码行数:31,代码来源:bitbang_i2c.c
示例5: userprompt
int userprompt(unsigned id,...)
{
char *fmt, *str;
int ch;
if(!getPromptString(id, &str, &fmt))
return 0;
/* Issue message */
if(*fmt) {
va_list ap;
va_start(ap, id);
vprintf(fmt, ap);
va_end(ap);
}
while((ch = vcgetchar()) == 0 || (ch = mapMetakey(str, ch)) == 0)
beep(); /* hit erroreous character */
outc('\n'); /* advance to next line */
freePromptString(str, fmt);
return ch;
}
开发者ID:ErisBlastar,项目名称:osfree,代码行数:25,代码来源:msg_prmp.c
示例6: echocmd
int
echocmd(int argc, char **argv)
{
int nonl = 0;
struct output *outs = out1;
if (!*++argv)
goto end;
if (equal(*argv, "-n")) {
nonl = ~nonl;
if (!*++argv)
goto end;
}
do {
char c;
nonl += conv_escape_str(*argv);
outstr(stackblock(), outs);
if (nonl > 0)
break;
c = ' ';
if (!*++argv) {
end:
if (nonl) {
break;
}
c = '\n';
}
outc(c, outs);
} while (*argv);
return 0;
}
开发者ID:Agochka,项目名称:klibc,代码行数:34,代码来源:printf.c
示例7: do_indent
void do_indent(void)
{
int i = indent_level * 8;
while ( i >= 8 )
{
outc( '\t' );
i -= 8;
}
while ( i > 0 )
{
outc( ' ' );
--i;
}
}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:16,代码来源:gen.c
示例8: transition_struct_out
/* transition_struct_out - output a yy_trans_info structure
*
* outputs the yy_trans_info structure with the two elements, element_v and
* element_n. Formats the output with spaces and carriage returns.
*/
void
transition_struct_out(int element_v, int element_n)
{
out_dec2(" {%4d,%4d },", element_v, element_n);
datapos += TRANS_STRUCT_PRINT_LENGTH;
if (datapos >= 79 - TRANS_STRUCT_PRINT_LENGTH) {
outc('\n');
if (++dataline % 10 == 0)
outc('\n');
datapos = 0;
}
}
开发者ID:Kampbell,项目名称:ReFlex,代码行数:21,代码来源:misc.c
示例9: outs
void outs( char *s )
{
char c;
while( c = *s++ ) {
outc( c );
}
}
开发者ID:MikeyG,项目名称:open-watcom-v2,代码行数:7,代码来源:dbglib.c
示例10: dataflush
/* dataflush - flush generated data statements */
void
dataflush(void)
{
outc('\n');
if (++dataline >= NUMDATALINES) {
/* Put out a blank line so that the table is grouped into
* large blocks that enable the user to find elements easily.
*/
outc('\n');
dataline = 0;
}
/* Reset the number of characters written on the current line. */
datapos = 0;
}
开发者ID:Kampbell,项目名称:ReFlex,代码行数:17,代码来源:misc.c
示例11: outstr
void
outstr(const char *p, struct output *file)
{
while (*p)
outc(*p++, file);
if (file == out2)
flushout(file);
}
开发者ID:lacombar,项目名称:netbsd-alc,代码行数:8,代码来源:output.c
示例12: outshstr
void
outshstr(const char *p, struct output *file)
{
static const char norm_chars [] \
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
int need_q = p[0] == 0 || p[strspn(p, norm_chars)] != 0;
char c;
if (need_q)
outc('\'', file);
while (c = *p++, c != 0){
if (c != '\''){
outc(c, file);
}else{
outc('\'', file);
outc('\\', file);
outc(c, file);
outc('\'', file);
}
}
if (need_q)
outc('\'', file);
if (file == out2)
flushout(file);
}
开发者ID:lacombar,项目名称:netbsd-alc,代码行数:28,代码来源:output.c
示例13: outbin
void
outbin(const void *data, size_t len, struct output *file)
{
const char *p;
p = data;
while (len-- > 0)
outc(*p++, file);
}
开发者ID:jpostel,项目名称:FreeBSD-mirror,代码行数:9,代码来源:output.c
示例14: outns
void
outns(const char *str, int n)
{
if (!str)
return;
while (*str && n-- > 0) {
outc(*str++);
}
}
开发者ID:OmniBus,项目名称:hkday-pttbbs,代码行数:9,代码来源:screen.c
示例15: outs
void
outs(const char *str)
{
if (!str)
return;
while (*str) {
outc(*str++);
}
}
开发者ID:OmniBus,项目名称:hkday-pttbbs,代码行数:9,代码来源:screen.c
示例16: mkdata
/* mkdata - generate a data statement
*
* Generates a data statement initializing the current array element to
* "value".
*/
void mkdata(int value)
{
if ( datapos >= NUMDATAITEMS )
{
outc( ',' );
dataflush();
}
if ( datapos == 0 )
/* Indent. */
out( " " );
else
outc( ',' );
++datapos;
out_dec( "%5d", value );
}
开发者ID:juanfra684,项目名称:DragonFlyBSD,代码行数:23,代码来源:misc.c
示例17: passwd_outs
void passwd_outs(char *text)
{
register int column = 0;
register char ch;
while ((ch = *text++) && (++column < 80))
{
outc('*');
}
}
开发者ID:yrchen,项目名称:Athena,代码行数:9,代码来源:visio.c
示例18: outmsg
void
outmsg(register char *msg)
{
move(b_lines, 0);
clrtoeol();
while (*msg)
outc(*msg++);
refresh();
}
开发者ID:yrchen,项目名称:Athena,代码行数:10,代码来源:visio.c
示例19: doformat
void
doformat(struct output *dest, const char *f, va_list ap)
{
#ifdef HAVE_VASPRINTF
char *s;
vasprintf(&s, f, ap);
outstr(s, dest);
free(s);
#else /* !HAVE_VASPRINTF */
static const char digit_lower[] = "0123456789abcdef";
static const char digit_upper[] = "0123456789ABCDEF";
const char *digit;
char c;
char temp[TEMPSIZE];
int flushleft;
int sharp;
int width;
int prec;
int islong;
int isquad;
char *p;
int sign;
int64_t l;
uint64_t num;
unsigned base;
int len;
int size;
int pad;
while ((c = *f++) != '\0') {
if (c != '%') {
outc(c, dest);
continue;
}
flushleft = 0;
sharp = 0;
width = 0;
prec = -1;
islong = 0;
isquad = 0;
for (;;) {
if (*f == '-')
flushleft++;
else if (*f == '#')
sharp++;
else
break;
f++;
}
if (*f == '*') {
width = va_arg(ap, int);
f++;
} else {
while (is_digit(*f)) {
开发者ID:dezelin,项目名称:kBuild,代码行数:55,代码来源:output.c
示例20: edit_outs
void
edit_outs(const char *text)
{
register int column = 0;
register char ch;
while ((ch = *text++) && (++column < t_columns))
outc(ch == KEY_ESC ? '*' : ch);
return ;
}
开发者ID:yrchen,项目名称:Athena,代码行数:11,代码来源:visio.c
注:本文中的outc函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论