您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ sym_lookup函数代码示例

51自学网 2021-06-03 08:36:25
  C++
这篇教程C++ sym_lookup函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中sym_lookup函数的典型用法代码示例。如果您正苦于以下问题:C++ sym_lookup函数的具体用法?C++ sym_lookup怎么用?C++ sym_lookup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了sym_lookup函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: peekn

static struct block *cast_expression(struct block *block){    struct typetree *type;    struct token tok;    struct symbol *sym;    /* This rule needs two lookahead; to see beyond the initial parenthesis if     * it is actually a cast or an expression. */    if (peek().token == '(') {        tok = peekn(2);        switch (tok.token) {        case IDENTIFIER:            sym = sym_lookup(&ns_ident, tok.strval);            if (!sym || sym->symtype != SYM_TYPEDEF)                break;        case FIRST(type_name):            consume('(');            type = declaration_specifiers(NULL);            if (peek().token != ')') {                type = declarator(type, NULL);            }            consume(')');            block = cast_expression(block);            block->expr = eval_cast(block, block->expr, type);            return block;        default:            break;        }    }    return unary_expression(block);}
开发者ID:JamesLinus,项目名称:c-compiler,代码行数:32,


示例2: sym_init

void sym_init(void){	struct symbol *sym;	struct utsname uts;	char *p;	static bool inited = false;	if (inited)		return;	inited = true;	uname(&uts);	sym = sym_lookup("ARCH", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;	p = getenv("ARCH");	if (p)		sym_add_default(sym, p);	sym = sym_lookup("KERNELVERSION", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;	p = getenv("KERNELVERSION");	if (p)		sym_add_default(sym, p);	sym = sym_lookup("UNAME_RELEASE", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;	sym_add_default(sym, uts.release);}
开发者ID:me-oss,项目名称:me-pcd,代码行数:32,


示例3: sym_init

void sym_init(void){	struct symbol *sym;	char *p;	static bool inited = false;	if (inited)		return;	inited = true;	sym = sym_lookup("VERSION", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;	p = getenv("VERSION");	if (p)		sym_add_default(sym, p);	sym = sym_lookup("TARGET_ARCH", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;	p = getenv("TARGET_ARCH");	if (p)		sym_add_default(sym, p);}
开发者ID:0919061,项目名称:PX4NuttX,代码行数:25,


示例4: print_exec_counts

voidprint_exec_counts (){  Sym **sorted_bbs, *sym;  unsigned int i, j, len;  if (first_output)    first_output = FALSE;  else    printf ("/f/n");  /* Sort basic-blocks according to function name and line number:  */  sorted_bbs = (Sym **) xmalloc (symtab.len * sizeof (sorted_bbs[0]));  len = 0;  for (sym = symtab.base; sym < symtab.limit; ++sym)    {      /* Accept symbol if it's in the INCL_EXEC table	 or there is no INCL_EXEC table	 and it does not appear in the EXCL_EXEC table.  */      if (sym_lookup (&syms[INCL_EXEC], sym->addr)	  || (syms[INCL_EXEC].len == 0	      && !sym_lookup (&syms[EXCL_EXEC], sym->addr)))	{	  sorted_bbs[len++] = sym;	}    }  qsort (sorted_bbs, len, sizeof (sorted_bbs[0]), cmp_bb);  /* Output basic-blocks:  */  for (i = 0; i < len; ++i)    {      sym = sorted_bbs [i];            if (sym->ncalls > 0 || ! ignore_zeros)	{	  /* FIXME: This only works if bfd_vma is unsigned long.  */	  printf (_("%s:%d: (%s:0x%lx) %lu executions/n"),		  sym->file ? sym->file->name : _("<unknown>"), sym->line_num,		  sym->name, (unsigned long) sym->addr, sym->ncalls);	}      for (j = 0; j < NBBS && sym->bb_addr[j]; j ++)	{	  if (sym->bb_calls[j] > 0 || ! ignore_zeros)	    {	      /* FIXME: This only works if bfd_vma is unsigned long.  */	      printf (_("%s:%d: (%s:0x%lx) %lu executions/n"),		      sym->file ? sym->file->name : _("<unknown>"), sym->line_num,		      sym->name, (unsigned long) sym->bb_addr[j],		      sym->bb_calls[j]);	    }	}    }  free (sorted_bbs);}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:58,


示例5: var_test

static awk_value_t *var_test(int nargs, awk_value_t *result){	awk_value_t value, value2;	awk_value_t *valp;	assert(result != NULL);	make_number(0.0, result);	if (nargs != 1) {		printf("var_test: nargs not right (%d should be 1)/n", nargs);		goto out;	}	/* look up PROCINFO - should fail */	if (sym_lookup("PROCINFO", AWK_ARRAY, & value))		printf("var_test: sym_lookup of PROCINFO failed - got a value!/n");	else		printf("var_test: sym_lookup of PROCINFO passed - did not get a value/n");	/* look up a reserved variable - should pass */	if (sym_lookup("ARGC", AWK_NUMBER, & value))		printf("var_test: sym_lookup of ARGC passed - got a value!/n");	else		printf("var_test: sym_lookup of ARGC failed - did not get a value/n");	/* now try to set it - should fail */	value.num_value++;	if (sym_update("ARGC", & value))		printf("var_test: sym_update of ARGC passed and should not have!/n");	else		printf("var_test: sym_update of ARGC failed - correctly/n");	/* look up variable whose name is passed in, should pass */	if (get_argument(0, AWK_STRING, & value)) {		if (sym_lookup(value.str_value.str, AWK_STRING, & value2)) {			/* change the value, should be reflected in awk script */			valp = make_number(42.0, & value2);			if (sym_update(value.str_value.str, valp)) {				printf("var_test: sym_update(/"%s/") succeeded/n", value.str_value.str);			} else {				printf("var_test: sym_update(/"%s/") failed/n", value.str_value.str);				goto out;			}		} else {			printf("var_test: sym_lookup(/"%s/") failed/n", value.str_value.str);			goto out;		}	} else {		printf("var_test: get_argument() failed/n");		goto out;	}	make_number(1.0, result);out:	return result;}
开发者ID:uarka,项目名称:gawk,代码行数:58,


示例6: factor

void factor () {    lvalue = false;    if (see("true") || see("false")) {        fprintf(output, "mov eax, %d/n", see("true") ? 1 : 0);        next();    } else if (token == token_ident) {        int global = sym_lookup(globals, global_no, buffer);        int local = sym_lookup(locals, local_no, buffer);        require(global >= 0 || local >= 0, "no symbol '%s' declared/n");        next();        if (see("=") || see("++") || see("--"))            lvalue = true;        if (global >= 0)            fprintf(output, "%s eax, [%s]/n", is_fn[global] || lvalue ? "lea" : "mov", globals[global]);        else if (local >= 0)            fprintf(output, "%s eax, [ebp%+d]/n", lvalue ? "lea" : "mov", offsets[local]);    } else if (token == token_int || token == token_char) {        fprintf(output, "mov eax, %s/n", buffer);        next();    } else if (token == token_str) {        fputs(".section .rodata/n", output);        int str = emit_label(new_label());        //Consecutive string literals are concatenated        while (token == token_str) {            fprintf(output, ".ascii %s/n", buffer);            next();        }        fputs(".byte 0/n"              ".section .text/n", output);        fprintf(output, "mov eax, offset _%08d/n", str);    } else if (try_match("(")) {        expr(0);        match(")");    } else        error("expected an expression, found '%s'/n");}
开发者ID:Fedjmike,项目名称:mini-c,代码行数:49,


示例7: create_node

void create_node(char *id, char *ifs){    int status;    pid_t pid;    char *argv[5];    char fd_buf[4*sizeof(int)+4];    int fd[2];    station_s *station;        pthread_mutex_lock(&station_table_lock);    if(!sym_lookup(&station_table, id)) {        status = pipe(fd);        if(status < 0) {            perror("Error Creating Pipe");            exit(EXIT_FAILURE);        }        sprintf(fd_buf, "%d.%d", fd[0], fd[1]);        argv[0] = CLIENT_PATH;        argv[1] = id;        argv[2] = ifs;        argv[3] = fd_buf;        argv[4] = NULL;                pid = fork();        if(pid) {            /* wait for SIGUSR1 from child */            pause();                        station = alloc(sizeof(*station));            station->pid = pid;            station->pipe[0] = fd[0];            station->pipe[1] = fd[1];                        sym_insert(&station_table, id, (sym_data_u){.ptr = station});        }
开发者ID:jonathanhamm,项目名称:csma,代码行数:35,


示例8: sym_init

void sym_init(void){	struct symbol *sym;#ifndef __MINGW32__	struct utsname uts;#endif	static bool inited = false;	if (inited)		return;	inited = true;#ifndef __MINGW32__	uname(&uts);#endif	sym = sym_lookup("UNAME_RELEASE", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;#ifndef __MINGW32__	sym_add_default(sym, uts.release);#else	sym_add_default(sym, "mingw-unknown");#endif}
开发者ID:MikeeHawk,项目名称:coreboot,代码行数:25,


示例9: sym_insert

int sym_insert( struct symTable *st, const char *name, struct Value val ){	int index = sym_hash( name );	struct Symbol *head = st->table[index];	struct Symbol *sb = sym_lookup( st, name );	if( sb != 0 )	{		/* the symbol exists, update its value */		/* if the symbol's value type is STRING type, free the memory first */		if( sb->val.type == SB_VAR_STRING )		{			free( sb->val.sval );		}		sb->val = val;	}	else	{		/* create a new symbol and insert it */		struct Symbol *new_sb = (struct Symbol*) malloc( sizeof( struct Symbol ) );		new_sb->name = (char*) malloc( strlen( name ) + 1 );		strcpy( new_sb->name, name );		new_sb->val = val;		new_sb->next = head;		st->table[index] = new_sb;	}	return 0;}	
开发者ID:Caoxuyang,项目名称:klcommon,代码行数:28,


示例10: sym_insert_array

int sym_insert_array( struct symTable *st, const char *name, size_t size ){	struct Symbol *sb = sym_lookup( st, name );	if( sb != 0 )	{		return -1;	}	else	{		size_t i;		int index = sym_hash( name );		struct Symbol *head = st->table[index];		struct Symbol *new_sb = (struct Symbol*) malloc( sizeof( struct Symbol ) );		new_sb->name = (char*) malloc( strlen( name ) + 1 );		strcpy( new_sb->name, name );		new_sb->val.type = SB_VAR_ARRAY;		new_sb->val.size = size;		new_sb->val.aval = (struct Value *) malloc( sizeof( struct Value ) * size );		for( i = 0; i < size; ++ i )		{			new_sb->val.aval[i].type = SB_VAR_NUM;			new_sb->val.aval[i].dval = 0;		}		new_sb->next = head;		st->table[index] = new_sb;		}	return 0;}
开发者ID:Caoxuyang,项目名称:klcommon,代码行数:29,


示例11: test_indirect_vars

static awk_value_t *test_indirect_vars(int nargs, awk_value_t *result){	awk_value_t value;	char *name = "NR";	(void) nargs;		/* silence warnings */	assert(result != NULL);	make_number(0.0, result);	/* system("rm testexttmp.txt") */	(void) unlink("testexttmp.txt");	if (sym_lookup(name, AWK_NUMBER, & value))		printf("test_indirect_var: sym_lookup of %s passed/n", name);	else {		printf("test_indirect_var: sym_lookup of %s failed/n", name);		goto out;	}	printf("test_indirect_var: value of NR is %g/n", value.num_value);	make_number(1.0, result);out:	return result;}
开发者ID:uarka,项目名称:gawk,代码行数:26,


示例12: test_scalar_reserved

static awk_value_t *test_scalar_reserved(int nargs, awk_value_t *result){	awk_value_t new_value;	awk_value_t the_scalar;	(void) nargs;		/* silence warnings */	make_number(0.0, result);	/* look up a reserved variable - should pass */	if (sym_lookup("ARGC", AWK_SCALAR, & the_scalar)) {		printf("test_scalar_reserved: sym_lookup of ARGC passed - got a value!/n");	} else {		printf("test_scalar_reserved: sym_lookup of ARGC failed - did not get a value/n");		goto out;	}	/* updating it should fail */	make_number(42.0, & new_value);	if (! sym_update_scalar(the_scalar.scalar_cookie, & new_value)) {		printf("test_scalar_reserved: could not update new_value2 for ARGC - pass/n");	} else {		printf("test_scalar_reserved: was able to update new_value2 for ARGC - fail/n");		goto out;	}	make_number(1.0, result);out:	return result;}
开发者ID:uarka,项目名称:gawk,代码行数:31,


示例13: consume

/* Parse call to builtin symbol __builtin_va_start, which is the result of * calling va_start(arg, s). Return type depends on second input argument. */static struct block *parse__builtin_va_start(struct block *block){    const struct typetree *type;    struct symbol *sym;    struct token param;    int is_invalid;    consume('(');    block = assignment_expression(block);    consume(',');    param = consume(IDENTIFIER);    sym = sym_lookup(&ns_ident, param.strval);    type = &current_func()->symbol->type;    is_invalid = !sym || sym->depth != 1 || !is_function(type);    is_invalid = is_invalid || !nmembers(type) || strcmp(        get_member(type, nmembers(type) - 1)->name, param.strval);    if (is_invalid) {        error("Second parameter of va_start must be last function argument.");        exit(1);    }    consume(')');    block->expr = eval__builtin_va_start(block, block->expr);    return block;}
开发者ID:JamesLinus,项目名称:c-compiler,代码行数:30,


示例14: while

static char *conf_expand_value(const char *in){	struct symbol *sym;	const char *src;	static char res_value[SYMBOL_MAXLENGTH];	char *dst, name[SYMBOL_MAXLENGTH];	res_value[0] = 0;	dst = name;	while ((src = strchr(in, '$'))) {		strncat(res_value, in, src - in);		src++;		dst = name;		while (isalnum((int)*src) || *src == '_')			*dst++ = *src++;		*dst = 0;		sym = sym_lookup(name, 0);		sym_calc_value(sym);		strcat(res_value, sym_get_string_value(sym));		in = src;	}	strcat(res_value, in);	return res_value;}
开发者ID:BackupTheBerlios,项目名称:wl530g-svn,代码行数:25,


示例15: sym_set_scalar

void sym_set_scalar(int width, int *eval_flags,                     scalar_t sc, ident_t id, sym_t sym){   int ivalue;   /* Find the symbol - it is does not exist make a new one */   sym_t newsym = sym_lookup(id, sym);   if (newsym == NULL) {      newsym = new_sym(id, sym);   }   /* Make sure that any existing one is of the right type */   if (newsym->type == SYM_VECTOR) {      /* errx(1, "%s is not a scalar", ident_str(id)); */      fprintf(stderr, "%s is not a scalar(lowercase)/n", ident_str(id));      exit(1);   }   /* Create a new scalar if needed */   if (newsym->type == SYM_UNKNOWN || newsym->scalar->width < width) {      if (newsym->type == SYM_SCALAR)         scalar_free(newsym->scalar);      newsym->type = SYM_SCALAR;      newsym->scalar = new_scalar(width);   }   /* Copy in the values */   for (ivalue=0; ivalue < width; ivalue++) {      if (eval_flags != NULL && !eval_flags[ivalue]) continue;      newsym->scalar->vals[ivalue] = sc->vals[ivalue];   }   return;}
开发者ID:Angel-Fernandez,项目名称:minc-tools,代码行数:32,


示例16: main

int main(int ac, char **av){	struct symbol *sym;	char *mode;	int res;	setlocale(LC_ALL, "");	bindtextdomain(PACKAGE, LOCALEDIR);	textdomain(PACKAGE);	conf_parse(av[1]);	conf_read(NULL);	sym = sym_lookup("KERNELVERSION", 0);	sym_calc_value(sym);	sprintf(menu_backtitle, _("Linux Kernel v%s Configuration"),		sym_get_string_value(sym));	mode = getenv("MENUCONFIG_MODE");	if (mode) {		if (!strcasecmp(mode, "single_menu"))			single_menu_mode = 1;	}	tcgetattr(1, &ios_org);	atexit(conf_cleanup);	init_wsize();	reset_dialog();	init_dialog(menu_backtitle);	do {		conf(&rootmenu);		dialog_clear();		res = dialog_yesno(NULL,				   _("Do you wish to save your "				     "new kernel configuration?/n"				     "<ESC><ESC> to continue."),				   6, 60);	} while (res == KEY_ESC);	end_dialog();	if (res == 0) {		if (conf_write(NULL)) {			fprintf(stderr, _("/n/n"				"Error during writing of the kernel configuration./n"				"Your kernel configuration changes were NOT saved."				"/n/n"));			return 1;		}		printf(_("/n/n"			"*** End of Linux kernel configuration./n"			"*** Execute 'make' to build the kernel or try 'make help'."			"/n/n"));	} else {		fprintf(stderr, _("/n/n"			"Your kernel configuration changes were NOT saved."			"/n/n"));	}	return 0;}
开发者ID:Voskrese,项目名称:mipsonqemu,代码行数:59,


示例17: main

int main(int ac, char **av){	struct symbol *sym;	char *mode;	int stat;	setlocale(LC_ALL, "");	bindtextdomain(PACKAGE, LOCALEDIR);	textdomain(PACKAGE);	conf_parse(av[1]);	conf_read(NULL);	sym = sym_lookup("KERNELVERSION", 0);	sym_calc_value(sym);	sprintf(menu_backtitle, _("swupdate %s Configuration"),		sym_get_string_value(sym));	mode = getenv("MENUCONFIG_MODE");	if (mode) {		if (!strcasecmp(mode, "single_menu"))			single_menu_mode = 1;	}	tcgetattr(1, &ios_org);	atexit(conf_cleanup);	init_wsize();	conf(&rootmenu);	do {		cprint_init();		cprint("--yesno");		cprint(_("Do you wish to save your new configuration?"));		cprint("5");		cprint("60");		stat = exec_conf();	} while (stat < 0);	if (stat == 0) {		if (conf_write(NULL)) {			fprintf(stderr, _("/n/n"				"Error during writing of the configuration./n"				"Your configuration changes were NOT saved."				"/n/n"));			return 1;		}		printf(_("/n/n"			"*** End of configuration./n"			"*** Execute 'make' to build the project or try 'make help'."			"/n/n"));	} else {		fprintf(stderr, _("/n/n"			"Your configuration changes were NOT saved."			"/n/n"));	}	return 0;}
开发者ID:EyeSee360,项目名称:swupdate,代码行数:58,


示例18: switch

static struct block *primary_expression(struct block *block){    const struct symbol *sym;    struct token tok;    switch ((tok = next()).token) {    case IDENTIFIER:        sym = sym_lookup(&ns_ident, tok.strval);        if (!sym) {            error("Undefined symbol '%s'.", tok.strval);            exit(1);        }        /* Special handling for builtin pseudo functions. These are expected to         * behave as macros, thus should be no problem parsing as function call         * in primary expression. Constructs like (va_arg)(args, int) will not         * work with this scheme. */        if (!strcmp("__builtin_va_start", sym->name)) {            block = parse__builtin_va_start(block);        } else if (!strcmp("__builtin_va_arg", sym->name)) {            block = parse__builtin_va_arg(block);        } else {            block->expr = var_direct(sym);        }        break;    case INTEGER_CONSTANT:        block->expr = var_int(tok.intval);        break;    case '(':        block = expression(block);        consume(')');        break;    case STRING:        sym =            sym_add(&ns_ident,                ".LC",                type_init(T_ARRAY, &basic_type__char, strlen(tok.strval) + 1),                SYM_STRING_VALUE,                LINK_INTERN);        /* Store string value directly on symbol, memory ownership is in string         * table from previously called str_register. The symbol now exists as         * if it was declared static char .LC[] = "...". */        ((struct symbol *) sym)->string_value = tok.strval;        /* Result is an IMMEDIATE of type [] char, with a reference to the new         * symbol containing the string literal. Will decay into char * on         * evaluation. */        block->expr = var_direct(sym);        assert(block->expr.kind == IMMEDIATE);        break;    default:        error("Unexpected '%s', not a valid primary expression.", tok.strval);        exit(1);    }    return block;}
开发者ID:JamesLinus,项目名称:c-compiler,代码行数:57,


示例19: l_spank_job_control_unsetenv

static int l_spank_job_control_unsetenv (lua_State *L){    unsetenv_f f = sym_lookup ("spank_job_control_unsetenv");    if (f == NULL)        return l_spank_error_msg (L,                "spank_job_control_unsetenv not implemented in this version");    return l_do_unsetenv (L, f);}
开发者ID:lipari,项目名称:slurm-spank-plugins,代码行数:10,


示例20: sym_lookup_vector

vector_t sym_lookup_vector(ident_t id, sym_t sym){   sym_t s = sym_lookup(id, sym);   if (!s) {      /* errx(1, "%s undefined", ident_str(id)); */      fprintf(stderr, "%s undefined/n", ident_str(id));      exit(1);   }   if (s->type != SYM_VECTOR)      return NULL;   return s->vector;}
开发者ID:Angel-Fernandez,项目名称:minc-tools,代码行数:11,


示例21: sym_set_vector

void sym_set_vector(int width, int *eval_flags,                     vector_t v, ident_t id, sym_t sym){   int ivalue, iel;   scalar_t sc;   /* Find the symbol - it is does not exist make a new one */   sym_t newsym = sym_lookup(id, sym);   if (newsym == NULL) {      newsym = new_sym(id, sym);   }   /* Make sure that any existing one is of the right type */   if (newsym->type == SYM_SCALAR) {      /* errx(1, "%s is not a vector", ident_str(id)); */      fprintf(stderr, "%s is not a vector/n", ident_str(id));      exit(1);   }   /* Create a new vector if needed - either it does not exist or the      length is changing or the width is increasing*/   if (newsym->type == SYM_UNKNOWN || newsym->vector->len != v->len ||      (newsym->vector->len > 0 && newsym->vector->el[0]->width < width) ) {      /* Free an existing vector. If eval_flags is set, then we cannot         change the length of the vector */      if (newsym->type == SYM_VECTOR) {         if (eval_flags != NULL && newsym->vector->len != v->len) {            /* errx(1, "assigned vector must match length of %s in if",                     ident_str(id)); */            fprintf(stderr, "assigned vector must match length of %s in if",                     ident_str(id));            exit(1);         }         vector_free(newsym->vector);      }      newsym->type = SYM_VECTOR;      newsym->vector = new_vector();      for (iel=0; iel < v->len; iel++) {         sc = new_scalar(width);         vector_append(newsym->vector, sc);         scalar_free(sc);      }   }   /* Copy in the values */   for (ivalue=0; ivalue < width; ivalue++) {      if (eval_flags != NULL && !eval_flags[ivalue]) continue;      for (iel=0; iel < v->len; iel++) {         newsym->vector->el[iel]->vals[ivalue] = v->el[iel]->vals[ivalue];      }   }   return;}
开发者ID:Angel-Fernandez,项目名称:minc-tools,代码行数:54,


示例22: main

int main(int ac, char **av){	struct symbol *sym;	char *mode;	int stat;	conf_parse(av[1]);	conf_read(NULL);	sym = sym_lookup("KERNELRELEASE", 0);	sym_calc_value(sym);	sprintf(menu_backtitle, "Linux Kernel v%s Configuration",		sym_get_string_value(sym));	mode = getenv("MENUCONFIG_MODE");	if (mode) {		if (!strcasecmp(mode, "single_menu"))			single_menu_mode = 1;	}	tcgetattr(1, &ios_org);	atexit(conf_cleanup);	init_wsize();	conf(&rootmenu);	do {		cprint_init();		cprint("--yesno");		cprint("Do you wish to save your new kernel configuration?");		cprint("5");		cprint("60");		stat = exec_conf();	} while (stat < 0);	if (stat == 0) {		if (conf_write(NULL)) {			fprintf(stderr, "/n/n"				"Error during writing of the kernel configuration./n"				"Your kernel configuration changes were NOT saved."				"/n/n");			return 1;		}		printf("/n/n"			"*** End of Linux kernel configuration./n"			"*** Execute 'make' to build the kernel or try 'make help'."			"/n/n");	} else {		fprintf(stderr, "/n/n"			"Your kernel configuration changes were NOT saved."			"/n/n");	}	return 0;}
开发者ID:FelipeFernandes1988,项目名称:Alice-1121-Modem,代码行数:54,


示例23: search_for_sym

static gimli_iter_status_t search_for_sym(const char *k, int klen,    void *item, void *arg){  gimli_mapped_object_t file = item;  struct find_sym *find = arg;  find->sym = sym_lookup(file, find->name);  if (find->sym) return GIMLI_ITER_STOP;  return GIMLI_ITER_CONT;}
开发者ID:PawelMarc,项目名称:gimli,代码行数:11,


示例24: aarch64_find_call

voidaarch64_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc){  bfd_vma pc, dest_pc, offset;  unsigned int insn;  Sym *child;  DBG (CALLDEBUG, printf ("[find_call] %s: 0x%lx to 0x%lx/n",			  parent->name, (unsigned long) p_lowpc,			  (unsigned long) p_highpc));  for (pc = p_lowpc; pc < p_highpc; pc += 4)    {      insn = bfd_get_32 (core_bfd, ((unsigned char *) core_text_space				    + pc - core_text_sect->vma));      if ((insn & BRANCH_MASK) == BRANCH_PATTERN)	{	  DBG (CALLDEBUG,	       printf ("[find_call] 0x%lx: bl", (unsigned long) pc));	  /* Regular pc relative addressing check that this is the	     address of a function.  */	  offset = ((((bfd_vma) insn & 0x3ffffff) ^ 0x2000000) - 0x2000000) << 2;	  dest_pc = pc + offset;	  if (hist_check_address (dest_pc))	    {	      child = sym_lookup (&symtab, dest_pc);	      if (child)		{		  DBG (CALLDEBUG,		       printf ("/tdest_pc=0x%lx, (name=%s, addr=0x%lx)/n",			       (unsigned long) dest_pc, child->name,			       (unsigned long) child->addr));		  if (child->addr == dest_pc)		    {		      /* a hit.  */		      arc_add (parent, child, (unsigned long) 0);		      continue;		    }		}	    }	  /* Something funny going on.  */	  DBG (CALLDEBUG, printf ("/tbut it's a botch/n"));	}    }}
开发者ID:ChillyWillyGuru,项目名称:binutils-2.24-PS3,代码行数:53,


示例25: sym_lookup

void FE::InitSyms() {  sym_def = sym_lookup("def");  sym_enum = sym_lookup("enum");  sym_func = sym_lookup("func");  sym_import = sym_lookup("import");  sym_struct = sym_lookup("struct");  sym_spawn = sym_lookup("spawn");}
开发者ID:nlsynth,项目名称:nli,代码行数:8,


示例26: sym_lookup_scalar

scalar_t sym_lookup_scalar(ident_t id, sym_t sym){   sym_t s = sym_lookup(id, sym);   if (!s) {      /* errx(1, "%s undefined", ident_str(id)); */      fprintf(stderr, "%s undefined/n", ident_str(id));      exit(1);   }   if (s->type != SYM_SCALAR) {      /* errx(1, "%s is not scalar (lowercase)", ident_str(id)); */      fprintf(stderr, "%s is not scalar (lowercase)/n", ident_str(id));      exit(1);   }   return s->scalar;}
开发者ID:Angel-Fernandez,项目名称:minc-tools,代码行数:14,


示例27: xr_sym

XR xr_sym(const char *str){    XR sym = sym_lookup(str);    if (sym == VAL_NIL) {        /* Create a new symbol and intern it in          * global symbol table */        sym = _xr_sym_alloc(str);        ((struct XRSymbol*)sym)->interned = 1;        xr_sym_put(sym);    }        return sym;}
开发者ID:nrhtr,项目名称:elixr,代码行数:14,


示例28: id

/* *  recognizes keywords and identifiers */static int id(lex_t *t){    unsigned h;    const struct tab *p;    assert(t);    clx_tok = hash_string(LEX_SPELL(t));    h = hashkey(clx_tok, NELEM(tab));    for (p = tab[h]; p; p = p->link)        if (p->key == clx_tok)            return p->code;    clx_sym = sym_lookup(clx_tok, sym_ident);    return LEX_ID;}
开发者ID:mycoboco,项目名称:beluga,代码行数:19,


示例29: sym_init

void sym_init(void){	struct symbol *sym;	struct utsname uts;	static bool inited = false;	if (inited)		return;	inited = true;	uname(&uts);	sym = sym_lookup("UNAME_RELEASE", 0);	sym->type = S_STRING;	sym->flags |= SYMBOL_AUTO;	sym_add_default(sym, uts.release);}
开发者ID:791254467,项目名称:openwrt-mt7620,代码行数:17,



注:本文中的sym_lookup函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ sym_set_angle_tolerance函数代码示例
C++ sym_is_choice_value函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。