本文整理汇总了C++中eol函数的典型用法代码示例。如果您正苦于以下问题:C++ eol函数的具体用法?C++ eol怎么用?C++ eol使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eol函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: line
void CompilGenerator::generateStructurePrefix(const StructureSPtr& pStructure)
{
if (pStructure->controlled())
line() << "controlled ";
if (pStructure->immutable())
line() << "immutable ";
if (pStructure->partial())
line() << "partial ";
line() << "structure " << pStructure->name()->value();
int indexOffset = 0;
StructureSPtr pBaseStructure = pStructure->baseStructure().lock();
if (pBaseStructure)
{
eol(declarationStream);
++indexOffset;
++mIndent[declarationStream];
line() << "inherit " << pBaseStructure->name()->value();
const std::vector<ObjectSPtr>& objects = pStructure->objects();
bool first_alter = true;
std::vector<ObjectSPtr>::const_iterator it;
for (it = objects.begin(); it != objects.end(); ++it)
{
AlterSPtr pAlter = ObjectFactory::downcastAlter(*it);
if (!pAlter) continue;
if (first_alter)
{
first_alter = false;
eol(declarationStream);
++mIndent[declarationStream];
++indexOffset;
table() << TableAligner::row()
<< "alter ";
}
else
{
table() << ","
<< TableAligner::row();
}
table() << TableAligner::col()
<< pAlter->field()->name()->value() << " "
<< TableAligner::col()
<< "= "
<< pAlter->defaultValue()->value();
}
}
mIndent[declarationStream] -= indexOffset;
openBlock(declarationStream, indexOffset);
}
开发者ID:ggeorgiev,项目名称:compil,代码行数:56,代码来源:compil_generator.cpp
示例2: while
Tsubtitle* TsubtitleParserMPsub::parse(Tstream &fd, int flags, REFERENCE_TIME start, REFERENCE_TIME stop)
{
wchar_t line[this->LINE_LEN + 1];
float a, b;
int num = 0;
wchar_t *p, *q;
do {
if (!fd.fgets(line, this->LINE_LEN)) {
return NULL;
}
} while (swscanf(line, L"%f %f", &a, &b) != 2);
TsubtitleText current(this->format);
mpsub_position += a * (sub_uses_time ? 100.0 : 1.0);
current.start = this->frameToTime(int(sub_uses_time ? mpsub_position / 100.0 : mpsub_position));
mpsub_position += b * (sub_uses_time ? 100.0 : 1.0);
current.stop = this->frameToTime(int(sub_uses_time ? mpsub_position / 100.0 : mpsub_position));
while (1) {
if (!fd.fgets(line, this->LINE_LEN)) {
if (num == 0) {
return NULL;
} else {
return store(current);
}
}
p = line;
while (iswspace((unsigned short)*p)) {
p++;
}
if (eol(*p) && num > 0) {
return store(current);
}
if (eol(*p)) {
return NULL;
}
for (q = p; !eol(*q); q++) {
;
}
*q = '\0';
if (strlen(p)) {
current.add(p);
++num;
} else {
if (num) {
return store(current);
} else {
return NULL;
}
}
}
return NULL; // we should have returned before if it's OK
}
开发者ID:xinjiguaike,项目名称:ffdshow,代码行数:54,代码来源:TsubreaderMplayer.cpp
示例3: print_offsets
void print_offsets(){
puts_attrib("=================OFF=================", color_entry(COLOR_MAGENTA, COLOR_BLACK)); eol();
puts_attrib("FAT Offset:", color_entry(COLOR_GREEN, COLOR_BLACK));
print_int(FAT_OFFSET, 16, color_entry(COLOR_RED, COLOR_BLACK)); eol();
puts_attrib("Root Offset:", color_entry(COLOR_GREEN, COLOR_BLACK));
print_int(ROOT_OFFSET , 16, color_entry(COLOR_RED, COLOR_BLACK)); eol();
puts_attrib("Data Offset:", color_entry(COLOR_GREEN, COLOR_BLACK));
print_int(DATA_OFFSET, 16, color_entry(COLOR_RED, COLOR_BLACK)); eol();
puts_attrib("=================OFF=================",color_entry(COLOR_MAGENTA, COLOR_BLACK)); eol();
}
开发者ID:asmodz,项目名称:ganjax,代码行数:12,代码来源:fat12.c
示例4: check_journal_wrap
static void check_journal_wrap(uint64_t seq, uint64_t *highest_seq)
{
if (seq < *highest_seq) {
print_gfs2("------------------------------------------------"
"------------------------------------------------");
eol(0);
print_gfs2("Journal wrapped here.");
eol(0);
print_gfs2("------------------------------------------------"
"------------------------------------------------");
eol(0);
}
*highest_seq = seq;
}
开发者ID:BetaXOi,项目名称:gfs2-utils,代码行数:14,代码来源:journal.c
示例5: print_cluster_list
void print_cluster_list(uint16_t clusternum){
while(clusternum != FAT12_END_OF_CLUSTERS){
print_int(clusternum, 10, 0); putc(' ');
clusternum = fat12_get_fat_entry(clusternum);
}
eol();
}
开发者ID:asmodz,项目名称:ganjax,代码行数:7,代码来源:fat12.c
示例6: delete_char
void iLine::delete_char()
{
if (eol())
return;
l->delete_char(col);
setcol(col);
}
开发者ID:wschweer,项目名称:qped,代码行数:7,代码来源:line.cpp
示例7: return
QChar iLine::operator*()
{
if (eol())
return QChar::Null;
QChar c = l->txt[p];
return (c == '\t') ? ' ' : c;
}
开发者ID:wschweer,项目名称:qped,代码行数:7,代码来源:line.cpp
示例8: handle_globl
static void handle_globl(char *s)
{
char *name;
symbol *sym;
for (;;) {
if (!(name = parse_identifier(&s))) {
syntax_error(10); /* identifier expected */
return;
}
sym = new_import(name);
myfree(name);
if (sym->flags & EXPORT)
general_error(62,sym->name,get_bind_name(sym)); /* binding already set */
sym->flags |= EXPORT;
s = skip(s);
if (*s == ',')
s = skip(s+1);
else
break;
}
eol(s);
}
开发者ID:kusma,项目名称:vasm,代码行数:26,代码来源:syntax.c
示例9: handle_rept
static void handle_rept(char *s)
{
taddr cnt = parse_constexpr(&s);
eol(s);
new_repeat((int)cnt,nodotneeded?"rept":".rept",nodotneeded?"endr":".endr");
}
开发者ID:ezrec,项目名称:vasm,代码行数:7,代码来源:syntax.c
示例10: prev_visible_lines
static int prev_visible_lines (int n)
{
#if JED_HAS_LINE_ATTRIBUTES
int i, dn;
i = 0;
while (i < n)
{
Line *l = CLine;
dn = 0;
do
{
l = l->prev;
dn++;
}
while ((l != NULL) && (l->flags & JED_LINE_HIDDEN));
if (l == NULL) break;
CLine = l;
LineNum -= dn;
i++;
}
if (i) eol (); /* leave point at eol */
return i;
#else
return jed_up (n);
#endif
}
开发者ID:hankem,项目名称:jed,代码行数:30,代码来源:cmds.c
示例11: eot
void CompilGenerator::generateStructureSuffix(const StructureSPtr&)
{
eot(declarationStream);
closeBlock(declarationStream);
eol(declarationStream);
bAddNewLine = false;
}
开发者ID:ggeorgiev,项目名称:compil,代码行数:7,代码来源:compil_generator.cpp
示例12: setNAEOL
void
setNAEOL(void)
{
setnoaddr();
eol();
}
开发者ID:n-t-roff,项目名称:ex-3.7_4.4BSD,代码行数:7,代码来源:ex_addr.c
示例13: handle_section
static void handle_section(char *s)
{
char *name,*attr;
if(!(name=parse_name(&s)))
return;
if(*s==','){
s=skip(s+1);
attr=s;
if(*s!='\"')
syntax_error(7);
else
s++;
attr=s;
while(*s&&*s!='\"')
s++;
attr=cnvstr(attr,s-attr);
s=skip(s+1);
}else{
attr="";
if(!strcmp(name,textname)) attr=textattr;
if(!strcmp(name,dataname)) attr=dataattr;
if(!strcmp(name,sdataname)) attr=sdataattr;
if(!strcmp(name,sdata2name)) attr=sdata2attr;
if(!strcmp(name,rodataname)) attr=rodataattr;
if(!strcmp(name,bssname)) attr=bssattr;
if(!strcmp(name,sbssname)) attr=sbssattr;
if(!strcmp(name,tocdname)) attr=tocdattr;
}
new_section(name,attr,1);
switch_section(name,attr);
eol(s);
}
开发者ID:ezrec,项目名称:vasm,代码行数:34,代码来源:syntax.c
示例14: _process_byte
void _process_byte ()
{
uint16_t data = CONSOLE_UART::receive ();
if (data & 0xff00) return;
uint8_t byte = data & 0xff;
switch (byte)
{
case KEY_ENTER:
if (_command_len)
{
_command [_command_len] = 0;
eol ();
if (handler) handler (_command);
}
show_prompt ();
return;
case KEY_DEL:
case KEY_BS:
if (!_command_len) return;
_command_len --;
CONSOLE_UART::send_string_p (PSTR ("\x08 \x08"));
return;
default:
if (byte < 0x20 || _command_len == CONSOLE_MAX_CMD_LENGTH - 1)
{
CONSOLE_UART::send (0x07);
return;
}
_command [_command_len ++] = byte;
CONSOLE_UART::send (byte);
}
return;
}
开发者ID:gitter-badger,项目名称:min_raw_osd,代码行数:33,代码来源:console.cpp
示例15: handle_stabs
static void handle_stabs(char *s)
{
char *name;
int t,o,d;
if (*s++ == '\"') {
name = s;
while (*s && *s!='\"')
s++;
name = cnvstr(name,s-name);
}
else {
syntax_error(7); /* " expected */
return;
}
s++;
t = comma_constexpr(&s);
o = comma_constexpr(&s);
d = comma_constexpr(&s);
s = skip(s);
if (*s == ',') {
s = skip(s+1);
stab_entry(name,t,o,d,s);
s = skip_operand(s);
}
else
syntax_error(9);
eol(s);
}
开发者ID:ezrec,项目名称:vasm,代码行数:29,代码来源:syntax.c
示例16: handle_type
static void handle_type(char *s)
{
char *name;
symbol *sym;
if(!(name=parse_identifier(&s))){
syntax_error(10); /* identifier expected */
return;
}
sym=new_import(name);
myfree(name);
s=skip(s);
if(*s==',')
s=skip(s+1);
else
syntax_error(9);
if(!strncmp(s,"@object",7)){
sym->flags|=TYPE_OBJECT;
s=skip(s+7);
}else if(!strncmp(s,"@function",9)){
sym->flags|=TYPE_FUNCTION;
s=skip(s+9);
}else
sym->flags|=parse_constexpr(&s);
eol(s);
}
开发者ID:ezrec,项目名称:vasm,代码行数:26,代码来源:syntax.c
示例17: handle_text
static void handle_text(char *s)
{
char *opstart = s;
operand *op;
dblock *db = NULL;
if (db = parse_string(&opstart,*s,8)) {
add_atom(0,new_data_atom(db,1));
s = opstart;
}
if (!db) {
op = new_operand();
s = skip_operand(s);
if (parse_operand(opstart,s-opstart,op,DATA_OPERAND(8))) {
atom *a;
a = new_datadef_atom(8,op);
a->align = 1;
add_atom(0,a);
}
else
syntax_error(8); /* invalid data operand */
}
eol(s);
}
开发者ID:EgoIncarnate,项目名称:mist-board,代码行数:25,代码来源:syntax.c
示例18: forward_paragraph
int forward_paragraph(void) /*{{{*/
{
Jed_Buffer_Hook_Type *h = CBuf->buffer_hooks;
if ((h != NULL)
&& (h->forward_paragraph_hook != NULL))
{
if (0 == SLexecute_function (h->forward_paragraph_hook))
return 1;
return -1;
}
while (1)
{
if (0 == jed_down (1))
{
eol ();
break;
}
if (is_paragraph_sep ())
break;
}
return(1);
}
开发者ID:hankem,项目名称:jed,代码行数:26,代码来源:text.c
示例19: handle_align
static void handle_align(char *s)
{
taddr align=parse_constexpr(&s);
atom *a=new_space_atom(number_expr(0),1,0);
a->align=1<<align;
add_atom(0,a);
eol(s);
}
开发者ID:ezrec,项目名称:vasm,代码行数:8,代码来源:syntax.c
示例20: handle_ident
static void handle_ident(char *s)
{
char *name;
if(name=parse_name(&s))
setfilename(name);
eol(s);
}
开发者ID:ezrec,项目名称:vasm,代码行数:8,代码来源:syntax.c
注:本文中的eol函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论