/usr/include/nrn/hocdec.h is in neuron-dev 7.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | #ifndef hocdec_h
#define hocdec_h
#define INCLUDEHOCH 1
#define OOP 1
#if defined(__cplusplus)
extern "C" {
#endif
#include "nrnapi.h"
#include "hocassrt.h"
#include <string.h>
#define gargstr hoc_gargstr
#define getarg hoc_getarg
/* the dec alpha cxx doesn't understand struct foo* inside a struct */
#if defined(__cplusplus)
#define HocStruct /**/
#define HocTypedef /**/
#define HocUnion /**/
union Inst;
struct Symbol;
struct Arrayinfo;
struct Proc;
struct Symlist;
union Datum;
struct cTemplate;
union Objectdata;
struct Object;
struct hoc_Item;
#else
#define HocStruct struct
#define HocUnion union
#define HocTypedef typedef
#endif
typedef int (*Pfri)(void);
typedef void (*Pfrv)(void);
typedef double (*Pfrd)(void);
typedef struct Object** (*Pfro)(void);
typedef const char** (*Pfrs)(void);
typedef int (*Pfri_vp)(void*);
typedef void (*Pfrv_vp)(void*);
typedef double (*Pfrd_vp)(void*);
typedef struct Object** (*Pfro_vp)(void*);
typedef const char** (*Pfrs_vp)(void*);
typedef union Inst { /* machine instruction list type */
Pfrv pf;
Pfrd pfd;
Pfro pfo;
Pfrs pfs;
Pfrv_vp pfv_vp;
Pfrd_vp pfd_vp;
Pfro_vp pfo_vp;
Pfrs_vp pfs_vp;
HocUnion Inst *in;
HocStruct Symbol *sym;
void* ptr;
int i;
} Inst;
#define STOP (Inst *)0
typedef struct Arrayinfo { /* subscript info for arrays */
unsigned *a_varn; /* dependent variable number for array elms */
int nsub; /* number of subscripts */
int refcount; /* because one object always uses symbol's */
int sub[1]; /* subscript range */
} Arrayinfo;
typedef struct Proc {
Inst defn; /* FUNCTION, PROCEDURE, FUN_BLTIN */
unsigned long size; /* length of instruction list */
HocStruct Symlist *list; /* For constants and strings */
/* not used by FUN_BLTIN */
int nauto; /* total # local variables */
int nobjauto; /* the last of these are pointers to objects */
} Proc;
typedef struct Symlist {
HocStruct Symbol *first;
HocStruct Symbol *last;
}Symlist;
typedef char *Upoint;
# define NOTUSER 0
# define USERINT 1 /* For subtype */
# define USERDOUBLE 2
#define USERPROPERTY 3 /* for newcable non-range variables */
#define USERFLOAT 4 /* John Miller's NEMO uses floats */
#if NEMO
#define NEMONODE 5 /* looks syntactically like vector */
#define NEMOAREA 6 /* looks like vector */
#endif
#define SYMBOL 7 /* for stack type */
#define OBJECTTMP 8 /* temporary object on stack */
#define CPLUSOBJECT 16 /* c++ registered class */
#define JAVAOBJECT 32 /* c++ registered class */
/* above two are bits, next must start at 64 */
#define OBJECTALIAS 1
#define VARALIAS 2
typedef struct HocSymExtension {
float *parmlimits; /* some variables have suggested bounds */
char* units;
float tolerance; /* some states have cvode absolute tolerance */
}HocSymExtension;
typedef struct Symbol { /* symbol table entry */
char *name;
short type;
short subtype; /* Flag for user integers */
#if defined(__cplusplus)
short cpublic; /* flag set public variable */
#else
short public; /* flag set public variable */
#endif
short defined_on_the_fly;/* moved here because otherwize gcc and borland do not align the same way */
union {
int oboff; /* offset into object data pointer space */
#if 0 /* these are now found via oboff. */
char *str; /* STRING */
HocStruct Object **objvar; /* possibly an array of object variables */
#endif
double *pval; /* User defined doubles - also for alias to scalar */
HocStruct Object* object_; /* alias to an object */
char *cstr; /* constant string */
double *pnum; /* Numbers */
int *pvalint; /* User defined integers */
float *pvalfloat; /* User defined floats */
int u_auto; /* stack offset # for AUTO variable */
double (*ptr)(); /* if BLTIN */
Proc *u_proc;
struct {
short type; /* Membrane type to find Prop */
int index; /* prop->param[index] */
}rng;
HocStruct Symbol **ppsym; /* Pointer to symbol pointer array */
#if defined(__cplusplus)
HocStruct cTemplate *ctemplate;
#else
HocStruct Template *template;
#endif
HocStruct Symbol* sym; /* for external */
} u;
unsigned s_varn; /* dependent variable number - 0 means indep */
Arrayinfo *arayinfo; /* ARRAY information if null then scalar */
HocSymExtension* extra; /* additions to symbol allow compatibility
with old nmodl dll's */
HocStruct Symbol *next; /* to link to another */
} Symbol;
#define ISARRAY(arg) (arg->arayinfo != (Arrayinfo *)0)
#ifndef hoc_list_h
#if defined(__cplusplus)
#define hoc_List struct hoc_Item
#else
typedef struct hoc_Item hoc_List;
#define List hoc_List
#define Item hoc_Item
#endif
#endif
typedef union Datum { /* interpreter stack type */
double val;
Symbol *sym;
int i;
double *pval; /* first used with Eion in NEURON */
HocStruct Object **pobj;
HocStruct Object *obj; /* sections keep this to construct a name */
char **pstr;
HocStruct hoc_Item* itm;
hoc_List* lst;
void* _pvoid; /* not used on stack, see nrnoc/point.c */
} Datum;
#if OOP
#if defined(__cplusplus)
typedef struct cTemplate {
#else
typedef struct Template {
#endif
Symbol *sym;
Symlist *symtable;
int dataspace_size;
int is_point_; /* actually the pointtype > 0 if a point process */
Symbol *init; /* null if there is no initialization function */
Symbol *unref; /* null if there is no function to call when refcount is decremented */
int index; /* next unique integer used for name for section */
int count; /* how many of this kind of object */
hoc_List* olist; /* list of all instances */
int id;
void* observers; /* hook to c++ ClassObservable */
void* (*constructor)(struct Object*);
void (*destructor)(void*);
void (*steer)(void*); /* normally nil */
int (*checkpoint)(void**);
#if defined(__cplusplus)
} cTemplate;
#else
} Template;
#endif
typedef union Objectdata{
double *pval; /* pointer to array of doubles, usually just 1 */
char **ppstr; /* pointer to pointer to string ,allows vectors someday*/
HocStruct Object **pobj; /* pointer to array of object pointers, usually just 1*/
HocStruct hoc_Item** psecitm; /* array of pointers to section items, usually just 1 */
hoc_List** plist; /* array of pointers to linked lists */
Arrayinfo* arayinfo;
void* _pvoid; /* Point_process */
}Objectdata;
typedef struct Object {
int refcount; /* how many object variables point to this */
int index; /* unique integer used for names of sections */
union {
Objectdata *dataspace; /* Points to beginning of object's data */
void* this_pointer; /* the c++ object */
}u;
#if defined(__cplusplus)
cTemplate *ctemplate;
#else
Template *template;
#endif
void* aliases; /* more convenient names for e.g. Vector or List elements dynamically created by this object*/
HocStruct hoc_Item* itm_me;/* this object in the template list */
HocStruct hoc_Item* secelm_; /* last of a set of contiguous section_list items used by forall */
void* observers; /* hook to c++ ObjObservable */
short recurse; /* to stop infinite recursions */
short unref_recurse_cnt; /* free only after last return from unref callback */
} Object;
#endif
typedef struct { /* User Functions */
const char *name;
void (*func)(void);
} VoidFunc;
typedef struct { /* User Double Scalars */
const char *name;
double *pdoub;
} DoubScal;
typedef struct { /* User Vectors */
const char *name;
double *pdoub;
int index1;
} DoubVec;
typedef struct { /* recommended limits for symbol values */
const char *name;
float bnd[2];
} HocParmLimits;
typedef struct { /* recommended tolerance for CVODE */
const char *name;
float tolerance;
} HocStateTolerance;
typedef struct { /* units for symbol values */
const char *name;
char *units;
} HocParmUnits;
#include "oc_ansi.h"
extern void* emalloc(size_t n);
extern void* ecalloc(size_t n, size_t size);
extern void* erealloc(void* ptr, size_t n);
extern Inst *hoc_progp, *hoc_progbase, *hoc_prog, *hoc_prog_parse_recover;
extern Inst *hoc_pc;
extern Objectdata *hoc_objectdata;
extern Objectdata *hoc_top_level_data;
extern Object* hoc_thisobject;
extern Symlist* hoc_symlist;
extern Symlist* hoc_top_level_symlist;
extern Symlist* hoc_built_in_symlist;
extern Objectdata *hoc_objectdata_save(void);
extern Objectdata* hoc_objectdata_restore(Objectdata*);
#define OPVAL(sym) hoc_objectdata[sym->u.oboff].pval
#define OPSTR(sym) hoc_objectdata[sym->u.oboff].ppstr
#define OPOBJ(sym) hoc_objectdata[sym->u.oboff].pobj
#define OPSECITM(sym) hoc_objectdata[sym->u.oboff].psecitm
#define OPLIST(sym) hoc_objectdata[sym->u.oboff].plist
#define OPARINFO(sym) hoc_objectdata[sym->u.oboff + 1].arayinfo
#if LINT
#undef assert
#define assert(arg) {if (arg) ;} /* so fprintf doesn't give lint */
#undef IGNORE
#define IGNORE(arg) {if(arg);}
#define LINTUSE(arg) {if(arg);}
char *cplint;
int ilint;
#define Strcat cplint = strcat
#define Strncat cplint = strncat
#define Strcpy cplint = strcpy
#define Strncpy cplint = strncpy
#define Sprintf cplint = sprintf
#define Printf ilint = printf
#define Fprintf ilint = fprintf
#else
#if defined(__TURBOC__)
#undef IGNORE
#define IGNORE
#else
#undef IGNORE
#define IGNORE(arg) arg
#endif
#define LINTUSE(arg)
#define Strcat strcat
#define Strncat strncat
#define Strcpy strcpy
#define Strncpy strncpy
#define Sprintf sprintf
#define Printf nrnpy_pr
#define Fprintf fprintf
#endif
/* EINTR handling for LINDA */
#if LINDA
#include <errno.h>
#define ERRCHK(c1) {errno=EINTR;while(errno==EINTR){errno=0;c1}}
#else
#define ERRCHK(c1) c1
#endif
#define IFGUI if (hoc_usegui){
#define ENDGUI }
extern int hoc_usegui; /* when 0 does not make interviews calls */
extern int nrn_istty_;
extern int parallel_sub; /* for use with parallel neuron (see parallel.cl) */
#define NOT_PARALLEL_SUB(c1) {if (!parallel_sub) c1}
/* Enter handling for PVM NJP 11/21/94 */
#ifdef PVM
extern int init_parallel( );
int num_procs;
int *tids;
int node_num;
int mytid;
#endif
#if defined(__cplusplus)
}
#endif
#endif
|