intr.c File Reference

#include "defs.h"
#include "names.h"

Include dependency graph for intr.c:

Go to the source code of this file.

Data Structures

struct  Intrbits
struct  Intrblock
struct  Specblock

Functions

void r8fix (Void)
static expptr foldminmax (int ismin, struct Listblock *argsp)
expptr intrcall (Namep np, struct Listblock *argsp, int nargs)
int intrfunct (char *s)
Addrp intraddr (Namep np)
void cast_args (int maxtype, chainp args)
expptr Inline (int fno, int type, struct Chain *args)

Variables

union {
   int   ijunk
   Intrpacked   bits
packed
LOCAL struct Intrblock intrtab []
LOCAL struct Specblock spectab []
char * callbyvalue []


Function Documentation

void cast_args ( int  maxtype,
chainp  args 
)

Definition at line 1020 of file intr.c.

References args, cpexpr(), ENULL, mkconv(), mktmp(), puteq(), and TCONST.

Referenced by intrcall().

01022 {
01023     for (; args; args = args -> nextp) {
01024         expptr e = (expptr) args->datap;
01025         if (e -> headblock.vtype != maxtype)
01026             if (e -> tag == TCONST)
01027                 args->datap = (char *) mkconv(maxtype, e);
01028             else {
01029                 Addrp temp = mktmp(maxtype, ENULL);
01030 
01031                 puteq(cpexpr((expptr)temp), e);
01032                 args->datap = (char *)temp;
01033             } /* else */
01034     } /* for */
01035 } /* cast_args */

Here is the call graph for this function:

Here is the caller graph for this function:

static expptr foldminmax ( int  ismin,
struct Listblock argsp 
) [static]

Definition at line 502 of file intr.c.

References ci, Const, Chain::datap, frexpr(), h, ISINT, ISREAL, Listblock::listp, mkconv(), Chain::nextp, TYQUAD, and Listblock::vtype.

Referenced by intrcall(), and putmnmx().

00504 {
00505 #ifndef NO_LONG_LONG
00506         Llong cq, cq1;
00507 #endif
00508         Constp h;
00509         double cd, cd1;
00510         ftnint ci;
00511         int mtype;
00512         struct Chain *cp, *cpx;
00513 
00514         mtype = argsp->vtype;
00515         cp = cpx = argsp->listp;
00516         h = &((expptr)cp->datap)->constblock;
00517 #ifndef NO_LONG_LONG
00518         if (mtype == TYQUAD) {
00519                 cq = h->vtype == TYQUAD ? h->Const.cq : h->Const.ci;
00520                 while(cp = cp->nextp) {
00521                         h = &((expptr)cp->datap)->constblock;
00522                         cq1 = h->vtype == TYQUAD ? h->Const.cq : h->Const.ci;
00523                         if (ismin) {
00524                                 if (cq > cq1) {
00525                                         cq = cq1;
00526                                         cpx = cp;
00527                                         }
00528                                 }
00529                         else {
00530                                 if (cq < cq1) {
00531                                         cq = cq1;
00532                                         cpx = cp;
00533                                         }
00534                                 }
00535                         }
00536                 }
00537         else
00538 #endif
00539         if (ISINT(mtype)) {
00540                 ci = h->Const.ci;
00541                 if (ismin)
00542                         while(cp = cp->nextp) {
00543                                 h = &((expptr)cp->datap)->constblock;
00544                                 if (ci > h->Const.ci) {
00545                                         ci = h->Const.ci;
00546                                         cpx = cp;
00547                                         }
00548                                 }
00549                 else
00550                         while(cp = cp->nextp) {
00551                                 h = &((expptr)cp->datap)->constblock;
00552                                 if (ci < h->Const.ci) {
00553                                         ci = h->Const.ci;
00554                                         cpx = cp;
00555                                         }
00556                                 }
00557                 }
00558         else {
00559                 if (ISREAL(h->vtype))
00560                         cd = h->vstg ? atof(h->Const.cds[0]) : h->Const.cd[0];
00561 #ifndef NO_LONG_LONG
00562                 else if (h->vtype == TYQUAD)
00563                         cd = (double)(h->Const.cq);
00564 #endif
00565                 else
00566                         cd = h->Const.ci;
00567                 while(cp = cp->nextp) {
00568                         h = &((expptr)cp->datap)->constblock;
00569                         if (ISREAL(h->vtype))
00570                                 cd1 = h->vstg   ? atof(h->Const.cds[0])
00571                                                 : h->Const.cd[0];
00572 #ifndef NO_LONG_LONG
00573                         else if (h->vtype == TYQUAD)
00574                                 cd1 = (double)(h->Const.cq);
00575 #endif
00576                         else
00577                                 cd1 = h->Const.ci;
00578                         if (ismin) {
00579                                 if (cd > cd1) {
00580                                         cd = cd1;
00581                                         cpx = cp;
00582                                         }
00583                                 }
00584                         else {
00585                                 if (cd < cd1) {
00586                                         cd = cd1;
00587                                         cpx = cp;
00588                                         }
00589                                 }
00590                         }
00591                 }
00592         h = &((expptr)cpx->datap)->constblock;
00593         cpx->datap = 0;
00594         frexpr((tagptr)argsp);
00595         if (h->vtype != mtype)
00596                 return mkconv(mtype, (expptr)h);
00597         return (expptr)h;
00598         }

Here is the call graph for this function:

Here is the caller graph for this function:

expptr Inline ( int  fno,
int  type,
struct Chain args 
)

Definition at line 1046 of file intr.c.

References addressable(), args, cpexpr(), ENULL, forcedouble, frexpr(), mkconv(), mkexpr(), mktmp(), NULL, OPABS, OPASSIGN, OPCOMMA, OPDABS, OPMOD, OPSTAR, t, t1, TYDREAL, tyioint, and TYREAL.

Referenced by intrcall().

01048 {
01049         register expptr q, t, t1;
01050 
01051         switch(fno)
01052         {
01053         case 8: /* real abs */
01054         case 9: /* short int abs */
01055         case 10:        /* long int abs */
01056         case 11:        /* double precision abs */
01057                 if( addressable(q = (expptr) args->datap) )
01058                 {
01059                         t = q;
01060                         q = NULL;
01061                 }
01062                 else
01063                         t = (expptr) mktmp(type,ENULL);
01064                 t1 = mkexpr(type == TYREAL && forcedouble ? OPDABS : OPABS,
01065                         cpexpr(t), ENULL);
01066                 if(q)
01067                         t1 = mkexpr(OPCOMMA, mkexpr(OPASSIGN, cpexpr(t),q), t1);
01068                 frexpr(t);
01069                 return(t1);
01070 
01071         case 26:        /* dprod */
01072                 q = mkexpr(OPSTAR, mkconv(TYDREAL,(expptr)args->datap),
01073                         (expptr)args->nextp->datap);
01074                 return(q);
01075 
01076         case 27:        /* len of character string */
01077                 q = (expptr) cpexpr(((tagptr)args->datap)->headblock.vleng);
01078                 frexpr((expptr)args->datap);
01079                 return mkconv(tyioint, q);
01080 
01081         case 14:        /* half-integer mod */
01082         case 15:        /* mod */
01083                 return mkexpr(OPMOD, (expptr) args->datap,
01084                                 (expptr) args->nextp->datap);
01085         }
01086         return(NULL);
01087 }

Here is the call graph for this function:

Here is the caller graph for this function:

Addrp intraddr ( Namep  np  ) 

Definition at line 970 of file intr.c.

References builtin(), CLPROC, errnode, errstr(), fatali(), fatalstr(), Nameblock::fvarname, INTRBGEN, INTRBOOL, INTRCNST, INTRCONV, INTRGEN, INTRMAX, INTRMIN, INTRSPEC, packed, PINTRINSIC, sp(), spectab, tyint, TYLOGICAL, TYLONG, TYSHORT, Nameblock::vardesc, Nameblock::varno, Nameblock::vclass, and Nameblock::vprocclass.

Referenced by mkaddr().

00972 {
00973         Addrp q;
00974         register struct Specblock *sp;
00975         int f3field;
00976 
00977         if(np->vclass!=CLPROC || np->vprocclass!=PINTRINSIC)
00978                 fatalstr("intraddr: %s is not intrinsic", np->fvarname);
00979         packed.ijunk = np->vardesc.varno;
00980         f3field = packed.bits.f3;
00981 
00982         switch(packed.bits.f1)
00983         {
00984         case INTRGEN:
00985                 /* imag, log, and log10 arent specific functions */
00986                 if(f3field==31 || f3field==43 || f3field==47)
00987                         goto bad;
00988 
00989         case INTRSPEC:
00990                 sp = spectab + f3field;
00991                 if (tyint == TYLONG
00992                 && (sp->rtype == TYSHORT || sp->rtype == TYLOGICAL))
00993                         ++sp;
00994                 q = builtin(sp->rtype, sp->spxname,
00995                         sp->othername ? 1 : 0);
00996                 return(q);
00997 
00998         case INTRCONV:
00999         case INTRMIN:
01000         case INTRMAX:
01001         case INTRBOOL:
01002         case INTRCNST:
01003         case INTRBGEN:
01004 bad:
01005                 errstr("cannot pass %s as actual", np->fvarname);
01006                 return((Addrp)errnode());
01007         }
01008         fatali("intraddr: impossible f1=%d\n", (int) packed.bits.f1);
01009         /* NOT REACHED */ return 0;
01010 }

Here is the call graph for this function:

Here is the caller graph for this function:

expptr intrcall ( Namep  np,
struct Listblock argsp,
int  nargs 
)

Definition at line 608 of file intr.c.

References Expression::addrblock, badtype(), builtin(), callbyvalue, cast_args(), Constant::ci, Constblock::Const, Expression::constblock, Chain::datap, ENULL, err66(), Expression::exprblock, Fatal(), fatali(), fixargs(), fixexpr(), foldminmax(), frchain(), free(), Nameblock::fvarname, Expression::headblock, i, ICON, Inline(), INTRBGEN, INTRBOOL, INTRCNST, INTRCONV, INTRGEN, INTRMAX, INTRMIN, INTRSPEC, ISCOMPLEX, ISCONST, Listblock::listp, M, maxtype(), mkchain(), mkconv(), mkcxcon(), mkexpr(), mkintcon(), mkrealcon(), MSKINT, MSKLOGICAL, MSKREAL, Chain::nextp, NO, no66flag, ONEOF, op, OPBITBITS, OPBITNOT, OPBITSH, OPBITTEST, OPCALL, OPCCALL, OPCONV, OPLSHIFT, OPMAX, OPMIN, OPRSHIFT, packed, Addrblock::parenused, s, sp(), spectab, TADDR, Expression::tag, TYDCOMPLEX, TYDREAL, tyint, tylog, TYLOGICAL, TYLONG, TYQUAD, TYREAL, TYSHORT, TYUNKNOWN, Nameblock::vardesc, Nameblock::varno, Listblock::vtype, Exprblock::vtype, Headblock::vtype, warn1(), and YES.

Referenced by mkfunct().

00610 {
00611         int i, rettype;
00612         ftnint k;
00613         Addrp ap;
00614         register struct Specblock *sp;
00615         register struct Chain *cp;
00616         expptr q, ep;
00617         int constargs, mtype, op;
00618         int f1field, f2field, f3field;
00619         char *s;
00620         static char     bit_bits[] =    "?bit_bits",
00621                         bit_shift[] =   "?bit_shift",
00622                         bit_cshift[] =  "?bit_cshift";
00623         static char *bitop[3] = { bit_bits, bit_shift, bit_cshift };
00624         static int t_pref[2] = { 'l', 'q' };
00625 
00626         packed.ijunk = np->vardesc.varno;
00627         f1field = packed.bits.f1;
00628         f2field = packed.bits.f2;
00629         f3field = packed.bits.f3;
00630         if(nargs == 0)
00631                 goto badnargs;
00632 
00633         mtype = 0;
00634         constargs = 1;
00635         for(cp = argsp->listp ; cp ; cp = cp->nextp)
00636         {
00637                 ep = (expptr)cp->datap;
00638                 if (!ISCONST(ep))
00639                         constargs = 0;
00640                 else if( ep->headblock.vtype==TYSHORT )
00641                         cp->datap = (char *) mkconv(tyint, ep);
00642                 mtype = maxtype(mtype, ep->headblock.vtype);
00643         }
00644 
00645         switch(f1field)
00646         {
00647         case INTRBGEN:
00648                 op = f3field;
00649                 if( ! ONEOF(mtype, MSKINT) )
00650                         goto badtype;
00651                 if (op < OPBITBITS) {
00652                         if(nargs != 2)
00653                                 goto badnargs;
00654                         if (op != OPBITTEST) {
00655 #ifdef TYQUAD
00656                                 if (mtype == TYQUAD)
00657                                         op += 2;
00658 #endif
00659                                 goto intrbool2;
00660                                 }
00661                         q = mkexpr(op, (expptr)argsp->listp->datap,
00662                                         (expptr)argsp->listp->nextp->datap);
00663                         q->exprblock.vtype = TYLOGICAL;
00664                         goto intrbool2a;
00665                         }
00666                 if (nargs != 2 && (nargs != 3 || op == OPBITSH))
00667                         goto badnargs;
00668                 cp = argsp->listp;
00669                 ep = (expptr)cp->datap;
00670                 if (ep->headblock.vtype < TYLONG)
00671                         cp->datap = (char *)mkconv(TYLONG, ep);
00672                 while(cp->nextp) {
00673                         cp = cp->nextp;
00674                         ep = (expptr)cp->datap;
00675                         if (ep->headblock.vtype != TYLONG)
00676                                 cp->datap = (char *)mkconv(TYLONG, ep);
00677                         }
00678                 if (op == OPBITSH) {
00679                         ep = (expptr)argsp->listp->nextp->datap;
00680                         if (ISCONST(ep)) {
00681                                 if ((k = ep->constblock.Const.ci) < 0) {
00682                                         q = (expptr)argsp->listp->datap;
00683                                         if (ISCONST(q)) {
00684                                                 ep->constblock.Const.ci = -k;
00685                                                 op = OPRSHIFT;
00686                                                 goto intrbool2;
00687                                                 }
00688                                         }
00689                                 else {
00690                                         op = OPLSHIFT;
00691                                         goto intrbool2;
00692                                         }
00693                                 }
00694                         }
00695                 else if (nargs == 2) {
00696                         if (op == OPBITBITS)
00697                                 goto badnargs;
00698                         cp->nextp = mkchain((char*)ICON(-1), 0);
00699                         }
00700                 ep = (expptr)argsp->listp->datap;
00701                 i = ep->headblock.vtype;
00702                 s = bitop[op - OPBITBITS];
00703                 *s = t_pref[i - TYLONG];
00704                 ap = builtin(i, s, 1);
00705                 return fixexpr((Exprp)
00706                                 mkexpr(OPCCALL, (expptr)ap, (expptr)argsp) );
00707 
00708         case INTRBOOL:
00709                 op = f3field;
00710                 if( ! ONEOF(mtype, MSKINT|MSKLOGICAL) )
00711                         goto badtype;
00712                 if(op == OPBITNOT)
00713                 {
00714                         if(nargs != 1)
00715                                 goto badnargs;
00716                         q = mkexpr(OPBITNOT, (expptr)argsp->listp->datap, ENULL);
00717                 }
00718                 else
00719                 {
00720                         if(nargs != 2)
00721                                 goto badnargs;
00722  intrbool2:
00723                         q = mkexpr(op, (expptr)argsp->listp->datap,
00724                                         (expptr)argsp->listp->nextp->datap);
00725                 }
00726  intrbool2a:
00727                 frchain( &(argsp->listp) );
00728                 free( (charptr) argsp);
00729                 return(q);
00730 
00731         case INTRCONV:
00732                 rettype = f2field;
00733                 switch(rettype) {
00734                   case TYLONG:
00735                         rettype = tyint;
00736                         break;
00737                   case TYLOGICAL:
00738                         rettype = tylog;
00739                   }
00740                 if( ISCOMPLEX(rettype) && nargs==2)
00741                 {
00742                         expptr qr, qi;
00743                         qr = (expptr) argsp->listp->datap;
00744                         qi = (expptr) argsp->listp->nextp->datap;
00745                         if (qr->headblock.vtype == TYDREAL
00746                          || qi->headblock.vtype == TYDREAL)
00747                                 rettype = TYDCOMPLEX;
00748                         if(ISCONST(qr) && ISCONST(qi))
00749                                 q = mkcxcon(qr,qi);
00750                         else    q = mkexpr(OPCONV,mkconv(rettype-2,qr),
00751                             mkconv(rettype-2,qi));
00752                 }
00753                 else if(nargs == 1) {
00754                         if (f3field && ((Exprp)argsp->listp->datap)->vtype
00755                                         == TYDCOMPLEX)
00756                                 rettype = TYDREAL;
00757                         q = mkconv(rettype+100, (expptr)argsp->listp->datap);
00758                         if (q->tag == TADDR)
00759                                 q->addrblock.parenused = 1;
00760                         }
00761                 else goto badnargs;
00762 
00763                 q->headblock.vtype = rettype;
00764                 frchain(&(argsp->listp));
00765                 free( (charptr) argsp);
00766                 return(q);
00767 
00768 
00769 #if 0
00770         case INTRCNST:
00771 
00772 /* Machine-dependent f77 stuff that f2c omits:
00773 
00774 intcon contains
00775         radix for short int
00776         radix for long int
00777         radix for single precision
00778         radix for double precision
00779         precision for short int
00780         precision for long int
00781         precision for single precision
00782         precision for double precision
00783         emin for single precision
00784         emin for double precision
00785         emax for single precision
00786         emax for double prcision
00787         largest short int
00788         largest long int
00789 
00790 realcon contains
00791         tiny for single precision
00792         tiny for double precision
00793         huge for single precision
00794         huge for double precision
00795         mrsp (epsilon) for single precision
00796         mrsp (epsilon) for double precision
00797 */
00798         {       register struct Incstblock *cstp;
00799                 extern ftnint intcon[14];
00800                 extern double realcon[6];
00801 
00802                 cstp = consttab + f3field;
00803                 for(i=0 ; i<f2field ; ++i)
00804                         if(cstp->atype == mtype)
00805                                 goto foundconst;
00806                         else
00807                                 ++cstp;
00808                 goto badtype;
00809 
00810 foundconst:
00811                 switch(cstp->rtype)
00812                 {
00813                 case TYLONG:
00814                         return(mkintcon(intcon[cstp->constno]));
00815 
00816                 case TYREAL:
00817                 case TYDREAL:
00818                         return(mkrealcon(cstp->rtype,
00819                             realcon[cstp->constno]) );
00820 
00821                 default:
00822                         Fatal("impossible intrinsic constant");
00823                 }
00824         }
00825 #endif
00826 
00827         case INTRGEN:
00828                 sp = spectab + f3field;
00829                 if(no66flag)
00830                         if(sp->atype == mtype)
00831                                 goto specfunct;
00832                         else err66("generic function");
00833 
00834                 for(i=0; i<f2field ; ++i)
00835                         if(sp->atype == mtype)
00836                                 goto specfunct;
00837                         else
00838                                 ++sp;
00839                 warn1 ("bad argument type to intrinsic %s", np->fvarname);
00840 
00841 /* Made this a warning rather than an error so things like "log (5) ==>
00842    log (5.0)" can be accommodated.  When none of these cases matches, the
00843    argument is cast up to the first type in the spectab list; this first
00844    type is assumed to be the "smallest" type, e.g. REAL before DREAL
00845    before COMPLEX, before DCOMPLEX */
00846 
00847                 sp = spectab + f3field;
00848                 mtype = sp -> atype;
00849                 goto specfunct;
00850 
00851         case INTRSPEC:
00852                 sp = spectab + f3field;
00853 specfunct:
00854                 if(tyint==TYLONG && ONEOF(sp->rtype,M(TYSHORT)|M(TYLOGICAL))
00855                     && (sp+1)->atype==sp->atype)
00856                         ++sp;
00857 
00858                 if(nargs != sp->nargs)
00859                         goto badnargs;
00860                 if(mtype != sp->atype)
00861                         goto badtype;
00862 
00863 /* NOTE!!  I moved fixargs (YES) into the ELSE branch so that constants in
00864    the inline expression wouldn't get put into the constant table */
00865 
00866                 fixargs (NO, argsp);
00867                 cast_args (mtype, argsp -> listp);
00868 
00869                 if(q = Inline((int)(sp-spectab), mtype, argsp->listp))
00870                 {
00871                         frchain( &(argsp->listp) );
00872                         free( (charptr) argsp);
00873                 } else {
00874 
00875                     if(sp->othername) {
00876                         /* C library routines that return double... */
00877                         /* sp->rtype might be TYREAL */
00878                         ap = builtin(sp->rtype,
00879                                 callbyvalue[sp->othername], 1);
00880                         q = fixexpr((Exprp)
00881                                 mkexpr(OPCCALL, (expptr)ap, (expptr)argsp) );
00882                     } else {
00883                         fixargs(YES, argsp);
00884                         ap = builtin(sp->rtype, sp->spxname, 0);
00885                         q = fixexpr((Exprp)
00886                                 mkexpr(OPCALL, (expptr)ap, (expptr)argsp) );
00887                     } /* else */
00888                 } /* else */
00889                 return(q);
00890 
00891         case INTRMIN:
00892         case INTRMAX:
00893                 if(nargs < 2)
00894                         goto badnargs;
00895                 if( ! ONEOF(mtype, MSKINT|MSKREAL) )
00896                         goto badtype;
00897                 argsp->vtype = mtype;
00898                 if (constargs)
00899                         q = foldminmax(f1field==INTRMIN, argsp);
00900                 else
00901                         q = mkexpr(f1field==INTRMIN ? OPMIN : OPMAX,
00902                                         (expptr)argsp, ENULL);
00903 
00904                 q->headblock.vtype = mtype;
00905                 rettype = f2field;
00906                 if(rettype == TYLONG)
00907                         rettype = tyint;
00908                 else if(rettype == TYUNKNOWN)
00909                         rettype = mtype;
00910                 return( mkconv(rettype, q) );
00911 
00912         default:
00913                 fatali("intrcall: bad intrgroup %d", f1field);
00914         }
00915 badnargs:
00916         errstr("bad number of arguments to intrinsic %s", np->fvarname);
00917         goto bad;
00918 
00919 badtype:
00920         errstr("bad argument type to intrinsic %s", np->fvarname);
00921 
00922 bad:
00923         return( errnode() );
00924 }

Here is the call graph for this function:

Here is the caller graph for this function:

int intrfunct ( char *  s  ) 

Definition at line 933 of file intr.c.

References errext(), i, intr_omit, INTREND, intrtab, noextflag, p, and packed.

Referenced by mkfunct(), and setintr().

00935 {
00936         register struct Intrblock *p;
00937         int i;
00938         extern int intr_omit;
00939 
00940         for(p = intrtab; p->intrval.intrgroup!=INTREND ; ++p)
00941         {
00942                 if( !strcmp(s, p->intrfname) )
00943                 {
00944                         if (i = p->intrval.extflag) {
00945                                 if (i & intr_omit)
00946                                         return 0;
00947                                 if (noextflag)
00948                                         errext(s);
00949                                 }
00950                         packed.bits.f1 = p->intrval.intrgroup;
00951                         packed.bits.f2 = p->intrval.intrstuff;
00952                         packed.bits.f3 = p->intrval.intrno;
00953                         packed.bits.f4 = p->intrval.dblcmplx;
00954                         return(packed.ijunk);
00955                 }
00956         }
00957 
00958         return(0);
00959 }

Here is the call graph for this function:

Here is the caller graph for this function:

void r8fix ( Void   ) 

Definition at line 428 of file intr.c.

References I, INTRGEN, intrtab, S, TYCOMPLEX, TYDCOMPLEX, TYDREAL, and TYREAL.

Referenced by set_externs().

00429 {
00430         register struct Intrblock *I;
00431         register struct Specblock *S;
00432 
00433         for(I = intrtab; I->intrfname[0]; I++)
00434                 if (I->intrval.intrgroup != INTRGEN)
00435                     switch(I->intrval.intrstuff) {
00436                         case TYREAL:
00437                                 I->intrval.intrstuff = TYDREAL;
00438                                 I->intrval.intrno = I->intrval.dblintrno;
00439                                 break;
00440                         case TYCOMPLEX:
00441                                 I->intrval.intrstuff = TYDCOMPLEX;
00442                                 I->intrval.intrno = I->intrval.dblintrno;
00443                                 I->intrval.dblcmplx = 1;
00444                         }
00445 
00446         for(S = spectab; S->atype; S++)
00447             switch(S->atype) {
00448                 case TYCOMPLEX:
00449                         S->atype = TYDCOMPLEX;
00450                         if (S->rtype == TYREAL)
00451                                 S->rtype = TYDREAL;
00452                         else if (S->rtype == TYCOMPLEX)
00453                                 S->rtype = TYDCOMPLEX;
00454                         switch(S->spxname[0]) {
00455                                 case 'r':
00456                                         S->spxname[0] = 'd';
00457                                         break;
00458                                 case 'c':
00459                                         S->spxname[0] = 'z';
00460                                         break;
00461                                 default:
00462                                         Fatal("r8fix bug");
00463                                 }
00464                         break;
00465                 case TYREAL:
00466                         S->atype = TYDREAL;
00467                         switch(S->rtype) {
00468                             case TYREAL:
00469                                 S->rtype = TYDREAL;
00470                                 if (S->spxname[0] != 'r')
00471                                         Fatal("r8fix bug");
00472                                 S->spxname[0] = 'd';
00473                             case TYDREAL:       /* d_prod */
00474                                 break;
00475 
00476                             case TYSHORT:
00477                                 if (!strcmp(S->spxname, "hr_expn"))
00478                                         S->spxname[1] = 'd';
00479                                 else if (!strcmp(S->spxname, "h_nint"))
00480                                         strcpy(S->spxname, "h_dnnt");
00481                                 else Fatal("r8fix bug");
00482                                 break;
00483 
00484                             case TYLONG:
00485                                 if (!strcmp(S->spxname, "ir_expn"))
00486                                         S->spxname[1] = 'd';
00487                                 else if (!strcmp(S->spxname, "i_nint"))
00488                                         strcpy(S->spxname, "i_dnnt");
00489                                 else Fatal("r8fix bug");
00490                                 break;
00491 
00492                             default:
00493                                 Fatal("r8fix bug");
00494                             }
00495                 }
00496         }

Here is the caller graph for this function:


Variable Documentation

struct Intrpacked bits

Definition at line 30 of file intr.c.

Referenced by best_allocation(), icbrt(), and XctNextItem().

char* callbyvalue[]

Initial value:

        {0,
        "sqrt",
        "exp",
        "log",
        "sin",
        "cos",
        "tan",
        "asin",
        "acos",
        "atan",
        "atan2",
        "sinh",
        "cosh",
        "tanh"
        }

Definition at line 410 of file intr.c.

Referenced by intrcall().

int ijunk

Definition at line 29 of file intr.c.

LOCAL struct Intrblock intrtab[ ]

Referenced by intrfunct(), and r8fix().

union { ... } packed

Referenced by intraddr(), intrcall(), and intrfunct().

LOCAL struct Specblock spectab[ ]

Referenced by intraddr(), and intrcall().


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