1 #include <../../nrnconf.h> 38 #define AUDIT_SCRIPT_DIR "$NEURONHOME/lib/auditscripts" 39 #define AUDIT_DIR "AUDIT" 44 if (retrieve_audit.
mode) {
46 retrieve_audit.
mode = 0;
47 retrieve_audit.
id = 0;
48 if (retrieve_audit.
pipe) {
50 retrieve_audit.
pipe = (FILE*)0;
85 hoc_warning(
"Could not connect to hocaudit.sh via pipe:", buf);
93 for (i=0; i <
argc; ++
i) {
98 for (i=1; i <
argc; ++
i) {
99 if ( argv[i][0] !=
'-') {
115 hoc_warning(
"auditing failed in pipesend",
"turning off");
191 return retrieve_audit.
mode;
215 bp = buf + strlen(buf);
219 bp[strlen(bp) - 1] =
'\0';
240 retrieve_audit.
mode = 1;
241 retrieve_audit.
id =
id;
244 if ((retrieve_audit.
pipe =
popen(buf,
"r")) == (FILE*)0) {
251 retrieve_audit =
save;
252 fprintf(stderr,
"should now delete %s", retdir);
263 buf[strlen(buf)-1] =
'\0';
264 if(strncmp(buf, fname, strlen(fname)) != 0) {
265 fprintf(stderr,
"Warning: xopen_from_audit files have different names %s %s\n", fname, buf);
sprintf(buf," if (secondorder) {\ " int _i;\" " for(_i=0;_i< %d;++_i) {\" " _p[_slist%d[_i]]+=dt *_p[_dlist%d[_i]];\" " }}\", numeqn, listnum, listnum)
int system(const char *s)
static void xopen_audit(void)
struct RetrieveAudit RetrieveAudit
static RetrieveAudit retrieve_audit
void hoc_Retrieveaudit(void)
void hoc_audit_from_xopen1(const char *fname, const char *rcs)
int const size_t const size_t n
FILE * popen(char *s1, char *s2)
int hoc_xopen1(const char *filename, const char *rcs)
void hoc_warning(const char *, const char *)
static const char * fname(const char *name)
void hoc_execerror(const char *, const char *)
char * getenv(const char *s)
fprintf(stderr, "Don't know the location of params at %p\, pp)
void hoc_on_init_register(Pfrv pf)
static double save(void *v)
void hoc_audit_from_hoc_main1(int argc, const char **argv, const char **envp)
static void hoc_audit_init(void)
int hoc_retrieve_audit(int id)
void hoc_audit_from_final_exit(void)
void hoc_audit_command(const char *buf)
int hoc_retrieving_audit(void)
void hoc_xopen_from_audit(const char *fname)
double chkarg(int, double low, double high)
static void pipesend(int type, const char *s)