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

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

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

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

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

示例1: error_exit

// Die with an error message.void error_exit(char *msg, ...){  va_list va;  va_start(va, msg);  verror_msg(msg, 0, va);  va_end(va);  xexit();}
开发者ID:zsaleeba,项目名称:shellbox,代码行数:11,


示例2: sigpipe_handler

RETSIGTYPEsigpipe_handler(int x)    /* handle broken pipes ... */{    fprintf(stderr,            "Broken pipe : fcron may have closed the connection/nThe connection "            "has been idle for more than %ds, or fcron may not be running anymore./n",            MAX_IDLE_TIME);    fprintf(stderr, "Exiting .../n");    xexit(EXIT_ERR);}
开发者ID:colmsjo,项目名称:batches,代码行数:12,


示例3: help_exit

// Exit with an error message after showing help text.void help_exit(char *msg, ...){  va_list va;  if (CFG_TOYBOX_HELP) show_help(stderr);  va_start(va, msg);  verror_msg(msg, 0, va);  va_end(va);  xexit();}
开发者ID:kmkhailov,项目名称:toybox,代码行数:13,


示例4: xatob

bool xatob(const char * str){    StrNum conv;    bool b = conv.tob(str);    if (!conv.ok()) {        if (conv.getStatus() == StrNum::BAD_STRING) {            fprintf(stderr, "xatob(/"%s/") : bad string-to-boolean conversion./n", str);        }        xexit(1);    }    return b;}
开发者ID:ibukanov,项目名称:ahome,代码行数:12,


示例5: xopen

int     xopen(char *str, int flags){    int   fd;    fd = open(str, flags);    if (fd == -1)    {        my_putstr_err("Error: file ");        my_putstr_err(str);        xexit(" not accessible/n");    }    return (fd);}
开发者ID:Dallolz,项目名称:dev,代码行数:13,


示例6: as_assert

voidas_assert (const char *file, int line, const char *fn){  as_show_where ();  fprintf (stderr, _("Internal error!/n"));  if (fn)    fprintf (stderr, _("Assertion failure in %s at %s:%d./n"),	     fn, file, line);  else    fprintf (stderr, _("Assertion failure at %s:%d./n"), file, line);  fprintf (stderr, _("Please report this bug./n"));  xexit (EXIT_FAILURE);}
开发者ID:perhaad,项目名称:gdb-test,代码行数:13,


示例7: as_abort

voidas_abort (const char *file, int line, const char *fn){  as_show_where ();  if (fn)    fprintf (stderr, _("Internal error, aborting at %s:%d in %s/n"),	     file, line, fn);  else    fprintf (stderr, _("Internal error, aborting at %s:%d/n"),	     file, line);  fprintf (stderr, _("Please report this bug./n"));  xexit (EXIT_FAILURE);}
开发者ID:perhaad,项目名称:gdb-test,代码行数:13,


示例8: process_pcap

static void process_pcap(		uint8_t *args, 		const struct pcap_pkthdr *hdr, 		const uint8_t *p		){	if (direct)		xcache_process_packet((uint8_t *)p);	else if (xproc((void *)p, hdr->len)) {		xexit();		exit(0);	}}
开发者ID:xieran1988,项目名称:xcache,代码行数:13,


示例9: exitstat

voidexitstat(void){    Char *s;    /*     * Note that if STATUS is corrupted (i.e. getn bombs) then error will exit     * directly because we poke child here. Otherwise we might continue     * unwarrantedly (sic).     */    child = 1;    s = value(STRstatus);    xexit(s ? getn(s) : 0);}
开发者ID:radixo,项目名称:openbsd-src,代码行数:13,


示例10: main

int main(int argc, char *argv[]){	pcap_t *p;	struct bpf_program fp;	if (argc > 1 && strstr(argv[1], ".scap")) {		FILE *fp = fopen(argv[1], "rb");		int len;		static char packet[1*1024*1024];		xcache_init();		printf("replay %s/n", argv[1]);		while (fread(&len, 1, sizeof(len), fp) == sizeof(len)) {			fread(packet, 1, len, fp);			xcache_process_packet(packet);		}		return 0;	}	if (argc > 1 && strstr(argv[1], ".pcap")) {		xcache_init();		printf("replay %s/n", argv[1]);		p = pcap_open_offline(argv[1], NULL);		direct = 1;		pcap_loop(p, -1, process_pcap, NULL);		return 0;	}	if (getenv("cap"))		cap = atoi(getenv("cap"));	if (cap == 0) {		printf("capture=pcap/n");		xinit();		p = pcap_open_live("eth1", BUFSIZ, 1, 1000, NULL);		pcap_compile(p, &fp, "port 80", 0, 0);		pcap_setfilter(p, &fp);		pcap_loop(p, -1, process_pcap, NULL);		return 1;	}	if (cap == 1) {		printf("capture=raw/n");		xinit();		raw_loop();		xexit();	}	printf("unknown mode/n");	return 1;}
开发者ID:xieran1988,项目名称:xcache,代码行数:51,


