Back to index

radiance  4R0+20100331
Functions | Variables
cv.c File Reference
#include "meta.h"

Go to the source code of this file.

Functions

int scanp (PRIMITIVE *p, FILE *fp)
void printp (PRIMITIVE *p, FILE *fp)
void printeof (FILE *fp)
int main (int argc, char **argv)

Variables

static const char RCSid [] = "$Id: cv.c,v 1.4 2007/11/21 18:51:05 greg Exp $"
char * progname

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 21 of file cv.c.

{
 FILE  *fp;
 PRIMITIVE  curp;
 short  htom = TRUE;

 progname = *argv++;
 argc--;

 if (argc && **argv == '-') {
    htom = FALSE;
    argv++;
    argc--;
    }

 if (argc)
    for (; argc; argc--, argv++) {
       fp = efopen(*argv, "r");
       if (htom)
          while (scanp(&curp, fp)) {
             writep(&curp, stdout);
            fargs(&curp);
             }
       else
          while (readp(&curp, fp)) {
             printp(&curp, stdout);
            fargs(&curp);
             }
       fclose(fp);
       }
 else
    if (htom)
       while (scanp(&curp, stdin)) {
          writep(&curp, stdout);
         fargs(&curp);
          }
    else
       while (readp(&curp, stdin)) {
          printp(&curp, stdout);
         fargs(&curp);
          }

 if (htom)
    writeof(stdout);
    
 return(0);
 }

Here is the call graph for this function:

void printeof ( FILE *  fp)
void printp ( PRIMITIVE *  p,
FILE *  fp 
)

Here is the caller graph for this function:

int scanp ( PRIMITIVE *  p,
FILE *  fp 
)

Here is the caller graph for this function:


Variable Documentation

char* progname

Definition at line 17 of file cv.c.

const char RCSid[] = "$Id: cv.c,v 1.4 2007/11/21 18:51:05 greg Exp $" [static]

Definition at line 2 of file cv.c.