1 #include <../../nrnconf.h> 2 #if HAVE_IV // to end of file 6 #include <InterViews/cursor.h> 7 #include <InterViews/window.h> 16 static FILE* help_pipe;
18 #if MAC && !defined(carbon) 22 #if defined(WIN32) && !defined(CYGWIN) 37 static CopyStringList* filequeue;
45 strncpy(buf, s+4, 256);
47 for (p = buf; *
p; ++
p) {
53 for (p = buf; *
p; ++
p) {
61 filequeue =
new CopyStringList();
63 if (strncmp(p,
"?0", 2) == 0) {
66 filequeue->append(str);
68 }
else if (strncmp(p,
"?1", 2) == 0) {
81 static void readmore() {
82 #if !defined(WIN32) && !defined(MAC) 84 char* cmd =
"ls $NEURONHOME/doc/help/*.help";
85 FILE* p =
popen(cmd,
"r");
87 printf(
"couldn't do: %s\n", cmd);
90 while (fgets(buf, 1024, p)) {
91 fprintf(help_pipe,
"?0 %s", buf);
96 #if !defined(WIN32) && !defined(MAC) 99 printf(
"online help not currently working\n");
101 if (help_pipe && ferror(help_pipe)) {
102 printf(
"error on the help pipe, restarting\n\ 103 but will be missing this sessions hoc help text\n");
108 printf(
"Starting the help system\n");
110 sprintf(buf,
"%s/ochelp",
"$NEURONHOME/bin/$CPU");
111 if ((help_pipe =
popen(buf,
"w")) == (FILE*)0) {
112 printf(
"Could not start %s\n", buf);
117 for (
long i = 0;
i < filequeue->count(); ++
i) {
118 fprintf(help_pipe,
"%s\n", filequeue->item_ref(
i).string());
120 filequeue->remove_all();
125 if (strncmp(s,
"?0", 2) == 0) {
128 fprintf(help_pipe,
"%s\n", buf);
138 #if defined(WIN32) || defined(MAC) 143 static bool ran_ochelp =
false;
147 printf(
"Could not connect to nrnbbs service\n");
150 if (!ran_ochelp && !
nrnbbs_look(
"ochelp running")) {
152 printf(
"Starting the help system\n");
155 printf(
"proper ochelp version not running\n");
162 for (
long i = 0;
i < filequeue->count(); ++
i) {
163 sprintf(buf,
"%s\n", filequeue->item_ref(
i).string());
166 filequeue->remove_all();
170 if (strncmp(s,
"?0", 2) == 0) {
198 static const CursorPattern question_pat = {
199 0x0000, 0x0000, 0x0000, 0x7c00, 0xce00, 0x0600, 0x0600, 0x0c00,
200 0x3000, 0x6000, 0x6000, 0x6000, 0x0000, 0x0000, 0x6000, 0x6000
203 static const CursorPattern question_mask = {
206 #if !defined(UNIX) && (defined(WIN32) || defined(MAC)) 207 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff,
208 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
210 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00,
211 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00, 0xfe00
220 if (!Oc::help_cursor_) {
static Cursor * help_cursor_
char * hoc_current_xopen(void)
void nrnbbs_post_string(const char *, const char *)
static void help(const char *)
#define implementList(List, T)
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
void ivoc_help(const char *)
bool nrnbbs_look(const char *)
FILE * popen(char *s1, char *s2)
fprintf(stderr, "Don't know the location of params at %p\, pp)
static Cursor * help_cursor()
void nrnbbs_exec(const char *)
#define declareList(List, T)