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  

names.c File Reference

#include "defs.h"
#include "output.h"
#include "names.h"
#include "iob.h"

Go to the source code of this file.


Defines

#define ONE_STRUCT   1
#define UNION_STRUCT   2
#define INIT_STRUCT   3

Functions

char * c_type_decl (int type, int is_extern)
char * new_func_length (Void)
char * new_arg_length (Namep arg)
void declare_new_addr (struct Addrblock *addrp)
void wr_nv_ident_help (FILE *outfile, struct Addrblock *addrp)
int nv_type_help (struct Addrblock *addrp)
char * lit_name (struct Literal *litp)
char * comm_union_name (int count)
void wr_globals (FILE *outfile)
ftnint commlen (register chainp vl)
void pad_common (Extsym *c)
void wr_common_decls (FILE *outfile)
void wr_struct (FILE *outfile, chainp var_list)
char * user_label (ftnint stateno)
char * temp_name (char *starter, int num, char *storage)
char * equiv_name (int memno, char *store)
void def_commons (FILE *of)

Variables

char * c_keywords []
int n_keywords = sizeof(c_keywords)/sizeof(char *)

Define Documentation

#define INIT_STRUCT   3
 

Definition at line 498 of file names.c.

Referenced by wr_common_decls().

#define ONE_STRUCT   1
 

Definition at line 496 of file names.c.

Referenced by wr_common_decls().

#define UNION_STRUCT   2
 

Definition at line 497 of file names.c.

Referenced by wr_common_decls().


Function Documentation

char* c_type_decl int    type,
int    is_extern
 

Definition at line 65 of file names.c.

References TYALIST, TYCILIST, TYCLLIST, TYERROR, TYFTNLEN, TYICILIST, TYINLIST, TYOLIST, TYQUAD, and TYVOID.

Referenced by do_p1_head(), list_arg_types(), opconv_fudge(), putentries(), wr_globals(), wr_one_init(), wr_struct(), write_char_init(), and write_typedefs().

00067 {
00068     static char buff[100];
00069 
00070     switch (type) {
00071         case TYREAL:    if (!is_extern || !forcedouble)
00072                                 { strcpy (buff, "real");break; }
00073         case TYDREAL:   strcpy (buff, "doublereal");    break;
00074         case TYCOMPLEX: if (is_extern)
00075                             strcpy (buff, "/* Complex */ VOID");
00076                         else
00077                             strcpy (buff, "complex");
00078                         break;
00079         case TYDCOMPLEX:if (is_extern)
00080                             strcpy (buff, "/* Double Complex */ VOID");
00081                         else
00082                             strcpy (buff, "doublecomplex");
00083                         break;
00084         case TYADDR:
00085         case TYINT1:
00086         case TYSHORT:
00087         case TYLONG:
00088 #ifdef TYQUAD
00089         case TYQUAD:
00090 #endif
00091         case TYLOGICAL1:
00092         case TYLOGICAL2:
00093         case TYLOGICAL: strcpy(buff, typename[type]);
00094                         break;
00095         case TYCHAR:    if (is_extern)
00096                             strcpy (buff, "/* Character */ VOID");
00097                         else
00098                             strcpy (buff, "char");
00099                         break;
00100 
00101         case TYUNKNOWN: strcpy (buff, "UNKNOWN");
00102 
00103 /* If a procedure's type is unknown, assume it's a subroutine */
00104 
00105                         if (!is_extern)
00106                             break;
00107 
00108 /* Subroutines must return an INT, because they might return a label
00109    value.  Even if one doesn't, the caller will EXPECT it to. */
00110 
00111         case TYSUBR:    strcpy (buff, "/* Subroutine */ int");
00112                                                         break;
00113         case TYERROR:   strcpy (buff, "ERROR");         break;
00114         case TYVOID:    strcpy (buff, "void");          break;
00115         case TYCILIST:  strcpy (buff, "cilist");        break;
00116         case TYICILIST: strcpy (buff, "icilist");       break;
00117         case TYOLIST:   strcpy (buff, "olist");         break;
00118         case TYCLLIST:  strcpy (buff, "cllist");        break;
00119         case TYALIST:   strcpy (buff, "alist");         break;
00120         case TYINLIST:  strcpy (buff, "inlist");        break;
00121         case TYFTNLEN:  strcpy (buff, "ftnlen");        break;
00122         default:        sprintf (buff, "BAD DECL '%d'", type);
00123                                                         break;
00124     } /* switch */
00125 
00126     return buff;
00127 } /* c_type_decl */

char* comm_union_name int    count
 

Definition at line 321 of file names.c.

Referenced by wr_common_decls().

00323 {
00324         static char buf[12];
00325 
00326         sprintf(buf, "%d", count);
00327         return buf;
00328         }

ftnint commlen register chainp    vl
 

Definition at line 411 of file names.c.

References Constant::ci, Constblock::Const, Expression::constblock, ISCONST, Dimblock::nelt, and v.

Referenced by pad_common().

00413 {
00414         ftnint size;
00415         int type;
00416         struct Dimblock *t;
00417         Namep v;
00418 
00419         while(vl->nextp)
00420                 vl = vl->nextp;
00421         v = (Namep)vl->datap;
00422         type = v->vtype;
00423         if (type == TYCHAR)
00424                 size = v->vleng->constblock.Const.ci;
00425         else
00426                 size = typesize[type];
00427         if ((t = v->vdim) && ISCONST(t->nelt))
00428                 size *= t->nelt->constblock.Const.ci;
00429         return size + v->voffset;
00430         }

void declare_new_addr struct Addrblock   addrp
 

Definition at line 171 of file names.c.

References cpexpr(), mkchain(), and new_vars.

Referenced by autovar().

00173 {
00174     extern chainp new_vars;
00175 
00176     new_vars = mkchain((char *)cpexpr((expptr)addrp), new_vars);
00177 } /* declare_new_addr */

void def_commons FILE *    of
 

Definition at line 734 of file names.c.

References Extsym::allextp, c, Extsym::cextname, Chain::datap, ext1comm, Extsym::extinit, Extsym::extstg, fatalstr(), next_tab, Chain::nextp, nice_printf(), prev_tab, STGCOMMON, and wr_struct().

Referenced by main().

00736 {
00737         Extsym *ext;
00738         int c, onefile, Union;
00739         chainp comm;
00740         extern int ext1comm;
00741         FILE *c_filesave = c_file;
00742 
00743         if (ext1comm == 1) {
00744                 onefile = 1;
00745                 c_file = of;
00746                 fprintf(of, "/*>>>'/dev/null'<<<*/\n\
00747 #ifdef Define_COMMONs\n\
00748 /*<<</dev/null>>>*/\n");
00749                 }
00750         else
00751                 onefile = 0;
00752         for(ext = extsymtab; ext < nextext; ext++)
00753                 if (ext->extstg == STGCOMMON
00754                 && !ext->extinit && (comm = ext->allextp)) {
00755                         sprintf(outbtail, "%scom.c", ext->cextname);
00756                         if (onefile)
00757                                 fprintf(of, "/*>>>'%s'<<<*/\n",
00758                                         outbtail);
00759                         else {
00760                                 c_file = of = fopen(outbuf,textwrite);
00761                                 if (!of)
00762                                         fatalstr("can't open %s", outbuf);
00763                                 }
00764                         fprintf(of, "#include \"f2c.h\"\n");
00765                         if (Ansi == 2)
00766                                 fprintf(of,
00767                          "\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n");
00768                         if (comm->nextp) {
00769                                 Union = 1;
00770                                 nice_printf(of, "union {\n");
00771                                 next_tab(of);
00772                                 }
00773                         else
00774                                 Union = 0;
00775                         for(c = 1; comm; comm = comm->nextp) {
00776                                 nice_printf(of, "struct {\n");
00777                                 next_tab(of);
00778                                 wr_struct(of, (chainp)comm->datap);
00779                                 prev_tab(of);
00780                                 if (Union)
00781                                         nice_printf(of, "} _%d;\n", c++);
00782                                 }
00783                         if (Union)
00784                                 prev_tab(of);
00785                         nice_printf(of, "} %s;\n", ext->cextname);
00786                         if (Ansi == 2)
00787                                 fprintf(of,
00788                          "\n#ifdef __cplusplus\n}\n#endif\n");
00789                         if (onefile)
00790                                 fprintf(of, "/*<<<%s>>>*/\n", outbtail);
00791                         else
00792                                 fclose(of);
00793                         }
00794         if (onefile)
00795                 fprintf(of, "/*>>>'/dev/null'<<<*/\n#endif\n\
00796 /*<<</dev/null>>>*/\n");
00797         c_file = c_filesave;
00798         }

