| 1 |
#include "f2c.h" |
| 2 |
#include "fio.h" |
| 3 |
#include "lio.h" |
| 4 |
#include "fmt.h" |
| 5 |
|
| 6 |
extern int f__Aquote; |
| 7 |
|
| 8 |
static VOID |
| 9 |
nl_donewrec(Void) |
| 10 |
{ |
| 11 |
(*f__donewrec)(); |
| 12 |
PUT(' '); |
| 13 |
} |
| 14 |
|
| 15 |
#ifdef KR_headers |
| 16 |
x_wsne(a) cilist *a; |
| 17 |
#else |
| 18 |
#include "string.h" |
| 19 |
#ifdef __cplusplus |
| 20 |
extern "C" { |
| 21 |
#endif |
| 22 |
|
| 23 |
VOID |
| 24 |
x_wsne(cilist *a) |
| 25 |
#endif |
| 26 |
{ |
| 27 |
Namelist *nl; |
| 28 |
char *s; |
| 29 |
Vardesc *v, **vd, **vde; |
| 30 |
ftnint number, type; |
| 31 |
ftnlen *dims; |
| 32 |
ftnlen size; |
| 33 |
extern ftnlen f__typesize[]; |
| 34 |
|
| 35 |
nl = (Namelist *)a->cifmt; |
| 36 |
PUT('&'); |
| 37 |
for(s = nl->name; *s; s++) |
| 38 |
PUT(*s); |
| 39 |
PUT(' '); |
| 40 |
f__Aquote = 1; |
| 41 |
vd = nl->vars; |
| 42 |
vde = vd + nl->nvars; |
| 43 |
while(vd < vde) { |
| 44 |
v = *vd++; |
| 45 |
s = v->name; |
| 46 |
#ifdef No_Extra_Namelist_Newlines |
| 47 |
if (f__recpos+strlen(s)+2 >= L_len) |
| 48 |
#endif |
| 49 |
nl_donewrec(); |
| 50 |
while(*s) |
| 51 |
PUT(*s++); |
| 52 |
PUT(' '); |
| 53 |
PUT('='); |
| 54 |
number = (dims = v->dims) ? dims[1] : 1; |
| 55 |
type = v->type; |
| 56 |
if (type < 0) { |
| 57 |
size = -type; |
| 58 |
type = TYCHAR; |
| 59 |
} |
| 60 |
else |
| 61 |
size = f__typesize[type]; |
| 62 |
l_write(&number, v->addr, size, type); |
| 63 |
if (vd < vde) { |
| 64 |
if (f__recpos+2 >= L_len) |
| 65 |
nl_donewrec(); |
| 66 |
PUT(','); |
| 67 |
PUT(' '); |
| 68 |
} |
| 69 |
else if (f__recpos+1 >= L_len) |
| 70 |
nl_donewrec(); |
| 71 |
} |
| 72 |
f__Aquote = 0; |
| 73 |
PUT('/'); |
| 74 |
} |
| 75 |
#ifdef __cplusplus |
| 76 |
} |
| 77 |
#endif |