13 #include "../winio/debug.h" 26 void send(
const char* url);
30 static void quit(
const char* msg) {
33 if (strcmp(msg,
"neuron closed") == 0) {
38 static void help(
const char*);
48 MessageBox(
NULL,
"no NEURONHOME environment variable",
"OCHELP", MB_OK);
59 MessageBox (
NULL, buf,
"OCHELP", MB_OK);
63 int flen = f->
read(st);
87 DebugMessage(
"|%s|\n", buf);
90 DebugMessage(
"i=%d\n", i);
99 strncpy(val, shelp->
string() +
i, j-
i);
104 static void help(
const char* msg) {
106 if (strcmp(msg,
"neuron closed") == 0) {
114 if (
find(buf, buf)) {
121 char buf1[256],buf2[256];
124 for (
char* cp = buf1; *cp; ++cp) {
132 sprintf(buf,
"file:///%s/html/help/%s", buf1, buf2);
140 const char*
n =
getenv(
"NEURONHOME");
160 for (i=strlen(buf); i >= 0 && buf[
i] !=
'\\'; --
i) {;}
163 for (j=strlen(buf); j >= 0 && buf[
j] !=
'\\'; --
j) {;}
168 &&(buf[--i] ==
'n' || buf[i] ==
'N')
169 &&(buf[--i] ==
'i' || buf[i] ==
'I')
170 &&(buf[--i] ==
'b' || buf[i] ==
'B')
172 static char buf1[256];
176 sprintf(buf1,
"%s/lib/nrn.def", buf);
177 if ((f =
fopen(buf1,
"r")) == (FILE*)0) {
178 sprintf(buf1,
"%s/lib/nrn.defaults", buf);
179 if ((f =
fopen(buf1,
"r")) == (FILE*)0) {
180 sprintf(buf1,
"%s not valid neuronhome\n", buf);
181 MessageBox(
NULL, buf1,
"mos2nrn", MB_OK);
186 sprintf(buf1,
"NEURONHOME=%s", buf);
199 #define SIG_PF void (*)(...) 215 while(url[start] ==
' ') {
220 signal(SIGCHLD, SIG_IGN);
void nrnbbs_post(const char *)
virtual int search(int start, u_char) const
void nrnbbs_notify(const char *, NrnBBSCallback)
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
bool nrnbbs_take_string(const char *, char *)
int system(const char *s)
const char * string() const
int const size_t const size_t n
char * getenv(const char *s)
void nrnbbs_wait(bool *pflag=(bool *) 0)
bool nrnbbs_take(const char *)
void setneuronhome(const char *)
int Search(const char *text, int length, int index, int range)