init.c File Reference

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

Include dependency graph for init.c:

Go to the source code of this file.

Defines

#define ALLOCN(n, x)   (struct x *) ckalloc((n)*sizeof(struct x))

Functions

void fileinit (Void)
void hashclear (Void)
void procinit (Void)
void setimpl (int type, ftnint length, int c1, int c2)

Variables

char * fl_fmt_string
char * db_fmt_string
char * cm_fmt_string
char * dcm_fmt_string
chainp new_vars = CHNULL
chainp used_builtins = CHNULL
chainp assigned_fmts = CHNULL
chainp allargs
chainp earlylabs
char main_alias [52]
int tab_size = 4
FILEP infile
FILEP diagfile
FILEP c_file
FILEP pass1_file
FILEP initfile
FILEP blkdfile
char * token
int maxtoklen
int toklen
long err_lineno
long lineno
char * infname
int needkwd
Labelblockthislabel = NULL
int nerr
int nwarn
flag saveall
flag substars
int parstate = OUTSIDE
flag headerdone = NO
int blklevel
int doin_setbound
int impltype [26]
ftnint implleng [26]
int implstg [26]
int tyint = TYLONG
int tylogical = TYLONG
int tylog = TYLOGICAL
int typesize [NTYPES]
int typealign [NTYPES]
int type_choice [4] = { TYDREAL, TYSHORT, TYLONG, TYSHORT }
char * Typename []
int type_pref [NTYPES]
char * protorettypes []
char * casttypes [TYSUBR+1]
char * usedcasts [TYSUBR+1]
char * dfltarg []
static char * dflt0proc []
char * dflt1proc []
char ** dfltproc = dflt0proc
static char Bug [] = "bug"
char * ftn_types []
int init_ac [TYSUBR+1]
int proctype = TYUNKNOWN
char * procname
int rtvlabel [NTYPES0]
Addrp retslot
Addrp xretslot [NTYPES0]
int cxslot = -1
int chslot = -1
int chlgslot = -1
int procclass = CLUNKNOWN
int nentry
int nallargs
int nallchargs
flag multitype
ftnint procleng
long lastiolabno
long lastlabno
int lastvarno
int lastargslot
int autonum [TYVOID]
char * av_pfix [TYVOID]
int maxctl
Ctlframectls
Ctlframectlstack
Ctlframelastctl
Namep regnamep [MAXREGVAR]
int highregvar
int nregvar
int maxext
Extsymextsymtab
Extsymnextext
Extsymlastext
int maxequiv
Equivblockeqvclass
int maxhash
Hashentryhashtab
Hashentrylasthash
int maxstno
Labelblocklabeltab
Labelblocklabtabend
Labelblockhighlabtab
int maxdim = MAXDIM
Rplblockrpllist = NULL
Chaincurdtp = NULL
flag toomanyinit
ftnint curdtelt
chainp templist [TYVOID]
chainp holdtemps
int dorange = 0
Entrypointentries = NULL
chainp chains = NULL
flag inioctl
int iostmt
int nioctl
int nequiv = 0
int eqvstart = 0
int nintnames = 0
int maxlablist
Labelblock ** labarray
Literallitpool
int nliterals
char dflttype [26]
unsigned char hextoi_tab [Table_size]
unsigned char Letters [Table_size]
char * ei_first
char * ei_next
char * ei_last
char * wh_first
char * wh_next
char * wh_last
unsigned long ff
memblockcurmemblock
memblockfirstmemblock
char * mem_first
char * mem_next
char * mem_last
char * mem0_last


Define Documentation

#define ALLOCN ( n,
x   )     (struct x *) ckalloc((n)*sizeof(struct x))

Definition at line 294 of file init.c.

Referenced by fileinit().


Function Documentation

void fileinit ( Void   ) 

Definition at line 297 of file init.c.

References ALLOCN, ckalloc(), ctls, ctlstack, dfltproc, dflttype, eqvclass, extsymtab, ff, fmt_init(), forcedouble, hextoi, hextoi_tab, highlabtab, i, infile, j, labarray, labeltab, labtabend, lastctl, lastext, lasthash, lastiolabno, lastlabno, lastvarno, Letters, litpool, main_alias, maxctl, maxequiv, maxext, maxhash, maxlablist, maxliterals, maxstno, maxtoklen, mem_init(), memset(), nerr, nextext, nliterals, np_init(), out_init(), s, token, TYDREAL, tyint, TYREAL, and tyreal.

Referenced by main().

00298 {
00299         register char *s;
00300         register int i, j;
00301 
00302         lastiolabno = 100000;
00303         lastlabno = 0;
00304         lastvarno = 0;
00305         nliterals = 0;
00306         nerr = 0;
00307 
00308         infile = stdin;
00309 
00310         maxtoklen = 502;
00311         token = (char *)ckalloc(maxtoklen+2);
00312         memset(dflttype, tyreal, 26);
00313         memset(dflttype + ('i' - 'a'), tyint, 6);
00314         memset(hextoi_tab, 16, sizeof(hextoi_tab));
00315         for(i = 0, s = "0123456789abcdef"; *s; i++, s++)
00316                 hextoi(*s) = i;
00317         for(i = 10, s = "ABCDEF"; *s; i++, s++)
00318                 hextoi(*s) = i;
00319         for(j = 0, s = "abcdefghijklmnopqrstuvwxyz"; i = *s++; j++)
00320                 Letters[i] = Letters[i+'A'-'a'] = j;
00321 #ifdef TYQUAD
00322         /* Older C compilers may not understand UL suffixes. */
00323         /* It would be much simpler to use 0xffffffffUL some places... */
00324         ff = 0xffff;
00325         ff = (ff << 16) | ff;
00326 #endif
00327         ctls = ALLOCN(maxctl+1, Ctlframe);
00328         extsymtab = ALLOCN(maxext, Extsym);
00329         eqvclass = ALLOCN(maxequiv, Equivblock);
00330         hashtab = ALLOCN(maxhash, Hashentry);
00331         labeltab = ALLOCN(maxstno, Labelblock);
00332         litpool = ALLOCN(maxliterals, Literal);
00333         labarray = (struct Labelblock **)ckalloc(maxlablist*
00334                                         sizeof(struct Labelblock *));
00335         fmt_init();
00336         mem_init();
00337         np_init();
00338 
00339         ctlstack = ctls++;
00340         lastctl = ctls + maxctl;
00341         nextext = extsymtab;
00342         lastext = extsymtab + maxext;
00343         lasthash = hashtab + maxhash;
00344         labtabend = labeltab + maxstno;
00345         highlabtab = labeltab;
00346         main_alias[0] = '\0';
00347         if (forcedouble)
00348                 dfltproc[TYREAL] = dfltproc[TYDREAL];
00349 
00350 /* Initialize the routines for providing C output */
00351 
00352         out_init ();
00353 }

Here is the call graph for this function:

Here is the caller graph for this function:

void hashclear ( Void   ) 

Definition at line 356 of file init.c.

References Dimblock::dimexpr, Dimblock::dims, Dimblock::dimsize, frexpr(), i, lasthash, ndim, p, and Hashentry::varp.

Referenced by procinit().

00357 {
00358         register struct Hashentry *hp;
00359         register Namep p;
00360         register struct Dimblock *q;
00361         register int i;
00362 
00363         for(hp = hashtab ; hp < lasthash ; ++hp)
00364                 if(p = hp->varp)
00365                 {
00366                         frexpr(p->vleng);
00367                         if(q = p->vdim)
00368                         {
00369                                 for(i = 0 ; i < q->ndim ; ++i)
00370                                 {
00371                                         frexpr(q->dims[i].dimsize);
00372                                         frexpr(q->dims[i].dimexpr);
00373                                 }
00374                                 frexpr(q->nelt);
00375                                 frexpr(q->baseoffset);
00376                                 frexpr(q->basexpr);
00377                                 free( (charptr) q);
00378                         }
00379                         if(p->vclass == CLNAMELIST)
00380                                 frchain( &(p->varxptr.namelist) );
00381                         free( (charptr) p);
00382                         hp->varp = NULL;
00383                 }
00384         }

Here is the call graph for this function:

Here is the caller graph for this function:

void procinit ( Void   ) 

Definition at line 390 of file init.c.

References allargs, assigned_fmts, autonum, blklevel, chlgslot, chslot, CLUNKNOWN, ctls, ctlstack, curmemblock, cxslot, Chain::datap, dcomplex_seen, dorange, earlylabs, ei_first, ei_last, ei_next, entries, eqvstart, firstmemblock, frchain(), free(), frexchain(), frexpr(), hashclear(), headerdone, highlabtab, highregvar, holdtemps, i, inioctl, io_structs, iob_list, labeltab, labtabend, lastargslot, lp, multitype, nallargs, nallchargs, needkwd, nentry, nequiv, new_vars, Chain::nextp, nintnames, NO, nregvar, NTYPES0, NULL, nwarn, OUTSIDE, parstate, procclass, procleng, procname, proctype, retslot, rpllist, rtvlabel, saveall, setimpl(), STGBSS, substars, templist, thislabel, TYADDR, tyint, tyreal, TYUNKNOWN, TYVOID, undeftype, used_builtins, wh_first, wh_last, wh_next, and xretslot.

Referenced by endproc(), and main().

00391 {
00392         register struct Labelblock *lp;
00393         struct Chain *cp;
00394         int i;
00395         struct memblock;
00396 
00397         curmemblock = firstmemblock;
00398         mem_next = mem_first;
00399         mem_last = mem0_last;
00400         ei_next = ei_first = ei_last = 0;
00401         wh_next = wh_first = wh_last = 0;
00402         iob_list = 0;
00403         for(i = 0; i < 9; i++)
00404                 io_structs[i] = 0;
00405 
00406         parstate = OUTSIDE;
00407         headerdone = NO;
00408         blklevel = 1;
00409         saveall = NO;
00410         substars = NO;
00411         nwarn = 0;
00412         thislabel = NULL;
00413         needkwd = 0;
00414 
00415         proctype = TYUNKNOWN;
00416         procname = "MAIN_";
00417         procclass = CLUNKNOWN;
00418         nentry = 0;
00419         nallargs = nallchargs = 0;
00420         multitype = NO;
00421         retslot = NULL;
00422         for(i = 0; i < NTYPES0; i++) {
00423                 frexpr((expptr)xretslot[i]);
00424                 xretslot[i] = 0;
00425                 }
00426         cxslot = -1;
00427         chslot = -1;
00428         chlgslot = -1;
00429         procleng = 0;
00430         blklevel = 1;
00431         lastargslot = 0;
00432 
00433         for(lp = labeltab ; lp < labtabend ; ++lp)
00434                 lp->stateno = 0;
00435 
00436         hashclear();
00437 
00438 /* Clear the list of newly generated identifiers from the previous
00439    function */
00440 
00441         frexchain(&new_vars);
00442         frexchain(&used_builtins);
00443         frchain(&assigned_fmts);
00444         frchain(&allargs);
00445         frchain(&earlylabs);
00446 
00447         nintnames = 0;
00448         highlabtab = labeltab;
00449 
00450         ctlstack = ctls - 1;
00451         for(i = TYADDR; i < TYVOID; i++) {
00452                 for(cp = templist[i]; cp ; cp = cp->nextp)
00453                         free( (charptr) (cp->datap) );
00454                 frchain(templist + i);
00455                 autonum[i] = 0;
00456                 }
00457         holdtemps = NULL;
00458         dorange = 0;
00459         nregvar = 0;
00460         highregvar = 0;
00461         entries = NULL;
00462         rpllist = NULL;
00463         inioctl = NO;
00464         eqvstart += nequiv;
00465         nequiv = 0;
00466         dcomplex_seen = 0;
00467 
00468         for(i = 0 ; i<NTYPES0 ; ++i)
00469                 rtvlabel[i] = 0;
00470 
00471         if(undeftype)
00472                 setimpl(TYUNKNOWN, (ftnint) 0, 'a', 'z');
00473         else
00474         {
00475                 setimpl(tyreal, (ftnint) 0, 'a', 'z');
00476                 setimpl(tyint,  (ftnint) 0, 'i', 'n');
00477         }
00478         setimpl(-STGBSS, (ftnint) 0, 'a', 'z'); /* set class */
00479 }

Here is the call graph for this function:

Here is the caller graph for this function:

void setimpl ( int  type,
ftnint  length,
int  c1,
int  c2 
)

Definition at line 491 of file init.c.

References err, i, implleng, implstg, impltype, lengtype(), letter, TYCHAR, and TYLONG.

Referenced by procinit(), and yyparse().

00493 {
00494         int i;
00495         char buff[100];
00496 
00497         if(c1==0 || c2==0)
00498                 return;
00499 
00500         if(c1 > c2) {
00501                 sprintf(buff, "characters out of order in implicit:%c-%c", c1, c2);
00502                 err(buff);
00503                 }
00504         else {
00505                 c1 = letter(c1);
00506                 c2 = letter(c2);
00507                 if(type < 0)
00508                         for(i = c1 ; i<=c2 ; ++i)
00509                                 implstg[i] = - type;
00510                 else {
00511                         type = lengtype(type, length);
00512                         if(type == TYCHAR) {
00513                                 if (length < 0) {
00514                                         err("length (*) in implicit");
00515                                         length = 1;
00516                                         }
00517                                 }
00518                         else if (type != TYLONG)
00519                                 length = 0;
00520                         for(i = c1 ; i<=c2 ; ++i) {
00521                                 impltype[i] = type;
00522                                 implleng[i] = length;
00523                                 }
00524                         }
00525                 }
00526         }

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

chainp allargs

Definition at line 42 of file init.c.

Referenced by doentry(), fix_entry_returns(), length_comp(), list_arg_types(), list_decls(), listargs(), procinit(), procode(), and putentries().

chainp assigned_fmts = CHNULL

Definition at line 41 of file init.c.

Referenced by fmtname(), procinit(), and write_assigned_fmts().

int autonum[TYVOID]

Definition at line 227 of file init.c.

Referenced by autovar(), and procinit().

char* av_pfix[TYVOID]

Initial value:

 {"??TYUNKNOWN??", "a","i1","s","i",

                         "i8",

                        "r","d","q","z","L1","L2","L","ch",
                         "??TYSUBR??", "??TYERROR??","ci", "ici",
                         "o", "cl", "al", "ioin" }

Definition at line 228 of file init.c.

Referenced by autovar().

FILEP blkdfile

Definition at line 54 of file init.c.

Referenced by main(), and setdata().

int blklevel

Definition at line 72 of file init.c.

char Bug[] = "bug" [static]

Definition at line 187 of file init.c.

FILEP c_file

Definition at line 51 of file init.c.

Referenced by def_commons(), done(), endproc(), ind_printf(), main(), start_formatting(), and wr_common_decls().

char* casttypes[TYSUBR+1]

Initial value:

 {
        "U_fp", "??bug??", "I1_fp",
        "J_fp", "I_fp",

        "Q_fp",

        "R_fp", "D_fp", "C_fp", "Z_fp",
        "L1_fp", "L2_fp", "L_fp", "H_fp", "S_fp"
        }

Definition at line 141 of file init.c.

Referenced by list_arg_types(), and set_externs().

chainp chains = NULL

Definition at line 272 of file init.c.

Referenced by frchain(), frexchain(), and mkchain().

int chlgslot = -1

Definition at line 216 of file init.c.

Referenced by doentry(), and procinit().

int chslot = -1

Definition at line 215 of file init.c.

Referenced by doentry(), and procinit().

char* cm_fmt_string

Definition at line 31 of file init.c.

Referenced by out_const(), and out_init().

struct Ctlframe* ctls

Definition at line 237 of file init.c.

Referenced by enddo(), endproc(), exenddo(), fileinit(), popctl(), procinit(), and yyparse().

struct Ctlframe* ctlstack

Definition at line 238 of file init.c.

Referenced by enddo(), endproc(), exdo(), exelif(), exelse(), exenddo(), exendif(), fileinit(), new_endif(), popctl(), procinit(), pushctl(), and yyparse().

ftnint curdtelt

Definition at line 266 of file init.c.

Referenced by nextdata(), and yyparse().

struct Chain* curdtp = NULL

Definition at line 264 of file init.c.

Referenced by nextdata(), pop_datastack(), and yyparse().

struct memblock* curmemblock

Definition at line 75 of file mem.c.

Referenced by mem(), mem_init(), and procinit().

int cxslot = -1

Definition at line 214 of file init.c.

Referenced by doentry(), and procinit().

char* db_fmt_string

Definition at line 30 of file init.c.

Referenced by dtos(), and out_init().

char* dcm_fmt_string

Definition at line 32 of file init.c.

Referenced by out_const(), and out_init().

char* dflt0proc[] [static]

Initial value:

 {
        0, 0, "(integer1 (*)())0",
        "(shortint (*)())0", "(integer (*)())0",

        "(longint (*)())0",

        "(real (*)())0",
        "(doublereal (*)())0", "(complex (*)())0", "(doublecomplex (*)())0",
        "(logical1 (*)())0", "(shortlogical (*)())0",
        "(logical (*)())0", "(char (*)())0", "(int (*)())0"
        }

Definition at line 163 of file init.c.

char* dflt1proc[]

Initial value:

 { "(U_fp)0", "( ??bug?? )0", "(I1_fp)0",
        "(J_fp)0", "(I_fp)0",

        "(Q_fp)0",

        "(R_fp)0", "(D_fp)0", "(C_fp)0", "(Z_fp)0",
        "(L1_fp)0","(L2_fp)0",
        "(L_fp)0", "(H_fp)0", "(S_fp)0"
        }

Definition at line 175 of file init.c.

Referenced by main().

char* dfltarg[]

Initial value:

 {
        0, 0, "(integer1 *)0",
        "(shortint *)0", "(integer *)0",

        "(longint *)0",

        "(real *)0",
        "(doublereal *)0", "(complex *)0", "(doublecomplex *)0",
        "(logical1 *)0","(shortlogical *)0", "(logical *)0", "(char *)0"
        }

Definition at line 152 of file init.c.

Referenced by putentries().

char** dfltproc = dflt0proc

Definition at line 185 of file init.c.

Referenced by fileinit(), main(), and putentries().

char dflttype[26]

Definition at line 286 of file init.c.

Referenced by doentry(), and fileinit().

FILEP diagfile

Definition at line 49 of file init.c.

Referenced by doinclude(), entrypt(), err(), Fatal(), main(), omit_non_f(), set_tmp_names(), startproc(), warn(), and yyparse().

int doin_setbound

Definition at line 73 of file init.c.

Referenced by dim_finish(), out_addr(), output_binary(), putmnmx(), and setbound().

int dorange = 0

Definition at line 269 of file init.c.

Referenced by enddo(), exdo(), procinit(), and yyparse().

chainp earlylabs

Definition at line 43 of file init.c.

Referenced by enddcl(), p1_label(), and procinit().

char* ei_first

Definition at line 288 of file init.c.

Referenced by procinit(), putif(), and start_formatting().

char * ei_last

Definition at line 288 of file init.c.

Referenced by do_p1_elseifstart(), procinit(), and putif().

char * ei_next

Definition at line 288 of file init.c.

Referenced by do_p1_elseifstart(), procinit(), putif(), and start_formatting().

struct Entrypoint* entries = NULL

Definition at line 270 of file init.c.

struct Equivblock* eqvclass

Definition at line 251 of file init.c.

Referenced by do_uninit_equivs(), doequiv(), eqvcommon(), eqveqv(), fileinit(), wr_equiv_init(), write_char_init(), and yyparse().

int eqvstart = 0

Definition at line 278 of file init.c.

Referenced by memname(), procinit(), and wr_one_init().

long err_lineno

Definition at line 59 of file init.c.

Referenced by dataval(), doinclude(), popinclude(), and yyparse().

Extsym* extsymtab

Definition at line 246 of file init.c.

Referenced by builtin(), changedtype(), comm2dcl(), commonprotos(), def_commons(), do_p1_extern(), docomleng(), docommon(), doentry(), endproc(), entry_goto(), eqvcommon(), fileinit(), fixexttype(), get_argtypes(), ioseta(), memname(), mkaddr(), mkext1(), mkfunct(), newentry(), out_addr(), out_call(), out_name(), p1_addr(), read_Pfiles(), settype(), start_formatting(), typekludge(), user_label(), wr_abbrevs(), wr_common_decls(), wr_equiv_init(), and yyparse().

unsigned long ff

Definition at line 291 of file init.c.

Referenced by fileinit(), loadfamilyGif(), and mkbitcon().

struct memblock * firstmemblock

Definition at line 75 of file mem.c.

Referenced by mem_init(), and procinit().

char* fl_fmt_string

Definition at line 29 of file init.c.

Referenced by flconst(), and out_init().

char* ftn_types[]

Initial value:

 { "external", "??", "integer*1",
        "integer*2", "integer",

        "integer*8",

        "real",
        "double precision", "complex", "double complex",
        "logical*1", "logical*2",
        "logical", "character", "subroutine",
        Bug,Bug,Bug,Bug,Bug,Bug,Bug,Bug,Bug, "ftnlen"
        }

Definition at line 189 of file init.c.

Referenced by Argtype(), changedtype(), mixed_type(), and write_typedefs().

struct Hashentry* hashtab

Definition at line 254 of file init.c.

flag headerdone = NO

Definition at line 71 of file init.c.

Referenced by procinit(), puthead(), and yyparse().

unsigned char hextoi_tab[Table_size]

Definition at line 287 of file init.c.

Referenced by fileinit().

struct Labelblock* highlabtab

Definition at line 260 of file init.c.

Referenced by fileinit(), mklabel(), poplab(), procinit(), and write_formats().

int highregvar

Definition at line 242 of file init.c.

Referenced by procinit().

chainp holdtemps

Definition at line 268 of file init.c.

Referenced by freetemps(), frtemp(), and procinit().

ftnint implleng[26]

Definition at line 75 of file init.c.

Referenced by impldcl(), setimpl(), and wronginf().

int implstg[26]

Definition at line 76 of file init.c.

Referenced by setimpl(), and vardcl().

int impltype[26]

Definition at line 74 of file init.c.

Referenced by impldcl(), inferdcl(), setimpl(), and wronginf().

FILEP infile

Definition at line 48 of file init.c.

Referenced by doinclude(), fileinit(), getcd(), popinclude(), and start_formatting().

char* infname

Definition at line 62 of file init.c.

Referenced by c_name(), doinclude(), err(), Fatal(), getcd(), getcds(), list_init_data(), popinclude(), putlineno(), and warn().

flag inioctl

Definition at line 274 of file init.c.

Referenced by endioctl(), procinit(), startioctl(), and yyparse().

int init_ac[TYSUBR+1]

Initial value:

 { 0,0,0,0,0,0,0,

                          0,

                          1, 1, 0, 0, 0, 2}

Definition at line 201 of file init.c.

Referenced by length_comp().

FILEP initfile

Definition at line 53 of file init.c.

Referenced by done(), list_decls(), and setdata().

int iostmt

Definition at line 275 of file init.c.

Referenced by doiolist(), endio(), endioctl(), ioclause(), iocname(), startrw(), and yyparse().

struct Labelblock** labarray

Definition at line 281 of file init.c.

Referenced by fileinit(), and yyparse().

struct Labelblock* labeltab

Definition at line 258 of file init.c.

Referenced by do_p1_label(), endio(), endproc(), fileinit(), mklabel(), poplab(), procinit(), write_formats(), and yyparse().

struct Labelblock* labtabend

Definition at line 259 of file init.c.

Referenced by endproc(), fileinit(), mklabel(), and procinit().

int lastargslot

Definition at line 226 of file init.c.

Referenced by nextarg(), and procinit().

struct Ctlframe* lastctl

Definition at line 239 of file init.c.

Referenced by fileinit(), and pushctl().

Extsym* lastext

Definition at line 248 of file init.c.

Referenced by fileinit(), and mkext1().

struct Hashentry* lasthash

Definition at line 255 of file init.c.

Referenced by dobss(), donmlist(), fileinit(), hashclear(), memno2info(), mkname(), and write_namelists().

long lastiolabno

Definition at line 223 of file init.c.

Referenced by fileinit(), and newiolabel().

long lastlabno

Definition at line 224 of file init.c.

Referenced by fileinit(), and newlabel().

int lastvarno

Definition at line 225 of file init.c.

Referenced by fileinit(), startrw(), vardcl(), write_char_init(), and yyparse().

unsigned char Letters[Table_size]

Definition at line 287 of file init.c.

Referenced by fileinit().

long lineno

Definition at line 60 of file init.c.

Referenced by contmax(), dataval(), do_p1_set_line(), doinclude(), enddcl(), err(), Fatal(), getcd(), getcds(), mkexpr(), popinclude(), setdata(), subcheck(), warn(), write_indent(), and yyparse().

struct Literal* litpool

Definition at line 283 of file init.c.

Referenced by addrlit(), fileinit(), findconst(), output_literal(), putconst(), and wr_globals().

char main_alias[52]

Definition at line 44 of file init.c.

Referenced by fileinit(), main(), and startproc().

int maxctl

Definition at line 67 of file main.c.

int maxdim = MAXDIM

Definition at line 262 of file init.c.

Referenced by suboffset(), and yyparse().

int maxequiv

Definition at line 64 of file main.c.

int maxext

Definition at line 65 of file main.c.

int maxhash

Definition at line 68 of file main.c.

int maxlablist

Definition at line 71 of file main.c.

int maxstno

Definition at line 66 of file main.c.

int maxtoklen

Definition at line 58 of file init.c.

Referenced by adjtoklen(), crunch(), and fileinit().

char * mem0_last

Definition at line 77 of file mem.c.

char* mem_first

Definition at line 77 of file mem.c.

char * mem_last

Definition at line 77 of file mem.c.

char * mem_next

Definition at line 77 of file mem.c.

flag multitype

Definition at line 221 of file init.c.

Referenced by do_p1_head(), do_p1_subr_ret(), doentry(), epicode(), fix_entry_returns(), list_arg_types(), listargs(), out_addr(), procinit(), and putentries().

