ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/tabfunc.c
(Generate patch)

Comparing ray/src/cal/tabfunc.c (file contents):
Revision 1.2 by schorsch, Sun Jun 8 12:03:09 2003 UTC vs.
Revision 1.3 by schorsch, Thu Jun 26 00:58:09 2003 UTC

# Line 26 | Line 26 | static const char      RCSid[] = "$Id$";
26  
27   #define  MAXTAB         1024            /* maximum number of data rows */
28   #define  MAXLINE        4096            /* maximum line width (characters) */
29 /*#define  FLOAT                float   */      /* real type (precision) */
29   #define  OUTFMT         "%.7g"          /* output format conversion string */
30  
31   int     interpolate = 0;
# Line 34 | Line 33 | char   *progname;
33   char    **func;
34   int     nfuncs;
35  
36 < FLOAT   abscissa[MAXTAB];               /* independent values (first column) */
37 < FLOAT   (*ordinate)[MAXTAB];            /* dependent values (other columns) */
36 > RREAL   abscissa[MAXTAB];               /* independent values (first column) */
37 > RREAL   (*ordinate)[MAXTAB];            /* dependent values (other columns) */
38   int     tabsize = 0;                    /* final table size (number of rows) */
39   char    locID[16];                      /* local identifier (for uniqueness) */
40  
# Line 43 | Line 42 | char   locID[16];                      /* local identifier (for uniqueness)
42  
43   static void load_data(FILE *fp);
44   static void print_funcs(char *xe);
45 < static void putlist(register FLOAT *av, int al, register int pos);
45 > static void putlist(register RREAL *av, int al, register int pos);
46   static char * absc_exp(void);
47  
48   int
# Line 68 | Line 67 | char   **argv
67          }
68          func = argv;
69          nfuncs = argc;
70 <        ordinate = (FLOAT (*)[MAXTAB])malloc(nfuncs*MAXTAB*sizeof(FLOAT));
70 >        ordinate = (RREAL (*)[MAXTAB])malloc(nfuncs*MAXTAB*sizeof(RREAL));
71          if (ordinate == NULL) {
72                  fprintf(stderr, "%s: not enough memory\n", progname);
73                  exit(1);
# Line 212 | Line 211 | char   *xe
211  
212   static void
213   putlist(                /* put out array of values */
214 < register FLOAT  *av,
214 > register RREAL  *av,
215   int     al,
216   register int    pos
217   )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines