1 #include <../../nrnconf.h>
15 #include "../winio/debug.h"
23 void send(
const char* url);
27 static void quit(
const char* msg) {
30 if (strcmp(msg,
"neuron closed") == 0) {
39 static void help(
const char*);
55 std::ifstream f(
name, std::ios::in | std::ios::binary);
61 f.seekg(0, std::ios::end);
62 size_t flen = f.tellg();
64 f.seekg(0, std::ios::beg);
65 f.read(&content[0], content.size());
87 static bool find(
const char*
key,
char* val) {
107 static void help(
const char* msg) {
108 if (strcmp(msg,
"neuron closed") == 0) {
124 char buf1[256], buf2[256];
127 for (
char* cp = buf1; *cp; ++cp) {
135 sprintf(
buf,
"file:///%s/html/help/%s", buf1, buf2);
143 const char*
n =
getenv(
"NEURONHOME");
163 for (
i = strlen(
buf);
i >= 0 &&
buf[
i] !=
'\\'; --
i) {
168 for (
j = strlen(
buf);
j >= 0 &&
buf[
j] !=
'\\'; --
j) {
174 if (
i ==
j + 4 && (
buf[--
i] ==
'n' ||
buf[
i] ==
'N') && (
buf[--
i] ==
'i' ||
buf[
i] ==
'I') &&
175 (
buf[--
i] ==
'b' ||
buf[
i] ==
'B')) {
176 static char buf1[256];
181 if ((f =
fopen(buf1,
"r")) == (FILE*) 0) {
183 if ((f =
fopen(buf1,
"r")) == (FILE*) 0) {
184 sprintf(buf1,
"%s not valid neuronhome\n",
buf);
185 MessageBox(
NULL, buf1,
"mos2nrn", MB_OK);
205 #if defined(SIGNAL_CAST)
206 signal(SIGHUP, (SIGNAL_CAST)
quit1);
208 signal(SIGHUP,
quit1);
217 while (url[
start] ==
' ') {
222 signal(SIGCHLD, SIG_IGN);
224 #if defined(SIGNAL_CAST)
225 signal(SIGCHLD, (SIGNAL_CAST)
quit1);
227 signal(SIGCHLD,
quit1);
int Search(const char *text, int length, int index, int range)
virtual int search(int start, u_char) const
const char * string() const
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)
int main(int argc, const char **argv)
const char * neuronhome()
static CopyString * shelp
static bool find(const char *key, char *val)
static void quit(const char *msg)
void send(const char *url)
static void help(const char *)
static RETSIGTYPE quit1(int)
void nrnbbs_post(const char *)
bool nrnbbs_take(const char *)
void nrnbbs_wait(bool *pflag=(bool *) 0)
bool nrnbbs_take_string(const char *, char *)
void nrnbbs_notify(const char *, NrnBBSCallback)
void setneuronhome(const char *)
char * getenv(const char *s)
int const size_t const size_t n