1 #include <../../nrnconf.h>
13 #include "../mswin/extra/d2upath.cpp"
25 static HCURSOR wait_cursor;
26 static HCURSOR old_cursor;
28 extern int bad_install_ok;
32 extern FILE* hoc_redir_stdout;
42 GetModuleFileName(
NULL,
buf, 256);
43 for (
i = strlen(
buf);
i >= 0 &&
buf[
i] !=
'\\'; --
i) {
48 for (
j = strlen(
buf);
j >= 0 &&
buf[
j] !=
'\\'; --
j) {
57 void HandleOutput(
char* s) {
60 static long exception_filter(LPEXCEPTION_POINTERS
p) {
67 "\nUnhandled Exception. This usually means a bad memory \n\
69 "It is not possible to make a judgment as to whether it is safe\n\
70 to continue. If this happened while compiling a template, you will have to\n\
75 "Second Unhandled Exception: Quitting NEURON. You will be asked to save \
76 any unsaved em buffers before exiting.",
77 "NEURON Internal ERROR",
81 return EXCEPTION_EXECUTE_HANDLER;
84 void hoc_set_unhandled_exception_filter() {
85 SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
88 return CopyFile(src, dest,
FALSE);
91 static FILE* dll_stdio_[] = {(FILE*) 0x0, (FILE*) 0x20, (FILE*) 0x40};
93 void nrn_mswindll_stdio(FILE*
i, FILE*
o, FILE*
e) {
94 if (
o != dll_stdio_[1]) {
95 printf(
"nrn_mswindll_stdio stdio in dll = %p but expected %p\n",
o, dll_stdio_[1]);
104 for (cp = s; *cp; ++cp) {
123 void ivoc_win32_cleanup();
126 void hoc_win32_cleanup() {
130 ivoc_win32_cleanup();
140 void hoc_win_exec(
void) {
144 i = (int)
chkarg(2, -1000, 1000);
151 void hoc_winio_show(
int b) {}
153 #if !defined(__MWERKS__)
char * hoc_dos2unixpath(const char *d)
sprintf(buf, " if (secondorder) {\n" " int _i;\n" " for (_i = 0; _i < %d; ++_i) {\n" " _p[_slist%d[_i]] += dt*_p[_dlist%d[_i]];\n" " }}\n", numeqn, listnum, listnum)
double chkarg(int, double low, double high)
void hoc_execerror(const char *, const char *)
double(* nrnpy_object_to_double_)(Object *)
#define TRY_GUI_REDIRECT_DOUBLE(name, obj)
void setneuronhome(const char *)
char * getenv(const char *s)
int hoc_copyfile(const char *src, const char *dest)
char * emalloc(unsigned n)
int const size_t const size_t n
char * hoc_back2forward(char *s)
char * hoc_forward2back(char *s)