char* equiv_name int    memno,
char *    store
 

Definition at line 716 of file names.c.

References EQUIV_INIT_NAME, and IDENT_LEN.

Referenced by wr_equiv_init().

00718 {
00719     static char buf[IDENT_LEN];
00720     char *pointer = buf;
00721 
00722     if (store)
00723         pointer = store;
00724 
00725     sprintf (pointer, "%s_%d", EQUIV_INIT_NAME, memno);
00726     return pointer;
00727 } /* equiv_name */

char* lit_name struct Literal   litp
 

Definition at line 242 of file names.c.

References CONST_IDENT_MAX, Literal::litival, and TYQUAD.

Referenced by output_literal(), and wr_globals().

00244 {
00245         static char buf[CONST_IDENT_MAX];
00246         ftnint val;
00247         char *fmt;
00248 
00249         if (litp == (struct Literal *) NULL)
00250                 return NULL;
00251 
00252         switch (litp -> littype) {
00253         case TYINT1:
00254                 val = litp -> litval.litival;
00255                 if (val >= 256 || val < -255)
00256                         sprintf (buf, "ci1_b%ld", litp -> litnum);
00257                 else if (val < 0)
00258                         sprintf (buf, "ci1_n%ld", -val);
00259                 else
00260                         sprintf(buf, "ci1__%ld", val);
00261                 break;
00262         case TYSHORT:
00263                 val = litp -> litval.litival;
00264                 if (val >= 32768 || val <= -32769)
00265                         sprintf (buf, "cs_b%ld", litp -> litnum);
00266                 else if (val < 0)
00267                         sprintf (buf, "cs_n%ld", -val);
00268                 else
00269                         sprintf (buf, "cs__%ld", val);
00270                 break;
00271         case TYLONG:
00272 #ifdef TYQUAD
00273         case TYQUAD:
00274 #endif
00275                 val = litp -> litval.litival;
00276                 if (val >= 100000 || val <= -10000)
00277                         sprintf (buf, "c_b%ld", litp -> litnum);
00278                 else if (val < 0)
00279                         sprintf (buf, "c_n%ld", -val);
00280                 else
00281                         sprintf (buf, "c__%ld", val);
00282                 break;
00283         case TYLOGICAL1:
00284                 fmt = "cl1_%s";
00285                 goto spr_logical;
00286         case TYLOGICAL2:
00287                 fmt = "cl2_%s";
00288                 goto spr_logical;
00289         case TYLOGICAL:
00290                 fmt = "c_%s";
00291         spr_logical:
00292                 sprintf (buf, fmt, (litp -> litval.litival
00293                                         ? "true" : "false"));
00294                 break;
00295         case TYREAL:
00296         case TYDREAL:
00297                 /* Given a limit of 6 or 8 character on external names, */
00298                 /* few f.p. values can be meaningfully encoded in the   */
00299                 /* constant name.  Just going with the default cb_#     */
00300                 /* seems to be the best course for floating-point       */
00301                 /* constants.   */
00302         case TYCHAR:
00303                 /* Shouldn't be any of these */
00304         case TYADDR:
00305         case TYCOMPLEX:
00306         case TYDCOMPLEX:
00307         case TYSUBR:
00308         default:
00309                 sprintf (buf, "c_b%ld", litp -> litnum);
00310     } /* switch */
00311     return buf;
00312 } /* lit_name */

char* new_arg_length Namep    arg
 

Definition at line 139 of file names.c.

References arg.

Referenced by doentry(), list_arg_types(), listargs(), and putentries().

00141 {
00142         static char buf[64];
00143         char *fmt = "%s_len", *s = arg->fvarname;
00144         switch(*s) {
00145           case 'r':
00146                 if (!strcmp(s+1, "et_val"))
00147                         goto adjust_fmt;
00148                 break;
00149           case 'h':
00150           case 'i':
00151                 if (!s[1]) {
00152  adjust_fmt:
00153                         fmt = "%s_length"; /* avoid conflict with libF77 */
00154                         }
00155           }
00156         sprintf (buf, fmt, s);
00157         return buf;
00158 } /* new_arg_length */

char* new_func_length Void   
 

Definition at line 131 of file names.c.

Referenced by doentry().

00132 { return "ret_val_len"; }

int nv_type_help struct Addrblock   addrp
 

Definition at line 211 of file names.c.

00213 {
00214     if (addrp == (struct Addrblock *) NULL)
00215         return -1;
00216 
00217     return addrp -> vtype;
00218 } /* nv_type_help */

void pad_common Extsym   c [static]
 

Definition at line 437 of file names.c.

References ALLOC, c, CHNULL, CLVAR, commlen(), Nameblock::cvarname, Chain::datap, Dimblock::dims, Nameblock::fvarname, ICON, L, mkchain(), Dimblock::ndim, Chain::nextp, STGCOMMON, Nameblock::tag, TNAME, v, Nameblock::vclass, Nameblock::vdim, Nameblock::vleng, Nameblock::vstg, and Nameblock::vtype.

Referenced by wr_common_decls().

00439 {
00440         register chainp cvl;
00441         register Namep v;
00442         long L = c->maxleng;
00443         int type;
00444         struct Dimblock *t;
00445         int szshort = typesize[TYSHORT];
00446 
00447         for(cvl = c->allextp; cvl; cvl = cvl->nextp)
00448                 if (commlen((chainp)cvl->datap) >= L)
00449                         return;
00450         v = ALLOC(Nameblock);
00451         v->vtype = type = L % szshort ? TYCHAR
00452                                       : type_choice[L/szshort % 4];
00453         v->vstg = STGCOMMON;
00454         v->vclass = CLVAR;
00455         v->tag = TNAME;
00456         v->vdim = t = ALLOC(Dimblock);
00457         t->ndim = 1;
00458         t->dims[0].dimsize = ICON(L / typesize[type]);
00459         v->fvarname = v->cvarname = "eqv_pad";
00460         if (type == TYCHAR)
00461                 v->vleng = ICON(1);
00462         c->allextp = mkchain((char *)mkchain((char *)v, CHNULL), c->allextp);
00463         }

char* temp_name char *    starter,
int    num,
char *    storage
 

Definition at line 692 of file names.c.

References IDENT_LEN.

Referenced by autovar(), and startrw().

00694 {
00695     static char buf[IDENT_LEN];
00696     char *pointer = buf;
00697     char *prefix = "t";
00698 
00699     if (storage)
00700         pointer = storage;
00701 
00702     if (starter && *starter)
00703         prefix = starter;
00704 
00705     sprintf (pointer, "%s__%d", prefix, num);
00706     return pointer;
00707 } /* temp_name */

char* user_label ftnint    stateno
 

Definition at line 671 of file names.c.

References USER_LABEL_MAX.

Referenced by compgoto_out(), do_p1_goto(), do_p1_label(), entry_goto(), and out_asgoto().

00673 {
00674         static char buf[USER_LABEL_MAX + 1];
00675         static char *Lfmt[2] = { "L_%ld", "L%ld" };
00676 
00677         if (stateno >= 0)
00678                 sprintf(buf, Lfmt[shiftcase], stateno);
00679         else
00680                 sprintf(buf, "L_%s", extsymtab[-1-stateno].fextname);
00681         return buf;
00682 } /* user_label */

void wr_common_decls FILE *    outfile
 

Definition at line 505 of file names.c.

References Extsym::allextp, Extsym::cextname, comm_union_name(), def_start(), E, extcomm, extern_out(), INIT_STRUCT, next_tab, Chain::nextp, nice_printf(), ONE_STRUCT, pad_common(), prev_tab, revchain(), STGCOMMON, UNION_STRUCT, and wr_struct().