int nallargs

Definition at line 219 of file init.c.

Referenced by count_args(), doentry(), procinit(), and putentries().

int nallchargs

Definition at line 220 of file init.c.

Referenced by doentry(), procinit(), and putentries().

int needkwd

Definition at line 63 of file init.c.

Referenced by gettok(), procinit(), and yyparse().

int nentry

Definition at line 218 of file init.c.

Referenced by do_p1_head(), doentry(), endproc(), parse(), procinit(), procode(), prolog(), and run().

int nequiv = 0

Definition at line 277 of file init.c.

Referenced by do_uninit_equivs(), doequiv(), list_decls(), procinit(), write_char_init(), and yyparse().

int nerr

Definition at line 65 of file init.c.

Referenced by docommon(), err(), err66(), errext(), expr_out(), fileinit(), main(), and overlapping().

chainp new_vars = CHNULL

Definition at line 34 of file init.c.

Referenced by declare_new_addr(), list_decls(), memno2info(), procinit(), and setbound().

Extsym* nextext

Definition at line 247 of file init.c.

Referenced by comm2dcl(), commonprotos(), def_commons(), docomleng(), docommon(), endproc(), fileinit(), mkext1(), read_Pfiles(), start_formatting(), and wr_common_decls().

int nintnames = 0

Definition at line 279 of file init.c.

Referenced by mkname(), and procinit().

int nioctl

Definition at line 276 of file init.c.

Referenced by ioclause(), startioctl(), and startrw().

int nliterals

Definition at line 284 of file init.c.

Referenced by addrlit(), fileinit(), findconst(), output_literal(), putconst(), and wr_globals().

int nregvar

Definition at line 243 of file init.c.

Referenced by deregister(), inregister(), and procinit().

int nwarn

Definition at line 66 of file init.c.

Referenced by procinit(), and warn().

int parstate = OUTSIDE

Definition at line 70 of file init.c.

Referenced by dataval(), enddcl(), endproc(), entrypt(), exequals(), main(), mkexpr(), newproc(), p1_label(), procinit(), settype(), and yyparse().

FILEP pass1_file

Definition at line 52 of file init.c.

Referenced by done(), main(), p1_const(), p1_line_number(), p1put(), p1putd(), p1putdd(), p1putddd(), p1putdds(), p1putds(), p1putn(), p1puts(), putif(), putwhile(), start_formatting(), and westart().

int procclass = CLUNKNOWN

Definition at line 217 of file init.c.

Referenced by doentry(), entrypt(), epicode(), exreturn(), newproc(), procinit(), prolog(), setdata(), settype(), startproc(), and yyparse().

ftnint procleng

Definition at line 222 of file init.c.

Referenced by doentry(), entrypt(), and procinit().

char* procname

Definition at line 208 of file init.c.

Referenced by entrypt(), procinit(), startproc(), and subcheck().

int proctype = TYUNKNOWN

Definition at line 207 of file init.c.

Referenced by do_p1_head(), doentry(), entrypt(), epicode(), exreturn(), list_arg_types(), listargs(), procinit(), and putentries().

char* protorettypes[]

Initial value:

 {
        "?", "??", "integer1", "shortint", "integer",

        "longint",

        "real", "doublereal",
        "C_f", "Z_f", "logical1", "shortlogical", "logical", "H_f", "int"
        }

Definition at line 132 of file init.c.

Referenced by protowrite(), and set_externs().

Namep regnamep[MAXREGVAR]

Definition at line 241 of file init.c.

Referenced by deregister(), and inregister().

Addrp retslot

Definition at line 210 of file init.c.

Referenced by doentry(), exreturn(), procinit(), and retval().

struct Rplblock* rpllist = NULL

Definition at line 263 of file init.c.

Referenced by frrpl(), mkplace(), nextdata(), procinit(), and stfcall().

int rtvlabel[NTYPES0]

Definition at line 209 of file init.c.

Referenced by doentry(), and procinit().

flag saveall

Definition at line 68 of file init.c.

Referenced by list_decls(), procinit(), and yyparse().

flag substars

Definition at line 69 of file init.c.

Referenced by epicode(), procinit(), and yyparse().

int tab_size = 4

Definition at line 45 of file init.c.

Referenced by out_init().

chainp templist[TYVOID]

Definition at line 267 of file init.c.

Referenced by freetemps(), mktmpn(), and procinit().

struct Labelblock* thislabel = NULL

Definition at line 64 of file init.c.

Referenced by exenddo(), procinit(), and yyparse().

char* token

Definition at line 57 of file init.c.

Referenced by adjtoklen(), fileinit(), get_p1_token(), gettok(), hexcheck(), iocname(), TCL_ArrayDim(), and yyparse().

int toklen

Definition at line 58 of file init.c.

Referenced by gettok(), yylex(), and yyparse().

flag toomanyinit

Definition at line 265 of file init.c.

Referenced by dataval(), and yyparse().

int tyint = TYLONG

Definition at line 78 of file init.c.

Referenced by fileinit(), fold(), intraddr(), intrcall(), lengtype(), mkintcon(), mkintqcon(), mkpower(), opconv_fudge(), procinit(), putcat(), putconst(), putcx1(), putiocall(), and set_externs().

int tylog = TYLOGICAL

Definition at line 80 of file init.c.

Referenced by intrcall(), lengtype(), mklogcon(), and set_externs().

int tylogical = TYLONG

Definition at line 79 of file init.c.

Referenced by retval(), and set_externs().

int type_choice[4] = { TYDREAL, TYSHORT, TYLONG, TYSHORT }

Definition at line 105 of file init.c.

Referenced by fill_type(), pad_common(), and wr_equiv_init().

int type_pref[NTYPES]

Initial value:

 { 0, 0, 3, 5, 7,

                         10,

                                8, 11, 9, 12, 1, 4, 6, 2 }

Definition at line 126 of file init.c.

Referenced by docommon(), and doequiv().

int typealign[NTYPES]

Initial value:

 {
        1, ALIADDR, 1, ALISHORT, ALILONG,

        ALIDOUBLE,

        ALILONG, ALIDOUBLE,
        ALILONG, ALIDOUBLE, 1, ALISHORT, ALILONG, 1, 1, 1,
        ALILONG, ALILONG, ALILONG, ALILONG, ALILONG, ALILONG}

Definition at line 96 of file init.c.

Referenced by docommon(), set_externs(), and wr_equiv_init().

char* Typename[]

Initial value:

 {
        "<<unknown>>",
        "address",
        "integer1",
        "shortint",
        "integer",

        "longint",

        "real",
        "doublereal",
        "complex",
        "doublecomplex",
        "logical1",
        "shortlogical",
        "logical",
        "char"  
        }

Definition at line 107 of file init.c.

Referenced by c_type_decl(), fill_dcl(), out_call(), putio(), and wr_equiv_init().

int typesize[NTYPES]

Initial value:

 {
        1, SZADDR, 1, SZSHORT, SZLONG,

                2*SZLONG,

                SZLONG, 2*SZLONG,
                2*SZLONG, 4*SZLONG, 1, SZSHORT, SZLONG, 1, 1, 0,
                4*SZLONG + SZADDR,      
                4*SZLONG + 2*SZADDR,    
                4*SZLONG + 5*SZADDR,    
                2*SZLONG + SZADDR,      
                2*SZLONG,               
                11*SZLONG + 15*SZADDR   
                }

Definition at line 81 of file init.c.

Referenced by autovar(), commlen(), do_uninit_equivs(), docommon(), fill_type(), fixexpr(), get_fill(), iarrlen(), lengtype(), mkscalar(), nextdata(), opconv_fudge(), out_addr(), pad_common(), putct1(), putcx1(), set_externs(), setdata(), suboffset(), wr_array_init(), wr_equiv_init(), write_char_init(), and yyparse().

chainp used_builtins = CHNULL

Definition at line 38 of file init.c.

Referenced by builtin(), list_decls(), and procinit().

char* usedcasts[TYSUBR+1]

Definition at line 150 of file init.c.

Referenced by list_arg_types(), and write_typedefs().

char* wh_first

Definition at line 289 of file init.c.

Referenced by procinit(), putwhile(), and start_formatting().

char * wh_last

Definition at line 289 of file init.c.

Referenced by procinit(), and putwhile().

char * wh_next

Definition at line 289 of file init.c.

Referenced by do_p1_1while(), do_p1_2while(), procinit(), putwhile(), and start_formatting().

Addrp xretslot[NTYPES0]

Definition at line 213 of file init.c.

Referenced by doentry(), fix_entry_returns(), list_arg_types(), listargs(), mkaddr(), out_addr(), out_name(), procinit(), putentries(), and settype().


Generated on Sun Mar 4 15:08:15 2007 for Scilab [trunk] by  doxygen 1.5.1