1 #include <../../nrnconf.h> 14 static FILE *
fin, *fmark, *fdat;
16 static dashes(), file_func(), dat_head();
41 if ((
fin =
fopen(name,
"w")) == (FILE *)0) {
45 if ((fmark =
fopen(name,
"w")) == (FILE *)0) {
49 if ((fdat =
fopen(name,
"w")) == (FILE *)0) {
60 marksec[
i] = marksec[isec];
62 if (imark < MAXMARKS) {
63 marksec[
i] = 1L << (imark++);
64 file_func(secorder[isec]);
70 for (i=0; i<rootnodecount; i++) {
71 printline(v_node[i]->child, 0, 0., (
double)(i*100));
72 dashes(v_node[i]->child, 0., (
double)(i*100), 0., 1);
74 free((
char *)marksec);
86 double cos(),
sin(), xx, yy, ttheta, dx;
90 for (irall=0; irall < nrall; irall++) {
92 ttheta = theta + (double)(nrall - 2*irall - 1)/(double)nrall;
93 for (i=0; i<sec->
nnode - 1; i++) {
96 printline(sec, i, xx, yy);
98 for (i=sec->
nnode - 1; i>=0; i--) {
100 if (i == sec->
nnode - 1) {
101 dashes(ch, xx, yy, ttheta, 0);
103 dashes(ch, xx, yy, ttheta+.5, 0);
106 if (i < sec->
nnode - 1) {
107 xx -= dx*
cos(ttheta);
108 yy -= dx*
sin(ttheta);
112 ttheta = 3.14159 - .5;
115 dashes(ch, x, y, ttheta+.5, 0);
120 static double diamval(
Node*
nd)
124 for (p = nd->
prop; p; p = p->
next) {
133 static void printline(
Section* sec,
int i,
double x,
double y)
150 if (
i == sec->
nnode - 2) {
157 if (i < sec->
nnode - 2) {
164 fwrite((
char *)&marksec[sec->
order],
sizeof(
long), 1, fmark);
166 inode++, type, (x += .001), y, d);
169 }
else if ( nb == 2) {
171 }
else if (nb == 0) {
174 fwrite((
char *)&marksec[sec->
order],
sizeof(
long), 1, fmark);
179 static void file_func(
Section* sec)
185 static int hhtype = 0;
194 for (p = nd->
prop; p; p = p->
next) {
195 if (p->
type == hhtype) {
204 fprintf(fdat,
"^active %d\n",active);
205 fprintf(fdat,
"^synapse %d\n",0);
207 fprintf(fdat,
"^gback %g\n",0.);
209 fprintf(fdat,
"^tstart %g\n",0.);
210 fprintf(fdat,
"^twidth %g\n",0.);
213 static void dat_head(
void)
218 fprintf(fdat,
"%d %g %g\n",4, 1., 1000.);
221 fprintf(fdat,
"%g %g\n", .1, 10.);
224 fprintf(fdat,
"%g %g %g\n",1000., 1.
e-6, Ra);
227 fprintf(fdat,
"%g %g\n",30., -15.);
230 fprintf(fdat,
"%g %g %g %g %g %g\n",1.,1.,1.,1.,1.,1.);
233 fprintf(fdat,
"%g %g\n",115., -12.);
void * ecalloc(size_t n, size_t size)
Symbol * hoc_lookup(const char *)
static void dashes(Section *sec, int offset, int first)
void hoc_execerror(const char *, const char *)
fprintf(stderr, "Don't know the location of params at %p\, pp)
double section_length(Section *sec)
static double active(void *v)