intex2c.c File Reference

#include <string.h>
#include <stdio.h>
#include "stack-c.h"

Include dependency graph for intex2c.c:

Go to the source code of this file.

Functions

int ex2c __PARAMS ((double *, int *, int *, double *, int *, int *, int *))
int intex2c (char *fname)
int ex2c (double *a, int *ma, int *na, double *b, int *mb, int *nb, int *err)


Function Documentation

int ex2c __PARAMS ( (double *, int *, int *, double *, int *, int *, int *)   ) 

external functions to be called through this interface

int ex2c ( double *  a,
int ma,
int na,
double*  b,
int mb,
int nb,
int err 
)

Definition at line 64 of file intex2c.c.

References i.

Referenced by intex2c().

00067 {
00068   int i;
00069   *err=0;
00070   for ( i= 0 ; i < (*ma)*(*na) ; i++) a[i] = 2*a[i] ;
00071   for ( i= 0 ; i < (*mb)*(*nb) ; i++) b[i] = 3*b[i] ;
00072   return(0);
00073 }

Here is the caller graph for this function:

int intex2c ( char*  fname  ) 

Definition at line 12 of file intex2c.c.

References CheckLhs, CheckRhs, CreateVar, ex2c(), get_optionals(), GetRhsVar, ierr, l, LhsVar, m, rhs_opts__::m, m1, n, rhs_opts__::n, n1, NULL, NumOpt, rhs_opts__::position, Rhs, stk, type, and rhs_opts__::type.

00014 { 
00015   int m1,n1,l1,ierr=0;
00017   static rhs_opts opts[]= { {-1,"v1","d",0,0,0},
00018                             {-1,"v2","d",0,0,0},
00019                             {-1,NULL,NULL,0,0}
00020   };
00021   int minrhs = 1,maxrhs = 1,minlhs=1,maxlhs=3,nopt,iopos;
00022 
00023   nopt = NumOpt();
00024 
00025   CheckRhs(minrhs,maxrhs+nopt) ;
00026   CheckLhs(minlhs,maxlhs) ;
00027 
00029 
00030   GetRhsVar( 1, "c", &m1, &n1, &l1);
00031   
00032   if ( get_optionals(fname,opts) == 0) return 0;
00033 
00035   iopos=Rhs ;
00036   if ( opts[0].position  == -1 ) {
00037     iopos++ ; opts[0].position = iopos;
00038     opts[0].m = opts[0].n = 1; opts[0].type = "d";
00039     CreateVar(opts[0].position,opts[0].type,&opts[0].m,&opts[0].n,&opts[0].l);
00040     *stk(opts[0].l)=99.0;
00041   }
00042   if ( opts[1].position  == -1 ) {
00043     iopos++ ; opts[1].position = iopos;
00044     opts[1].m = opts[1].n = 1; opts[1].type = "d";
00045     CreateVar(opts[1].position,opts[1].type,&opts[1].m,&opts[1].n,&opts[1].l);
00046     *stk(opts[1].l)= 3;
00047   }
00048 
00049   ex2c(stk(opts[0].l),&opts[0].m,&opts[0].n,
00050        stk(opts[1].l),&opts[1].m,&opts[1].n,&ierr);
00051 
00052   if (ierr > 0) 
00053     {
00054       Scierror(999,"%s: Internal error \r\n",fname);
00055       return 0;
00056     }
00058   LhsVar(1) = 1;
00059   LhsVar(2) = opts[0].position;
00060   LhsVar(3) = opts[1].position;
00061   return 0;
00062 }

Here is the call graph for this function:


Generated on Sun Mar 4 16:07:50 2007 for Scilab [trunk] by  doxygen 1.5.1