crestrc.c File Reference

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

Include dependency graph for crestrc.c:

Go to the source code of this file.

Defines

#define MYSTR   "Scilab is ..."

Functions

int dblearrayc (double **a, int *m, int *n, int *ierr)
int intarrayc (int **a, int *m, int *n, int *ierr)
int crestrc (char **a, int *m, int *ierr)


Define Documentation

#define MYSTR   "Scilab is ..."

Definition at line 62 of file crestrc.c.

Referenced by crestr(), and crestrc().


Function Documentation

int crestrc ( char **  a,
int m,
int ierr 
)

Definition at line 64 of file crestrc.c.

References malloc(), MYSTR, and sciprint().

Referenced by intex5c(), and intex6c().

00067 {
00068   *m= strlen(MYSTR);
00069   *a= (char *) malloc((unsigned) (*m+1)*sizeof(char));
00070   if ( *a != (char *) 0) 
00071     {
00072       *ierr=0;
00073       sprintf((*a),MYSTR);
00074     }
00075   else
00076     {
00077       *ierr=1;
00078       sciprint("malloc : No more space \r\n");
00079     }
00080   return(0);
00081 }

Here is the call graph for this function:

Here is the caller graph for this function:

int dblearrayc ( double **  a,
int m,
int n,
int ierr 
)

Definition at line 16 of file crestrc.c.

References i, and malloc().

Referenced by intex6c().

00019 {
00020   int i ;
00021   *n=5 ;
00022   *m=3 ;
00023   *a= ( double *) malloc( (unsigned) (*m)*(*n) *sizeof(double));
00024   if ( *a != (double *) 0)   
00025     {
00026       *ierr=0;
00027       for ( i= 0 ; i < (*m)*(*n) ; i++) (*a)[i] = i+1;
00028     }
00029   else 
00030     *ierr=1;
00031   return(0);
00032 }

Here is the call graph for this function:

Here is the caller graph for this function:

int intarrayc ( int **  a,
int m,
int n,
int ierr 
)

Definition at line 37 of file crestrc.c.

References i, and malloc().

Referenced by intex6c().

00040 {
00041   int i ;
00042   *n=5 ;
00043   *m=3 ;
00044   *a= ( int *) malloc( (unsigned) (*m)*(*n) *sizeof(int));
00045   if ( *a != (int *) 0)   
00046     {
00047       *ierr=0;
00048       for ( i= 0 ; i < (*m)*(*n) ; i++) (*a)[i] = i+1;
00049     }
00050   else 
00051       *ierr=1;
00052   return(0);
00053 }

Here is the call graph for this function:

Here is the caller graph for this function:


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