Referenced by main().

00507 {
00508     Extsym *ext;
00509     extern int extcomm;
00510     static char *Extern[4] = {"", "Extern ", "extern "};
00511     char *E, *E0 = Extern[extcomm];
00512     int did_one = 0;
00513 
00514     for (ext = extsymtab; ext < nextext; ext++) {
00515         if (ext -> extstg == STGCOMMON && ext->allextp) {
00516             chainp comm;
00517             int count = 1;
00518             int which;                  /* which display to use;
00519                                            ONE_STRUCT, UNION or INIT */
00520 
00521             if (!did_one)
00522                 nice_printf (outfile, "/* Common Block Declarations */\n\n");
00523 
00524             pad_common(ext);
00525 
00526 /* Construct the proper, condensed list of structs; eliminate duplicates
00527    from the initial list   ext -> allextp   */
00528 
00529             comm = ext->allextp = revchain(ext->allextp);
00530 
00531             if (ext -> extinit)
00532                 which = INIT_STRUCT;
00533             else if (comm->nextp) {
00534                 which = UNION_STRUCT;
00535                 nice_printf (outfile, "%sunion {\n", E0);
00536                 next_tab (outfile);
00537                 E = "";
00538                 }
00539             else {
00540                 which = ONE_STRUCT;
00541                 E = E0;
00542                 }
00543 
00544             for (; comm; comm = comm -> nextp, count++) {
00545 
00546                 if (which == INIT_STRUCT)
00547                     nice_printf (outfile, "struct %s%d_ {\n",
00548                             ext->cextname, count);
00549                 else
00550                     nice_printf (outfile, "%sstruct {\n", E);
00551 
00552                 next_tab (c_file);
00553 
00554                 wr_struct (outfile, (chainp) comm -> datap);
00555 
00556                 prev_tab (c_file);
00557                 if (which == UNION_STRUCT)
00558                     nice_printf (outfile, "} _%d;\n", count);
00559                 else if (which == ONE_STRUCT)
00560                     nice_printf (outfile, "} %s;\n", ext->cextname);
00561                 else
00562                     nice_printf (outfile, "};\n");
00563             } /* for */
00564 
00565             if (which == UNION_STRUCT) {
00566                 prev_tab (c_file);
00567                 nice_printf (outfile, "} %s;\n", ext->cextname);
00568             } /* if */
00569             did_one = 1;
00570             nice_printf (outfile, "\n");
00571 
00572             for (count = 1, comm = ext -> allextp; comm;
00573                     comm = comm -> nextp, count++) {
00574                 def_start(outfile, ext->cextname,
00575                         comm_union_name(count), "");
00576                 switch (which) {
00577                     case ONE_STRUCT:
00578                         extern_out (outfile, ext);
00579                         break;
00580                     case UNION_STRUCT:
00581                         nice_printf (outfile, "(");
00582                         extern_out (outfile, ext);
00583                         nice_printf(outfile, "._%d)", count);
00584                         break;
00585                     case INIT_STRUCT:
00586                         nice_printf (outfile, "(*(struct ");
00587                         extern_out (outfile, ext);
00588                         nice_printf (outfile, "%d_ *) &", count);
00589                         extern_out (outfile, ext);
00590                         nice_printf (outfile, ")");
00591                         break;
00592                 } /* switch */
00593                 nice_printf (outfile, "\n");
00594             } /* for count = 1, comm = ext -> allextp */
00595             nice_printf (outfile, "\n");
00596         } /* if ext -> extstg == STGCOMMON */
00597     } /* for ext = extsymtab */
00598 } /* wr_common_decls */

void wr_globals FILE *    outfile
 

Definition at line 342 of file names.c.

References c_type_decl(), Constant::ccp1, Constant::cds, Literal::cds, Constblock::Const, frexpr(), ICON, lit_name(), Literal::littype, Literal::lituse, Literal::litval, margin_printf(), MSKCOMPLEX, MSKREAL, nice_printf(), ONEOF, out_const(), Constblock::vleng, Constblock::vstg, and Constblock::vtype.

Referenced by main().

00344 {
00345     struct Literal *litp, *lastlit;
00346     extern int hsize;
00347     char *litname;
00348     int did_one, t;
00349     struct Constblock cb;
00350     ftnint x, y;
00351 
00352     if (nliterals == 0)
00353         return;
00354 
00355     lastlit = litpool + nliterals;
00356     did_one = 0;
00357     for (litp = litpool; litp < lastlit; litp++) {
00358         if (!litp->lituse)
00359                 continue;
00360         litname = lit_name(litp);
00361         if (!did_one) {
00362                 margin_printf(outfile, "/* Table of constant values */\n\n");
00363                 did_one = 1;
00364                 }
00365         cb.vtype = litp->littype;
00366         if (litp->littype == TYCHAR) {
00367                 x = litp->litval.litival2[0] + litp->litval.litival2[1];
00368                 if (y = x % hsize)
00369                         x += y = hsize - y;
00370                 nice_printf(outfile,
00371                         "static struct { %s fill; char val[%ld+1];", halign, x);
00372                 nice_printf(outfile, " char fill2[%ld];", hsize - 1);
00373                 nice_printf(outfile, " } %s_st = { 0,", litname);
00374                 cb.vleng = ICON(litp->litval.litival2[0]);
00375                 cb.Const.ccp = litp->cds[0];
00376                 cb.Const.ccp1.blanks = litp->litval.litival2[1] + y;
00377                 cb.vtype = TYCHAR;
00378                 out_const(outfile, &cb);
00379                 frexpr(cb.vleng);
00380                 nice_printf(outfile, " };\n");
00381                 nice_printf(outfile, "#define %s %s_st.val\n", litname, litname);
00382                 continue;
00383                 }
00384         nice_printf(outfile, "static %s %s = ",
00385                 c_type_decl(litp->littype,0), litname);
00386 
00387         t = litp->littype;
00388         if (ONEOF(t, MSKREAL|MSKCOMPLEX)) {
00389                 cb.vstg = 1;
00390                 cb.Const.cds[0] = litp->cds[0];
00391                 cb.Const.cds[1] = litp->cds[1];
00392                 }
00393         else {
00394                 memcpy((char *)&cb.Const, (char *)&litp->litval,
00395                         sizeof(cb.Const));
00396                 cb.vstg = 0;
00397                 }
00398         out_const(outfile, &cb);
00399 
00400         nice_printf (outfile, ";\n");
00401     } /* for */
00402     if (did_one)
00403         nice_printf (outfile, "\n");
00404 } /* wr_globals */

void wr_nv_ident_help FILE *    outfile,
struct Addrblock   addrp
 

Definition at line 186 of file names.c.

References frexpr(), ICON, nice_printf(), and out_addr().

00188 {
00189     int eltcount = 0;
00190 
00191     if (addrp == (struct Addrblock *) NULL)
00192         return;
00193 
00194     if (addrp -> isarray) {
00195         frexpr (addrp -> memoffset);
00196         addrp -> memoffset = ICON(0);
00197         eltcount = addrp -> ntempelt;
00198         addrp -> ntempelt = 0;
00199         addrp -> isarray = 0;
00200     } /* if */
00201     out_addr (outfile, addrp);
00202     if (eltcount)
00203         nice_printf (outfile, "[%d]", eltcount);
00204 } /* wr_nv_ident_help */

void wr_struct FILE *    outfile,
chainp    var_list
 

Definition at line 606 of file names.c.

References c_type_decl(), Constant::ci, CLPROC, Constblock::Const, Expression::constblock, err, erri(), ISICON, L, nice_printf(), out_name(), STGAUTO, TNAME, var, Nameblock::vdim, Nameblock::vleng, and Nameblock::vtype.

Referenced by def_commons(), and wr_common_decls().

