![]() |
NEURON
|
#include <../../nrnconf.h>#include "hocstr.h"#include "equation.h"#include <stdio.h>#include <stdlib.h>#include <math.h>#include <errno.h>#include "parse.hpp"#include "hocparse.h"#include "oc_ansi.h"#include "ocjump.h"#include "ocfunc.h"#include "ocmisc.h"#include "nrnmpi.h"#include "nrnpy.h"#include "nrnfilewrap.h"#include "../nrniv/backtrace_utils.h"#include "../utils/profile/profiler_interface.h"#include <cfenv>#include <condition_variable>#include <filesystem>#include <iostream>#include <mutex>#include <thread>#include <utility>#include "utils/logger.hpp"#include <ctype.h>#include <signal.h>Go to the source code of this file.
Classes | |
| struct | signal_handler_guard |
| struct | temporarily_change< T > |
Macros | |
| #define | FEEXCEPT (FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW) |
| #define | READLINE 1 |
| #define | CHAR char |
| #define | TMPBUFSIZE 512 |
| #define | CBUFSIZE 512 |
| #define | EPS hoc_epsilon |
| #define | HAS_SIGPIPE 1 |
| #define | YYNEEDMORE -3 |
Typedefs | |
| using | SignalType = void(int) |
Functions | |
| static void | matherr1 (void) |
| void | nrn_feenableexcept () |
| void | start_profile (int i) |
| void | add_profile (int i) |
| void | pr_profile (void) |
| char * | readline (const char *prompt) |
| void | rl_deprep_terminal (void) |
| void | add_history (const char *) |
| static int | follow (int expect, int ifyes, int ifno) |
| static int | Getc (NrnFILEWrap *fp) |
| static void | unGetc (int c, NrnFILEWrap *fp) |
| static int | backslash (int c) |
| void | nrn_exit (int i) |
| static void | sigpipe_handler (int sig) |
| int | getnb (void) |
| static char * | optarray (char *buf) |
| int | yylex (void) |
| void | hoc_arayinstal (void) |
| int | hoc_arayinfo_install (Symbol *sp, int nsub) |
| void | hoc_freearay (Symbol *sp) |
| void | hoc_free_arrayinfo (Arrayinfo *a) |
| void | hoc_defnonly (const char *s) |
| void | hoc_show_errmess_always (void) |
| void | hoc_execerror_mes (const char *s, const char *t, int prnt) |
| void | hoc_execerror (const char *s, const char *t) |
| void | onintr (int) |
| void | hoc_coredump_on_error (void) |
| void | print_bt () |
| void | fpecatch (int) |
| __attribute__ ((noreturn)) void sigsegvcatch(int) | |
| int | hoc_pid (void) |
| void | hoc_main1_init (const char *pname, const char **envp) |
| HocStr * | hocstr_create (size_t size) |
| static CHAR * | fgets_unlimited_nltrans (HocStr *s, NrnFILEWrap *f, int nltrans) |
| char * | fgets_unlimited (HocStr *s, NrnFILEWrap *f) |
| void | hocstr_delete (HocStr *hs) |
| void | hocstr_resize (HocStr *hs, size_t n) |
| void | hocstr_copy (HocStr *hs, const char *buf) |
| static int | hoc_run1 () |
| int | hoc_main1 (int argc, const char **argv, const char **envp) |
| void | hoc_final_exit (void) |
| void | hoc_quit (void) |
| int | hoc_moreinput () |
| static void | set_signals (void) |
| static void | restore_signals (void) |
| static void | nrn_inputbuf_getline (void) |
| void | oc_save_input_info (const char **i1, int *i2, int *i3, NrnFILEWrap **i4) |
| void | oc_restore_input_info (const char *i1, int i2, int i3, NrnFILEWrap *i4) |
| int | hoc_oc (const char *buf) |
| int | hoc_oc (const char *buf, std::ostream &os) |
| void | hoc_warning (const char *s, const char *t) |
| int | hoc_yyparse (void) |
| CHAR * | hoc_fgets_unlimited (HocStr *bufstr, NrnFILEWrap *f) |
| int | hoc_get_line (void) |
| void | hoc_help (void) |
Variables | |
| int | nrnignore |
| int | nrn_global_argc |
| char ** | nrn_global_argv |
| int | nrn_inpython_ |
| int(* | p_nrnpy_pyrun )(const char *fname) |
| int | nrn_mpiabort_on_error_ {1} |
| int | nrn_feenableexcept_ = 0 |
| int | nrn_nobanner_ |
| int | hoc_pipeflag |
| int | hoc_usegui |
| HocStr * | hoc_tmpbuf |
| HocStr * | hoc_cbufstr |
| const char * | hoc_promptstr |
| static CHAR * | hoc_cbuf |
| CHAR * | hoc_ctp |
| int | hoc_ictp |
| char * | neuron_home |
| int | hoc_print_first_instance |
| NrnFILEWrap * | hoc_fin |
| const char * | progname |
| int | hoc_lineno |
| int | hoc_intset |
| int | hoc_indef |
| const char * | infile |
| size_t | hoc_xopen_file_size_ |
| char * | hoc_xopen_file_ |
| const char ** | gargv |
| int | gargc |
| static int | c = '\n' |
| static int | eos |
| static int | debug_message_ |
| int | hoc_execerror_messages |
| int | nrn_try_catch_nest_depth {0} |
| How many NEURON try { ... More... | |
| int | yystart |
| static int | coredump |
| int | nrn_istty_ |
| int | hoc_main1_inited_ |
| static SignalType * | signals [4] |
| static const char * | nrn_inputbufptr |
| int | hoc_in_yyparse = 0 |
| int | hoc_interviews = 0 |
| #define EPS hoc_epsilon |
| using SignalType = void(int) |
| void add_history | ( | const char * | ) |
| char* fgets_unlimited | ( | HocStr * | s, |
| NrnFILEWrap * | f | ||
| ) |
|
static |
|
static |
|
static |
| CHAR* hoc_fgets_unlimited | ( | HocStr * | bufstr, |
| NrnFILEWrap * | f | ||
| ) |
| void hoc_main1_init | ( | const char * | pname, |
| const char ** | envp | ||
| ) |
| void oc_restore_input_info | ( | const char * | i1, |
| int | i2, | ||
| int | i3, | ||
| NrnFILEWrap * | i4 | ||
| ) |
| void oc_save_input_info | ( | const char ** | i1, |
| int * | i2, | ||
| int * | i3, | ||
| NrnFILEWrap ** | i4 | ||
| ) |
| char* readline | ( | const char * | prompt | ) |
| void rl_deprep_terminal | ( | void | ) |
|
static |
| NrnFILEWrap* hoc_fin |
|
extern |
Definition at line 39 of file hoc_oop.cpp.
|
extern |
Definition at line 159 of file fileio.cpp.
|
extern |
Definition at line 158 of file fileio.cpp.
|
extern |
Definition at line 227 of file hoc_init.cpp.
| int nrn_try_catch_nest_depth {0} |
How many NEURON try { ...
} catch(...) { ... } blocks are in the call stack.
Errors inside NEURON are triggered using hoc_execerror, which ultimately throws an exception. To replicate the old logic, we sometimes need to insert a try/catch block only if there is no try/catch block less deeply nested on the call stack. This global variable tracks how many such blocks are currently present on the stack.
| int(* p_nrnpy_pyrun) (const char *fname) | ( | const char * | fname | ) |
|
static |