1 #include <../../nrnconf.h>
103 extern int yytchar, yylineno;
128 }
else if (
argc == 3) {
131 diag(
"Usage:",
"modl prefixto.mod [inputfile]");
133 if ((
fin = fopen(
finname,
"r")) == (FILE*) 0) {
135 if ((
fin = fopen(
finname,
"r")) == (FILE*) 0) {
152 for (
q = q1;
q->prev != q2;
q =
q->next) {
158 switch (
q->itemtype) {
169 Fprintf(stderr,
"\nq->itemtype = %d\n",
q->itemtype);
170 diag(
"printlist handles only a few types of items", (
char*) 0);
191 switch (
q->itemtype) {
207 Fprintf(file,
"HEAD/TAIL of list\n");
222 Fprintf(file,
"ITEMARRAY %ld\n",
n);
223 for (
i = 0;
i <
n;
i++) {
228 Fprintf(file,
"NEWLINE %d\n",
q->itemsubtype);
231 Fprintf(stderr,
"\nq->itemtype = %d\n",
q->itemtype);
232 diag(
"unknown itemtype", (
char*) 0);
void printlist(List *list)
char finname[NRN_BUFSIZE]
int main(int argc, char *argv[])
void printitems(Item *q1, Item *q2)
static void debug_item(Item *q, int indent, FILE *file)
static const char * pgm_name
void printitem(Item *q, FILE *fp)
static void openfiles(int, char **)
#define ITERATE(itm, lst)
int Sprintf(char(&buf)[N], const char *fmt, Args &&... args)
Redirect sprintf to snprintf if the buffer size can be deduced.
int const size_t const size_t n
int Fprintf(FILE *stream, const char *fmt, Args... args)