diff --git a/src/ivoc/ivocmain.cpp b/src/ivoc/ivocmain.cpp index 226b37cf11..079406f40c 100644 --- a/src/ivoc/ivocmain.cpp +++ b/src/ivoc/ivocmain.cpp @@ -162,9 +162,6 @@ std::ostream* OcIdraw::idraw_stream = 0; #endif /*****************************************************************************/ extern void ivoc_cleanup(); -#if OCSMALL -static char* ocsmall_argv[] = {0, "difus.hoc"}; -#endif #if defined(WIN32) && HAVE_IV extern HWND hCurrWnd; #endif @@ -538,13 +535,6 @@ int ivocmain_session(int argc, const char** argv, const char** env, int start_se #endif // !unix. #if HAVE_IV -#if OCSMALL - our_argc = 2; - our_argv = new char*[2]; - our_argv[0] = "Neuron"; - our_argv[1] = ":lib:hoc:macload.hoc"; - session = new Session("NEURON", our_argc, our_argv, options, properties); -#else #if defined(WIN32) if (hoc_usegui) { session = new Session("NEURON", our_argc, (char**) our_argv, options, properties); @@ -596,8 +586,6 @@ int ivocmain_session(int argc, const char** argv, const char** env, int start_se } delete[] nrn_props; -#endif /*OCSMALL*/ - if (session) { session->style()->find_attribute("NSTACK", hoc_nstack); session->style()->find_attribute("NFRAME", hoc_nframe); @@ -711,12 +699,6 @@ int ivocmain_session(int argc, const char** argv, const char** env, int start_se #if USENRNJAVA nrn_InitializeJavaVM(); #endif -#if OCSMALL - if (argc == 1) { - ocsmall_argv[0] = our_argv[0]; - exit_status = oc.run(2, ocsmall_argv); - } else -#endif #if defined(USE_PYTHON) #if HAVE_IV if (session && session->style()->value_is_on("python")) { diff --git a/src/ivoc/pwman.cpp b/src/ivoc/pwman.cpp index d0ec316a47..9ddfaaa9e3 100644 --- a/src/ivoc/pwman.cpp +++ b/src/ivoc/pwman.cpp @@ -1272,11 +1272,7 @@ PrintableWindowManager::PrintableWindowManager() { if (PrintableWindow::leader() != pwmi_->w_) { pwmi_->w_->replace_dismiss_action(NULL); } -#if OCSMALL - pwmi_->w_->xplace(-800, 0); -#else pwmi_->w_->xplace(0, 0); -#endif // pwmi_->w_->map(); PrintableWindow::intercept(ocg); } diff --git a/src/oc/audit.cpp b/src/oc/audit.cpp index 3b26128078..6cfab93dce 100644 --- a/src/oc/audit.cpp +++ b/src/oc/audit.cpp @@ -40,7 +40,6 @@ maintain a list of xopen statements with the proper rcs version number. static void hoc_audit_init(void) { -#if !OCSMALL if (retrieve_audit.mode) { /* clean up. there must have been an execerror */ retrieve_audit.mode = 0; @@ -50,11 +49,9 @@ static void hoc_audit_init(void) { retrieve_audit.pipe = (FILE*) 0; } } -#endif } void hoc_audit_from_hoc_main1(int argc, const char** argv, const char** envp) { -#if !OCSMALL /*ARGSUSED*/ int i; char buf[200]; @@ -101,10 +98,8 @@ void hoc_audit_from_hoc_main1(int argc, const char** argv, const char** envp) { } } fprintf(faudit, "\n"); -#endif } -#if !OCSMALL static void pipesend(int type, const char* s) { int err; if (audit_pipe) { @@ -118,25 +113,19 @@ static void pipesend(int type, const char* s) { fflush(audit_pipe); } } -#endif void hoc_audit_command(const char* buf) { -#if !OCSMALL if (doaudit) { fprintf(faudit, "%s", buf); } -#endif } void hoc_audit_from_xopen1(const char* fname, const char* rcs) { -#if !OCSMALL if (!hoc_retrieving_audit() && doaudit && !rcs) { pipesend(1, fname); } -#endif } void hoc_audit_from_final_exit(void) { -#if !OCSMALL if (faudit) { fclose(faudit); faudit = 0; @@ -146,20 +135,16 @@ void hoc_audit_from_final_exit(void) { audit_pipe = 0; } doaudit = 0; -#endif } void hoc_Saveaudit(void) { int err; -#if !OCSMALL err = hoc_saveaudit(); -#endif hoc_ret(); hoc_pushx((double) err); } int hoc_saveaudit(void) { -#if !OCSMALL static int n = 0; char buf[200]; if (hoc_retrieving_audit() || !doaudit) { @@ -178,34 +163,26 @@ int hoc_saveaudit(void) { doaudit = 0; return 0; } -#endif return 1; } int hoc_retrieving_audit(void) { -#if !OCSMALL return retrieve_audit.mode; -#else - return 0; -#endif } void hoc_Retrieveaudit(void) { int err, id; -#if !OCSMALL if (ifarg(1)) { id = (int) chkarg(1, 0., 1e7); } else { id = 0; } -#endif err = hoc_retrieve_audit(id); hoc_ret(); hoc_pushx((double) err); } static void xopen_audit(void) { -#if !OCSMALL char buf[200], *bp; constexpr auto rm_str = "rm "; strcpy(buf, rm_str); @@ -218,11 +195,9 @@ static void xopen_audit(void) { #if 1 nrn_assert(system(buf) >= 0); #endif -#endif } int hoc_retrieve_audit(int id) { -#if !OCSMALL RetrieveAudit save; char buf[200]; char retdir[200]; @@ -241,12 +216,10 @@ int hoc_retrieve_audit(int id) { /* pclose(retrieve_audit.pipe);*/ retrieve_audit = save; fprintf(stderr, "should now delete %s", retdir); -#endif return 1; } void hoc_xopen_from_audit(const char* fname) { -#if !OCSMALL char buf[200]; /* check the synchronization */ nrn_assert(fgets(buf, 200, retrieve_audit.pipe)); @@ -255,5 +228,4 @@ void hoc_xopen_from_audit(const char* fname) { fprintf(stderr, "Warning: xopen_from_audit files have different names %s %s\n", fname, buf); } xopen_audit(); -#endif } diff --git a/src/oc/debug.cpp b/src/oc/debug.cpp index 2f8aeb5626..2e80df76ed 100644 --- a/src/oc/debug.cpp +++ b/src/oc/debug.cpp @@ -21,7 +21,6 @@ void hoc_debug(void) /* print the machine */ /* running copy of calls to execute */ void debugzz(Inst* p) { -#if !OCSMALL { if (p->in == STOP) Printf("STOP\n"); @@ -142,5 +141,4 @@ void debugzz(Inst* p) { } p++; } -#endif /*OCSMALL*/ } diff --git a/src/oc/getsym.cpp b/src/oc/getsym.cpp index 05eb02f6a1..bf0297893d 100644 --- a/src/oc/getsym.cpp +++ b/src/oc/getsym.cpp @@ -2,9 +2,6 @@ /* /local/src/master/nrn/src/oc/getsym.cpp,v 1.2 1996/02/16 16:19:26 hines Exp */ /* getsym.cpp,v - * Revision 1.2 1996/02/16 16:19:26 hines - * OCSMALL used to throw out things not needed by teaching programs - * * Revision 1.1.1.1 1994/10/12 17:22:08 hines * NEURON 3.0 distribution * @@ -59,9 +56,6 @@ getsym.cpp,v hoc_execstr(char *s) compiles and executes the string */ -#if OCSMALL -#else - #include "hocgetsym.h" #include "parse.hpp" #include "hocparse.h" @@ -172,4 +166,3 @@ void hoc_execstr(const char* cp) { hoc_pc = pcsav; hoc_free_list(&symlist); } -#endif /*OCSMALL*/ diff --git a/src/oc/hoc.cpp b/src/oc/hoc.cpp index 6eded05477..6820464bc6 100644 --- a/src/oc/hoc.cpp +++ b/src/oc/hoc.cpp @@ -96,10 +96,6 @@ void start_profile(int i) {} void add_profile(int i) {} void pr_profile(void) {} -#if OCSMALL -#define READLINE 0 -#endif - #ifndef READLINE #define READLINE 1 #endif diff --git a/src/oc/nonlin.cpp b/src/oc/nonlin.cpp index 467ac07349..aee3aebcbb 100644 --- a/src/oc/nonlin.cpp +++ b/src/oc/nonlin.cpp @@ -20,7 +20,6 @@ typedef struct elm* Elm; void hoc_dep_make(void) /* tag the variable as dependent with a variable number */ { -#if !OCSMALL Symbol* sym; unsigned* numpt = 0; @@ -58,18 +57,15 @@ void hoc_dep_make(void) /* tag the variable as dependent with a variable number if (*numpt > 0) hoc_execerror(sym->name, "made dependent twice"); *numpt = ++neqn; -#endif } void init_access(void) /* zero the access array */ { -#if !OCSMALL if (hoc_access != (int*) 0) free((char*) hoc_access); hoc_access = (int*) ecalloc((neqn + 1), sizeof(int)); hoc_var_access = -1; -#endif } static void eqn_space(void); /* reallocate space for matrix */ @@ -80,8 +76,6 @@ static unsigned maxeqn; void hoc_eqn_name(void) /* save row number for lhs and/or rhs */ { -#if !OCSMALL - if (maxeqn != neqn) /* discard equations and reallocate space */ { eqn_space(); @@ -95,11 +89,9 @@ void hoc_eqn_name(void) /* save row number for lhs and/or rhs */ hoc_execerror("illegal equation name", (hoc_pc - 2)->sym->name); row = hoc_var_access; hoc_nopop(); -#endif } static void set_varble(void) { /* set up varble array by searching for tags */ -#if !OCSMALL Symbol* sp; for (sp = hoc_symlist->first; sp != (Symbol*) 0; sp = sp->next) { @@ -117,14 +109,12 @@ static void set_varble(void) { /* set up varble array by searching for tags */ } } } -#endif } static double Delta = .001; /* variable variation */ void hoc_eqinit(void) /* built in function to initialize equation solver */ { -#if !OCSMALL Symbol* sp; if (ifarg(1)) @@ -140,20 +130,17 @@ void hoc_eqinit(void) /* built in function to initialize equation solver */ } neqn = 0; eqn_space(); -#endif hoc_ret(); hoc_pushx(0.); } void hoc_eqn_init(void) /* initialize equation row */ { -#if !OCSMALL struct elm* el; for (el = rowst[row]; el != (struct elm*) 0; el = el->c_right) el->value = 0.; rhs[row] = 0.; -#endif } void hoc_eqn_lhs(void) /* add terms to left hand side */ @@ -168,7 +155,6 @@ void hoc_eqn_rhs(void) /* add terms to right hand side */ static void eqn_side(int lhs) { -#if !OCSMALL int i; struct elm* el; double f0, f1; @@ -199,11 +185,9 @@ static void eqn_side(int lhs) { el->value += (f1 - f0) / Delta; } hoc_pc++; -#endif } static void eqn_space(void) { /* reallocate space for matrix */ -#if !OCSMALL int i; struct elm* el; @@ -239,19 +223,15 @@ static void eqn_space(void) { /* reallocate space for matrix */ eqord[i] = i; varord[i] = i; } -#endif } void hoc_Prmat(void) { -#if !OCSMALL prmat(); -#endif hoc_ret(); hoc_pushx(1.); } void hoc_solve(void) { -#if !OCSMALL /* Sum is a measure of the dependent variable accuracy and how well the equations are solved */ @@ -277,9 +257,6 @@ void hoc_solve(void) { } rowst[i] = colst[i] = (struct elm*) 0; } -#else - double sum = 0; -#endif hoc_ret(); hoc_pushx(sum); } diff --git a/src/oc/xred.cpp b/src/oc/xred.cpp index 8a9145d390..90946d3a57 100644 --- a/src/oc/xred.cpp +++ b/src/oc/xred.cpp @@ -4,9 +4,6 @@ /* /local/src/master/nrn/src/oc/xred.cpp,v 1.3 1996/02/16 16:19:33 hines Exp */ /* xred.cpp,v - * Revision 1.3 1996/02/16 16:19:33 hines - * OCSMALL used to throw out things not needed by teaching programs - * * Revision 1.2 1995/04/03 13:58:43 hines * Port to MSWindows * @@ -63,7 +60,6 @@ int hoc_ired(const char* prompt, int defalt, int min, int max) { input is freeform as scanf can make it. */ double hoc_xred(const char* prompt, double defalt, double min, double max) { -#if !OCSMALL char istr[80], c[2]; double input; for (;;) { @@ -91,9 +87,6 @@ double hoc_xred(const char* prompt, double defalt, double min, double max) { } IGNORE(fprintf(stderr, "input error\n")); } -#else - return 0.; -#endif } @@ -102,20 +95,15 @@ double hoc_xred(const char* prompt, double defalt, double min, double max) { */ void hoc_Sred(void) { -#if !OCSMALL char defalt[80], **pdefalt; double x; strcpy(defalt, gargstr(2)); pdefalt = hoc_pgargstr(2); x = (double) hoc_sred(gargstr(1), defalt, gargstr(3)); hoc_assign_str(pdefalt, defalt); -#else - double x = 0.; -#endif hoc_ret(); hoc_pushx(x); } -#if !OCSMALL /* sred.cpp SW Jaslove March 23, 1992 n = sred(prompt,default,charlist) @@ -165,5 +153,3 @@ int hoc_sred(const char* prompt, char* defalt, char* charlist) { } return 0; } - -#endif