void set_color(int bgcolor, int fgcolor) { char *afstr; char *abstr; char t[4096]; char *area; char *term; char bp[1024]; if ((term = my_get_env("TERM")) == NULL) { my_putstr_error("can't determine terminal\n"); exit(-1); } if (tgetent(bp, term) != 1) { my_putstr_error("problem with tgetent\n"); exit(-1); } area = t; afstr = xtgetstr("AF", &area); abstr = xtgetstr("AB", &area); if (tputs(tparm(afstr, fgcolor), 1, my_outc) == ERR) exit(-1); if (bgcolor != 0) if (tputs(tparm(abstr, bgcolor), 1, my_outc) == ERR) exit(-1); }
//used by jit factory, but defined here for lazyness std::string get_gras_runtime_include_path(void) { const std::string root = my_get_env("GRAS_ROOT", "@GRAS_ROOT@"); const fs::path inc_path = fs::path(root) / "include"; return inc_path.string(); }