warnings + initialize values
Allan CORNET [Mon, 29 Jun 2009 14:54:05 +0000 (16:54 +0200)]
111 files changed:
scilab/modules/scicos_blocks/src/c/absblk.c
scilab/modules/scicos_blocks/src/c/absolute_value.c
scilab/modules/scicos_blocks/src/c/acos_blk.c
scilab/modules/scicos_blocks/src/c/acosh_blk.c
scilab/modules/scicos_blocks/src/c/asin_blk.c
scilab/modules/scicos_blocks/src/c/asinh_blk.c
scilab/modules/scicos_blocks/src/c/assignment.c
scilab/modules/scicos_blocks/src/c/atan_blk.c
scilab/modules/scicos_blocks/src/c/atanh_blk.c
scilab/modules/scicos_blocks/src/c/automat.c
scilab/modules/scicos_blocks/src/c/backlash.c
scilab/modules/scicos_blocks/src/c/bit_clear_16.c
scilab/modules/scicos_blocks/src/c/bit_clear_32.c
scilab/modules/scicos_blocks/src/c/bit_clear_8.c
scilab/modules/scicos_blocks/src/c/bit_set_16.c
scilab/modules/scicos_blocks/src/c/bit_set_8.c
scilab/modules/scicos_blocks/src/c/bounce_ball.c
scilab/modules/scicos_blocks/src/c/bouncexy.c
scilab/modules/scicos_blocks/src/c/canimxy.c
scilab/modules/scicos_blocks/src/c/canimxy3d.c
scilab/modules/scicos_blocks/src/c/cevscpe.c
scilab/modules/scicos_blocks/src/c/cfscope.c
scilab/modules/scicos_blocks/src/c/cmat3d.c
scilab/modules/scicos_blocks/src/c/cmatview.c
scilab/modules/scicos_blocks/src/c/cmscope.c
scilab/modules/scicos_blocks/src/c/constraint_c.c
scilab/modules/scicos_blocks/src/c/convert.c
scilab/modules/scicos_blocks/src/c/cos_blk.c
scilab/modules/scicos_blocks/src/c/cosblk.c
scilab/modules/scicos_blocks/src/c/cosh_blk.c
scilab/modules/scicos_blocks/src/c/counter.c
scilab/modules/scicos_blocks/src/c/cscope.c
scilab/modules/scicos_blocks/src/c/cscopxy.c
scilab/modules/scicos_blocks/src/c/cscopxy3d.c
scilab/modules/scicos_blocks/src/c/csslti4.c
scilab/modules/scicos_blocks/src/c/cstblk4_m.c
scilab/modules/scicos_blocks/src/c/cumsum_c.c
scilab/modules/scicos_blocks/src/c/cumsum_m.c
scilab/modules/scicos_blocks/src/c/cumsum_r.c
scilab/modules/scicos_blocks/src/c/cumsumz_c.c
scilab/modules/scicos_blocks/src/c/cumsumz_m.c
scilab/modules/scicos_blocks/src/c/cumsumz_r.c
scilab/modules/scicos_blocks/src/c/curve_c.c
scilab/modules/scicos_blocks/src/c/dband.c
scilab/modules/scicos_blocks/src/c/deadband.c
scilab/modules/scicos_blocks/src/c/delay4_i16.c
scilab/modules/scicos_blocks/src/c/delay4_i32.c
scilab/modules/scicos_blocks/src/c/delay4_i8.c
scilab/modules/scicos_blocks/src/c/delay4_ui16.c
scilab/modules/scicos_blocks/src/c/delay4_ui32.c
scilab/modules/scicos_blocks/src/c/delay4_ui8.c
scilab/modules/scicos_blocks/src/c/deriv.c
scilab/modules/scicos_blocks/src/c/diffblk_c.c
scilab/modules/scicos_blocks/src/c/dmmul.c
scilab/modules/scicos_blocks/src/c/dmmul1.c
scilab/modules/scicos_blocks/src/c/dollar4.c
scilab/modules/scicos_blocks/src/c/dollar4_m.c
scilab/modules/scicos_blocks/src/c/dsslti4.c
scilab/modules/scicos_blocks/src/c/evaluate_expr.c
scilab/modules/scicos_blocks/src/c/evtdly4.c
scilab/modules/scicos_blocks/src/c/evtvardly.c
scilab/modules/scicos_blocks/src/c/expblk_m.c
scilab/modules/scicos_blocks/src/c/extdiag.c
scilab/modules/scicos_blocks/src/c/extdiagz.c
scilab/modules/scicos_blocks/src/c/extract.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_LH.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_LSB.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_MSB0.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_MSB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_RB0.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_RB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_UH0.c
scilab/modules/scicos_blocks/src/c/extract_bit_16_UH1.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_LH.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_LSB.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_MSB0.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_MSB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_RB0.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_RB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_UH0.c
scilab/modules/scicos_blocks/src/c/extract_bit_32_UH1.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_LH.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_LSB.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_MSB0.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_MSB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_RB0.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_RB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_UH0.c
scilab/modules/scicos_blocks/src/c/extract_bit_8_UH1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u16_MSB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u16_RB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u16_UH1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u32_MSB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u32_RB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u32_UH1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u8_MSB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u8_RB1.c
scilab/modules/scicos_blocks/src/c/extract_bit_u8_UH1.c
scilab/modules/scicos_blocks/src/c/extractor.c
scilab/modules/scicos_blocks/src/c/extractz.c
scilab/modules/scicos_blocks/src/c/exttril.c
scilab/modules/scicos_blocks/src/c/exttrilz.c
scilab/modules/scicos_blocks/src/c/exttriu.c
scilab/modules/scicos_blocks/src/c/exttriuz.c
scilab/modules/scicos_blocks/src/c/foriterator.c
scilab/modules/scicos_blocks/src/c/fromws_c.c
scilab/modules/scicos_blocks/src/c/gainblk.c
scilab/modules/scicos_blocks/src/c/gainblk_i16e.c
scilab/modules/scicos_blocks/src/c/gainblk_i16n.c
scilab/modules/scicos_blocks/src/c/gainblk_i16s.c
scilab/modules/scicos_blocks/src/c/gainblk_i32e.c

