static void gwretitle (GUIWIN *gw, char *name) { GUI_WINDOW *gwp = (GUI_WINDOW *)gw; #if 0 char title[_MAX_PATH + 20]; BUFFER buf; buf = buffind(toCHAR(name)); if (buf && o_filename(buf)) name = tochar8(o_filename(buf)); sprintf (title, "WinElvis - [%s]", name); SetWindowText (gwp->frameHWnd, title); #else Char *argv[2]; Char *title; ELVBOOL wasmsg; /* evaluate the titleformat string */ argv[0] = (Char *)name; argv[1] = NULL; title = o_titleformat(gwp); if (!title) title = (Char *)"$1"; wasmsg = msghide(ElvTrue); title = calculate(title, argv, CALC_MSG); msghide(wasmsg); if (title && *title) name = (char *)title; /* change the window's title */ SetWindowText (gwp->frameHWnd, name); #endif }
static ERROR compile(FILE *script, struct node *node) { assert(node->which == MODULE); struct module *mod = node->as.MODULE.mod; const char *fn = mod->filename; error e; char *c_fn = calloc(strlen(fn) + sizeof(".o.c"), sizeof(char)); sprintf(c_fn, "%s.o.c", fn); char *o_fn = o_filename(mod->filename); e = cc(script, mod, o_fn, c_fn); EXCEPT(e); free(o_fn); free(c_fn); return 0; }