这篇教程C++ DEBUG_INIT函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中DEBUG_INIT函数的典型用法代码示例。如果您正苦于以下问题:C++ DEBUG_INIT函数的具体用法?C++ DEBUG_INIT怎么用?C++ DEBUG_INIT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了DEBUG_INIT函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: mainint main(int argc, char * argv[]){ DEBUG_INIT(NULL); volatile struct exception exp; TRY_CATCH(exp, MASK_ALL) { wrapper_main(argc, argv); }
开发者ID:pi3orama,项目名称:currf2,代码行数:7,
示例2: gst_vdp_output_buffer_get_typeGTypegst_vdp_output_buffer_get_type (void){ static GType _gst_vdp_output_buffer_type; if (G_UNLIKELY (_gst_vdp_output_buffer_type == 0)) { static const GTypeInfo info = { sizeof (GstBufferClass), NULL, NULL, gst_vdp_output_buffer_class_init, NULL, NULL, sizeof (GstVdpOutputBuffer), 0, (GInstanceInitFunc) gst_vdp_output_buffer_init, NULL }; _gst_vdp_output_buffer_type = g_type_register_static (GST_TYPE_BUFFER, "GstVdpOutputBuffer", &info, 0); DEBUG_INIT (); } return _gst_vdp_output_buffer_type;}
开发者ID:zsx,项目名称:ossbuild,代码行数:25,
示例3: mainint main(){ DDRA = 0xff; DDRB = 0x00; PORTB = 0x00; DDRB |= _BV(EMPH_BIT); DEBUG_INIT(); timer_init(); sei(); uint8_t leds = 1; for (;;) { PORTA = leds; delayms(250); delayms(250); if (!(leds <<= 1)) leds++; service_ide(); if (SDCARD_INSERTED) handle_sdcard(); } return 0;}
开发者ID:zeldin,项目名称:iceGDROM,代码行数:27,
示例4: gst_vdp_mpeg_frame_get_typeGTypegst_vdp_mpeg_frame_get_type (void){ static GType _gst_vdp_mpeg_frame_type = 0; if (G_UNLIKELY (_gst_vdp_mpeg_frame_type == 0)) { static const GTypeInfo info = { sizeof (GstVdpMpegFrameClass), NULL, NULL, gst_vdp_mpeg_frame_class_init, NULL, NULL, sizeof (GstVdpMpegFrame), 0, (GInstanceInitFunc) gst_vdp_mpeg_frame_init, NULL }; _gst_vdp_mpeg_frame_type = g_type_register_static (GST_TYPE_VIDEO_FRAME, "GstVdpMpegFrame", &info, 0); DEBUG_INIT (); } return _gst_vdp_mpeg_frame_type;}
开发者ID:spunktsch,项目名称:svtplayer,代码行数:25,
示例5: mainint main(int argc, const char *argv[]){ int opt; poptContext pc; struct main_context *main_ctx; int ret; uid_t uid; gid_t gid; struct poptOption long_options[] = { POPT_AUTOHELP SSSD_MAIN_OPTS SSSD_SERVER_OPTS(uid, gid) POPT_TABLEEND }; /* Set debug level to invalid value so we can decide if -d 0 was used. */ debug_level = SSSDBG_INVALID; umask(DFL_RSP_UMASK); pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { switch(opt) { default: fprintf(stderr, "/nInvalid option %s: %s/n/n", poptBadOption(pc, 0), poptStrerror(opt)); poptPrintUsage(pc, stderr, 0); return 1; } } poptFreeContext(pc); DEBUG_INIT(debug_level); /* set up things like debug, signals, daemonization, etc... */ debug_log_file = "sssd_pac"; ret = server_setup("sssd[pac]", 0, uid, gid, CONFDB_PAC_CONF_ENTRY, &main_ctx); if (ret != EOK) return 2; ret = die_if_parent_died(); if (ret != EOK) { /* This is not fatal, don't return */ DEBUG(SSSDBG_OP_FAILURE, "Could not set up to exit when parent process does/n"); } ret = pac_process_init(main_ctx, main_ctx->event_ctx, main_ctx->confdb_ctx); if (ret != EOK) return 3; /* loop on main */ server_loop(main_ctx); return 0;}
开发者ID:lejonet,项目名称:sssd,代码行数:59,
示例6: mainint main(int argc, const char *argv[]){ int rv; int no_cleanup = 0; poptContext pc; int opt; struct poptOption long_options[] = { POPT_AUTOHELP SSSD_DEBUG_OPTS {"no-cleanup", 'n', POPT_ARG_NONE, &no_cleanup, 0, _("Do not delete the test database after a test run"), NULL }, POPT_TABLEEND }; const UnitTest tests[] = { /* Utility functions unit test */ unit_test(dyndns_test_get_ifaddr), /* Dynamic DNS update unit tests*/ unit_test_setup_teardown(dyndns_test_ok, dyndns_test_setup, dyndns_test_teardown), unit_test_setup_teardown(dyndns_test_error, dyndns_test_setup, dyndns_test_teardown), unit_test_setup_teardown(dyndns_test_timeout, dyndns_test_setup, dyndns_test_teardown), unit_test_setup_teardown(dyndns_test_interval, dyndns_test_setup, dyndns_test_teardown), }; /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { switch(opt) { default: fprintf(stderr, "/nInvalid option %s: %s/n/n", poptBadOption(pc, 0), poptStrerror(opt)); poptPrintUsage(pc, stderr, 0); return 1; } } poptFreeContext(pc); DEBUG_INIT(debug_level); /* Even though normally the tests should clean up after themselves * they might not after a failed run. Remove the old db to be sure */ tests_set_cwd(); test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_SYSDB_FILE); test_dom_suite_setup(TESTS_PATH); rv = run_tests(tests); if (rv == 0 && !no_cleanup) { test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_SYSDB_FILE); } return rv;}
开发者ID:AbhishekKumarSingh,项目名称:sssd,代码行数:58,
示例7: mainint main (void){ DEBUG_INIT(); cli_rx = (cli_rx_fpt)uart0_getc; cli_tx = (cli_tx_fpt)uart0_putc; for(;;){ cli_putstr_P(PSTR("/r/n/r/nCrypto-VS (")); cli_putstr(algo_name); cli_putstr_P(PSTR(")/r/nloaded and running/r/n")); cmd_interface(cmdlist); }}
开发者ID:EwanLu,项目名称:chipwhisperer,代码行数:11,
示例8: mainint main (void){ DEBUG_INIT(); uart_putstr("/r/n"); cli_rx = uart_getc; cli_tx = uart_putc; shavs_algolist=(hfdesc_t**)algolist; shavs_algo=(hfdesc_t*)&sha256_desc; for(;;){ uart_putstr_P(PSTR("/r/n/r/nCrypto-VS (")); uart_putstr(algo_name); uart_putstr_P(PSTR(")/r/nloaded and running/r/n")); cmd_interface(cmdlist); }}
开发者ID:azilly-de,项目名称:openkubus,代码行数:14,
示例9: mainint main (void){ DEBUG_INIT(); cli_rx = (cli_rx_fpt)uart0_getc; cli_tx = (cli_tx_fpt)uart0_putc; cmacvs_algolist=(bcdesc_t**)algolist; cmacvs_algo=(bcdesc_t*)&aes128_desc; for(;;){ cli_putstr_P(PSTR("/r/n/r/nCrypto-VS (")); cli_putstr(algo_name); cli_putstr_P(PSTR(")/r/nloaded and running/r/n")); cmd_interface(cmdlist); }}
开发者ID:kailiu-bupt2005,项目名称:Arduino-and-XBee-based-secure-home-automation,代码行数:14,
示例10: gst_vdp_sink_get_typeGTypegst_vdp_sink_get_type (void){ static GType vdp_sink_type = 0; if (!vdp_sink_type) { static const GTypeInfo vdp_sink_info = { sizeof (VdpSinkClass), gst_vdp_sink_base_init, NULL, (GClassInitFunc) gst_vdp_sink_class_init, NULL, NULL, sizeof (VdpSink), 0, (GInstanceInitFunc) gst_vdp_sink_init, }; static const GInterfaceInfo iface_info = { (GInterfaceInitFunc) gst_vdp_sink_interface_init, NULL, NULL, }; static const GInterfaceInfo navigation_info = { (GInterfaceInitFunc) gst_vdp_sink_navigation_init, NULL, NULL, }; static const GInterfaceInfo overlay_info = { (GInterfaceInitFunc) gst_vdp_sink_xoverlay_init, NULL, NULL, }; vdp_sink_type = g_type_register_static (GST_TYPE_VIDEO_SINK, "VdpSink", &vdp_sink_info, 0); g_type_add_interface_static (vdp_sink_type, GST_TYPE_IMPLEMENTS_INTERFACE, &iface_info); g_type_add_interface_static (vdp_sink_type, GST_TYPE_NAVIGATION, &navigation_info); g_type_add_interface_static (vdp_sink_type, GST_TYPE_X_OVERLAY, &overlay_info); } DEBUG_INIT (); return vdp_sink_type;}
开发者ID:spunktsch,项目名称:svtplayer,代码行数:48,
示例11: mainint main(void){ //initialize_memory(); DEBUG_INIT();#if ! defined(USE_SCHEDULE) bus_init(); ifs_init();#endif /* USE_SCHEDULE */ ttpa_setstate(TTPA_STATE_UNSYNC); while(1) {#if defined(USE_SCHEDULE) schedule();#endif } return 0;}
开发者ID:bruggers,项目名称:NES-2012,代码行数:16,
示例12: mainint main(void){ int i; DEBUG_INIT("debug_test"); PAF; for(i=0;i<100;i++) test1(i); for(i=0;i<100;i++) test2(i); PIF; exit(0);}
开发者ID:sambeau,项目名称:burp,代码行数:18,
示例13: mainint main (void){ DEBUG_INIT(); cli_rx = (cli_rx_fpt)uart0_getc; cli_tx = (cli_tx_fpt)uart0_putc; shavs_algolist=(hfdesc_t**)algolist; shavs_algo=(hfdesc_t*)&echo256_desc; for(;;){ cli_putstr_P(PSTR("/r/n/r/nCrypto-VS (")); cli_putstr(algo_name); cli_putstr_P(PSTR("; ")); cli_putstr(__DATE__); cli_putstr_P(PSTR(" ")); cli_putstr(__TIME__); cli_putstr_P(PSTR(")/r/nloaded and running/r/n")); cmd_interface(cmdlist); }}
开发者ID:EwanLu,项目名称:chipwhisperer,代码行数:19,
示例14: mainintmain(int argc, char * argv[]){ char * target_fn = NULL; DEBUG_INIT(NULL); opts = parse_args(argc, argv); assert(opts != NULL); target_fn = argv[opts->cmd_idx]; assert(opts->cmd_idx < argc); /* check ckpt file and target file */ struct stat s; if (stat(opts->ckpt_fn, &s) != 0) { SYS_ERROR("file %s doesn't exists/n", opts->ckpt_fn); return -1; } if (!S_ISREG(s.st_mode)) { SYS_ERROR("file %s not a regular file/n", opts->ckpt_fn); return -1; } if (stat(target_fn, &s) != 0) { SYS_ERROR("file %s doesn't exists/n", target_fn); return -1; } if (!S_ISREG(s.st_mode)) { SYS_ERROR("file %s not a regular file/n", target_fn); return -1; } /* start */ volatile struct exception exp; TRY_CATCH(exp, MASK_ALL) { cf = load_ckpt_file(opts->ckpt_fn); gdbloader_main(target_fn); close_ckpt_file(cf); ptrace_detach(TRUE); } CATCH (exp) {
开发者ID:pi3orama,项目名称:Snitchaser,代码行数:42,
示例15: mainint main(int argc, const char *argv[]){ int opt; poptContext pc; int number_failed; struct poptOption long_options[] = { POPT_AUTOHELP { "debug-level", 'd', POPT_ARG_INT, &debug_level, 0, "Set debug level", NULL }, POPT_TABLEEND }; /* Set debug level to invalid value so we can deside if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { switch(opt) { default: fprintf(stderr, "/nInvalid option %s: %s/n/n", poptBadOption(pc, 0), poptStrerror(opt)); poptPrintUsage(pc, stderr, 0); return 1; } } poptFreeContext(pc); DEBUG_INIT(debug_level); tests_set_cwd(); Suite *s = crypto_suite(); SRunner *sr = srunner_create(s); srunner_run_all(sr, CK_ENV); number_failed = srunner_ntests_failed(sr); srunner_free(sr); return (number_failed == 0 ? EXIT_SUCCESS : EXIT_FAILURE);}
开发者ID:AbhishekKumarSingh,项目名称:sssd,代码行数:39,
示例16: mainint main(int argc, const char **argv){ int ret = EXIT_SUCCESS; struct tools_ctx *tctx = NULL; const char *pc_username = NULL; int pc_debug = SSSDBG_DEFAULT; int pc_remove = 0; int pc_force = 0; int pc_kick = 0; poptContext pc = NULL; struct poptOption long_options[] = { POPT_AUTOHELP { "debug", '/0', POPT_ARG_INT | POPT_ARGFLAG_DOC_HIDDEN, &pc_debug, 0, _("The debug level to run with"), NULL }, { "remove", 'r', POPT_ARG_NONE, NULL, 'r', _("Remove home directory and mail spool"), NULL }, { "no-remove", 'R', POPT_ARG_NONE, NULL, 'R', _("Do not remove home directory and mail spool"), NULL }, { "force", 'f', POPT_ARG_NONE, NULL, 'f', _("Force removal of files not owned by the user"), NULL }, { "kick", 'k', POPT_ARG_NONE, NULL, 'k', _("Kill users' processes before removing him"), NULL }, POPT_TABLEEND }; debug_prg_name = argv[0]; ret = set_locale(); if (ret != EOK) { DEBUG(1, ("set_locale failed (%d): %s/n", ret, strerror(ret))); ERROR("Error setting the locale/n"); ret = EXIT_FAILURE; goto fini; } /* parse parameters */ pc = poptGetContext(NULL, argc, argv, long_options, 0); poptSetOtherOptionHelp(pc, "USERNAME"); while ((ret = poptGetNextOpt(pc)) > 0) { switch (ret) { case 'r': pc_remove = DO_REMOVE_HOME; break; case 'R': pc_remove = DO_NOT_REMOVE_HOME; break; case 'f': pc_force = DO_FORCE_REMOVAL; break; case 'k': pc_kick = 1; break; } } DEBUG_INIT(pc_debug); if (ret != -1) { BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini); } pc_username = poptGetArg(pc); if (pc_username == NULL) { BAD_POPT_PARAMS(pc, _("Specify user to delete/n"), ret, fini); } CHECK_ROOT(ret, debug_prg_name); ret = init_sss_tools(&tctx); if (ret != EOK) { DEBUG(1, ("init_sss_tools failed (%d): %s/n", ret, strerror(ret))); if (ret == ENOENT) { ERROR("Error initializing the tools - no local domain/n"); } else { ERROR("Error initializing the tools/n"); } ret = EXIT_FAILURE; goto fini; } /* if the domain was not given as part of FQDN, default to local domain */ ret = parse_name_domain(tctx, pc_username); if (ret != EOK) { ERROR("Invalid domain specified in FQDN/n"); ret = EXIT_FAILURE; goto fini; } /* * Fills in defaults for ops_ctx user did not specify. */ ret = userdel_defaults(tctx, tctx->confdb, tctx->octx, pc_remove); if (ret != EOK) { ERROR("Cannot set default values/n"); ret = EXIT_FAILURE; goto fini;//.........这里部分代码省略.........
开发者ID:AbhishekKumarSingh,项目名称:sssd,代码行数:101,
示例17: mainint main(int argc, char *argv[]){ /* * Alloc the global structures * We can access these structs via the macro in ec_globals.h */ globals_alloc(); GBL_PROGRAM = strdup(EC_PROGRAM); GBL_VERSION = strdup(EC_VERSION); SAFE_CALLOC(GBL_DEBUG_FILE, strlen(EC_PROGRAM) + strlen("-") + strlen(EC_VERSION) + strlen("_debug.log") + 1, sizeof(char)); sprintf(GBL_DEBUG_FILE, "%s-%s_debug.log", GBL_PROGRAM, EC_VERSION); DEBUG_INIT(); DEBUG_MSG("main -- here we go !!"); /* initialize the filter mutex */ filter_init_mutex(); /* register the main thread as "init" */ ec_thread_register(EC_PTHREAD_SELF, "init", "initialization phase"); /* activate the signal handler */ signal_handler(); /* ettercap copyright */ fprintf(stdout, "/n" EC_COLOR_BOLD "%s %s" EC_COLOR_END " copyright %s %s/n/n", GBL_PROGRAM, GBL_VERSION, EC_COPYRIGHT, EC_AUTHORS); /* getopt related parsing... */ parse_options(argc, argv); /* check the date */ time_check(); /* load the configuration file */ load_conf(); /* * get the list of available interfaces * * this function will not return if the -I option was * specified on command line. it will instead print the * list and exit */ capture_getifs(); /* initialize the user interface */ ui_init(); /* initialize the network subsystem */ network_init(); /* * always disable the kernel ip forwarding (except when reading from file). * the forwarding will be done by ettercap. */ if(!GBL_OPTIONS->read && !GBL_OPTIONS->unoffensive && !GBL_OPTIONS->only_mitm) { disable_ip_forward(); #ifdef OS_LINUX if (!GBL_OPTIONS->read) disable_interface_offload();#endif /* binds ports and set redirect for ssl wrapper */ if(GBL_SNIFF->type == SM_UNIFIED && GBL_OPTIONS->ssl_mitm) ssl_wrap_init(); } /* * drop root privileges * we have already opened the sockets with high privileges * we don't need anymore root privs. */ drop_privs();/***** !! NO PRIVS AFTER THIS POINT !! *****/ /* load all the plugins */ plugin_load_all(); /* print how many dissectors were loaded */ conf_dissectors(); /* load the mac-fingerprints */ manuf_init(); /* load the tcp-fingerprints */ fingerprint_init(); /* load the services names */ services_init(); /* load http known fileds for user/pass */ http_fields_init();#ifdef HAVE_EC_LUA /* Initialize lua */ ec_lua_init();//.........这里部分代码省略.........
开发者ID:Nuc1eoN,项目名称:ettercap,代码行数:101,
示例18: mainintmain(int argc, const char *argv[]){ int opt; poptContext pc; int debug_fd = -1; errno_t ret; int sysvol_gpt_version; int result; TALLOC_CTX *main_ctx = NULL; uint8_t *buf = NULL; ssize_t len = 0; struct input_buffer *ibuf = NULL; struct response *resp = NULL; size_t written; struct poptOption long_options[] = { POPT_AUTOHELP {"debug-level", 'd', POPT_ARG_INT, &debug_level, 0, _("Debug level"), NULL}, {"debug-timestamps", 0, POPT_ARG_INT, &debug_timestamps, 0, _("Add debug timestamps"), NULL}, {"debug-microseconds", 0, POPT_ARG_INT, &debug_microseconds, 0, _("Show timestamps with microseconds"), NULL}, {"debug-fd", 0, POPT_ARG_INT, &debug_fd, 0, _("An open file descriptor for the debug logs"), NULL}, {"debug-to-stderr", 0, POPT_ARG_NONE | POPT_ARGFLAG_DOC_HIDDEN, &debug_to_stderr, 0, _("Send the debug output to stderr directly."), NULL }, POPT_TABLEEND }; /* Set debug level to invalid value so we can decide if -d 0 was used. */ debug_level = SSSDBG_INVALID; pc = poptGetContext(argv[0], argc, argv, long_options, 0); while((opt = poptGetNextOpt(pc)) != -1) { switch(opt) { default: fprintf(stderr, "/nInvalid option %s: %s/n/n", poptBadOption(pc, 0), poptStrerror(opt)); poptPrintUsage(pc, stderr, 0); _exit(-1); } } poptFreeContext(pc); DEBUG_INIT(debug_level); debug_prg_name = talloc_asprintf(NULL, "[sssd[gpo_child[%d]]]", getpid()); if (debug_prg_name == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "talloc_asprintf failed./n"); goto fail; } if (debug_fd != -1) { ret = set_debug_file_from_fd(debug_fd); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, "set_debug_file_from_fd failed./n"); } } DEBUG(SSSDBG_TRACE_FUNC, "gpo_child started./n"); main_ctx = talloc_new(NULL); if (main_ctx == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "talloc_new failed./n"); talloc_free(discard_const(debug_prg_name)); goto fail; } talloc_steal(main_ctx, debug_prg_name); buf = talloc_size(main_ctx, sizeof(uint8_t)*IN_BUF_SIZE); if (buf == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "talloc_size failed./n"); goto fail; } ibuf = talloc_zero(main_ctx, struct input_buffer); if (ibuf == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed./n"); goto fail; } DEBUG(SSSDBG_TRACE_FUNC, "context initialized/n"); errno = 0; len = sss_atomic_read_s(STDIN_FILENO, buf, IN_BUF_SIZE); if (len == -1) { ret = errno; DEBUG(SSSDBG_CRIT_FAILURE, "read failed [%d][%s]./n", ret, strerror(ret)); goto fail; } close(STDIN_FILENO); ret = unpack_buffer(buf, len, ibuf); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE,//.........这里部分代码省略.........
开发者ID:nalind,项目名称:sssd,代码行数:101,
示例19: CHOLMOD//.........这里部分代码省略.........#ifndef NPRINT /* stand-alone ANSI C program */ Common->print_function = printf ;#else /* printing disabled */ Common->print_function = NULL ;#endif /* ---------------------------------------------------------------------- */ /* workspace */ /* ---------------------------------------------------------------------- */ /* This code assumes the workspace held in Common is not initialized. If * it is, then a memory leak will occur because the pointers are * overwritten with NULL. */ Common->nrow = 0 ; Common->mark = EMPTY ; Common->xworksize = 0 ; Common->iworksize = 0 ; Common->Flag = NULL ; Common->Head = NULL ; Common->Iwork = NULL ; Common->Xwork = NULL ; Common->no_workspace_reallocate = FALSE ; /* ---------------------------------------------------------------------- */ /* statistics */ /* ---------------------------------------------------------------------- */ /* fl and lnz are computed in cholmod_analyze and cholmod_rowcolcounts */ Common->fl = EMPTY ; Common->lnz = EMPTY ; /* modfl is computed in cholmod_updown, cholmod_rowadd, and cholmod_rowdel*/ Common->modfl = EMPTY ; /* all routines use status as their error-report code */ Common->status = CHOLMOD_OK ; Common->malloc_count = 0 ; /* # calls to malloc minus # calls to free */ Common->memory_usage = 0 ; /* peak memory usage (in bytes) */ Common->memory_inuse = 0 ; /* current memory in use (in bytes) */ Common->nrealloc_col = 0 ; Common->nrealloc_factor = 0 ; Common->ndbounds_hit = 0 ; Common->rowfacfl = 0 ; Common->aatfl = EMPTY ; /* Common->called_nd is TRUE if cholmod_analyze called or NESDIS */ Common->called_nd = FALSE ; Common->blas_ok = TRUE ; /* false if BLAS int overflow occurs */ /* ---------------------------------------------------------------------- */ /* default SuiteSparseQR knobs and statististics */ /* ---------------------------------------------------------------------- */ for (k = 0 ; k < 4 ; k++) Common->SPQR_xstat [k] = 0 ; for (k = 0 ; k < 10 ; k++) Common->SPQR_istat [k] = 0 ; for (k = 0 ; k < 10 ; k++) Common->other1 [k] = 0 ; for (k = 0 ; k < 6 ; k++) Common->other2 [k] = 0 ; for (k = 0 ; k < 10 ; k++) Common->other3 [k] = 0 ; for (k = 0 ; k < 16 ; k++) Common->other4 [k] = 0 ; for (k = 0 ; k < 16 ; k++) Common->other5 [k] = (void *) NULL ; Common->SPQR_grain = 1 ; /* no Intel TBB multitasking, by default */ Common->SPQR_small = 1e6 ; /* target min task size for TBB */ Common->SPQR_shrink = 1 ; /* controls SPQR shrink realloc */ Common->SPQR_nthreads = 0 ; /* 0: let TBB decide how many threads to use */ /* ---------------------------------------------------------------------- */ /* GPU initializations */ /* ---------------------------------------------------------------------- */#ifdef GPU_BLAS Common->cublasHandle = NULL ; Common->cudaStreamSyrk = NULL ; Common->cudaStreamGemm = NULL ; Common->cudaStreamTrsm = NULL ; Common->cudaStreamPotrf [0] = NULL ; Common->cudaStreamPotrf [1] = NULL ; Common->cudaStreamPotrf [2] = NULL ; Common->cublasEventPotrf [0] = NULL ; Common->cublasEventPotrf [2] = NULL ; Common->HostPinnedMemory = NULL ; Common->devPotrfWork = NULL ; Common->devSyrkGemmPtrLx = NULL ; Common->devSyrkGemmPtrC = NULL ; Common->GemmUsed = 0 ; Common->SyrkUsed = 0 ; Common->syrkStart = 0 ;#endif DEBUG_INIT ("cholmod start", Common) ; return (TRUE) ;}
开发者ID:csilles,项目名称:cxxr,代码行数:101,
示例20: mainint main(int argc, char* const* argv){ pst_file pstfile; pst_index_ll *ptr; char *outdir = NULL, *file = NULL, *outname = NULL; char *buf = NULL; int c; FILE *fp; while ((c = getopt(argc, argv, "o:")) != -1) { switch (c) { case 'o': outdir = optarg; break; default: printf("Unknown switch %c/n", c); } } if (optind < argc) { file = argv[optind]; } else { printf("Usage: dumpblocks [options] pstfile/n"); printf("/tcopies the datablocks from the pst file into separate files/n"); printf("Options: /n"); printf("/t-o target/tSpecify the output directory/n"); exit(1); } DEBUG_INIT("dumpblocks.log", NULL); DEBUG_ENT("main"); printf("Opening file %s/n", file); if (pst_open(&pstfile, file)) { printf("Failed to open file %s/n", file); exit(1); } printf("Reading Indexes/n"); if (pst_load_index(&pstfile)) { printf("Failed to load indexes in file %s/n", argv[1]); exit(1); } if (outdir != NULL) if (chdir(outdir)) { printf("Failed to change into directory %s/n", outdir); exit(1); } ptr = pstfile.i_head; outname = (char *) pst_malloc(OUT_BUF); printf("Saving blocks/n"); while (ptr != NULL) { size_t c; c = pst_ff_getIDblock_dec(&pstfile, ptr->i_id, &buf); if (c) { snprintf(outname, OUT_BUF, "%#"PRIx64, ptr->i_id); if ((fp = fopen(outname, "wb")) == NULL) { printf("Failed to open file %s/n", outname); continue; } pst_fwrite(buf, 1, c, fp); fclose(fp); } else { printf("Failed to read block i_id %#"PRIx64"/n", ptr->i_id); } ptr = ptr->next; } pst_close(&pstfile); DEBUG_RET(); return 0;}
开发者ID:chrisw,项目名称:readpst-embeddedcalhack,代码行数:71,
示例21: mainint main(int argc, const char **argv){ TALLOC_CTX *mem_ctx = NULL; int pc_debug = SSSDBG_DEFAULT; const char *pc_domain = NULL; const char *pc_user = NULL; struct poptOption long_options[] = { POPT_AUTOHELP { "debug", '/0', POPT_ARG_INT | POPT_ARGFLAG_DOC_HIDDEN, &pc_debug, 0, _("The debug level to run with"), NULL }, { "domain", 'd', POPT_ARG_STRING, &pc_domain, 0, _("The SSSD domain to use"), NULL }, POPT_TABLEEND }; poptContext pc = NULL; const char *user; struct sss_ssh_ent *ent; size_t i; char *repr; int ret; debug_prg_name = argv[0]; ret = set_locale(); if (ret != EOK) { DEBUG(SSSDBG_CRIT_FAILURE, ("set_locale() failed (%d): %s/n", ret, strerror(ret))); ERROR("Error setting the locale/n"); ret = EXIT_FAILURE; goto fini; } mem_ctx = talloc_new(NULL); if (!mem_ctx) { ERROR("Not enough memory/n"); ret = EXIT_FAILURE; goto fini; } /* parse parameters */ pc = poptGetContext(NULL, argc, argv, long_options, 0); poptSetOtherOptionHelp(pc, "USER"); while ((ret = poptGetNextOpt(pc)) > 0) ; DEBUG_INIT(pc_debug); if (ret != -1) { BAD_POPT_PARAMS(pc, poptStrerror(ret), ret, fini); } pc_user = poptGetArg(pc); if (pc_user == NULL) { BAD_POPT_PARAMS(pc, _("User not specified/n"), ret, fini); } /* append domain to username if domain is specified */ if (pc_domain) { user = talloc_asprintf(mem_ctx, "%[email C++ DEBUG_LICENSE函数代码示例 C++ DEBUG_HTTPCLIENT函数代码示例
|