本文整理匯總了C++中EAT函數的典型用法代碼示例。如果您正苦於以下問題:C++ EAT函數的具體用法?C++ EAT怎麽用?C++ EAT使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EAT函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: do_undel
int do_undel(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,')');
return fs_log_undel(ts,inode);
}
示例2: EAT
static attribute *parse_attr_cleanup(symtable *scope, const char *ident)
{
char *sp;
where ident_loc;
attribute *attr = NULL;
struct symtab_entry ent;
(void)ident;
EAT(token_open_paren);
if(curtok != token_identifier)
die_at(NULL, "identifier expected for cleanup function");
where_cc1_current(&ident_loc);
sp = token_current_spel();
EAT(token_identifier);
if(symtab_search(scope, sp, NULL, &ent) && ent.type == SYMTAB_ENT_DECL) {
attr = attribute_new(attr_cleanup);
attr->bits.cleanup = ent.bits.decl;
} else {
warn_at_print_error(&ident_loc, "function '%s' not found", sp);
fold_had_error = 1;
}
EAT(token_close_paren);
return attr;
}
示例3: do_purge
uint8_t do_purge(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,')');
return fs_purge(ts,inode);
}
示例4: do_undel
uint8_t do_undel(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,')');
return shadow_fs_undel(ts,inode);
}
示例5: do_freeinodes
int do_freeinodes(const char *filename,uint64_t lv,uint32_t ts,char* ptr) {
uint32_t freeinodes;
EAT(ptr,filename,lv,'(');
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU32(freeinodes,ptr);
return fs_log_freeinodes(ts,freeinodes);
}
示例6: do_freeinodes
uint8_t do_freeinodes(uint64_t lv,uint32_t ts,char* ptr) {
uint32_t freeinodes;
EAT(ptr,lv,'(');
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU32(freeinodes,ptr);
return shadow_fs_freeinodes(ts,freeinodes);
}
示例7: do_unlock
int do_unlock(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint64_t chunkid;
(void)ts;
EAT(ptr,filename,lv,'(');
GETU64(chunkid,ptr);
EAT(ptr,filename,lv,')');
return fs_log_unlock(chunkid);
}
示例8: do_incversion
uint8_t do_incversion(uint64_t lv,uint32_t ts,char *ptr) {
uint64_t chunkid;
(void)ts;
EAT(ptr,lv,'(');
GETU64(chunkid,ptr);
EAT(ptr,lv,')');
return fs_incversion(chunkid);
}
示例9: do_emptyreserved
uint8_t do_emptyreserved(uint64_t lv,uint32_t ts,char* ptr) {
uint32_t freeinodes;
EAT(ptr,lv,'(');
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU32(freeinodes,ptr);
return fs_emptyreserved(ts,freeinodes);
}
示例10: do_unlock
uint8_t do_unlock(uint64_t lv,uint32_t ts,char *ptr) {
uint64_t chunkid;
(void)ts;
EAT(ptr,lv,'(');
GETU64(chunkid,ptr);
EAT(ptr,lv,')');
return shadow_fs_unlock(chunkid);
}
示例11: do_session
uint8_t do_session(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t cuid;
(void)ts;
EAT(ptr,lv,'(');
EAT(ptr,lv,')');
EAT(ptr,lv,':');
GETU32(cuid,ptr);
return shadow_fs_session(cuid);
}
示例12: do_append
uint8_t do_append(uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,inode_src;
EAT(ptr,lv,'(');
GETU32(inode,ptr);
EAT(ptr,lv,',');
GETU32(inode_src,ptr);
EAT(ptr,lv,')');
return shadow_fs_append(ts,inode,inode_src);
}
示例13: parse_test_init_expr
static void parse_test_init_expr(stmt *t, struct stmt_ctx *ctx)
{
where here;
where_cc1_current(&here);
EAT(token_open_paren);
/* if C99, we create a new scope here, for e.g.
* if(5 > (enum { a, b })a){ return a; } return b;
* "return b" can't see 'b' since its scope is only the if
*
* C90 drags the scope of the enum up to the enclosing block
*/
if(cc1_std >= STD_C99){
ctx->scope = t->symtab = symtab_new(t->symtab, &here);
}
if(parse_at_decl(ctx->scope, 1)){
decl *d;
/* if we are at a type, push a scope for it, for
* for(int i ...), if(int i = ...) etc
*/
symtable *init_scope = symtab_new(t->symtab, &here);
t->flow = stmt_flow_new(init_scope);
d = parse_decl(
DECL_SPEL_NEED, 0,
init_scope, init_scope);
UCC_ASSERT(d, "at decl, but no decl?");
UCC_ASSERT(
t->flow->for_init_symtab == init_scope,
"wrong scope for stmt-init");
flow_fold(t->flow, &t->symtab);
ctx->scope = t->symtab;
/* `d' is added to the scope implicitly */
if(accept(token_comma)){
/* if(int i = 5, i > f()){ ... } */
t->expr = parse_expr_exp(ctx->scope, 0);
}else{
/* if(int i = 5) -> if(i) */
t->expr = expr_new_identifier(d->spel);
}
}else{
t->expr = parse_expr_exp(t->symtab, 0);
}
FOLD_EXPR(t->expr, t->symtab);
EAT(token_close_paren);
}
示例14: do_session
int do_session(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t cuid;
(void)ts;
EAT(ptr,filename,lv,'(');
EAT(ptr,filename,lv,')');
EAT(ptr,filename,lv,':');
GETU32(cuid,ptr);
return fs_log_session(cuid);
}
示例15: do_append
int do_append(const char *filename,uint64_t lv,uint32_t ts,char *ptr) {
uint32_t inode,inode_src;
EAT(ptr,filename,lv,'(');
GETU32(inode,ptr);
EAT(ptr,filename,lv,',');
GETU32(inode_src,ptr);
EAT(ptr,filename,lv,')');
return fs_log_append(ts,inode,inode_src);
}