Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

xwsne.c

Go to the documentation of this file.
00001 #include "f2c.h"
00002 #include "fio.h"
00003 #include "lio.h"
00004 #include "fmt.h"
00005 
00006 extern int f__Aquote;
00007 
00008  static VOID
00009 nl_donewrec(Void)
00010 {
00011         (*f__donewrec)();
00012         PUT(' ');
00013         }
00014 
00015 #ifdef KR_headers
00016 x_wsne(a) cilist *a;
00017 #else
00018 #include "string.h"
00019 
00020  VOID
00021 x_wsne(cilist *a)
00022 #endif
00023 {
00024         Namelist *nl;
00025         char *s;
00026         Vardesc *v, **vd, **vde;
00027         ftnint *number, type;
00028         ftnlen *dims;
00029         ftnlen size;
00030         static ftnint one = 1;
00031         extern ftnlen f__typesize[];
00032 
00033         nl = (Namelist *)a->cifmt;
00034         PUT('&');
00035         for(s = nl->name; *s; s++)
00036                 PUT(*s);
00037         PUT(' ');
00038         f__Aquote = 1;
00039         vd = nl->vars;
00040         vde = vd + nl->nvars;
00041         while(vd < vde) {
00042                 v = *vd++;
00043                 s = v->name;
00044 #ifdef No_Extra_Namelist_Newlines
00045                 if (f__recpos+strlen(s)+2 >= L_len)
00046 #endif
00047                         nl_donewrec();
00048                 while(*s)
00049                         PUT(*s++);
00050                 PUT(' ');
00051                 PUT('=');
00052                 number = (dims = v->dims) ? dims + 1 : &one;
00053                 type = v->type;
00054                 if (type < 0) {
00055                         size = -type;
00056                         type = TYCHAR;
00057                         }
00058                 else
00059                         size = f__typesize[type];
00060                 l_write(number, v->addr, size, type);
00061                 if (vd < vde) {
00062                         if (f__recpos+2 >= L_len)
00063                                 nl_donewrec();
00064                         PUT(',');
00065                         PUT(' ');
00066                         }
00067                 else if (f__recpos+1 >= L_len)
00068                         nl_donewrec();
00069                 }
00070         f__Aquote = 0;
00071         PUT('/');
00072         }
 

Powered by Plone

This site conforms to the following standards: