void PlMessage(const char *fm, ...) { va_list(args); va_start(args, fm); if ( hasConsole() ) { Sfprintf(Serror, "SWI-Prolog: "); Svfprintf(Serror, fm, args); Sfprintf(Serror, "\n"); } else { char buf[1024]; int64_t hwndi; HWND hwnd = NULL; static atom_t ATOM_hwnd = 0; if ( !ATOM_hwnd ) ATOM_hwnd = PL_new_atom("hwnd"); if ( PL_current_prolog_flag(ATOM_hwnd, PL_INTEGER, &hwndi) ) hwnd = (HWND)hwndi; vsprintf(buf, fm, args); MessageBox(hwnd, buf, "SWI-Prolog", MB_OK|MB_TASKMODAL); } va_end(args); }
void CommonOutputAction::act() { // Store the common output parameters in the OutputWarehouse _app.getOutputWarehouse().setCommonParameters(&_pars); // Create the actions for the short-cut methods #ifdef LIBMESH_HAVE_EXODUS_API if (getParam<bool>("exodus")) create("Exodus"); #else if (getParam<bool>("exodus")) mooseWarning("Exodus output requested but not enabled through libMesh"); #endif #ifdef LIBMESH_HAVE_NEMESIS_API if (getParam<bool>("nemesis")) create("Nemesis"); #else if (getParam<bool>("nemesis")) mooseWarning("Nemesis output requested but not enabled through libMesh"); #endif // Only create a Console if screen output was not created if (getParam<bool>("console") && !hasConsole()) create("Console"); else _pars.set<bool>("console") = false; if (getParam<bool>("csv")) create("CSV"); #ifdef LIBMESH_HAVE_VTK if (getParam<bool>("vtk")) create("VTK"); #else if (getParam<bool>("vtk")) mooseWarning("VTK output requested but not enabled through libMesh"); #endif if (getParam<bool>("xda")) create("XDA"); if (getParam<bool>("xdr")) create("XDR"); if (getParam<bool>("checkpoint")) create("Checkpoint"); if (getParam<bool>("gmv")) create("GMV"); if (getParam<bool>("tecplot")) create("Tecplot"); if (getParam<bool>("gnuplot")) create("Gnuplot"); if (getParam<bool>("solution_history")) create("SolutionHistory"); if (getParam<bool>("dofmap")) create("DOFMap"); if (!getParam<bool>("color")) Moose::_color_console = false; }