void PROJECT::SetProjectFullName( const wxString& aFullPathAndName ) { // Compare paths, rather than inodes, to be less surprising to the user. // Create a temporary wxFileName to normalize the path wxFileName candidate_path( aFullPathAndName ); // Edge transitions only. This is what clears the project // data using the Clear() function. if( m_project_name.GetFullPath() != candidate_path.GetFullPath() ) { Clear(); // clear the data when the project changes. wxLogTrace( tracePathsAndFiles, "%s: old:'%s' new:'%s'", __func__, TO_UTF8( GetProjectFullName() ), TO_UTF8( aFullPathAndName ) ); m_project_name = aFullPathAndName; wxASSERT( m_project_name.IsAbsolute() ); wxASSERT( m_project_name.GetExt() == ProjectFileExtension ); // until multiple projects are in play, set an environment variable for the // the project pointer. { wxString path = m_project_name.GetPath(); wxSetEnv( PROJECT_VAR_NAME, path ); } } }
void PROJECT::SetProjectFullName( const wxString& aFullPathAndName ) { // Compare paths, rather than inodes, to be less surprising to the user. // Create a temporary wxFileName to normalize the path wxFileName candidate_path( aFullPathAndName ); // Edge transitions only. This is what clears the project // data using the Clear() function. if( m_project_name.GetFullPath() != candidate_path.GetFullPath() ) { Clear(); // clear the data when the project changes. DBG(printf( "%s: old:'%s' new:'%s'\n", __func__, TO_UTF8( GetProjectFullName() ), TO_UTF8( aFullPathAndName ) );)
int aga_bellman_ford_start(struct aga_graph *g, struct aga_node *source) { int rc; /* Make sure we're actually using the right ordering for * aga_icost_t */ BUILD_ASSERT(check_types_match(long, aga_icost_t) == 0); rc = aga_start(g); if (rc < 0) return rc; g->state.bellman_ford.nodelist = NULL; g->state.bellman_ford.nnodes = 0; g->state.bellman_ford.npasses = 0; candidate_path(g, source, 0, NULL, NULL); return 0; }
static bool aga_bellman_ford_step(struct aga_graph *g) { struct aga_node *n; const void *e; struct aga_edge_info ei; int err; bool newnode = false; if (!aga_check_state(g)) return false; for (n = g->state.bellman_ford.nodelist; n; n = n->u.bellman_ford.list) { aga_for_each_edge_info(e, ei, err, g, n) { aga_icost_t dist = n->u.bellman_ford.distance + ei.icost; newnode = newnode || candidate_path(g, ei.to, dist, n, e); } if (err) { aga_fail(g, err); return false; } }