示例11: xatoi

int xatoi(const char *str){    StrNum conv;    int n = conv.toi(str);    if (!conv.ok()) {        if (conv.getStatus() == StrNum::BAD_STRING) {            fprintf(stderr, "xatoi(/"%s/") : bad string-to-integer conversion./n", str);        }        else if (conv.getStatus() == StrNum::OUT_OF_RANGE) {            fprintf(stderr, "xatoi(/"%s/") : Value out of range./n",str);        }        xexit(1);    }    return n;}
开发者ID:ibukanov,项目名称:ahome,代码行数:15,


示例12: xatoul

unsigned long xatoul(const char *str){    StrNum conv;    unsigned long n = conv.toul(str);    if (!conv.ok()) {        if (conv.getStatus() == StrNum::BAD_STRING) {            fprintf(stderr, "xatoul(/"%s/") : bad string-to-integer conversion./n", str);        }        else if (conv.getStatus() == StrNum::OUT_OF_RANGE) {            fprintf(stderr, "xatoul(/"%s/")",str);            perror(" ");        }        xexit(1);    }    return n;}
开发者ID:ibukanov,项目名称:ahome,代码行数:16,


示例13: xatof

double xatof(const char *str){    StrNum conv;    double x = conv.tof(str);    if (!conv.ok()) {        if (conv.getStatus() == StrNum::BAD_STRING) {            fprintf(stderr, "xatof(/"%s/") : Bad string-to-double conversion./n", str);        }        else if (conv.getStatus() == StrNum::OUT_OF_RANGE) {            fprintf(stderr, "xatof(/"%s/")",str);            perror(" ");        }        xexit(1);    }    return x;}
开发者ID:ibukanov,项目名称:ahome,代码行数:16,


示例14: exitstat