00608 {
00609     int last_type = -1;
00610     int did_one = 0;
00611     chainp this_var;
00612 
00613     for (this_var = var_list; this_var; this_var = this_var -> nextp) {
00614         Namep var = (Namep) this_var -> datap;
00615         int type;
00616         char *comment = NULL;
00617 
00618         if (var == (Namep) NULL)
00619             err ("wr_struct:  null variable");
00620         else if (var -> tag != TNAME)
00621             erri ("wr_struct:  bad tag on variable '%d'",
00622                     var -> tag);
00623 
00624         type = var -> vtype;
00625 
00626         if (last_type == type && did_one)
00627             nice_printf (outfile, ", ");
00628         else {
00629             if (did_one)
00630                 nice_printf (outfile, ";\n");
00631             nice_printf (outfile, "%s ",
00632                     c_type_decl (type, var -> vclass == CLPROC));
00633         } /* else */
00634 
00635 /* Character type is really a string type.  Put out a '*' for parameters
00636    with unknown length and functions returning character */
00637 
00638         if (var -> vtype == TYCHAR && (!ISICON ((var -> vleng))
00639                 || var -> vclass == CLPROC))
00640             nice_printf (outfile, "*");
00641 
00642         var -> vstg = STGAUTO;
00643         out_name (outfile, var);
00644         if (var -> vclass == CLPROC)
00645             nice_printf (outfile, "()");
00646         else if (var -> vdim)
00647             comment = wr_ardecls(outfile, var->vdim,
00648                                 var->vtype == TYCHAR && ISICON(var->vleng)
00649                                 ? var->vleng->constblock.Const.ci : 1L);
00650         else if (var -> vtype == TYCHAR && var -> vclass != CLPROC &&
00651             ISICON ((var -> vleng)))
00652             nice_printf (outfile, "[%ld]",
00653                     var -> vleng -> constblock.Const.ci);
00654 
00655         if (comment)
00656             nice_printf (outfile, "%s", comment);
00657         did_one = 1;
00658         last_type = type;
00659     } /* for this_var */
00660 
00661     if (did_one)
00662         nice_printf (outfile, ";\n");
00663 } /* wr_struct */

Variable Documentation

char* c_keywords[]
 

Initial value:

 {
        "Long", "Multitype", "Namelist", "Vardesc", "abs", "acos",
        "addr", "address", "aerr", "alist", "asin", "asm", "atan",
        "atan2", "aunit", "auto", "break", "c", "case", "catch", "cerr",
        "char", "ciend", "cierr", "cifmt", "cilist", "cirec", "ciunit",
        "class", "cllist", "complex", "const", "continue", "cos",
        "cosh", "csta", "cunit", "d", "dabs", "default", "defined",
        "delete", "dims", "dmax", "dmin", "do", "double",
        "doublecomplex", "doublereal", "else", "entry", "enum", "exp",
        "extern", "far", "flag", "float", "for", "friend", "ftnint",
        "ftnlen", "goto", "h", "huge", "i", "iciend", "icierr",
        "icifmt", "icilist", "icirlen", "icirnum", "iciunit", "if",
        "inacc", "inacclen", "inblank", "inblanklen", "include",
        "indir", "indirlen", "inerr", "inex", "infile", "infilen",
        "infmt", "infmtlen", "inform", "informlen", "inline", "inlist",
        "inname", "innamed", "innamlen", "innrec", "innum", "inopen",
        "inrecl", "inseq", "inseqlen", "int", "integer", "integer1",
        "inunf", "inunflen", "inunit", "log", "logical", "logical1",
        "long", "longint", "max", "min", "name", "near", "new", "nvars",
        "oacc", "oblnk", "oerr", "ofm", "ofnm", "ofnmlen", "olist",
        "operator", "orl", "osta", "ounit", "overload", "private",
        "protected", "public", "r", "real", "register", "return",
        "short", "shortint", "shortlogical", "signed", "sin", "sinh",
        "sizeof", "sqrt", "static", "struct", "switch", "tan", "tanh",
        "template", "this", "try", "type", "typedef", "uinteger",
        "ulongint", "union", "unsigned", "vars", "virtual", "void",
        "volatile", "while", "z"
        }

Definition at line 806 of file names.c.

int n_keywords = sizeof(c_keywords)/sizeof(char *)
 

Definition at line 835 of file names.c.

 

Powered by Plone

This site conforms to the following standards: