int execTypedefList() { int res; // Just in case we have a small pch. const char *whatToLoad [] = { "TPainter3dAlgorithms", "TLego", "TAuthenticate", "TProofDraw", "TChainIndex", "TF1", "TGeoBoolNode", "TShape", "TXMLEngine" }; for(unsigned int i = 0 ; i < sizeof(whatToLoad) / sizeof(const char*); ++i) { gInterpreter->AutoLoad(whatToLoad[i]); gInterpreter->AutoParse(whatToLoad[i]); } res = check("int","int"); if (res) return res; res = check("Int_t","int"); if (res) return res; res = check("UInt_t","unsigned int"); if (res) return res; res = check("vector<int>::value_type","int"); if (res) return res; res = check("vector<int>::reference","int"); if (res) return res; res = check("Option_t","char"); if (res) return res; res = check("KeySym_t","unsigned long"); if (res) return res; res = check("TBuffer::CacheList_t","vector<TVirtualArray*>"); if (res) return res; res = check_missing("TBuffer::CacheList_notAtype"); if (res) return res; // The iterator typedef is now desugared. // res = check("vector<myNamespace::MyClass*>::const_iterator","vector<myNamespace::MyClass*>::const_iterator"); if (res) return res; res = check_target("std::map<std::string, int>::key_type","string"); if (res) return res; res = check_target("std::map<std::string, int>::value_type","pair<const string,int>"); if (res) return res; // The iterator typedef is now desugared. // res = check_target("std::list<std::string>::const_iterator","list<string>::const_iterator"); if (res) return res; res = check_file("typelist.v5.txt",350); if (res) return res; res = check_file("typelist.v6.txt",1517); if (res) return res; return 0; }
bool AATPoint::update_sample_near(const AIRCRAFT_STATE& state, TaskEvents &task_events, const TaskProjection &projection) { bool retval = OrderedTaskPoint::update_sample_near(state, task_events, projection); if (retval) { // deadzone must be updated assert(get_next()); // the deadzone is the convex hull formed from the sampled points // with the inclusion of the destination of the next turnpoint. m_deadzone = SearchPointVector(get_sample_points().begin(), get_sample_points().end()); SearchPoint destination(get_next()->get_location_remaining(), projection); m_deadzone.push_back(destination); prune_interior(m_deadzone); } retval |= check_target(state, false); return retval; }
void _gwy_grain_value_builtin_inscribed_disc(GwyGrainValue *inscrdrgrainvalue, GwyGrainValue *inscrdxgrainvalue, GwyGrainValue *inscrdygrainvalue, GwyGrainValue *edmeangrainvalue, const GwyGrainValue *xgrainvalue, const GwyGrainValue *ygrainvalue, const guint *grains, const guint *sizes, const GwyMaskField *mask, const GwyField *field) { guint ngrains; const gdouble *xvalues, *yvalues; gdouble *inscrdrvalues, *inscrdxvalues, *inscrdyvalues, *edmeanvalues; if (all_null(4, &ngrains, inscrdrgrainvalue, inscrdxgrainvalue, inscrdygrainvalue, edmeangrainvalue) || !check_target(inscrdrgrainvalue, &inscrdrvalues, GWY_GRAIN_VALUE_INSCRIBED_DISC_R) || !check_target(inscrdxgrainvalue, &inscrdxvalues, GWY_GRAIN_VALUE_INSCRIBED_DISC_X) || !check_target(inscrdygrainvalue, &inscrdyvalues, GWY_GRAIN_VALUE_INSCRIBED_DISC_Y) || !check_target(edmeangrainvalue, &edmeanvalues, GWY_GRAIN_VALUE_MEAN_EDGE_DISTANCE) || !check_dependence(xgrainvalue, &xvalues, GWY_GRAIN_VALUE_CENTER_X) || !check_dependence(ygrainvalue, &yvalues, GWY_GRAIN_VALUE_CENTER_Y)) return; inscribed_discs_and_friends(inscrdrvalues, inscrdxvalues, inscrdyvalues, edmeanvalues, xvalues, yvalues, grains, sizes, ngrains, mask, gwy_field_dx(field), gwy_field_dy(field)); if (inscrdxvalues) { gdouble off = field->xoff; for (guint i = 1; i <= ngrains; i++) inscrdxvalues[i] += off; } if (inscrdyvalues) { gdouble off = field->yoff; for (guint i = 1; i <= ngrains; i++) inscrdyvalues[i] += off; } }
bool AATPoint::update_sample_far(const AIRCRAFT_STATE& state, TaskEvents &task_events, const TaskProjection &projection) { // the orderedtaskpoint::update_sample_far does nothing for now // but we are calling this in case that changes. return OrderedTaskPoint::update_sample_far(state, task_events, projection) || check_target(state, true); }
bool AATPoint::update_sample(const AIRCRAFT_STATE& state, TaskEvents &task_events) { bool retval = OrderedTaskPoint::update_sample(state,task_events); if ((getActiveState() == CURRENT_ACTIVE) && (!m_target_locked)) { retval |= check_target(state); } return retval; }
void do_cd(char **t, t_env *env) { char *target; target = NULL; if (t[1] == NULL || my_strcmp_casse(t[1], "~") == 0) target = find_value(env->list, "HOME"); else target = my_strdup(t[1]); check_target(target); if (chdir(target) < 0) my_perror("Error: fail chdir(), give us errno to more informations...\n"); free(target); }
bool AATPoint::update_sample_near(const AIRCRAFT_STATE& state, TaskEvents &task_events, const TaskProjection &projection) { bool retval = OrderedTaskPoint::update_sample_near(state, task_events, projection); if (retval) update_deadzone(projection); retval |= check_target(state, false); return retval; }
/* * Check composed lvalue */ static void check_row_or_rec(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt, PLpgSQL_row *row, PLpgSQL_rec *rec, TupleDesc tupdesc) { int fnum; /* there are nothing to check on rec now */ if (row != NULL) { for (fnum = 0; fnum < row->nfields; fnum++) { if (row->varnos[fnum] < 0) continue; check_target(estate, stmt, row->varnos[fnum], tupdesc); } } }
void _gwy_grain_value_builtin_convex_hull(GwyGrainValue *minsizegrainvalue, GwyGrainValue *minanglegrainvalue, GwyGrainValue *maxsizegrainvalue, GwyGrainValue *maxanglegrainvalue, GwyGrainValue *chullareagrainvalue, GwyGrainValue *excircrgrainvalue, GwyGrainValue *excircxgrainvalue, GwyGrainValue *excircygrainvalue, const guint *grains, const guint *anyboundpos, const GwyField *field) { guint ngrains; gdouble *minsizevalues, *maxsizevalues, *minanglevalues, *maxanglevalues, *chullareavalues, *excircrvalues, *excircxvalues, *excircyvalues; if (all_null(8, &ngrains, minsizegrainvalue, maxsizegrainvalue, minanglegrainvalue, maxanglegrainvalue, chullareagrainvalue, excircrgrainvalue, excircxgrainvalue, excircygrainvalue) || !check_target(minsizegrainvalue, &minsizevalues, GWY_GRAIN_VALUE_MINIMUM_BOUND_SIZE) || !check_target(maxsizegrainvalue, &maxsizevalues, GWY_GRAIN_VALUE_MAXIMUM_BOUND_SIZE) || !check_target(minanglegrainvalue, &minanglevalues, GWY_GRAIN_VALUE_MINIMUM_BOUND_ANGLE) || !check_target(maxanglegrainvalue, &maxanglevalues, GWY_GRAIN_VALUE_MAXIMUM_BOUND_ANGLE) || !check_target(chullareagrainvalue, &chullareavalues, GWY_GRAIN_VALUE_CONVEX_HULL_AREA) || !check_target(excircrgrainvalue, &excircrvalues, GWY_GRAIN_VALUE_CIRCUMCIRCLE_R) || !check_target(excircxgrainvalue, &excircxvalues, GWY_GRAIN_VALUE_CIRCUMCIRCLE_X) || !check_target(excircygrainvalue, &excircyvalues, GWY_GRAIN_VALUE_CIRCUMCIRCLE_Y)) return; guint xres = field->xres, yres = field->yres; gdouble dx = gwy_field_dx(field), dy = gwy_field_dy(field); // Find the complete convex hulls. GridPointList *vertices = grid_point_list_new(0); for (guint gno = 1; gno <= ngrains; gno++) { gdouble vx = dx, vy = dy; find_grain_convex_hull(xres, yres, grains, anyboundpos[gno], vertices); if (minsizevalues || minanglevalues) { grain_minimum_bound(vertices, dx, dy, &vx, &vy); if (minsizevalues) minsizevalues[gno] = hypot(vx, vy); if (minanglevalues) minanglevalues[gno] = gwy_standardize_direction(atan2(-vy, vx)); } if (maxsizevalues || maxanglevalues) { grain_maximum_bound(vertices, dx, dy, &vx, &vy); if (maxsizevalues) maxsizevalues[gno] = hypot(vx, vy); if (maxanglevalues) maxanglevalues[gno] = gwy_standardize_direction(atan2(-vy, vx)); } if (chullareavalues) chullareavalues[gno] = grain_convex_hull_area(vertices, dx, dy); if (excircrvalues || excircxvalues || excircyvalues) { FooscribedDisc circle = { 0.0, 0.0, 0.0, 0 }; grain_convex_hull_centre(vertices, dx, dy, &circle.x, &circle.y); circle.R2 = minimize_circle_radius(&circle, vertices, dx, dy); improve_circumscribed_circle(&circle, vertices, dx, dy); if (excircrvalues) excircrvalues[gno] = sqrt(circle.R2); if (excircxvalues) excircxvalues[gno] = circle.x + field->xoff; if (excircyvalues) excircyvalues[gno] = circle.y + field->yoff; } } grid_point_list_free(vertices); }
gboolean run_plugin_run_program (RunProgramPlugin *plugin) { /* Check if target is up to date */ return check_target (plugin); }