當前位置: 首頁>>代碼示例>>C++>>正文


C++ EAT函數代碼示例

本文整理匯總了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);
}
開發者ID:alexmiao,項目名稱:moosefs,代碼行數:7,代碼來源:restore.c

示例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;
}
開發者ID:bobrippling,項目名稱:ucc-c-compiler,代碼行數:30,代碼來源:parse_attr.c

示例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);
}
開發者ID:chengyishi,項目名稱:moosefs,代碼行數:7,代碼來源:restore.c

示例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);
}
開發者ID:andyqzb,項目名稱:shadow-mfs,代碼行數:7,代碼來源:replay.c

示例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);
}
開發者ID:alexmiao,項目名稱:moosefs,代碼行數:8,代碼來源:restore.c

示例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);
}
開發者ID:andyqzb,項目名稱:shadow-mfs,代碼行數:8,代碼來源:replay.c

示例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);
}
開發者ID:alexmiao,項目名稱:moosefs,代碼行數:8,代碼來源:restore.c

示例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);
}
開發者ID:chengyishi,項目名稱:moosefs,代碼行數:8,代碼來源:restore.c

示例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);
}
開發者ID:chengyishi,項目名稱:moosefs,代碼行數:8,代碼來源:restore.c

示例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);
}
開發者ID:andyqzb,項目名稱:shadow-mfs,代碼行數:8,代碼來源:replay.c

示例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);
}
開發者ID:andyqzb,項目名稱:shadow-mfs,代碼行數:9,代碼來源:replay.c

示例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);
}
開發者ID:andyqzb,項目名稱:shadow-mfs,代碼行數:9,代碼來源:replay.c

示例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);
}
開發者ID:doniexun,項目名稱:ucc-c-compiler,代碼行數:57,代碼來源:parse_stmt.c

示例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);
}
開發者ID:alexmiao,項目名稱:moosefs,代碼行數:9,代碼來源:restore.c

示例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);
}
開發者ID:alexmiao,項目名稱:moosefs,代碼行數:9,代碼來源:restore.c


注:本文中的EAT函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。