/* Searches the environment for variables that are named token, and returns * a variable if found, null otherwise */ Var * Env(char *token) { DEBUG_PARS("Environment contains %d variables\n", env->varcount); for (int i = 0; i < env->varcount; i++) { DEBUG_PARS("\t%s variable: \"%s\"\n", TypeLabel(env->vars[i]->type), env->vars[i]->label); if (strcmp(env->vars[i]->label, token) == 0) { DEBUG_EXEC("Found %s in environment at %d\n", env->vars[i]->label, i); return env->vars[i]; } } return NULL; }
Interactor* Builder::TypeSizeControls () { Tray* t = new Tray; Interactor* typeLabel = TypeLabel(); Interactor* types = Types(); Interactor* sizeLabel = SizeLabel(); Interactor* sizes = Sizes(); t->HBox(t, typeLabel, hgap(), types, new HGlue, t); t->HBox(t, sizeLabel, hgap(), sizes, new HGlue, t); t->Align(Left, types, sizes); t->VBox(t, typeLabel, vspc(), sizeLabel, t); t->Align(VertCenter, typeLabel, types); t->Align(VertCenter, sizeLabel, sizes); return t; }