index ef419b8..e204fc2 100644 (file)
@@ -39,7 +39,7 @@ void absblk( flag, nevprt, t, xd, x, nx, z, nz, tvec,
              int *flag, *nevprt,*nx,*nz,*nrpar, *ipar, *nipar,*ntvec,*nu,*ny;
              double *t, *xd, *x, *z, *tvec, *rpar, *u, *y;
 {
-  int i;
+  int i = 0;
   for (i = 0 ; i <  *nu ; ++i ) y[i] = Abs(u[i]);
 } 
 /*--------------------------------------------------------------------------*/ 
index 665e160..9d5f286 100644 (file)
@@ -24,7 +24,7 @@
 /*--------------------------------------------------------------------------*/ 
 void  absolute_value(scicos_block *block,int flag)
 {
-  int i,j;
+  int i = 0,j = 0;
   if (flag==1){
     if( block->ng>0){
       for(i=0;i<block->insz[0];++i){
index 6074251..4cdf4b7 100644 (file)
@@ -24,7 +24,7 @@
 /*--------------------------------------------------------------------------*/ 
 void acos_blk(scicos_block *block,int flag)
 {
-  int j;
+  int j = 0;
   if(flag==1){
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=acos(block->inptr[0][j]);
index e328bfb..e6fb456 100644 (file)
@@ -28,7 +28,7 @@ extern double acosh(double x);
 /*--------------------------------------------------------------------------*/ 
 void acosh_blk(scicos_block *block,int flag)
 {
-  int j;
+  int j = 0;
   if(flag==1){
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=acosh(block->inptr[0][j]);
index 9a9f405..ff6604b 100644 (file)
@@ -24,7 +24,7 @@
 /*--------------------------------------------------------------------------*/ 
 void asin_blk(scicos_block *block,int flag)
 {
-  int j;
+  int j = 0;
   if(flag==1){
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=asin(block->inptr[0][j]);
index b3f9c8d..49198f0 100644 (file)
@@ -28,7 +28,7 @@ extern double asinh(double x);
 /*--------------------------------------------------------------------------*/ 
 void asinh_blk(scicos_block *block,int flag)
 {
-  int j;
+  int j = 0;
   if(flag==1){
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=asinh(block->inptr[0][j]);
index 876b3f9..d569a9c 100644 (file)
 #include <stdio.h>
 #include <memory.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void assignment(scicos_block *block,int flag)
 {
-  int my,ny,so;
-  double *out0;
+  int my = 0,ny = 0,so = 0;
+  double *out0 = NULL;
   my=GetOutPortRows(block,1);
   ny=GetOutPortCols(block,1);
   out0=GetRealOparPtrs(block,6);
index ea26758..81b2eb0 100644 (file)
@@ -24,7 +24,7 @@
 /*--------------------------------------------------------------------------*/ 
 void atan_blk(scicos_block *block,int flag)
 {
-  int j;
+  int j = 0;
   if(flag==1){
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=atan(block->inptr[0][j]);
index 6a81fa6..1e29e6a 100644 (file)
@@ -28,7 +28,7 @@ extern double atanh(double x);
 /*--------------------------------------------------------------------------*/ 
 void atanh_blk(scicos_block *block,int flag)
 {
-  int j;
+  int j = 0;
   if(flag==1){
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=atanh(block->inptr[0][j]);
index 87363cd..2ece699 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
 #include "localization.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /* A swithcing mechansim for building hybrid automata */
 /* Masoud Najafi, 2007, INRIA */
 
 void automat(scicos_block *block,int flag)
 {
-  double * y0, *y1, *ui;
-  double* g=block->g;
-  double* x=block->x;
-  double* xd=block->xd;
-  double* res=block->res; 
-  void**   work=block->work;
-  double* rpar=block->rpar;
-  double* evout=block->evout;
+  double *y0 = NULL, *y1 = NULL, *ui = NULL;
+  double* g = block->g;
+  double* x = block->x;
+  double* xd = block->xd;
+  double* res = block->res; 
+  void**   work = block->work;
+  double* rpar = block->rpar;
+  double* evout = block->evout;
 
-  int* ipar=block->ipar;
-  int* jroot=block->jroot;
-  int  nevprt=block->nevprt;
-  int* insz=block->insz;
-  int ng=block->ng;
+  int* ipar = block->ipar;
+  int* jroot = block->jroot;
+  int  nevprt = block->nevprt;
+  int* insz = block->insz;
+  int ng = block->ng;
 
-  int* Mode;
-  int  NMode, NX, Minitial,i,j,k,Mi,Mf,indice;
-  int* property=GetXpropPtrs(block);
-  int* iparXp;
-  int* iparCx;
-  double* rparX0;
-  int test;
-  NMode=ipar[0];
-  Minitial=ipar[1];
-  NX=ipar[2];
-  iparXp=ipar+3;
-  iparCx=iparXp+NX*NMode;
-  rparX0=rpar;
+  int* Mode = NULL;
+  int  NMode = 0, NX = 0, Minitial = 0,i = 0,j = 0,k = 0,Mi = 0,Mf = 0,indice = 0;
+  int* property = GetXpropPtrs(block);
+  int* iparXp = NULL;
+  int* iparCx = NULL;
+  double* rparX0 = NULL;
+  int test = 0;
+  NMode = ipar[0];
+  Minitial = ipar[1];
+  NX = ipar[2];
+  iparXp = ipar+3;
+  iparCx = iparXp+NX*NMode;
+  rparX0 = rpar;
 
 
   if (flag ==4){/*----------------------------------------------------------*/
index b6e384d..cdcc601 100644 (file)
@@ -25,7 +25,7 @@
 /*--------------------------------------------------------------------------*/ 
 void backlash(scicos_block *block,int flag)
 { 
-  double* rw,t;
+  double* rw = NULL,t  = 0.;
   if (flag == 4){/* the workspace is used to store previous values */
     if ((*block->work=  scicos_malloc(sizeof(double)* 4))== NULL ) {
       set_block_error(-16);
index 1347de5..7d5f2ab 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void bit_clear_16(scicos_block *block,int flag)
 {
-  int m,n,i;
-  short *opar;
-  short *u,*y;
+  int m = 0,n = 0,i = 0;
+  short *opar = NULL;
+  short *u = NULL,*y = NULL;
+
   m=GetInPortRows(block,1);
   n=GetOutPortCols(block,1);
   opar=Getint16OparPtrs(block,1);
index c189884..e980f13 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void bit_clear_32(scicos_block *block,int flag)
 {
-  int n,m,i;
-  long *opar;
-  long *u,*y;
+  int n = 0,m = 0,i = 0;
+  long *opar = NULL;
+  long *u = NULL,*y = NULL;
   opar=Getint32OparPtrs(block,1);
   u=Getint32InPortPtrs(block,1);
   y=Getint32OutPortPtrs(block,1);
index 0ef8aa6..c3570d6 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void bit_clear_8(scicos_block *block,int flag)
 {
-  int n,m,i;
-  char *opar;
-  char *u,*y;
-  opar=Getint8OparPtrs(block,1);
-  u=Getint8InPortPtrs(block,1);
-  y=Getint8OutPortPtrs(block,1);
-  n=GetInPortCols(block,1);
-  m=GetInPortRows(block,1);
+  int n = 0,m = 0,i = 0;
+  char *opar = NULL;
+  char *u = NULL,*y = NULL;
+  opar = Getint8OparPtrs(block,1);
+  u = Getint8InPortPtrs(block,1);
+  y = Getint8OutPortPtrs(block,1);
+  n = GetInPortCols(block,1);
+  m = GetInPortRows(block,1);
   for (i=0;i<m*n;i++) *(y+i)=((*(u+i))&(*opar));
 }
 /*--------------------------------------------------------------------------*/ 
index cafb52b..b5a60d4 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void bit_set_16(scicos_block *block,int flag)
 {
-  int n,m,i;
-  short *opar;
-  short *u,*y;
+  int n = 0, m = 0, i = 0;
+  short *opar = NULL;
+  short *u = NULL,*y = NULL;
+
   opar=Getint16OparPtrs(block,1);
   u=Getint16InPortPtrs(block,1);
   y=Getint16OutPortPtrs(block,1);
   n=GetInPortCols(block,1);
   m=GetInPortRows(block,1);
+
   for (i=0;i<m*n;i++) *(y+i)=((*(u+i))|(*opar));
 }
 /*--------------------------------------------------------------------------*/ 
index b8bb8e7..c35116d 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void bit_set_8(scicos_block *block,int flag)
 {
-  int n,m,i;
-  char *opar;
-  char *u,*y;
+  int n = 0,m = 0,i = 0;
+  char *opar = NULL;
+  char *u = NULL,*y = NULL;
   opar=Getint8OparPtrs(block,1);
   u=Getint8InPortPtrs(block,1);
   y=Getint8OutPortPtrs(block,1);
index 4ec6b6b..d2472c9 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void bounce_ball(scicos_block *block,int flag)
 {
-
-     int nevprt,nx,*ipar;
-     int *outsz;
-     double *x,*xd,*rpar;
-     double *g;
-     int ng;
-     int *jroot;
-     
+  int nevprt = 0,nx = 0,*ipar = NULL;
+  int *outsz = NULL;
+  double *x = NULL,*xd = NULL,*rpar = NULL;
+  double *g = NULL;
+  int ng = 0;
+  int *jroot = NULL;
      
-  int i1;
-  double d1, d2, d3;
+  int i1 = NULL;
+  double d1 = 0., d2 = 0., d3 = 0.;
   
-  static double a, b, c;
-  static int i, j, k, n;
-  static double s1, s2, s3, s4, xsi,*y1,*y2;
+  static double a = 0., b = 0., c = 0.;
+  static int i = 0, j = 0, k = 0, n = 0;
+  static double s1 = 0., s2 = 0., s3 = 0., s4 = 0., xsi = 0.,*y1 = NULL,*y2 = NULL;
   
   /*     Scicos block simulator */
   /*     bouncing ball */
index ea35e50..6a046dc 100644 (file)
@@ -36,6 +36,7 @@
 #include "scicos_block4.h"
 #include "ObjectStructure.h"
 #include "DrawingBridge.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn bouncexy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
@@ -44,18 +45,18 @@ void bouncexy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstd
 {
   scoGraphicalObject pAxes;
   scoGraphicalObject pTemp;
-  double * z;
-  double *rpar;
-  int *ipar, nipar;  
-  int i,j;
-  int dimension;
-  double ymin, ymax, xmin, xmax;
-  int win;
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
-  int * colors;
-  int imode;
-  double * size_balls;
+  double * z = NULL;
+  double *rpar = NULL;
+  int *ipar = NULL, nipar = 0;  
+  int i = 0,j = 0;
+  int dimension = 0;
+  double ymin = 0., ymax = 0., xmin = 0., xmax = 0.;
+  int win = 0;
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
+  int * colors = NULL;
+  int imode = 0;
+  double * size_balls = NULL;
   double radius_max;
 
   /*Retrieving Parameters*/
@@ -131,13 +132,13 @@ void bouncexy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstd
 */
 void bouncexy(scicos_block * block,int flag)
 {
-  ScopeMemory * pScopeMemory;
+  ScopeMemory * pScopeMemory = NULL;
   scoGraphicalObject pShortDraw;
-  double * z;
-  double t;
-  int i;
-  double * u1, *u2;
-  double * size_balls;
+  double * z = NULL;
+  double t = 0.;
+  int i = 0;
+  double * u1 = NULL, *u2 = NULL;
+  double * size_balls = NULL;
   switch(flag) 
     {
     case Initialization:
index 2b634f6..9fb7940 100755 (executable)
@@ -36,6 +36,7 @@
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
 #include "DrawingBridge.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn canimxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 void canimxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
   /* Declarations*/
-  int i;
-  int gomme_color; //As usual
-  int * ipar; //Integer Parameters
-  int color_flag; //Flag on Color
+  int i = 0;
+  int gomme_color = 0; //As usual
+  int * ipar = NULL; //Integer Parameters
+  int color_flag = 0; //Flag on Color
   int color[2];
-  int line_size;
-  int animed;
-  int win; //Windows ID : To give a name to the window
-  int buffer_size; //Buffer Size
+  int line_size = 0;
+  int animed = 0;
+  int win = 0; //Windows ID : To give a name to the window
+  int buffer_size = 0; //Buffer Size
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
-  int nipar;
-  double * rpar; //Reals parameters
-  double xmin, xmax, ymin, ymax; //Ymin and Ymax are vectors here
+  int nipar = 0;
+  double * rpar = NULL; //Reals parameters
+  double xmin = 0., xmax = 0., ymin = 0., ymax = 0.; //Ymin and Ymax are vectors here
   scoGraphicalObject Pinceau; //Pointer to each polyline of each axes
   scoGraphicalObject Gomme; //Pointer to each polyline of each axes
   scoGraphicalObject Trait; //Pointer to each trache of each axes
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
   int dimension = 2;
-  int nbr_curves;
-  char *label;
+  int nbr_curves = 0;
+  char *label = NULL;
 
   ipar = GetIparPtrs(block);
   nipar = GetNipar(block);
@@ -202,10 +203,10 @@ void canimxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdr
 void canimxy(scicos_block * block, int flag)
 {
   /*Declarations*/
-  ScopeMemory * pScopeMemory;
-  double *u1,*u2;
+  ScopeMemory * pScopeMemory = NULL;
+  double *u1 = NULL,*u2 = NULL;
   scoGraphicalObject pLongDraw;
-  int i;
+  int i = 0;
   /* State Machine Control */
   switch(flag)
     {
index fa5092d..d43534f 100644 (file)
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
 #include "DrawingBridge.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn canimxy3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 */
 void canimxy3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
-  int i; //As usual
-  int * ipar; //Integer Parameters
-  int color_number; //Flag on Color
-  int * color;
-  int * line_size;
-  int nbr_curves;
-  int animed;
-  int win; //Windows ID : To give a name to the window
-  int buffer_size; //Buffer Size
+  int i = 0; //As usual
+  int * ipar = NULL; //Integer Parameters
+  int color_number = 0; //Flag on Color
+  int * color = NULL;
+  int * line_size = NULL;
+  int nbr_curves = 0;
+  int animed = 0;
+  int win = 0; //Windows ID : To give a name to the window
+  int buffer_size = 0; //Buffer Size
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
-  int nipar;
-  double * rpar; //Reals parameters
-  double xmin, xmax, ymin, ymax, zmin, zmax,alpha,theta; //Ymin and Ymax are vectors here
+  int nipar = 0;
+  double * rpar = NULL; //Reals parameters
+  double xmin = 0., xmax = 0., ymin = 0., ymax = 0., zmin = 0., zmax = 0.,alpha = 0.,theta = 0.; //Ymin and Ymax are vectors here
   scoGraphicalObject Pinceau; //Pointer to each polyline of each axes
   scoGraphicalObject Gomme; //Pointer to each polyline of each axes
   scoGraphicalObject Trait; //Pointer to each trache of each axes
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
   int dimension = 3;
-  int gomme_color;
+  int gomme_color = 0;
   int size=0;
-  char *label;
+  char *label = NULL;
 
   ipar = GetIparPtrs(block);
   nipar = GetNipar(block);
@@ -207,9 +208,9 @@ void canimxy3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int first
 void canimxy3d(scicos_block * block, int flag)
 {
   /* Declarations*/
-  double *u1,*u2,*u3;
-  int i;
-  ScopeMemory * pScopeMemory;
+  double *u1 = NULL,*u2 = NULL,*u3 = NULL;
+  int i = 0;
+  ScopeMemory * pScopeMemory = NULL;
   scoGraphicalObject pLongDraw;
   /* State Machine Control */
   switch(flag)
index 2f62d29..e36af96 100755 (executable)
@@ -37,6 +37,7 @@
 #include "scicos_block4.h"
 #include "DrawingBridge.h"
 #include "SetJavaProperty.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cscopxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
@@ -45,21 +46,21 @@ void cevscpe_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdr
 {
   /* Declarations */
 
-  int nipar; //Number of elements in ipar vector
+  int nipar = 0; //Number of elements in ipar vector
   int i; //As usual
-  int * ipar;
-  double * rpar; //Integer Parameter
-  int nbr_colors; //Number of colors and lines IS ALSO number of channels
-  int win; //To give a name to the window
-  int color_flag; //0/1 color flag -- NOT USED
-  int  * colors; //Begin at ipar[2] and has a measure of 8 max
+  int * ipar = NULL;
+  double * rpar = NULL; //Integer Parameter
+  int nbr_colors = 0; //Number of colors and lines IS ALSO number of channels
+  int win = 0; //To give a name to the window
+  int color_flag = 0; //0/1 color flag -- NOT USED
+  int  * colors = NULL; //Begin at ipar[2] and has a measure of 8 max
   int dimension = 2;
-  double period; //Refresh Period of the scope is a vector here
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
-  double xmin, xmax, ymin, ymax;
+  double period = 0.; //Refresh Period of the scope is a vector here
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
+  double xmin = 0., xmax = 0., ymin = 0., ymax = 0;
   int win_pos[2], win_dim[2];
-  char *label;
+  char *label = NULL;
 
   /* Initialization */
   ipar =  GetIparPtrs(block);
@@ -118,12 +119,12 @@ void cevscpe_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdr
 void cevscpe(scicos_block * block, int flag)
 {
 
-  ScopeMemory * pScopeMemory;
+  ScopeMemory * pScopeMemory = NULL;
   int nbseg = 0;
   int tab[20];
   scoGraphicalObject pShortDraw, pLongDraw;
-  int i;
-  double t;
+  int i = 0;
+  double t = 0;
 
   switch(flag)
     {
index c2bcdbe..f032328 100755 (executable)
@@ -35,6 +35,7 @@
 #include "scoGetProperty.h"
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 extern int C2F(getouttb)();
 /*--------------------------------------------------------------------------*/ 
@@ -44,24 +45,24 @@ extern int C2F(getouttb)();
 void cfscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
 
-  double *rpar;
-  int *ipar, nipar;   
+  double *rpar = NULL;
+  int *ipar = NULL, nipar = 0;   
 
-  double period;
-  int i;
-  int dimension;
-  double ymin, ymax, xmin, xmax;
-  int buffer_size;
+  double period = 0.;
+  int i = 0;
+  int dimension = 0;
+  double ymin = 0., ymax = 0., xmin = 0., xmax = 0.;
+  int buffer_size = 0;
   int win_pos[2];
   int win_dim[2];
-  int win;
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
-  double dt;
-  int nbr_of_curves;
-  int color_flag;
-  int * colors;
-  char *label;
+  int win = 0;
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
+  double dt = 0.;
+  int nbr_of_curves = 0;
+  int color_flag = 0;
+  int * colors = NULL;
+  char *label = NULL;
 
   rpar = GetRparPtrs(block);
   ipar = GetIparPtrs(block);
@@ -123,15 +124,15 @@ void cfscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdr
 */
 void cfscope(scicos_block * block,int flag)
 {
-  ScopeMemory * pScopeMemory;
+  ScopeMemory * pScopeMemory = NULL;
   scoGraphicalObject pShortDraw;
-  double * sortie;
-  int  *  index_of_view;
-  double t;
-  int nbr_of_curves;
-  int *ipar;
-  int i,j;
-  int NbrPtsShort;
+  double * sortie = NULL;
+  int  *  index_of_view = NULL;
+  double t  = 0.;
+  int nbr_of_curves = 0;
+  int *ipar = NULL;
+  int i = 0,j = 0;
+  int NbrPtsShort = 0;
 
   switch(flag)
     {
index 6cf85be..ea70441 100644 (file)
@@ -36,6 +36,7 @@
 #include "scoGetProperty.h"
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cmat3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 void cmat3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
   /*Declarations*/
-  int i; //As usual
-  int * ipar; //Integer Parameters
+  int i = 0; //As usual
+  int * ipar = NULL; //Integer Parameters
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
   int dimension = 3;
-  double * rpar; //Reals parameters
-  double  ymin, ymax; //Ymin and Ymax are vectors here
-  double  xmin, xmax;
-  double zmin, zmax;
-  int number_of_curves_by_subwin;
-  int number_of_subwin;
-  double * mat;
-  int size_mat;
-  int size_in_x;
-  int size_in_y;
-  char *label;
+  double * rpar = NULL; //Reals parameters
+  double  ymin = 0., ymax = 0.; //Ymin and Ymax are vectors here
+  double  xmin = 0., xmax = 0.;
+  double zmin = 0., zmax = 0.;
+  int number_of_curves_by_subwin = 0;
+  int number_of_subwin = 0;
+  double * mat = NULL;
+  int size_mat = 0;
+  int size_in_x = 0;
+  int size_in_y = 0;
+  char *label = NULL;
   scoGraphicalObject pShortDraw;
 
   /*Retrieve parameters from the scicos_model() which has been created thanks to the interfacing function*/
@@ -157,11 +158,11 @@ void cmat3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdra
 void cmat3d(scicos_block * block, int flag)
 {
   /* Declarations */
-  ScopeMemory * pScopeMemory;
+  ScopeMemory * pScopeMemory = NULL;
   scoGraphicalObject pShortDraw;
-  double * u1;
-  int i,j;
-  int dim_i, dim_j;
+  double * u1 = NULL;
+  int i = 0, j = 0;
+  int dim_i = 0, dim_j = 0;
  
   /* State Machine Control */
   switch(flag)
index 34b4321..45e848f 100644 (file)
 #include "scoGetProperty.h"
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cmatview_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 */
 void cmatview_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
-  int i; //As usual
-  int * ipar; //Integer Parameters
+  int i = 0; //As usual
+  int * ipar = NULL; //Integer Parameters
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
   int dimension = 2;
-  double * rpar; //Reals parameters
-  double  ymin, ymax; //Ymin and Ymax are vectors here
-  double  xmin, xmax;
-  int number_of_curves_by_subwin;
-  int number_of_subwin;
-  double * mat;
-  int size_mat;
-  char *label;
+  double * rpar = NULL; //Reals parameters
+  double  ymin = 0., ymax = 0.; //Ymin and Ymax are vectors here
+  double  xmin = 0., xmax = 0.;
+  int number_of_curves_by_subwin = 0;
+  int number_of_subwin = 0;
+  double * mat = NULL;
+  int size_mat = 0;
+  char *label = NULL;
 
   rpar = GetRparPtrs(block);
   ipar = GetIparPtrs(block);
@@ -107,13 +108,13 @@ void cmatview_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstd
 void cmatview(scicos_block * block, int flag)
 {
   /* Declarations */
-  ScopeMemory * pScopeMemory;
+  ScopeMemory * pScopeMemory = NULL;
   scoGraphicalObject pShortDraw;
-  double * u1;
-  double alpha,beta;
-  int i,j;
-  double * rpar;
-  int dim_i, dim_j;
+  double * u1 = NULL;
+  double alpha = 0.,beta = 0.;
+  int i = 0, j = 0;
+  double * rpar = NULL;
+  int dim_i = 0, dim_j = 0;
   /* Initializations and Allocations*/
   //Allocations are done here because there are dependent of some values presents below
  
index 65d92a7..c6803ce 100644 (file)
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
 #include "SetJavaProperty.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cmscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 */
 void cmscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
-  int i; //As usual
-  int * ipar; //Integer Parameters
-  int * colors; //Colors
-  int win; //Windows ID : To give a name to the window
-  int buffer_size; //Buffer Size
+  int i = 0; //As usual
+  int * ipar = NULL; //Integer Parameters
+  int * colors = NULL; //Colors
+  int win = 0; //Windows ID : To give a name to the window
+  int buffer_size = 0; //Buffer Size
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
-  int inherited_events;
-  int nipar;
+  int inherited_events = 0;
+  int nipar = 0;
   int dimension = 2;
-  double * rpar; //Reals parameters
-  double dt; //Time++
-  double * period; //Refresh Period of the scope is a vector here
-  double * ymin,* ymax; //Ymin and Ymax are vectors here
-  double * xmin, *xmax;
-  int nbr_period;
-  int * number_of_curves_by_subwin;
-  int number_of_subwin;
-  int nbr_total_curves;
-  char *label;
+  double * rpar = NULL; //Reals parameters
+  double dt = 0.; //Time++
+  double * period = NULL; //Refresh Period of the scope is a vector here
+  double * ymin = NULL,* ymax = NULL; //Ymin and Ymax are vectors here
+  double * xmin = NULL, *xmax = NULL;
+  int nbr_period = 0;
+  int * number_of_curves_by_subwin = NULL;
+  int number_of_subwin = 0;
+  int nbr_total_curves = 0;
+  char *label = NULL;
 
 
   rpar = GetRparPtrs(block);
@@ -159,14 +160,14 @@ void cmscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdr
 void cmscope(scicos_block * block, int flag)
 {
   /* Declarations */
-  ScopeMemory * pScopeMemory;
-  int NbrPtsShort;
-  double * u1;
-  double t; //get_scicos_time()
+  ScopeMemory * pScopeMemory = NULL;
+  int NbrPtsShort = 0;
+  double * u1 = NULL;
+  double t = 0.; //get_scicos_time()
   scoGraphicalObject pShortDraw;
-  int i,j;
+  int i = 0,j = 0;
 
-  double d_current_real_time ; 
+  double d_current_real_time = 0. ; 
 
   /* Initializations and Allocations*/
   //Allocations are done here because there are dependent of some values presents below
index bd13bba..fc449d2 100644 (file)
@@ -20,6 +20,7 @@
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /*     February 2008 */
 /* Scicos block simulator */
@@ -28,8 +29,8 @@
 /*--------------------------------------------------------------------------*/ 
 void constraint_c(scicos_block *block,int flag)
 {
-  double *y,*y2,*u;
-  int i;
+  double *y = NULL,*y2 = NULL,*u = NULL;
+  int i = 0;
   int* property=GetXpropPtrs(block);
 
     switch(flag)
index 889af62..e46e780 100644 (file)
 #include "scicos_block4.h"
 #include "sciprint.h"
 #include "localization.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void convert(scicos_block *block,int flag)
 {
- int m,n,i;
- int *ipar;
- double v,w,k;
+ int m = 0,n = 0,i = 0;
+ int *ipar = NULL;
+ double v = 0.,w = 0.,k = 0.;
  
  m=GetInPortRows(block,1);
  n=GetInPortCols(block,1);
@@ -39,16 +40,17 @@ void convert(scicos_block *block,int flag)
     {
      switch (*ipar){
            case 1:{ 
-                  void *u,*y;
+                  void *u = NULL,*y = NULL;
                   int so;
                   so=GetSizeOfOut(block,1);
-                  u=GetInPortPtrs(block,1);
-                  y=GetOutPortPtrs(block,1);
-                  memcpy(y,u,m*n*so);
-                  break;}
+          u=GetInPortPtrs(block,1);
+          y=GetOutPortPtrs(block,1);
+          memcpy(y,u,m*n*so);
+         break;
+                          }
            case 2:{
-                  double *u;
-                  long *y;
+                  double *u = NULL;
+                  long *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -62,8 +64,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(long)w;}
                   break;}
            case 3:{
-                  double *u;
-                  short *y;
+                  double *u = NULL;
+                  short *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -77,8 +79,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(short)w;}
                   break;}
            case 4:{
-                  double *u;
-                  char *y;
+                  double *u = NULL;
+                  char *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -92,8 +94,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(char)w;}
                   break;}
            case 5:{
-                  double *u;
-                  unsigned long *y;
+                  double *u = NULL;
+                  unsigned long *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -103,8 +105,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned long)w;}
                   break;}
            case 6:{
-                  double *u;
-                  unsigned short *y;
+                  double *u = NULL;
+                  unsigned short *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -114,8 +116,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned short)w;}
                   break;}
            case 7:{
-                  double *u;
-                  unsigned char *y;
+                  double *u = NULL;
+                  unsigned char *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -125,15 +127,15 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned char)w;}
                   break;}
            case 8:{
-                  long *u;
-                  double *y;
+                  long *u = NULL;
+                  double *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=GetRealOutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) y[i]=(double) u[i];
                   break;}
            case 9:{
-                  long *u;
-                  short *y;
+                  long *u = NULL;
+                  short *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -147,8 +149,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(short)w;}
                   break;}
            case 10:{
-                  long *u;
-                  char *y;
+                  long *u = NULL;
+                  char *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -162,8 +164,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(char)w;}
                   break;}
            case 11:{
-                  long *u;
-                  unsigned short *y;
+                  long *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -173,8 +175,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned short)w;}
                   break;}
            case 12:{
-                  long *u;
-                  unsigned char *y;
+                  long *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -184,23 +186,23 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned char)w;}
                   break;}
            case 13:{
-                  short *u;
-                  double *y;
+                  short *u = NULL;
+                  double *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=GetRealOutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) y[i]=(double) u[i];
                   break;}
            case 14:{
-                  short *u;
-                  long *y;
+                  short *u = NULL;
+                  long *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(long)u[i];}
                   break;}
            case 15:{
-                  short *u;
-                  char *y;
+                  short *u = NULL;
+                  char *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -214,16 +216,16 @@ void convert(scicos_block *block,int flag)
                         y[i]=(char)w;}
                   break;}
            case 16:{
-                  short *u;
-                  unsigned long *y;
+                  short *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(unsigned long)u[i];}
                   break;}
            case 17:{
-                  short *u;
-                  unsigned char *y;
+                  short *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -233,54 +235,54 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned char)w;}
                   break;}
            case 18:{
-                  char *u;
-                  double *y;
+                  char *u = NULL;
+                  double *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=GetRealOutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) y[i]=(double) u[i];
                   break;}
            case 19:{
-                  char *u;
-                  long *y;
+                  char *u = NULL;
+                  long *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(long)u[i];}
                   break;}
            case 20:{
-                  char *u;
-                  short *y;
+                  char *u = NULL;
+                  short *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(short)u[i];}
                   break;}
            case 21:{
-                  char *u;
-                  unsigned long *y;
+                  char *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(unsigned long)u[i];}
                   break;}
            case 22:{
-                  char *u;
-                  unsigned short *y;
+                  char *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(unsigned short)u[i];}
                   break;}
            case 23:{
-                  unsigned long *u;
-                  double *y;
+                  unsigned long *u = NULL;
+                  double *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=GetRealOutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) y[i]=(double) u[i];
                   break;}
            case 24:{
-                  unsigned long *u;
-                  short *y;
+                  unsigned long *u = NULL;
+                  short *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -293,8 +295,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(short)w;}
                   break;}
            case 25:{
-                  unsigned long *u;
-                  char *y;
+                  unsigned long *u = NULL;
+                  char *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -307,8 +309,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(char)w;}
                   break;}
            case 26:{
-                  unsigned long *u;
-                  unsigned short *y;
+                  unsigned long *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -318,8 +320,8 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned short)w;}
                   break;}
            case 27:{
-                  unsigned long *u;
-                  unsigned char *y;
+                  unsigned long *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -329,23 +331,23 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned char)w;}
                   break;}
            case 28:{
-                  unsigned short *u;
-                  double *y;
+                  unsigned short *u = NULL;
+                  double *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=GetRealOutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) y[i]=(double) u[i];
                   break;}
            case 29:{
-                  unsigned short *u;
-                  long *y;
+                  unsigned short *u = NULL;
+                  long *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(long)u[i];}
                   break;}
            case 30:{
-                  unsigned short *u;
-                  char *y;
+                  unsigned short *u = NULL;
+                  char *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -358,16 +360,16 @@ void convert(scicos_block *block,int flag)
                         y[i]=(char)w;}
                   break;}
            case 31:{
-                  unsigned short *u;
-                  unsigned long *y;
+                  unsigned short *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(unsigned long)u[i];}
                   break;}
            case 32:{
-                  unsigned short *u;
-                  unsigned char *y;
+                  unsigned short *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -377,47 +379,47 @@ void convert(scicos_block *block,int flag)
                         y[i]=(unsigned char)w;}
                   break;}
            case 33:{
-                  unsigned char *u;
-                  double *y;
+                  unsigned char *u = NULL;
+                  double *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=GetRealOutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) y[i]=(double) u[i];
                   break;}
            case 34:{
-                  unsigned char *u;
-                  long *y;
+                  unsigned char *u = NULL;
+                  long *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(long)u[i];}
                   break;}
            case 35:{
-                  unsigned char *u;
-                  short *y;
+                  unsigned char *u = NULL;
+                  short *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(short)u[i];}
                   break;}
            case 36:{
-                  unsigned char *u;
-                  unsigned long *y;
+                  unsigned char *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(unsigned long)u[i];}
                   break;}
            case 37:{
-                  unsigned char *u;
-                  unsigned short *y;
+                  unsigned char *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
                        {y[i]=(unsigned short)u[i];}
                   break;}
            case 38:{
-                  double *u;
-                  long *y;
+                  double *u = NULL;
+                  long *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -430,8 +432,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 39:{
-                  double *u;
-                  short *y;
+                  double *u = NULL;
+                  short *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -444,8 +446,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 40:{
-                  double *u;
-                  char *y;
+                  double *u = NULL;
+                  char *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -458,8 +460,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 41:{
-                  double *u;
-                  unsigned long *y;
+                  double *u = NULL;
+                  unsigned long *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -472,8 +474,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 42:{
-                  double *u;
-                  unsigned short *y;
+                  double *u = NULL;
+                  unsigned short *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -486,8 +488,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 43:{
-                  double *u;
-                  unsigned char *y;
+                  double *u = NULL;
+                  unsigned char *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -500,8 +502,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 44:{
-                  long *u;
-                  short *y;
+                  long *u = NULL;
+                  short *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -514,8 +516,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 45:{
-                  long *u;
-                  char *y;
+                  long *u = NULL;
+                  char *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -528,8 +530,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 46:{
-                  long *u;
-                  unsigned long *y;
+                  long *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -539,8 +541,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 47:{
-                  long *u;
-                  unsigned short *y;
+                  long *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -553,8 +555,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 48:{
-                  long *u;
-                  unsigned char *y;
+                  long *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -567,8 +569,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 49:{
-                  short *u;
-                  char *y;
+                  short *u = NULL;
+                  char *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -581,8 +583,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 50:{
-                  short *u;
-                  unsigned long *y;
+                  short *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -590,8 +592,8 @@ void convert(scicos_block *block,int flag)
                         else y[i]=(unsigned long)u[i];}
                   break;}
            case 51:{
-                  short *u;
-                  unsigned short *y;
+                  short *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -601,8 +603,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 52:{
-                  short *u;
-                  unsigned char *y;
+                  short *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -615,8 +617,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 53:{
-                  char *u;
-                  unsigned long *y;
+                  char *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -624,8 +626,8 @@ void convert(scicos_block *block,int flag)
                         else y[i]=(unsigned long)u[i];}
                   break;}
            case 54:{
-                  char *u;
-                  unsigned short *y;
+                  char *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -635,8 +637,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 55:{
-                  char *u;
-                  unsigned char *y;
+                  char *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -646,8 +648,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 56:{
-                  long *y;
-                  unsigned long *u;
+                  long *y = NULL;
+                  unsigned long *u = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -658,8 +660,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 57:{
-                  unsigned long *u;
-                  short *y;
+                  unsigned long *u = NULL;
+                  short *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -670,8 +672,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 58:{
-                  unsigned long *u;
-                  char *y;
+                  unsigned long *u = NULL;
+                  char *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -682,8 +684,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 59:{
-                  unsigned long *u;
-                  unsigned short *y;
+                  unsigned long *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -694,8 +696,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 60:{
-                  unsigned long *u;
-                  unsigned char *y;
+                  unsigned long *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -706,8 +708,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 61:{
-                  unsigned short *u;
-                  short *y;
+                  unsigned short *u = NULL;
+                  short *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -718,8 +720,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 62:{
-                  unsigned short *u;
-                  char *y;
+                  unsigned short *u = NULL;
+                  char *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -730,8 +732,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 63:{
-                  unsigned short *u;
-                  unsigned char *y;
+                  unsigned short *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -742,8 +744,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 64:{
-                  unsigned char *u;
-                  char *y;
+                  unsigned char *u = NULL;
+                  char *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -754,8 +756,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 65:{
-                  double *u;
-                  long *y;
+                  double *u = NULL;
+                  long *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -769,8 +771,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 66:{
-                  double *u;
-                  short *y;
+                  double *u = NULL;
+                  short *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -784,8 +786,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 67:{
-                  double *u;
-                  char *y;
+                  double *u = NULL;
+                  char *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -799,8 +801,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 68:{
-                  double *u;
-                  unsigned long *y;
+                  double *u = NULL;
+                  unsigned long *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -814,8 +816,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 69:{
-                  double *u;
-                  unsigned short *y;
+                  double *u = NULL;
+                  unsigned short *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -829,8 +831,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 70:{
-                  double *u;
-                  unsigned char *y;
+                  double *u = NULL;
+                  unsigned char *y = NULL;
                   u=GetRealInPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -844,8 +846,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 71:{
-                  long *u;
-                  short *y;
+                  long *u = NULL;
+                  short *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -859,8 +861,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 72:{
-                  long *u;
-                  char *y;
+                  long *u = NULL;
+                  char *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -874,8 +876,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 73:{
-                  long *u;
-                  unsigned long *y;
+                  long *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -888,8 +890,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 74:{
-                  long *u;
-                  unsigned short *y;
+                  long *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -903,8 +905,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 75:{
-                  long *u;
-                  unsigned char *y;
+                  long *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint32InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -918,8 +920,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 76:{
-                  short *u;
-                  char *y;
+                  short *u = NULL;
+                  char *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -933,8 +935,8 @@ void convert(scicos_block *block,int flag)
                       }
                   break;}
            case 77:{
-                  short *u;
-                  unsigned long *y;
+                  short *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -946,8 +948,8 @@ void convert(scicos_block *block,int flag)
                         else y[i]=(unsigned long)u[i];}
                   break;}
            case 78:{
-                  short *u;
-                  unsigned short *y;
+                  short *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -960,8 +962,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 79:{
-                  short *u;
-                  unsigned char *y;
+                  short *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint16InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -975,8 +977,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 80:{
-                  char *u;
-                  unsigned long *y;
+                  char *u = NULL;
+                  unsigned long *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint32OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -988,8 +990,8 @@ void convert(scicos_block *block,int flag)
                         else y[i]=(unsigned long)u[i];}
                   break;}
            case 81:{
-                  char *u;
-                  unsigned short *y;
+                  char *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint16OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -1002,8 +1004,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 82:{
-                  char *u;
-                  unsigned char *y;
+                  char *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getint8InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   for (i=0;i<m*n;i++) 
@@ -1016,8 +1018,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 83:{
-                  long *y;
-                  unsigned long *u;
+                  long *y = NULL;
+                  unsigned long *u = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint32OutPortPtrs(block,1);
                   k=pow(2,32);
@@ -1031,8 +1033,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 84:{
-                  unsigned long *u;
-                  short *y;
+                  unsigned long *u = NULL;
+                  short *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -1046,8 +1048,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 85:{
-                  unsigned long *u;
-                  char *y;
+                  unsigned long *u = NULL;
+                  char *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -1061,10 +1063,10 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 86:{
-                  unsigned long *u;
-                  unsigned short *y;
+                  unsigned long *u = NULL;
+                  unsigned short *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
-                  y=Getuint16OutPortPtrs(block,1);
+              y=Getuint16OutPortPtrs(block,1);
                   k=pow(2,16);
                   for (i=0;i<m*n;i++) 
                        {if (u[i]>(k/2-1))
@@ -1076,8 +1078,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 87:{
-                  unsigned long *u;
-                  unsigned char *y;
+                  unsigned long *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getuint32InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -1091,8 +1093,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 88:{
-                  unsigned short *u;
-                  short *y;
+                  unsigned short *u = NULL;
+                  short *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getint16OutPortPtrs(block,1);
                   k=pow(2,16);
@@ -1106,8 +1108,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 89:{
-                  unsigned short *u;
-                  char *y;
+                  unsigned short *u = NULL;
+                  char *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -1121,8 +1123,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 90:{
-                  unsigned short *u;
-                  unsigned char *y;
+                  unsigned short *u = NULL;
+                  unsigned char *y = NULL;
                   u=Getuint16InPortPtrs(block,1);
                   y=Getuint8OutPortPtrs(block,1);
                   k=pow(2,8);
@@ -1136,8 +1138,8 @@ void convert(scicos_block *block,int flag)
                        }
                   break;}
            case 91:{
-                  unsigned char *u;
-                  char *y;
+                  unsigned char *u = NULL;
+                  char *y = NULL;
                   u=Getuint8InPortPtrs(block,1);
                   y=Getint8OutPortPtrs(block,1);
                   k=pow(2,8);
index 56e97ac..22501b6 100644 (file)
@@ -24,8 +24,8 @@
 /*--------------------------------------------------------------------------*/ 
 void cos_blk(scicos_block *block,int flag)
 {
-  int j;
   if(flag==1){
+       int j = 0;
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=cos(block->inptr[0][j]);
     }
index c73e41a..9ebfef0 100644 (file)
@@ -39,7 +39,7 @@ void cosblk (flag, nevprt, t, xd, x, nx, z, nz, tvec,
              double *t, *xd, *x, *z, *tvec, *rpar, *u, *y;
 {
 
-  int i ;
+  int i  = 0;
   for ( i=0; i < *nu ; i++)     y[i]= cos(u[i]);
 }
 /*--------------------------------------------------------------------------*/ 
index 73a2174..17f2f0c 100644 (file)
@@ -24,8 +24,9 @@
 /*--------------------------------------------------------------------------*/ 
 void cosh_blk(scicos_block *block,int flag)
 {
-  int j;
+  
   if(flag==1){
+       int j = 0;
     for (j=0;j<block->insz[0];j++) {
       block->outptr[0][j]=cosh(block->inptr[0][j]);
     }
index 1bfc3cf..62c29a7 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void counter(scicos_block *block,int flag)
 {
-  double *y,*z;
-  int *ipar;
+  double *y = NULL,*z = NULL;
+  int *ipar = NULL;
   y=GetRealOutPortPtrs(block,1);
   z=GetDstate(block);
   ipar=GetIparPtrs(block);
index 718efde..f5a3948 100644 (file)
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
 #include "SetJavaProperty.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 */
 void cscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
-  int i;
-  double *rpar;
-  int *ipar, nipar;
-  double period;
-  int dimension;
-  double ymin, ymax, xmin, xmax;
-  int buffer_size;
+  int i = 0;
+  double *rpar = NULL;
+  int *ipar = NULL, nipar = 0;
+  double period = 0.;
+  int dimension = 0;
+  double ymin = 0., ymax = 0., xmin = 0., xmax = 0.;
+  int buffer_size = 0;
   int win_pos[2];
   int win_dim[2];
-  int win;
-  int number_of_subwin;
+  int win = 0;
+  int number_of_subwin = 0;
   int number_of_curves_by_subwin[1];
-  int * colors;
-  char *label;
+  int * colors = NULL;
+  char *label = NULL;
 
   /*Retrieving Parameters*/
   rpar = GetRparPtrs(block);
@@ -122,14 +123,14 @@ void cscope_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdra
 */
 void cscope(scicos_block * block,int flag)
 {
-  ScopeMemory * pScopeMemory;
-  int i;
-  double t;
-  int NbrPtsShort;
-  double * u1;
+  ScopeMemory * pScopeMemory = NULL;
+  int i = 0;
+  double t = 0.;
+  int NbrPtsShort = 0;
+  double * u1 = NULL;
   scoGraphicalObject pShortDraw;
 
-  double d_current_real_time ; 
+  double d_current_real_time = 0.; 
 
   switch(flag) 
     {
index 375c7d2..9c55aed 100755 (executable)
 #include "scicos_block4.h"
 #include "DrawingBridge.h"
 #include "SetJavaProperty.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cscopxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 */
 void cscopxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
- int * ipar; //Integer Parameters
-  int color_flag; //Flag on Color
+  int * ipar = NULL; //Integer Parameters
+  int color_flag = 0; //Flag on Color
   int color[2];
-  int line_size;
-  int animed;
-  int win; //Windows ID : To give a name to the window
-  int buffer_size; //Buffer Size
+  int line_size = 0;
+  int animed = 0;
+  int win = 0; //Windows ID : To give a name to the window
+  int buffer_size = 0; //Buffer Size
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
-  int nipar;
-  double * rpar; //Reals parameters
-  double xmin, xmax, ymin, ymax; //Ymin and Ymax are vectors here
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
+  int nipar = 0;
+  double * rpar = NULL; //Reals parameters
+  double xmin = 0., xmax = 0., ymin = 0., ymax = 0.; //Ymin and Ymax are vectors here
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
   int dimension = 2;
-  int i;
-  char *label;
+  int i = 0;
+  char *label = NULL;
   scoGraphicalObject ShortDraw;
   scoGraphicalObject LongDraw;
 
@@ -123,11 +124,11 @@ void cscopxy_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdr
 void cscopxy(scicos_block * block, int flag)
 {
   /* Declarations*/
-  ScopeMemory * pScopeMemory;
-  double *u1,*u2;
+  ScopeMemory * pScopeMemory = NULL;
+  double *u1 = NULL,*u2 = NULL;
   scoGraphicalObject Pinceau; 
-  int NbrPtsShort;
-  int i;
+  int NbrPtsShort = 0;
+  int i = 0;
 
   /* State Machine Control */
   switch(flag)
index 3f471e0..609475d 100755 (executable)
 #include "scoSetProperty.h"
 #include "scicos_block4.h"
 #include "DrawingBridge.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 /** \fn cscopxy3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
     \brief Function to draw or redraw the window
 */
 void cscopxy3d_draw(scicos_block * block, ScopeMemory ** pScopeMemory, int firstdraw)
 {
-  int * ipar; //Integer Parameters
-  int color_number; //Flag on Color
-  int * color   ;
-  int * line_size;
-  int animed;
-  int win; //Windows ID : To give a name to the window
-  int buffer_size; //Buffer Size
+  int * ipar = NULL; //Integer Parameters
+  int color_number = 0; //Flag on Color
+  int * color =  0 ;
+  int * line_size = NULL;
+  int animed = 0;
+  int win = 0; //Windows ID : To give a name to the window
+  int buffer_size = 0; //Buffer Size
   int win_pos[2]; //Position of the Window
   int win_dim[2]; //Dimension of the Window
-  int nipar;
-  double * rpar; //Reals parameters
-  double xmin, xmax, ymin, ymax, zmin, zmax,alpha, theta; //Ymin and Ymax are vectors here
-  int number_of_subwin;
-  int number_of_curves_by_subwin;
+  int nipar = 0;
+  double * rpar = NULL; //Reals parameters
+  double xmin = 0.0, xmax = 0.0, ymin = 0.0, ymax = 0.0, zmin = 0.0, zmax = 0.0,alpha = 0.0, theta = 0.0; //Ymin and Ymax are vectors here
+  int number_of_subwin = 0;
+  int number_of_curves_by_subwin = 0;
   int dimension = 3;
-  int i;
-  int size=0;
-  char *label;
+  int i = 0;
+  int size = 0;
+  char *label = NULL;
   scoGraphicalObject ShortDraw;
   scoGraphicalObject LongDraw;
 
index fbd5f1f..dc400b3 100644 (file)
@@ -36,7 +36,7 @@ void csslti4(scicos_block *block,int flag)
       rpar(nx*nx+nx*nu+1:nx*nx+nx*nu+nx*ny)=C
       rpar(nx*nx+nx*nu+nx*ny+1:nx*nx+nx*nu+nx*ny+ny*nu)=D */
   
-  int un=1,lb,lc,ld;
+  int un=1,lb = 0,lc = 0,ld = 0;
   int nx=block->nx;
   double* x=block->x;
   double* xd=block->xd;
@@ -46,8 +46,8 @@ void csslti4(scicos_block *block,int flag)
   int* outsz=block->outsz;
   int* insz=block->insz;
   
-  lb=nx*nx;
-  lc=lb+nx*insz[0];
+  lb = nx * nx;
+  lc = lb + nx * insz[0];
   
   if (flag ==1 || flag ==6){
     /* y=c*x+d*u     */
index 8cd882d..18d6151 100644 (file)
@@ -22,6 +22,7 @@
 #include <memory.h>
 #include<stdio.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void cstblk4_m(scicos_block *block,int flag)
 { 
@@ -30,9 +31,9 @@ void cstblk4_m(scicos_block *block,int flag)
   Scicos block simulator
   output a vector of constants out(i)=opar(i)
   opar(1:nopar) : given constants */
-  int nopar,mo,no,so;
-  void *y;
-  void *opar;
+  int nopar = 0,mo = 0,no = 0,so = 0;
+  void *y = NULL;
+  void *opar = NULL;
   nopar = GetNopar(block);
   y=GetOutPortPtrs(block,1);
   opar=GetOparPtrs(block,1);
index e7d1c53..7bb4bb7 100644 (file)
@@ -23,9 +23,9 @@
 /*--------------------------------------------------------------------------*/ 
 void cumsum_c(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  int nu,mu,i,j,ij;
+  double *u = NULL;
+  double *y = NULL;
+  int nu = 0,mu = 0, i = 0,j = 0, ij = 0;
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
 
index 9a3b1b3..d4b0582 100644 (file)
@@ -23,9 +23,9 @@
 /*--------------------------------------------------------------------------*/ 
 void cumsum_m(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  int nu,mu,j;
+  double *u = NULL;
+  double *y = NULL;
+  int nu = 0,mu = 0,j = 0;
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
 
index 6a91b36..0fc27c1 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void cumsum_r(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  int nu,mu,i,j,ij;
+  double *u = NULL;
+  double *y = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
+
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
 
index 3e56b1e..bc10571 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void cumsumz_c(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
-  int nu,mu,i,j,ij;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
   ur=GetRealInPortPtrs(block,1);
index 54cf9d5..1fe85be 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void cumsumz_m(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
-  int nu,mu,j;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
+  int nu = 0,mu = 0,j = 0;
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
   ur=GetRealInPortPtrs(block,1);
@@ -37,7 +38,9 @@ void cumsumz_m(scicos_block *block,int flag)
   yr[0]=ur[0];
   yi[0]=ui[0];
   for(j=1;j<mu*nu;j++)
-       {yr[j]=ur[j]+yr[j-1];
-       yi[j]=ui[j]+yi[j-1];}
+  {
+         yr[j]=ur[j]+yr[j-1];
+      yi[j]=ui[j]+yi[j-1];
+  }
 }
 /*--------------------------------------------------------------------------*/ 
index 3989d64..bd28691 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void cumsumz_r(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
-  int nu,mu,i,j,ij;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
+
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
   ur=GetRealInPortPtrs(block,1);
index 75dddf9..121099e 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 void curve_c(scicos_block *block,int flag)
 {
-  double t,a,b,c,y1,y2,t1,t2;
-  int *ind,i,inow;
-  double *y;
-  double  d1,d2,h, dh, ddh, dddh;
-
+  double t = 0.,a = 0.,b = 0.,c = 0.,y1 = 0.,y2 = 0.,t1 = 0.,t2 = 0.;
+  int *ind = NULL, i = 0,inow = 0;
+  double *y = NULL;
+  double  d1 = 0.,d2 = 0.,h = 0., dh = 0., ddh = 0., dddh = 0.;
   
   switch(flag)
   {
index 1a151c8..3f4383d 100644 (file)
@@ -42,7 +42,7 @@ void dband (flag, nevprt, t, xd, x, nx, z, nz, tvec,
             int *flag, *nevprt,*nx,*nz,*nrpar, *ipar, *nipar,*ntvec,*nu,*ny;
             double *t, *xd, *x, *z, *tvec, *rpar, *u, *y;
 {
-  int i;
+  int i = 0;
   
   for ( i=0 ; i < *nu ; i++ ) 
     {
index 0e69c73..f89c381 100644 (file)
@@ -23,7 +23,8 @@
 #include "scicos_block.h"
 /*--------------------------------------------------------------------------*/ 
 void deadband(scicos_block *block,int flag)
-{/* rpar[0]:upper limit,  rpar[1]:lower limit */
+{
+       /* rpar[0]:upper limit,  rpar[1]:lower limit */
   if (flag==1){
     if (get_phase_simulation()==1||block->ng==0) {
       if (*block->inptr[0]>=block->rpar[0]){
index aa2da1c..9536941 100644 (file)
@@ -20,6 +20,7 @@
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void delay4_i16(scicos_block *block,int flag)
 {
@@ -28,9 +29,9 @@ void delay4_i16(scicos_block *block,int flag)
      Scicos block simulator
      Ouputs nx*dt delayed input */
 
-  short *y,*u,*oz;
-  int nz,mz;
-  int i;
+  short *y = NULL,*u = NULL,*oz = NULL;
+  int nz = 0,mz = 0;
+  int i = 0;
   
   u=Getint16InPortPtrs(block,1);
   y=Getint16OutPortPtrs(block,1);
index cd0053e..d617134 100644 (file)
@@ -20,6 +20,7 @@
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void delay4_i32(scicos_block *block,int flag)
 {
@@ -28,9 +29,9 @@ void delay4_i32(scicos_block *block,int flag)
      Scicos block simulator
      Ouputs nx*dt delayed input */
 
-  long *y,*u,*oz;
-  int nz,mz;
-  int i;
+  long *y = NULL,*u = NULL,*oz = NULL;
+  int nz = 0,mz = 0;
+  
   
   u=Getint32InPortPtrs(block,1);
   y=Getint32OutPortPtrs(block,1);
@@ -42,6 +43,7 @@ void delay4_i32(scicos_block *block,int flag)
     y[0]=oz[0];
   }else if (flag == 2){
     /*  shift buffer */
+       int i = 0; 
     for (i=0; i<=(mz*nz)-2; i++){
       oz[i]=oz[i+1];
     }
index 6add2ee..6ee14ae 100644 (file)
@@ -28,10 +28,9 @@ void delay4_i8(scicos_block *block,int flag)
      Scicos block simulator
      Ouputs nx*dt delayed input */
 
-  char *y,*u,*oz;
-  int nz,mz;
-  int i;
-  
+  char *y = NULL,*u = NULL,*oz = NULL;
+  int nz = 0,mz = 0;
+    
   u=Getint8InPortPtrs(block,1);
   y=Getint8OutPortPtrs(block,1);
   oz=Getint8OzPtrs(block,1);
@@ -41,6 +40,7 @@ void delay4_i8(scicos_block *block,int flag)
   if ((flag==1)||(flag==6)||(flag==4)){
     y[0]=oz[0];
   }else if (flag == 2){
+       int i = 0;
     /*  shift buffer */
     for (i=0; i<=(mz*nz)-2; i++){
       oz[i]=oz[i+1];
index 13ed60e..4dcec52 100644 (file)
@@ -20,6 +20,7 @@
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void delay4_ui16(scicos_block *block,int flag)
 {
@@ -28,9 +29,9 @@ void delay4_ui16(scicos_block *block,int flag)
      Scicos block simulator
      Ouputs nx*dt delayed input */
 
-  unsigned short *y,*u,*oz;
-  int nz,mz;
-  int i;
+  unsigned short *y = NULL,*u = NULL,*oz = NULL;
+  int nz = 0 ,mz = 0;
+
   
   u=Getuint16InPortPtrs(block,1);
   y=Getuint16OutPortPtrs(block,1);
@@ -41,6 +42,7 @@ void delay4_ui16(scicos_block *block,int flag)
   if ((flag==1)||(flag==6)||(flag==4)){
     y[0]=oz[0];
   }else if (flag == 2){
+    int i = 0;
     /*  shift buffer */
     for (i=0; i<=(mz*nz)-2; i++){
       oz[i]=oz[i+1];
index b4acaf4..8b0406d 100644 (file)
@@ -20,6 +20,7 @@
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void delay4_ui32(scicos_block *block,int flag)
 {
@@ -28,9 +29,9 @@ void delay4_ui32(scicos_block *block,int flag)
      Scicos block simulator
      Ouputs nx*dt delayed input */
 
-  unsigned long *y,*u,*oz;
-  int nz,mz;
-  int i;
+  unsigned long *y = NULL,*u = NULL,*oz = NULL;
+  int nz = 0,mz = 0;
+  int i = 0;
   
   u=Getuint32InPortPtrs(block,1);
   y=Getuint32OutPortPtrs(block,1);
index 13ccb20..7001602 100644 (file)
@@ -20,6 +20,7 @@
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void delay4_ui8(scicos_block *block,int flag)
 {
@@ -28,9 +29,9 @@ void delay4_ui8(scicos_block *block,int flag)
      Scicos block simulator
      Ouputs nx*dt delayed input */
 
-  unsigned char *y,*u,*oz;
-  int nz,mz;
-  int i;
+  unsigned char *y = NULL,*u = NULL,*oz = NULL;
+  int nz = 0,mz = 0;
+
   
   u=Getuint8InPortPtrs(block,1);
   y=Getuint8OutPortPtrs(block,1);
@@ -41,6 +42,7 @@ void delay4_ui8(scicos_block *block,int flag)
   if ((flag==1)||(flag==6)||(flag==4)){
     y[0]=oz[0];
   }else if (flag == 2){
+    int i = 0;
     /*  shift buffer */
     for (i=0; i<=(mz*nz)-2; i++){
       oz[i]=oz[i+1];
index 83c95d2..d192812 100644 (file)
@@ -25,9 +25,9 @@
 /*--------------------------------------------------------------------------*/ 
 void deriv(scicos_block *block,int flag)
 { 
-  double* rw;
-  double t,dt;
-  int i;
+  double* rw = NULL;
+  double t = 0.,dt = 0.;
+  int i = 0;
   if (flag == 4){/* the workspace is used to store previous values */
     if ((*block->work=
         scicos_malloc(sizeof(double)*2*(1+block->insz[0])))== NULL ) {
index 84eda12..490501a 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
-/*     Februery 2008 */
+/*     February 2008 */
 /* Scicos block simulator */
 /*--------------------------------------------------------------------------*/ 
 #define NX      block->nx
 /*--------------------------------------------------------------------------*/ 
 void diffblk_c(scicos_block *block,int flag)
 {
-  double *y,*u;
-  int i;
+  double *y = NULL,*u = NULL;
+  int i = 0;
   int* property=GetXpropPtrs(block);
     switch(flag)
       {
index ba507cc..abcc27f 100644 (file)
@@ -37,7 +37,7 @@ static int xerbla(char *srname, int *info);
 int dmmul(double *a, int *na, double *b, int *nb, double *c__, 
          int *nc, int *l, int *m, int *n)
 {
-  int a_dim1, a_offset, b_dim1, b_offset, c_dim1, c_offset;
+  int a_dim1 = 0, a_offset = 0, b_dim1 = 0, b_offset = 0, c_dim1 = 0, c_offset = 0;
     
 /*     PURPOSE */
 /*        computes the matrix product C = A * B */
@@ -83,11 +83,11 @@ static int dgemm(char *transa, char *transb, int *m, int *n, int *k, double *alp
   /* System generated locals */
   int i__1, i__2, i__3;
   /* Local variables */
-  static int info;
-  static long int nota, notb;
-  static double temp;
-  static int i, j, l, ncola;
-  static int nrowa, nrowb;  
+  static int info = 0;
+  static long int nota = 0, notb = 0;
+  static double temp = 0.;
+  static int i = 0, j = 0, l = 0, ncola = 0;
+  static int nrowa = 0, nrowb = 0;  
 
   
   /*     .. Scalar Arguments .. */
@@ -432,10 +432,10 @@ static int dgemm(char *transa, char *transb, int *m, int *n, int *k, double *alp
 static long int lsame(char *ca, char *cb)
 {
   /* System generated locals */
-  long int ret_val;
+  long int ret_val = 0;
 
   /* Local variables */
-  static int inta, intb, zcode;
+  static int inta = 0, intb = 0, zcode = 0;
   
 
   /*  -- LAPACK auxiliary routine (version 2.0) -- */
index ce49349..3ab00f6 100644 (file)
@@ -28,11 +28,11 @@ int dmmul1(double *a, int *na, double *b, int *nb, double *c__,
           int *nc, int *l, int *m, int *n)
 {
   /* System generated locals */
-  int i__1, i__2;
+  int i__1 = 0, i__2 = 0;
   
   /* Local variables */
 
-  static int i__, j, ib, ic;
+  static int i__ = 0, j = 0, ib = 0, ic = 0;
   
   /* !but */
   /*     ce sous programme effectue le produit matriciel: */
@@ -79,13 +79,13 @@ int dmmul1(double *a, int *na, double *b, int *nb, double *c__,
 double ddot(int *n, double *dx, int *incx, double *dy, int *incy)
 {
   /* System generated locals */
-  int i__1;
-  double ret_val;
+  int i__1 = 0;
+  double ret_val = 0.;
   
   /* Local variables */
-  static int i__, m;
-  static double dtemp;
-  static int ix, iy, mp1;
+  static int i__ = 0, m = 0;
+  static double dtemp = 0.;
+  static int ix = 0, iy = 0, mp1 = 0;
   
   
   /*     forms the dot product of two vectors. */
index 9f62c1f..c4ed9d6 100644 (file)
@@ -28,7 +28,7 @@ void dollar4(scicos_block *block,int flag)
   Scicos block simulator
   Ouputs delayed input */
   
-  int i;
+  int i = 0;
   for(i=0;i< block->insz[0];i++){
     if (flag ==1 || flag ==6 || flag ==4)
       block->outptr[0][i]=block->z[i];
index 17b6b47..a4114f8 100644 (file)
@@ -21,6 +21,7 @@
 /*--------------------------------------------------------------------------*/ 
 #include <memory.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 typedef struct
 {         int s;
@@ -34,9 +35,9 @@ void dollar4_m(scicos_block *block,int flag)
   Ouputs delayed input */
 
 
-  int m,n;
-  double *y,*u,*oz;
-  dol_struct *ptr;
+  int m = 0,n = 0;
+  double *y = NULL,*u = NULL,*oz = NULL;
+  dol_struct *ptr = NULL;
   m=GetInPortRows(block,1);
   n=GetInPortCols(block,1);
   u=GetRealInPortPtrs(block,1);
index 43f99f3..623ce03 100644 (file)
@@ -36,7 +36,7 @@ void dsslti4(scicos_block *block,int flag)
   rpar(nx*nx+1:nx*nx+nx*nu)=B
   rpar(nx*nx+nx*nu+1:nx*nx+nx*nu+nx*ny)=C */
   
-  int un=1,lb,lc,ld;
+  int un=1,lb = 0,lc = 0,ld = 0;
   int nz=block->nz;
   double* z=block->z;
   double* rpar=block->rpar;
@@ -44,7 +44,7 @@ void dsslti4(scicos_block *block,int flag)
   double* u=block->inptr[0];
   int* outsz=block->outsz;
   int* insz=block->insz;
-  double *w;
+  double *w = NULL;
   
   lb=nz*nz;
   
index c2cffce..ae61201 100644 (file)
@@ -58,8 +58,8 @@ double atanh(double x)
 void evaluate_expr(scicos_block *block,int flag)
 {
   static double stack [1000];
-  static int count,bottom,nzcr,i,phase; 
-  int j;  
+  static int count = 0,bottom = 0,nzcr = 0,i = 0,phase = 0; 
+  int j = 0;  
   if (flag==1||flag==6||flag==9){
     phase=get_phase_simulation();
     bottom=-1;
index 499384f..24e0041 100644 (file)
@@ -28,8 +28,8 @@
  */
 void evtdly4(scicos_block *block,int flag)
 {
-  double t;
-  long long int *i;
+  double t = 0.;
+  long long int *i = NULL;
 
   switch(flag)
   {
index 57773f4..e8f8ed8 100644 (file)
@@ -24,7 +24,8 @@
 /*--------------------------------------------------------------------------*/ 
 void evtvardly(scicos_block *block,int flag)
 { 
-  if (flag==3){
+  if (flag==3)
+  {
     block->evout[0]=block->inptr[0][0];
   }
 }
index 37f58dc..a000ba6 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void expblk_m(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  double *rpar;
-  int nu,mu,i;
+  double *u = NULL;
+  double *y = NULL;
+  double *rpar = NULL;
+  int nu = 0,mu = 0,i = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 03282d1..bf2de7b 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extdiag(scicos_block *block,int flag)
 {
-  double *u1;
-  double *y;
+  double *u1 = NULL;
+  double *y = NULL;
 
-  int mu,nu,i,ii;
+  int mu = 0,nu = 0,i = 0,ii = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 426259f..3f3090c 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extdiagz(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
 
-  int mu,nu,i,ii;
+  int mu = 0,nu = 0,i = 0,ii = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 1af3ce4..b2297f7 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  int *r;
-  int nu,mu,nr,i,j,ij,k,nc,nl;
+  double *u = NULL;
+  double *y = NULL;
+  int *r = NULL;
+  int nu = 0,mu = 0,nr = 0,i = 0,j = 0,ij = 0,k = 0,nc = 0,nl = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 1c37dd0..e6bba12 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_LH(scicos_block *block,int flag)
 {
-   int i,maxim;
-   short *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    maxim=16;
index ff562f1..4a132b2 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_LSB(scicos_block *block,int flag)
 {
-   int i,maxim;
-   short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index fcab880..96ce75f 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_MSB0(scicos_block *block,int flag)
 {
-   int i,maxim;
-   short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 8ae4fcf..374f89b 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_MSB1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index a2ee7fd..206b053 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_RB0(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 44f5e6d..40171bb 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_RB1(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 9d24854..0d4264c 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_UH0(scicos_block *block,int flag)
 {
-   int i,maxim;
-   short *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    maxim=16;
index 4d42bdf..e7061ad 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_16_UH1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   short *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   short *y = NULL,*u = NULL,ref = 0,n = 0;
    y=Getint16OutPortPtrs(block,1);
    u=Getint16InPortPtrs(block,1);
    maxim=16;
index 7551bec..d84467a 100644 (file)
@@ -24,8 +24,8 @@
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_LH(scicos_block *block,int flag)
 {
-   int i,maxim;
-   long *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    maxim=32;
index 612d2b8..43a235a 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_LSB(scicos_block *block,int flag)
 {
-   int i,maxim;
+   int i= 0,maxim = 0;
    long *y,*u,ref,n;
    int *ipar;
    y=Getint32OutPortPtrs(block,1);
index 1f38372..9c32d10 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_MSB0(scicos_block *block,int flag)
 {
-   int i,maxim;
-   long *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index c386153..6d35bc8 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_MSB1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   long *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 79858cc..674a025 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_RB0(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   long *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 8184f86..8af095e 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_RB1(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   long *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 71f8fdd..c1e0ded 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_UH0(scicos_block *block,int flag)
 {
-   int i,maxim;
-   long *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    maxim=32;
index 65cbe84..093a585 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_32_UH1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   long *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   long *y = NULL,*u = NULL,ref = 0,n = 0;
    y=Getint32OutPortPtrs(block,1);
    u=Getint32InPortPtrs(block,1);
    maxim=32;
index cbb2410..31695e7 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_LH(scicos_block *block,int flag)
 {
-   int i,maxim;
-   char *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   char *y = NULL,*u = NULL,ref = 0,n = 0;
+
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    maxim=8;
index 2140547..79dd241 100644 (file)
@@ -24,9 +24,9 @@
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_LSB(scicos_block *block,int flag)
 {
-   int i,maxim;
-   char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   char *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 16457b0..45b208b 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_MSB0(scicos_block *block,int flag)
 {
-   int i,maxim;
-   char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   char *y= NULL,*u = NULL,ref = 0,n =0;
+   int *ipar = NULL;
+
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index f7ab361..cf481f3 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_MSB1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   char *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
@@ -38,4 +39,4 @@ void extract_bit_8_MSB1(scicos_block *block,int flag)
    *y=(*u)&(ref);
    *y=*y>>(maxim-*ipar);
 }
-/*--------------------------------------------------------------------------*/ 
\ No newline at end of file
+/*--------------------------------------------------------------------------*/ 
index 8332713..bf0849b 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_RB0(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0, numb = 0;
+   char *y = NULL, *u = NULL, ref = 0, n = 0;
+   int *ipar = NULL;
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 8b9447c..825baf1 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_RB1(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   char *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
+
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 435a7a0..b4aa2c5 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_UH0(scicos_block *block,int flag)
 {
-   int i,maxim;
-   char *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   char *y = NULL,*u = NULL,ref = 0,n = 0;
+
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    maxim=8;
index 1acadac..0cae53c 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_8_UH1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   char *y,*u,ref,n;
+   int i = 0, maxim = 0;
+   char *y = 0,*u = 0,ref = 0,n = 0;
+
    y=Getint8OutPortPtrs(block,1);
    u=Getint8InPortPtrs(block,1);
    maxim=8;
@@ -36,4 +38,4 @@ void extract_bit_8_UH1(scicos_block *block,int flag)
    *y=(*u)&(ref);
    *y=*y>>maxim/2;
 }
-/*--------------------------------------------------------------------------*/ 
\ No newline at end of file
+/*--------------------------------------------------------------------------*/ 
index b5f553f..38bd272 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u16_MSB1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   unsigned short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   unsigned short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
+
    y=Getuint16OutPortPtrs(block,1);
    u=Getuint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index ba558cc..5d58505 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u16_RB1(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   unsigned short *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   unsigned short *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getuint16OutPortPtrs(block,1);
    u=Getuint16InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 58594cd..a9c66ae 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u16_UH1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   unsigned short *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   unsigned short *y = NULL,*u = NULL,ref = 0, n = 0;
    y=Getuint16OutPortPtrs(block,1);
    u=Getuint16InPortPtrs(block,1);
    maxim=16;
@@ -36,4 +37,4 @@ void extract_bit_u16_UH1(scicos_block *block,int flag)
    *y=(*u)&(ref);
    *y=*y>>maxim/2;
 }
-/*--------------------------------------------------------------------------*/ 
\ No newline at end of file
+/*--------------------------------------------------------------------------*/ 
index d395652..3eb5239 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u32_MSB1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   unsigned long *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   unsigned long *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getuint32OutPortPtrs(block,1);
    u=Getuint32InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 63fc93a..599fa9c 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u32_RB1(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   unsigned long *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   unsigned long *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getuint32OutPortPtrs(block,1);
    u=Getuint32InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 71c7a09..a9c0979 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u32_UH1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   unsigned long *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   unsigned long *y = NULL,*u = NULL,ref = 0,n = 0;
+
    y=Getuint32OutPortPtrs(block,1);
    u=Getuint32InPortPtrs(block,1);
    maxim=32;
index 44bf952..de80d80 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u8_MSB1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   unsigned char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0;
+   unsigned char *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getuint8OutPortPtrs(block,1);
    u=Getuint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index b6bb975..30c074b 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u8_RB1(scicos_block *block,int flag)
 {
-   int i,maxim,numb;
-   unsigned char *y,*u,ref,n;
-   int *ipar;
+   int i = 0,maxim = 0,numb = 0;
+   unsigned char *y = NULL,*u = NULL,ref = 0,n = 0;
+   int *ipar = NULL;
    y=Getuint8OutPortPtrs(block,1);
    u=Getuint8InPortPtrs(block,1);
    ipar=GetIparPtrs(block);
index 147a7a1..71ff27d 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extract_bit_u8_UH1(scicos_block *block,int flag)
 {
-   int i,maxim;
-   unsigned char *y,*u,ref,n;
+   int i = 0,maxim = 0;
+   unsigned char *y = NULL,*u = NULL,ref = 0,n = 0;
+
    y=Getuint8OutPortPtrs(block,1);
    u=Getuint8InPortPtrs(block,1);
    maxim=8;
index 42f7d21..156c881 100644 (file)
@@ -24,7 +24,7 @@
 /*--------------------------------------------------------------------------*/ 
 void extractor(scicos_block *block,int flag)
 {
-  int i,j;
+  int i = 0,j = 0;
   if(flag==1){
     for(i=0;i<block->nipar;++i){
       j=block->ipar[i]-1;
index 2a84c60..6f5dce9 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void extractz(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
-  int *r;
-  int nu,mu,nr,i,j,ij,k,nc,nl;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
+  int *r = NULL;
+  int nu = 0,mu = 0,nr = 0,i = 0,j = 0,ij = 0,k = 0,nc = 0,nl = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 62806f4..d893d04 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void exttril(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  int nu,mu,i,j,ij;
+  double *u = NULL;
+  double *y = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 8d3b3a5..c0558e3 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void exttrilz(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
-  int nu,mu,i,j,ij;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index aa96b72..649b40e 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void exttriu(scicos_block *block,int flag)
 {
-  double *u;
-  double *y;
-  int nu,mu,i,j,ij;
+  double *u = NULL;
+  double *y = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 1b74f9a..1d8b289 100644 (file)
 */
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void exttriuz(scicos_block *block,int flag)
 {
-  double *ur;
-  double *ui;
-  double *yr;
-  double *yi;
-  int nu,mu,i,j,ij;
+  double *ur = NULL;
+  double *ui = NULL;
+  double *yr = NULL;
+  double *yi = NULL;
+  int nu = 0,mu = 0,i = 0,j = 0,ij = 0;
 
   mu=GetInPortRows(block,1);
   nu=GetInPortCols(block,1);
index 1d2c348..b515692 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <memory.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void foriterator(scicos_block *block,int flag)
 { 
-  void *y,*u,*z;
-  int *ipar;
-  int so;
-  int nin;
+  void *y = NULL,*u = NULL,*z = NULL;
+  int *ipar = NULL;
+  int so = 0;
+  int nin = 0;
+
   z=GetOzPtrs(block,1);
   so=GetSizeOfOut(block,1);
   if (flag==1) {
index 3bae477..2cfbf14 100644 (file)
@@ -81,33 +81,33 @@ typedef struct {
 /*--------------------------------------------------------------------------*/ 
 void fromws_c(scicos_block *block,int flag)
 {
-  double t,y1,y2,t1,t2,r;
-  double *spline, *A_d, *A_sd, *qdy;
+  double t = 0.,y1 = 0.,y2 = 0.,t1 = 0.,t2 = 0.,r = 0.;
+  double *spline = NULL, *A_d = NULL, *A_sd = NULL, *qdy = NULL;
   /* double  a,b,c,*y;*/
-  double d1,d2,h, dh, ddh, dddh;
+  double d1 = 0.,d2 = 0.,h = 0., dh = 0., ddh = 0., dddh = 0.;
   /* counter and indexes variables */
-  int i,inow;
-  int j,jfirst;
-  int cnt1, cnt2, EVindex, PerEVcnt;
+  int i = 0,inow = 0;
+  int j = 0,jfirst = 0;
+  int cnt1 = 0, cnt2 = 0, EVindex = 0, PerEVcnt = 0;
 
   /* variables to handle files of TMPDIR/Workspace */
-  int fd;
-  char *status;
+  int fd = 0;
+  char *status = NULL;
   int swap = 1;
-  double res;
-  int out_n;
-  long int lout;
+  double res = 0.;
+  int out_n = 0;
+  long int lout = 0;
   char filename[FILENAME_MAX];
   char str[100];
-  int ierr;
+  int ierr = 0;
 
   /* variables for type and dims of data coming from scilab */
-  int Ytype, YsubType, mY, nY;
-  int nPoints;
+  int Ytype = 0, YsubType = 0, mY = 0, nY = 0;
+  int nPoints = 0;
   int Ydim[10];
 
   /* variables for type and dims of data of the output port block */
-  int ytype, my, ny;
+  int ytype = 0, my = 0, ny = 0;
 
   /* generic pointer */
   SCSREAL_COP *y_d = NULL,*y_cd = NULL,*ptr_d = NULL, *ptr_T = NULL, *ptr_D = NULL;
@@ -119,7 +119,7 @@ void fromws_c(scicos_block *block,int flag)
   SCSUINT32_COP *y_ul = NULL,*ptr_ul = NULL;
 
   /* the struct ptr of that block */
-  fromwork_struct *ptr;
+  fromwork_struct *ptr = NULL;
 
   /* for path of TMPDIR/workspace */
   char env[256];
index fdfc36d..e90514a 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include "scicos_block4.h"
 #include "machine.h" /* C2F */
+#include "MALLOC.H"
 /*--------------------------------------------------------------------------*/ 
 extern int C2F(dmmul)();
 extern int C2F(dmmul1)();
 /*--------------------------------------------------------------------------*/ 
 void gainblk(scicos_block *block,int flag)
 {
-  int i;
+  int i = 0;
 
-  double *u; double *y;
-  int nu,ny,my;
-  double *rpar;
-  int nrpar;
+  double *u = NULL; double *y = NULL;
+  int nu = 0,ny = 0,my = 0;
+  double *rpar = NULL;
+  int nrpar = 0;
 
   nu=GetInPortRows(block,1);
   ny=GetOutPortRows(block,1);
index c47123a..b8ec16f 100644 (file)
 #include "sciprint.h"
 #include "scicos_block4.h"
 #include "localization.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void gainblk_i16e(scicos_block *block,int flag)
 {
  if ((flag==1)|(flag==6)){
-  int i,j,l,ji,jl,il;
-  short *u,*y;
-  int mu,ny,my,mo,no;
-  short *opar;
-  double k,D,C;
+  int i = 0,j = 0,l = 0,ji = 0,jl = 0,il = 0;
+  short *u = NULL,*y = NULL;
+  int mu = 0,ny = 0,my = 0,mo = 0,no = 0;
+  short *opar = NULL;
+  double k = 0.,D = 0.,C = 0.;
   mo=GetOparSize(block,1,1);
   no=GetOparSize(block,1,2);
   mu=GetInPortRows(block,1);
index df54e5f..77a10b5 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void gainblk_i16n(scicos_block *block,int flag)
 {
  if ((flag==1)|(flag==6)){
-  int i,j,l,ji,jl,il;
-  short *u,*y;
-  int mu,ny,my,mo,no;
-  short *opar;
-  double k,D,C,t;
+  int i = 0,j = 0,l = 0,ji = 0,jl = 0,il = 0;
+  short *u = NULL,*y = NULL;
+  int mu = 0,ny = 0,my = 0,mo = 0,no = 0;
+  short *opar = NULL;
+  double k = 0.,D = 0.,C = 0.,t = 0.;
 
   mo=GetOparSize(block,1,1);
   no=GetOparSize(block,1,2);
index 2a46e3d..e0ac8d6 100644 (file)
 /*--------------------------------------------------------------------------*/ 
 #include <math.h>
 #include "scicos_block4.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void gainblk_i16s(scicos_block *block,int flag)
 {
  if ((flag==1)|(flag==6)){
-  int i,j,l,ji,jl,il;
-  short *u,*y;
-  int mu,ny,my,mo,no;
-  short *opar;
-  double k,D,C;
+  int i = 0,j = 0,l = 0,ji = 0,jl = 0,il = 0;
+  short *u = NULL,*y = NULL;
+  int mu = 0,ny = 0,my = 0,mo = 0,no = 0;
+  short *opar = NULL;
+  double k = 0.,D = 0.,C = 0.;
 
   mo=GetOparSize(block,1,1);
   no=GetOparSize(block,1,2);
index 621d754..f41b53e 100644 (file)
 #include "scicos_block4.h"
 #include "sciprint.h"
 #include "localization.h"
+#include "MALLOC.h"
 /*--------------------------------------------------------------------------*/ 
 void gainblk_i32e(scicos_block *block,int flag)
 {
  if ((flag==1)|(flag==6)){
-  int i,j,l,ji,jl,il;
-  long *u,*y;
-  int mu,ny,my,mo,no;
-  long *opar;
-  double k,D,C;
+  int i = 0,j = 0,l = 0,ji = 0,jl = 0,il = 0;
+  long *u = NULL,*y = NULL;
+  int mu = 0,ny = 0,my = 0,mo = 0,no = 0;
+  long *opar = NULL;
+  double k = 0.,D = 0.,C = 0.;
 
   mo=GetOparSize(block,1,1);
   no=GetOparSize(block,1,2);