FAXPP_Error elementdecl_name_ws_state2(FAXPP_TokenizerEnv *env) { read_char(env); switch(env->current_char) { WHITESPACE: next_char(env); break; case '%': store_state(env); env->state = parameter_entity_reference_in_markup_state; next_char(env); token_start_position(env); if(env->external_subset || env->external_dtd_entity || env->external_in_markup_entity) return NO_ERROR; return PARAMETER_ENTITY_IN_INTERNAL_SUBSET; default: env->state = elementdecl_name_state1; token_start_position(env); // No next_char break; } return NO_ERROR; }
void hsyncnet::process(const double order, const solve_type solver, const bool collect_dynamic, hsyncnet_analyser & analyser) { std::size_t number_neighbors = m_initial_neighbors; std::size_t current_number_clusters = m_oscillators.size(); if (current_number_clusters <= m_number_clusters) { return; /* Nothing to process, amount of objects is less than required amount of clusters. */ } double radius = average_neighbor_distance(oscillator_locations, number_neighbors); std::size_t increase_step = (std::size_t) round(oscillator_locations->size() * m_increase_persent); if (increase_step < 1) { increase_step = DEFAULT_INCREASE_STEP; } sync_dynamic current_dynamic; do { create_connections(radius, false); simulate_dynamic(order, 0.1, solver, collect_dynamic, current_dynamic); if (collect_dynamic) { if (analyser.empty()) { store_state(*(current_dynamic.begin()), analyser); } store_state(*(current_dynamic.end() - 1), analyser); } else { m_time += DEFAULT_TIME_STEP; } hsyncnet_cluster_data clusters; current_dynamic.allocate_sync_ensembles(0.05, clusters); current_number_clusters = clusters.size(); number_neighbors += increase_step; radius = calculate_radius(radius, number_neighbors); } while(current_number_clusters > m_number_clusters); if (!collect_dynamic) { store_state(*(current_dynamic.end() - 1), analyser); } }
static void sigint (int foo) { arla_warnx (ADEBMISC, "fatal signal received"); store_state (); delete_pid_file (); exit (0); }
void permutation(WORDSIZE* state){ WORDSIZE a, b, c, d; unsigned int index; load_state(state, a, b, c, d); for (index = 0; index < ROUNDS; index++){ a ^= index; a ^= choice(f(b), f(c), f(d)); b ^= choice(f(c), f(d), f(a)); c ^= choice(f(d), f(a), f(b)); d ^= choice(f(a), f(b), f(c));} store_state(state, a, b, c, d);}
void otp_read P2C(FILE *, input_file, FILE *, output_file) { int i, j, len, no_words; int *table, *instrs; store_state("INITIAL"); yyin = input_file; yyparse(); room_for_tables=0; for(i=0; i<no_tables; i++) { room_for_tables = room_for_tables + tables[i].length; } room_for_states=0; for(i=0; i<no_states; i++) { room_for_states = room_for_states + states[i].length; } no_words = no_tables + room_for_tables + no_states + room_for_states + 7; output(output_file, no_words); output(output_file, input_bytes); output(output_file, output_bytes); output(output_file, no_tables); output(output_file, room_for_tables); output(output_file, no_states); output(output_file, room_for_states); for(i=0; i<no_tables; i++) { len = tables[i].length; output(output_file, len); } for(i=0; i<no_tables; i++) { len = tables[i].length; table = tables[i].table; for(j=0; j<len; j++) { output(output_file, table[j]); } } for(i=0; i<no_states; i++) { len = states[i].length; output(output_file, len); } for(i=0; i<no_states; i++) { len = states[i].length; instrs = states[i].instrs; for(j=0; j<len; j++) { output(output_file, instrs[j]); } } }
static void sighup (int foo) { store_state (); delete_pid_file (); }