1 #include <../../nrnconf.h> 14 #include "../winio/debug.h" 22 void send(
const char* url);
26 static void quit(
const char* msg) {
29 if (strcmp(msg,
"neuron closed") == 0) {
38 static void help(
const char*);
61 int flen = f->
read(st);
97 strncpy(val, shelp->
string() +
i, j-
i);
102 static void help(
const char* msg) {
103 if (strcmp(msg,
"neuron closed") == 0) {
112 if (
find(buf, buf)) {
119 char buf1[256],buf2[256];
122 for (
char* cp = buf1; *cp; ++cp) {
130 sprintf(buf,
"file:///%s/html/help/%s", buf1, buf2);
138 const char*
n =
getenv(
"NEURONHOME");
158 for (i=strlen(buf); i >= 0 && buf[
i] !=
'\\'; --
i) {;}
161 for (j=strlen(buf); j >= 0 && buf[
j] !=
'\\'; --
j) {;}
166 &&(buf[--i] ==
'n' || buf[i] ==
'N')
167 &&(buf[--i] ==
'i' || buf[i] ==
'I')
168 &&(buf[--i] ==
'b' || buf[i] ==
'B')
170 static char buf1[256];
174 sprintf(buf1,
"%s/lib/nrn.def", buf);
175 if ((f =
fopen(buf1,
"r")) == (FILE*)0) {
176 sprintf(buf1,
"%s/lib/nrn.defaults", buf);
177 if ((f =
fopen(buf1,
"r")) == (FILE*)0) {
178 sprintf(buf1,
"%s not valid neuronhome\n", buf);
179 MessageBox(
NULL, buf1,
"mos2nrn", MB_OK);
184 sprintf(buf1,
"NEURONHOME=%s", buf);
199 #if defined(SIGNAL_CAST) 200 signal(SIGHUP, (SIGNAL_CAST)
quit1);
202 signal(SIGHUP, quit1);
212 while(url[start] ==
' ') {
217 signal(SIGCHLD, SIG_IGN);
219 #if defined(SIGNAL_CAST) 220 signal(SIGCHLD, (SIGNAL_CAST)
quit1);
222 signal(SIGCHLD, quit1);
void nrnbbs_post(const char *)
virtual int search(int start, u_char) const
void nrnbbs_notify(const char *, NrnBBSCallback)
static CopyString * shelp
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
static void quit(const char *msg)
static RETSIGTYPE quit1(int)
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)
static bool find(const char *key, char *val)
static void help(const char *)