ex6c.c File Reference

#include "../../routines/machine.h"
#include <stdlib.h>

Include dependency graph for ex6c.c:

Go to the source code of this file.

Functions

C2F() ccalc6b (char ***a, int *m, int *n, int *err)
C2F() ccalc6a (char ***a, int *m, int *n)


Function Documentation

C2F() ccalc6a ( char ***  a,
int m,
int n 
)

Definition at line 45 of file ex6c.c.

References a, i, j, and m.

00048 {
00049   int i,j;
00050   for ( i = 0 ; i < *m*(*n) ; i++) 
00051     {
00052       char *loc = (*a)[i];
00053       for ( j = 0 ; j < strlen(loc); j++) 
00054         if ( loc[j] =='a' ) loc[j] ='o';
00055     }
00056 }

C2F() ccalc6b ( char ***  a,
int m,
int n,
int err 
)

Definition at line 13 of file ex6c.c.

References a, err, i, m, malloc(), n, nstring, and sciprint().

00016 {
00017   int i,nstring;
00018   *m=3;
00019   *n=2;
00020   nstring= (*m)*(*n);
00021   *a =(char **) malloc((unsigned) (nstring * sizeof(char *)));
00022   if ( *a ==0) 
00023     {
00024       sciprint("No more space\r\n");
00025       *err=1;
00026       return;
00027     }
00028   for ( i=0  ; i< nstring ; i++) 
00029     {
00030       (*a)[i] = (char *) malloc ((8)*sizeof(char));
00031       sprintf((*a)[i],"char %d",i);
00032       *err=0;
00033     }
00034 }

Here is the call graph for this function:


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