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.1 by greg, Sat Feb 22 02:07:20 2003 UTC vs.
Revision 1.2 by schorsch, Sun Jun 8 12:03:09 2003 UTC

# Line 9 | Line 9 | static const char      RCSid[] = "$Id$";
9  
10   #include <stdio.h>
11   #include <stdlib.h>
12 + #include <string.h>
13   #include <math.h>
14   #include <ctype.h>
15 + #ifdef _WIN32
16 + #include <process.h> /* getpid() */
17 + #else
18 + #include <sys/types.h>
19 + #include <unistd.h>
20 + #endif
21  
22 + #include "standard.h"
23 + #include "platform.h"
24 +
25   #define  isdelim(c)     (isspace(c) || (c)==',')
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  FLOAT                float   */      /* real type (precision) */
30   #define  OUTFMT         "%.7g"          /* output format conversion string */
31  
32   int     interpolate = 0;
# Line 29 | Line 39 | FLOAT  (*ordinate)[MAXTAB];            /* dependent values (other
39   int     tabsize = 0;                    /* final table size (number of rows) */
40   char    locID[16];                      /* local identifier (for uniqueness) */
41  
42 < extern char     *fgets(), *fskip(), *absc_exp();
42 > /*extern char   *fgets(), *fskip(), *absc_exp();*/
43  
44 + static void load_data(FILE *fp);
45 + static void print_funcs(char *xe);
46 + static void putlist(register FLOAT *av, int al, register int pos);
47 + static char * absc_exp(void);
48  
49 < main(argc, argv)
50 < int     argc;
51 < char    **argv;
49 > int
50 > main(
51 > int     argc,
52 > char    **argv
53 > )
54   {
55          progname = argv[0];
56          argv++;
# Line 64 | Line 80 | char   **argv;
80   }
81  
82  
83 < load_data(fp)                   /* load tabular data from fp */
84 < FILE    *fp;
83 > static void
84 > load_data(                      /* load tabular data from fp */
85 > FILE    *fp
86 > )
87   {
88          int     lineno;
89          char    *err;
# Line 110 | Line 128 | fatal:
128   }
129  
130  
131 < char *
132 < absc_exp()                      /* produce expression for abscissa */
131 > static char *
132 > absc_exp(void)                  /* produce expression for abscissa */
133   {
134          static char     ourexp[64];
135          double  step, eps;
# Line 164 | Line 182 | absc_exp()                     /* produce expression for abscissa */
182   }
183  
184  
185 < print_funcs(xe)                 /* print functions */
186 < char    *xe;
185 > static void
186 > print_funcs(                    /* print functions */
187 > char    *xe
188 > )
189   {
190          int     xelen;
191          register int    i;
# Line 190 | Line 210 | char   *xe;
210   }
211  
212  
213 < putlist(av, al, pos)            /* put out array of values */
214 < register FLOAT  *av;
215 < int     al;
216 < register int    pos;
213 > static void
214 > putlist(                /* put out array of values */
215 > register FLOAT  *av,
216 > int     al,
217 > register int    pos
218 > )
219   {
220          char    obuf[32];
221          int     len;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines