////////////////////////////////////////////////////////////////////////// // list bucket void ListBucketTask::RunImp() { std::string prefix = CString2string(_prefix); prefix = MultiByteToUtf8(prefix); add_params("prefix", URLEncode(prefix)); add_params("delimiter", URLEncode("/")); std::string uri_str = uri(); std::string buckname = CString2string(_buckname); buckname = MultiByteToUtf8(buckname); set_uri(uri_str.append(URLEncode(buckname) + "/")); }
void global_init_params (void) { gcc_assert (!params_finished); add_params (lang_independent_params, LAST_PARAM); targetm_common.option_default_params (); }
////////////////////////////////////////////////////////////////////////// // base TaskBase::TaskBase() : _running(FALSE) , _id(_maxid++) , _content_type("") , _date("") { set_uri("/"); set_use_https(false); set_host(S3_DEFAULT_HOSTNAME); set_timeout(CMD_TASK_TIMEOUT_SECOND); add_params("formatter", "json"); add_header("Accept-Encoding", "identity"); }
/* Equate the dimensions of "set" starting at "first" to * freshly created parameters with identifiers "ids". * The number of equated dimensions is equal to the number of elements in "ids". */ static __isl_give isl_set *parametrize(__isl_take isl_set *set, int first, __isl_keep isl_id_list *ids) { int i, n; unsigned nparam; nparam = isl_set_dim(set, isl_dim_param); set = add_params(set, ids); n = isl_id_list_n_id(ids); for (i = 0; i < n; ++i) set = isl_set_equate(set, isl_dim_param, nparam + i, isl_dim_set, first + i); return set; }
std::string Authorization::string_to_sign(std::map <std::string , std::string> ¶ms, utils::auth_var &data) { //Calculate the canonical string for the request std::string verb_ = data.verb; stringstream ss; ss<<verb_<<"\n"<<data.host; if(strcmp(data.port,"None")) { ss<<":"; ss<<data.port; } ss<<"\n"<<data.path<<"\n"; add_params(params, data); ss<<sort_params(params); return ss.str(); }
PRIVATE void set_fold_compound(vrna_fold_compound_t *vc, vrna_md_t *md_p, unsigned int options, unsigned int aux){ char *sequence, **sequences; unsigned int length, s; int cp; /* cut point for cofold */ char *seq, *seq2; sequence = NULL; sequences = NULL; cp = -1; /* some default init values */ vc->params = NULL; vc->exp_params = NULL; vc->matrices = NULL; vc->exp_matrices = NULL; vc->hc = NULL; vc->auxdata = NULL; vc->free_auxdata = NULL; switch(vc->type){ case VRNA_VC_TYPE_SINGLE: sequence = vc->sequence; seq2 = strdup(sequence); seq = vrna_cut_point_remove(seq2, &cp); /* splice out the '&' if concatenated sequences and reset cp... this should also be safe for single sequences */ vc->cutpoint = cp; if((cp > 0) && (md_p->min_loop_size == TURN)) md_p->min_loop_size = 0; /* is it safe to set this here? */ free(vc->sequence); vc->sequence = seq; vc->length = length = strlen(seq); vc->sequence_encoding = vrna_seq_encode(seq, md_p); vc->sequence_encoding2 = vrna_seq_encode_simple(seq, md_p); if(!(options & VRNA_OPTION_EVAL_ONLY)){ vc->ptype = (aux & WITH_PTYPE) ? vrna_ptypes(vc->sequence_encoding2, md_p) : NULL; /* backward compatibility ptypes */ vc->ptype_pf_compat = (aux & WITH_PTYPE_COMPAT) ? get_ptypes(vc->sequence_encoding2, md_p, 1) : NULL; } else { vc->ptype = NULL; vc->ptype_pf_compat = NULL; } vc->sc = NULL; free(seq2); break; case VRNA_VC_TYPE_ALIGNMENT: sequences = vc->sequences; vc->length = length = vc->length; vc->cons_seq = consensus((const char **)sequences); vc->S_cons = vrna_seq_encode_simple(vc->cons_seq, md_p); vc->pscore = vrna_alloc(sizeof(int)*((length*(length+1))/2+2)); /* backward compatibility ptypes */ vc->pscore_pf_compat = (aux & WITH_PTYPE_COMPAT) ? vrna_alloc(sizeof(int)*((length*(length+1))/2+2)) : NULL; oldAliEn = vc->oldAliEn = md_p->oldAliEn; vc->S = vrna_alloc((vc->n_seq+1) * sizeof(short *)); vc->S5 = vrna_alloc((vc->n_seq+1) * sizeof(short *)); vc->S3 = vrna_alloc((vc->n_seq+1) * sizeof(short *)); vc->a2s = vrna_alloc((vc->n_seq+1) * sizeof(unsigned short *)); vc->Ss = vrna_alloc((vc->n_seq+1) * sizeof(char *)); for (s = 0; s < vc->n_seq; s++) { vrna_aln_encode(vc->sequences[s], &(vc->S[s]), &(vc->S5[s]), &(vc->S3[s]), &(vc->Ss[s]), &(vc->a2s[s]), md_p); } vc->S5[vc->n_seq] = NULL; vc->S3[vc->n_seq] = NULL; vc->a2s[vc->n_seq] = NULL; vc->Ss[vc->n_seq] = NULL; vc->S[vc->n_seq] = NULL; vc->scs = NULL; break; default: /* do nothing ? */ break; } vc->iindx = vrna_idx_row_wise(vc->length); vc->jindx = vrna_idx_col_wise(vc->length); /* now come the energy parameters */ add_params(vc, md_p, options); }
void general_init(const char *argv0) { const char *p; p = argv0 + strlen(argv0); while(p != argv0 && !IS_DIR_SEPARATOR(p[-1])) --p; progname = p; xmalloc_set_program_name(progname); hex_init(); /* Unlock the stdio streams. */ unlock_std_streams(); gcc_init_libintl(); /* Initialize the diagnostics reporting machinery, so option parsing can give warnings and errors. */ diagnostic_initialize(global_dc); /* Set a default printer. Language specific initializations will override it later. */ pp_format_decoder(global_dc->printer) = &default_tree_printer; /* Trap fatal signals, e.g. SIGSEGV, and convert them to ICE messages. */ #ifdef SIGSEGV signal(SIGSEGV, crash_signal); #endif #ifdef SIGILL signal(SIGILL, crash_signal); #endif #ifdef SIGBUS signal(SIGBUS, crash_signal); #endif #ifdef SIGABRT signal(SIGABRT, crash_signal); #endif #if defined SIGIOT &&(!defined SIGABRT || SIGABRT != SIGIOT) signal(SIGIOT, crash_signal); #endif #ifdef SIGFPE signal(SIGFPE, crash_signal); #endif /* Other host-specific signal setup. */ (*host_hooks.extra_signals)(); /* Initialize the garbage-collector, string pools and tree type hash table. */ init_ggc(); init_stringpool(); linemap_init(&line_table); init_ttree(); /* Initialize register usage now so switches may override. */ init_reg_sets(); /* Register the language-independent parameters. */ add_params(lang_independent_params, LAST_PARAM); /* This must be done after add_params but before argument processing. */ init_ggc_heuristics(); init_optimization_passes(); }
void global_init_params (void) { add_params (lang_independent_params, LAST_PARAM); targetm_common.option_default_params (); }
WallFollower(int hz) : hz(hz), v(0.0), w(0.0) { add_params(); print_params(); twist_publisher = nh.advertise<geometry_msgs::Twist>(TOPIC_TWIST, BUFFER_SIZE); dist_pose_subscriber = nh.subscribe<s8_ip::distPose>(TOPIC_DIST_POSE, BUFFER_SIZE, &WallFollower::dist_pose_callback, this); }