__dead voidexitstat(void){    Char *s;#ifdef PROF    monitor(0);#endif    /*     * Note that if STATUS is corrupted (i.e. getn bombs) then error will exit     * directly because we poke child here. Otherwise we might continue     * unwarrantedly (sic).     */    child = 1;    s = value(STRstatus);    xexit(s ? getn(s) : 0);    /* NOTREACHED */}
开发者ID:ajinkya93,项目名称:netbsd-src,代码行数:17,


示例15: usage

voidusage(void){	xprintf("usage: go tool dist [command]/n"		"Commands are:/n"		"/n"		"banner         print installation banner/n"		"bootstrap      rebuild everything/n"		"clean          deletes all built files/n"		"env [-p]       print environment (-p: include $PATH)/n"		"install [dir]  install individual directory/n"		"version        print Go version/n"		"/n"		"All commands take -v flags to emit extra information./n"	);	xexit(2);}
开发者ID:rosrad,项目名称:go-rep,代码行数:17,


示例16: as_fatal

voidas_fatal (const char *format, ...){  va_list args;  as_show_where ();  va_start (args, format);  fprintf (stderr, _("Fatal error: "));  vfprintf (stderr, format, args);  (void) putc ('/n', stderr);  va_end (args);  /* Delete the output file, if it exists.  This will prevent make from     thinking that a file was created and hence does not need rebuilding.  */  if (out_file_name != NULL)    unlink_if_ordinary (out_file_name);  xexit (EXIT_FAILURE);}
开发者ID:perhaad,项目名称:gdb-test,代码行数:17,


示例17: show_usage

static void ATTRIBUTE_NORETURNshow_usage(FILE *file, int status){  fprintf(file, _("Usage: %s [option(s)] in-file/n"), program_name);  fprintf(file,          _(" Print a human readable interpretation of a SYSROFF object file/n"));  fprintf(file, _(" The options are:/n/  -h --help              Display this information/n/  -v --version           Display the program's version/n//n"));  if (status == 0) {    fprintf(file, _("Report bugs to %s/n"), REPORT_BUGS_TO);  }  xexit(status);}
开发者ID:cooljeanius,项目名称:apple-gdb-1824,代码行数:17,


示例18: add_client

int			add_client(t_env *e, int s){  int			cs;  struct sockaddr_in	client_sin;  socklen_t		client_sin_len;  char			str[12];  client_sin_len = sizeof(client_sin);  if ((cs = accept(s, (struct sockaddr *)&client_sin, &client_sin_len)) == -1)    xexit(s, strerror(errno));  e->fd_type[cs] = FD_CLIENT;  e->fct_read[cs] = client_read;  e->fct_write[cs] = sendmess;  sprintf(str, "Player %d", cs);  e->name[cs] = strdup(str);  dprintf(cs, "BIENVENUE/n");  return (cs);}
开发者ID:Protoxy-,项目名称:Zappy,代码行数:18,


示例19: toy_exec

// Like exec() but runs an internal toybox command instead of another file.// Only returns if it can't run command internally, otherwise exit() when done.void toy_exec(char *argv[]){  struct toy_list *which;  // Return if we can't find it (which includes no multiplexer case),  if (!(which = toy_find(*argv))) return;  // Return if stack depth getting noticeable (proxy for leaked heap, etc).  if (toys.stacktop && labs((char *)toys.stacktop-(char *)&which)>6000)    return;  // Return if we need to re-exec to acquire root via suid bit.  if (toys.which && (which->flags&TOYFLAG_ROOTONLY) && toys.wasroot) return;  // Run command  toy_init(which, argv);  if (toys.which) toys.which->toy_main();  xexit();}
开发者ID:OoOverflow,项目名称:toybox,代码行数:21,


示例20: usage

static voidusage(){	eprintf("Usage: %s [OPTIONS] DISK/n"		"where OPTIONS are:/n"		"/t-V         display version information/n"		"/t-f FILE    File to copy. The FILE may be a gzipped file./n"		"/t           If not specified, it defaults to minifs.gz./n"		"/t-h         display this help and exit/n"		"/t-o FILE    send output to FILE instead of stdout/n"		"/t-w         wait for key press before exiting/n/n"		"DISK is the concatenation of BUS, TARGET and LUN./n"		"BUS is one of `i' (IDE), `a' (ACSI) or `s' (SCSI)./n"		"TARGET and LUN are one decimal digit each. LUN must/n"		"not be specified for IDE devices and is optional for/n"		"ACSI/SCSI devices (if omitted, LUN defaults to 0)./n/n"		"Examples:  a0  refers to ACSI target 0 lun 0/n"		"           s21 refers to SCSI target 2 lun 1/n"		, program_name);	xexit(EXIT_SUCCESS);}
开发者ID:lacombar,项目名称:netbsd-alc,代码行数:21,


示例21: toybox_main

// Multiplexer command, first argument is command to run, rest are args to that.// If first argument starts with - output list of command install paths.void toybox_main(void){  static char *toy_paths[]={"usr/","bin/","sbin/",0};  int i, len = 0;  // fast path: try to exec immediately.  // (Leave toys.which null to disable suid return logic.)  if (toys.argv[1]) toy_exec(toys.argv+1);  // For early error reporting  toys.which = toy_list;  if (toys.argv[1]) {    if (!strcmp("--version", toys.argv[1])) {      xputs(TOYBOX_VERSION);      xexit();    }    if (toys.argv[1][0] != '-') {      toys.exitval = 127;      error_exit("Unknown command %s", toys.argv[1]);    }  }  // Output list of command.  for (i=1; i<ARRAY_LEN(toy_list); i++) {    int fl = toy_list[i].flags;    if (fl & TOYMASK_LOCATION) {      if (toys.argv[1]) {        int j;        for (j=0; toy_paths[j]; j++)          if (fl & (1<<j)) len += printf("%s", toy_paths[j]);      }      len += printf("%s",toy_list[i].name);      if (++len > 65) len = 0;      xputc(len ? ' ' : '/n');    }  }  xputc('/n');}
开发者ID:OoOverflow,项目名称:toybox,代码行数:41,


示例22: fixerror

voidfixerror(void){    didfds = 0;			/* Forget about 0,1,2 */    /*     * Go away if -e or we are a child shell     */    if (!exitset || exiterr || child)	xexit(1);    /*     * Reset the state of the input. This buffered seek to end of file will     * also clear the while/foreach stack.     */    btoeof();    setcopy(STRstatus, STR1, VAR_READWRITE);/*FIXRESET*/#ifdef BSDJOBS    if (tpgrp > 0)	(void) tcsetpgrp(FSHTTY, tpgrp);#endif}
开发者ID:Lance0312,项目名称:tcsh,代码行数:22,


示例23: phup

/* * in the event of a HUP we want to save the history */static voidphup(int sig){    /* XXX sigh, everything after this is a signal race */    rechist();    /*     * We kill the last foreground process group. It then becomes     * responsible to propagate the SIGHUP to its progeny.     */    {	struct process *pp, *np;	for (pp = proclist.p_next; pp; pp = pp->p_next) {	    np = pp;	    /*	     * Find if this job is in the foreground. It could be that	     * the process leader has exited and the foreground flag	     * is cleared for it.	     */	    do		/*		 * If a process is in the foreground; we try to kill		 * it's process group. If we succeed, then the		 * whole job is gone. Otherwise we keep going...		 * But avoid sending HUP to the shell again.		 */		if ((np->p_flags & PFOREGND) != 0 && np->p_jobid != shpgrp &&		    kill(-np->p_jobid, SIGHUP) != -1) {		    /* In case the job was suspended... */		    (void) kill(-np->p_jobid, SIGCONT);		    break;		}	    while ((np = np->p_friends) != pp);	}    }    xexit(sig);}
开发者ID:radixo,项目名称:openbsd-src,代码行数:42,


示例24: xmalloc_failed

voidxmalloc_failed (size_t size){#ifdef HAVE_SBRK  size_t allocated;  if (first_break != NULL)    allocated = (char *) sbrk (0) - first_break;  else    allocated = (char *) sbrk (0) - (char *) &environ;  fprintf (stderr,	   "/n%s%sout of memory allocating %lu bytes after a total of %lu bytes/n",	   name, *name ? ": " : "",	   (unsigned long) size, (unsigned long) allocated);#else /* HAVE_SBRK */  fprintf (stderr,	   "/n%s%sout of memory allocating %lu bytes/n",	   name, *name ? ": " : "",	   (unsigned long) size);#endif /* HAVE_SBRK */  xexit (1);}  
开发者ID:0day-ci,项目名称:gcc,代码行数:22,


示例25: toy_singleinit

// Setup toybox global state for this command.static void toy_singleinit(struct toy_list *which, char *argv[]){  toys.which = which;  toys.argv = argv;  if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "C"+!!(which->flags & TOYFLAG_LOCALE));  if (CFG_TOYBOX_HELP_DASHDASH && argv[1] && !strcmp(argv[1], "--help")) {    if (CFG_TOYBOX && toys.which == toy_list && toys.argv[2])      if (!(toys.which = toy_find(toys.argv[2]))) return;    show_help(stdout);    xexit();  }  if (NEED_OPTIONS && which->options) get_optflags();  else {    toys.optargs = argv+1;    for (toys.optc = 0; toys.optargs[toys.optc]; toys.optc++);  }  toys.old_umask = umask(0);  if (!(which->flags & TOYFLAG_UMASK)) umask(toys.old_umask);  toys.signalfd--;  toys.toycount = ARRAY_LEN(toy_list);}
开发者ID:OoOverflow,项目名称:toybox,代码行数:25,


示例26: main

intmain (int argc, char **argv){  char *emulation;  long start_time = get_run_time ();#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)  setlocale (LC_MESSAGES, "");#endif#if defined (HAVE_SETLOCALE)  setlocale (LC_CTYPE, "");#endif  bindtextdomain (PACKAGE, LOCALEDIR);  textdomain (PACKAGE);  program_name = argv[0];  xmalloc_set_program_name (program_name);  START_PROGRESS (program_name, 0);  expandargv (&argc, &argv);  bfd_init ();  bfd_set_error_program_name (program_name);  xatexit (ld_cleanup);  /* Set up the sysroot directory.  */  ld_sysroot = get_sysroot (argc, argv);  if (*ld_sysroot)    {      if (*TARGET_SYSTEM_ROOT == 0)	{	  einfo ("%P%F: this linker was not configured to use sysroots/n");	  ld_sysroot = "";	}      else	ld_canon_sysroot = lrealpath (ld_sysroot);    }  if (ld_canon_sysroot)    ld_canon_sysroot_len = strlen (ld_canon_sysroot);  else    ld_canon_sysroot_len = -1;  /* Set the default BFD target based on the configured target.  Doing     this permits the linker to be configured for a particular target,     and linked against a shared BFD library which was configured for     a different target.  The macro TARGET is defined by Makefile.  */  if (! bfd_set_default_target (TARGET))    {      einfo (_("%X%P: can't set BFD default target to `%s': %E/n"), TARGET);      xexit (1);    }#if YYDEBUG  {    extern int yydebug;    yydebug = 1;  }#endif  config.build_constructors = TRUE;  config.rpath_separator = ':';  config.split_by_reloc = (unsigned) -1;  config.split_by_file = (bfd_size_type) -1;  config.make_executable = TRUE;  config.magic_demand_paged = TRUE;  config.text_read_only = TRUE;  command_line.warn_mismatch = TRUE;  command_line.warn_search_mismatch = TRUE;  command_line.check_section_addresses = -1;  command_line.disable_target_specific_optimizations = -1;  /* We initialize DEMANGLING based on the environment variable     COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the     output of the linker, unless COLLECT_NO_DEMANGLE is set in the     environment.  Acting the same way here lets us provide the same     interface by default.  */  demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;  link_info.allow_undefined_version = TRUE;  link_info.keep_memory = TRUE;  link_info.combreloc = TRUE;  link_info.strip_discarded = TRUE;  link_info.emit_hash = TRUE;  link_info.callbacks = &link_callbacks;  link_info.input_bfds_tail = &link_info.input_bfds;  /* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init     and _fini symbols.  We are compatible.  */  link_info.init_function = "_init";  link_info.fini_function = "_fini";  link_info.relax_pass = 1;  link_info.pei386_auto_import = -1;  link_info.spare_dynamic_tags = 5;  link_info.path_separator = ':';  ldfile_add_arch ("");  emulation = get_emulation (argc, argv);//.........这里部分代码省略.........
开发者ID:hhabe,项目名称:rx-linux-binutils,代码行数:101,


示例27: stderror

/* * Print the error with the given id. * * Special ids: *	ERR_SILENT: Print nothing. *	ERR_OLD: Print the previously set error if one was there. *	         otherwise return. *	ERR_NAME: If this bit is set, print the name of the function *		  in bname * * This routine always resets or exits.  The flag haderr * is set so the routine who catches the unwind can propogate * it if they want. * * Note that any open files at the point of error will eventually * be closed in the routine process in sh.c which is the only * place error unwinds are ever caught. */voidstderror(int id, ...){    va_list va;    Char **v;    int flags;    flags = id & ERR_FLAGS;    id &= ~ERR_FLAGS;    if ((flags & ERR_OLD) && seterr == NULL)	abort();    if (id < 0 || id > (int)(sizeof(errorlist) / sizeof(errorlist[0])))	id = ERR_INVALID;    (void)fflush(cshout);    (void)fflush(csherr);    haderr = 1;			/* Now to diagnostic output */    timflg = 0;			/* This isn't otherwise reset */    if (!(flags & ERR_SILENT)) {	if (flags & ERR_NAME)	    (void)fprintf(csherr, "%s: ", bname);	if ((flags & ERR_OLD))	    /* Old error. */	    (void)fprintf(csherr, "%s./n", seterr);	else {	    va_start(va, id);	    (void)vfprintf(csherr, errorlist[id], va);	    va_end(va);	    (void)fprintf(csherr, "./n");	}    }    if (seterr) {	xfree((ptr_t) seterr);	seterr = NULL;    }    if ((v = pargv) != NULL)	pargv = 0, blkfree(v);    if ((v = gargv) != NULL)	gargv = 0, blkfree(v);    (void)fflush(cshout);    (void)fflush(csherr);    didfds = 0;			/* Forget about 0,1,2 */    /*     * Go away if -e or we are a child shell     */    if (exiterr || child)	xexit(1);    /*     * Reset the state of the input. This buffered seek to end of file will     * also clear the while/foreach stack.     */    btoeof();    set(STRstatus, Strsave(STR1));    if (tpgrp > 0)	(void)tcsetpgrp(FSHTTY, tpgrp);    reset();			/* Unwind */}
开发者ID:tombibsd,项目名称:netbsd-src,代码行数:84,


示例28: gldelf32pic32mx_parse_args

/*** parse_args()**** This function is called for each command-line option.*/static intgldelf32pic32mx_parse_args (int argc, char ** argv){  int        longind;  int        optc;  int        prevoptind = optind;  int        prevopterr = opterr;  int        wanterror;  static int lastoptind = -1;  const char *smart_io_option_err  = "--smart-io and --no-smart-io";  const char *option_err = " options can not be used together/n";  const char *data_init_option_err = "--data-init and --no-data-init";  if (lastoptind != optind)    opterr = 0;  wanterror  = opterr;  lastoptind = optind;  optc   = getopt_long_only (argc, argv, shortopts, longopts, & longind);  opterr = prevopterr;  switch (optc)    {    default:      if (wanterror)        xexit (1);      optind =  prevoptind;      return 0;    case 'D':      pic32_debug = TRUE;      break;    case SMART_IO_OPTION:      if (pic32_has_smart_io_option && (!pic32_smart_io))        einfo(_("%P%F: Error: %s%s"), smart_io_option_err, option_err);      pic32_smart_io = TRUE;      pic32_has_smart_io_option = TRUE;      break;    case NO_SMART_IO_OPTION:      if (pic32_has_smart_io_option && (pic32_smart_io))        einfo(_("%P%F: Error: %s%s"), smart_io_option_err, option_err);      pic32_smart_io = FALSE;      pic32_has_smart_io_option = TRUE;      break;    case REPORT_MEM_OPTION:      pic32_report_mem = TRUE;      break;    case DATA_INIT_OPTION:      if (pic32_has_data_init_option && (!pic32_data_init))        einfo(_("%P%F: Error: %s%s"), data_init_option_err, option_err);      pic32_data_init = TRUE;      pic32_has_data_init_option = TRUE;      break;    case NO_DATA_INIT_OPTION:      if (pic32_has_data_init_option && (pic32_data_init))        einfo(_("%P%F: Error: %s%s"), data_init_option_err, option_err);      pic32_data_init = FALSE;      pic32_has_data_init_option = TRUE;      break;    }  return 1;} /* static int gldelf32pic32mx_parse_args ()*/
开发者ID:ccompiler4pic32,项目名称:pic32-binutils,代码行数:68,


示例29: vfinfo

//.........这里部分代码省略.........	      else if (*fmt == 'S')		{		  /* Print script file and linenumber.  */		  etree_type node;		  etree_type *tp = (etree_type *) args[arg_no].p;		  fmt++;		  ++arg_count;		  if (tp == NULL)		    {		      tp = &node;		      tp->type.filename = ldlex_filename ();		      tp->type.lineno = lineno;		    }		  if (tp->type.filename != NULL)		    fprintf (fp, "%s:%u", tp->type.filename, tp->type.lineno);		}	      else if (*fmt == 'T')		{		  /* Symbol name.  */		  const char *name = (const char *) args[arg_no].p;		  fmt++;		  ++arg_count;		  if (name == NULL || *name == 0)		    {		      fprintf (fp, _("no symbol"));		      break;		    }		  else if (demangling)		    {		      char *demangled;		      demangled = bfd_demangle (link_info.output_bfd, name,						DMGL_ANSI | DMGL_PARAMS);		      if (demangled != NULL)			{			  fprintf (fp, "%s", demangled);			  free (demangled);			  break;			}		    }		  fprintf (fp, "%s", name);		}	      else		{		  /* native (host) void* pointer, like printf */		  fprintf (fp, "%p", args[arg_no].p);		  ++arg_count;		}	      break;	    case 's':	      /* arbitrary string, like printf */	      fprintf (fp, "%s", (char *) args[arg_no].p);	      ++arg_count;	      break;	    case 'd':	      /* integer, like printf */	      fprintf (fp, "%d", args[arg_no].i);	      ++arg_count;	      break;	    case 'u':	      /* unsigned integer, like printf */	      fprintf (fp, "%u", args[arg_no].i);	      ++arg_count;	      break;	    case 'l':	      if (*fmt == 'd')		{		  fprintf (fp, "%ld", args[arg_no].l);		  ++arg_count;		  ++fmt;		  break;		}	      else if (*fmt == 'u')		{		  fprintf (fp, "%lu", args[arg_no].l);		  ++arg_count;		  ++fmt;		  break;		}	      /* Fallthru */	    default:	      fprintf (fp, "%%%c", fmt[-1]);	      break;	    }	}    }  if (is_warning && config.fatal_warnings)    config.make_executable = FALSE;  if (fatal)    xexit (1);}
开发者ID:bminor,项目名称:binutils-gdb,代码行数:101,



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


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