Back to index

radiance  4R0+20100331
Functions | Variables
ranimove.c File Reference
#include "copyright.h"
#include <time.h>
#include <sys/time.h>
#include <ctype.h>
#include <string.h>
#include "paths.h"
#include "ranimove.h"

Go to the source code of this file.

Functions

static void setdefaults (void)
static void setmove (struct ObjMove *om, char *ms)
static void setrendparams (char *optf, char *qval)
static void getradfile (char *rfargs)
static void animate (void)
static int countviews (void)
static char * getobjname (struct ObjMove *om)
static char * getxf (struct ObjMove *om, int n)
int main (int argc, char *argv[])
void eputs (register char *s)
void quit (int ec)
VIEWgetview (int n)
char * getexp (int n)
double expspec_val (char *s)
char * getoctspec (int n)
static char * getobjname (register struct ObjMove *om)
static char * getxf (register struct ObjMove *om, int n)
int getmove (OBJECT obj)
double obj_prio (OBJECT obj)
double getTime (void)

Variables

static const char RCSid [] = "$Id: ranimove.c,v 3.13 2009/12/12 19:01:00 greg Exp $"
int NVARS = NV_INIT
VARIABLE vv [] = VV_INIT
int nowarn
int silent = 0
int quickstart = 0
int nprocs = 1
int rtperfrm = 60
double ndthresh = 2.
int ndtset = 0
int fbeg = 1
int fend = 0
int fcur
char lorendoptf [32]
RAYPARAMS lorendparams
char hirendoptf [32]
RAYPARAMS hirendparams
RAYPARAMScurparams
int twolevels
double mblur
double rate
char objtmpf [32]
struct ObjMoveobj_move
int haveprio = 0
int gargc
char ** gargv

Function Documentation

static void animate ( void  ) [static]

Definition at line 440 of file ranimove.c.

{
       int    rpass;

       if (fbeg > 1)                      /* synchronize transforms */
              getoctspec(fbeg-1);

       for (fcur = fbeg; fcur <= fend; fcur++) {
              if (!silent)
                     printf("Frame %d:\n", fcur);
                                          /* base rendering */
              init_frame();
                                          /* refinement */
              for (rpass = 0; refine_frame(rpass); rpass++)
                     ;
                                          /* final filter pass */
              filter_frame();
                                          /* output frame */
              send_frame();
       }
                                   /* free resources */
       free_frame();
       if (nprocs > 1)
              ray_pdone(1);
       else
              ray_done(1);
       getview(0);
       getexp(0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static int countviews ( void  ) [static]

Definition at line 523 of file ranimove.c.

{
       int    n;

       if (getview(n=1) == NULL)
              return(0);
       while (getview(-1) != NULL)
              n++;
       return(n);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void eputs ( register char *  s)

Definition at line 171 of file ranimove.c.

{
       static int  midline = 0;

       if (!*s)
              return;
       if (!midline++) {
              fputs(progname, stderr);
              fputs(": ", stderr);
       }
       fputs(s, stderr);
       if (s[strlen(s)-1] == '\n') {
              fflush(stderr);
              midline = 0;
       }
}
double expspec_val ( char *  s)

Definition at line 595 of file ranimove.c.

{
       double expval;

       if (s == NULL || !*s)
              return(1.0);

       expval = atof(s);
       if ((s[0] == '+') | (s[0] == '-'))
              return(pow(2.0, expval));
       return(expval);
}

Here is the caller graph for this function:

char* getexp ( int  n)

Definition at line 536 of file ranimove.c.

{
       extern char   *fskip();
       static char   expval[32];
       static FILE   *expfp = NULL;
       static int    curfrm = 0;
       register char *cp;

       if (n == 0) {                      /* signal to close file */
              if (expfp != NULL) {
                     fclose(expfp);
                     expfp = NULL;
              }
              return(NULL);
       }
       if (!vdef(EXPOSURE))               /* no setting (auto) */
              return(NULL);
       if (isflt(vval(EXPOSURE)))         /* always the same */
              return(vval(EXPOSURE));
       if (expfp == NULL) {               /* open exposure file */
              if ((expfp = fopen(vval(EXPOSURE), "r")) == NULL) {
                     sprintf(errmsg, "cannot open exposure file \"%s\"",
                                   vval(EXPOSURE));
                     error(SYSTEM, errmsg);
              }
              curfrm = 0;
       }
       if (curfrm > n) {                  /* rewind if necessary */
              rewind(expfp);
              curfrm = 0;
       }
       while (n > curfrm) {               /* read to line */
              if (fgets(expval, sizeof(expval), expfp) == NULL) {
                     sprintf(errmsg, "%s: too few exposures",
                                   vval(EXPOSURE));
                     error(USER, errmsg);
              }
              if (strlen(expval) == sizeof(expval)-1)
                     goto formerr;
              curfrm++;
       }
       cp = fskip(expval);                /* check format */
       if (cp != NULL)
              while (isspace(*cp))
                     *cp++ = '\0';
       if (cp == NULL || *cp)
              goto formerr;
       return(expval);                           /* return value */
formerr:
       sprintf(errmsg, "%s: exposure format error on line %d",
                     vval(EXPOSURE), curfrm);
       error(USER, errmsg);
       return NULL; /* pro forma return */
}

Here is the call graph for this function:

int getmove ( OBJECT  obj)

Definition at line 809 of file ranimove.c.

{
       static int    lasti;
       static OBJECT lasto = OVOID;
       char   *onm, *objnm;
       int    len, len2;
       register int  i;

       if (obj == OVOID)
              return(-1);
       if (obj == lasto)
              return(lasti);
                                   /* look for matching object */
       onm = objptr(obj)->oname;
       for (i = vdef(MOVE); i--; ) {
              objnm = obj_move[i].name;
              len = strlen(objnm);
              if (!strncmp(onm, objnm, len)) {
                     if ((obj_move[i].parent < 0) & (onm[len] == '.'))
                            break;
                     objnm = getobjname(&obj_move[i]) + len;
                     len2 = strlen(objnm);
                     if (!strncmp(onm+len, objnm, len2) && onm[len+len2] == '.')
                            break;
              }
       }
       lasto = obj;                /* cache what we found */
       return(lasti = i);
}

Here is the call graph for this function:

static char* getobjname ( struct ObjMove om) [static]

Here is the caller graph for this function:

static char* getobjname ( register struct ObjMove om) [static]

Definition at line 667 of file ranimove.c.

{
       static char   objName[512];
       register char *cp = objName;
       
       strcpy(cp, om->name);
       while (om->parent >= 0) {
              while (*cp) cp++;
              *cp++ = '@';
              om = &obj_move[om->parent];
              strcpy(cp, om->name);
       }
       return(objName);
}
char* getoctspec ( int  n)

Definition at line 612 of file ranimove.c.

{
       static char   combuf[1024];
       int           cfm = 0;
       int    uses_inline;
       FILE   *fp;
       int    i;
                                   /* is octree static? */
       if (!vdef(MOVE))
              return(vval(OCTREEF));
                                   /* done already */
       if (n == cfm)
              return(combuf);
                                   /* else create object file */
       strcpy(objtmpf, "movinobj.rad");
       fp = fopen(objtmpf, "w");
       if (fp == NULL) {
              sprintf(errmsg, "cannot write to moving objects file '%s'",
                            objtmpf);
              error(SYSTEM, errmsg);
       }
       uses_inline = 0;
       for (i = 0; i < vdef(MOVE); i++) {
              int    inlc = (obj_move[i].spec[0] == '!');
              if (!obj_move[i].spec[0])
                     continue;
              if (inlc)
                     fprintf(fp, "%s %d \\\n\t| xform",
                                   obj_move[i].spec, n);
              else
                     fputs("!xform", fp);
              fprintf(fp, " -n %s", getobjname(&obj_move[i]));
              fputs(getxf(&obj_move[i], n), fp);
              if (!inlc)
                     fprintf(fp, " %s\n", obj_move[i].spec);
              else
                     fputc('\n', fp);
              uses_inline |= inlc;
       }
       if (fclose(fp) == EOF)
              error(SYSTEM, "error writing moving objects file");
       if (uses_inline)
              sprintf(combuf, "!oconv %s -f -i '%s' %s",
                            vdef(OCONV) ? vval(OCONV) : "",
                            vval(OCTREEF), objtmpf);
       else
              sprintf(combuf, "!xform -f %s | oconv -f -i '%s' -",
                            objtmpf, vval(OCTREEF));
       return(combuf);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void getradfile ( char *  rfargs) [static]

Definition at line 388 of file ranimove.c.

{
       static short  mvar[] = {OCONV,OCTREEF,RESOLUTION,EXPOSURE,-1};
       char   combuf[256];
       register int  i;
       register char *cp;
       char   *pippt = NULL;
                                   /* create rad command */
       strcpy(lorendoptf, "ranim0.opt");
       sprintf(combuf,
       "rad -v 0 -s -e -w %s %s oconv=-f OPTFILE=%s | egrep '^[ \t]*(NOMATCH",
                     rfargs,
              (vdef(LOWQ) && vval(LOWQ)[0]!='-') ? vval(LOWQ) : "",
                     lorendoptf);
       cp = combuf;
       while (*cp) {
              if (*cp == '|') pippt = cp;
              cp++;
       }                           /* match unset variables */
       for (i = 0; mvar[i] >= 0; i++)
              if (!vdef(mvar[i])) {
                     *cp++ = '|';
                     strcpy(cp, vnam(mvar[i]));
                     while (*cp) cp++;
                     pippt = NULL;
              }
       if (pippt != NULL)
              strcpy(pippt, "> " NULL_DEVICE);   /* nothing to match */
       else {
              strcpy(cp, ")[ \t]*=' > ranimove.var");
              cp += 11;            /* point to file name */
       }
       system(combuf);                    /* ignore exit code */
       if (pippt == NULL) {        /* load variables and remove file */
              loadvars(cp);
              unlink(cp);
       }
       if (!vdef(HIGHQ) || vval(HIGHQ)[0]=='-') {
              strcpy(hirendoptf, lorendoptf);
              return;
       }
                                   /* get high quality options */
       strcpy(hirendoptf, "ranim1.opt");
       sprintf(combuf, "rad -v 0 -s -w %s %s OPTFILE=%s",
                     rfargs, vval(HIGHQ), hirendoptf);
       system(combuf);
}

Here is the call graph for this function:

double getTime ( void  )

Definition at line 856 of file ranimove.c.

{
       struct timeval       time_now;
                                   /* return CPU time if one process */
       if (nprocs == 1)
              return((double)clock()*(1.0/(double)CLOCKS_PER_SEC));
                                   /* otherwise, return wall time */
       gettimeofday(&time_now, NULL);
       return((double)time_now.tv_sec + 1e-6*(double)time_now.tv_usec);
}

Here is the caller graph for this function:

VIEW* getview ( int  n)

Definition at line 472 of file ranimove.c.

{
       static FILE   *viewfp = NULL;             /* view file pointer */
       static int    viewnum = 0;         /* current view number */
       static VIEW   curview = STDVIEW;   /* current view */
       char   linebuf[256];

       if (n == 0) {               /* signal to close file and clean up */
              if (viewfp != NULL) {
                     fclose(viewfp);
                     viewfp = NULL;
                     viewnum = 0;
                     curview = stdview;
              }
              return(NULL);
       }
       if (viewfp == NULL) {                     /* open file */
              if ((viewfp = fopen(vval(VIEWFILE), "r")) == NULL) {
                     perror(vval(VIEWFILE));
                     quit(1);
              }
       } else if (n > 0 && n < viewnum) { /* rewind file */
              if (viewnum == 1 && feof(viewfp))
                     return(&curview);           /* just one view */
              if (fseek(viewfp, 0L, 0) == EOF) {
                     perror(vval(VIEWFILE));
                     quit(1);
              }
              curview = stdview;
              viewnum = 0;
       }
       if (n < 0) {                       /* get next view */
              register int  c = getc(viewfp);
              if (c == EOF)
                     return(NULL);               /* that's it */
              ungetc(c, viewfp);
              n = viewnum + 1;
       }
       while (n > viewnum) {              /* scan to desired view */
              if (fgets(linebuf, sizeof(linebuf), viewfp) == NULL)
                     return(viewnum==1 ? &curview : (VIEW *)NULL);
              if (isview(linebuf) && sscanview(&curview, linebuf) > 0)
                     viewnum++;
       }
       return(&curview);           /* return it */
}

Here is the call graph for this function:

static char* getxf ( struct ObjMove om,
int  n 
) [static]

Here is the caller graph for this function:

static char* getxf ( register struct ObjMove om,
int  n 
) [static]

Definition at line 686 of file ranimove.c.

{
       static char   xfsbuf[4096];
       char          *xfp;
       int           framestep = 0;
       XF            oxf;
       FILE          *fp;
       char          abuf[512];
       char          *av[64];
       int           ac;
       int           i;
       register char *cp;
                                   /* get parent transform, first */
       if (om->parent >= 0)
              xfp = getxf(&obj_move[om->parent], n);
       else
              *(xfp = xfsbuf + sizeof(xfsbuf)-1) = '\0';
                                   /* get transform spec. & priority */
       if (om->cfm != n) {
              if (om->xf_file[0]) {
                     fp = fopen(om->xf_file, "r");
                     if (fp == NULL) {
                            sprintf(errmsg,
                                   "cannot open transform file '%s'",
                                          om->xf_file);
                            error(SYSTEM, errmsg);
                     }
                     for (i = 0; i < n; i++)
                            if (fgetline(om->xfs, sizeof(om->xfs), fp)
                                          == NULL) {
                                   sprintf(errmsg,
                                   "too few transforms in file '%s'",
                                                 om->xf_file);
                                   error(USER, errmsg);
                            }
                     fclose(fp);
              }
              strcpy(cp=abuf, om->xfs);
              ac = 0;
              for ( ; ; ) {
                     while (isspace(*cp))
                            *cp++ = '\0';
                     if (!*cp)
                            break;
                     av[ac++] = cp;
                     while (*++cp && !isspace(*cp))
                            ;
              }
              av[ac] = NULL;
              if (xf(&oxf, ac, av) != ac ||
                            fabs(oxf.sca) <= FTINY) {
                     sprintf(errmsg, "bad transform args: %s",
                                   om->xfs);
                     error(USER, errmsg);
              }
              copymat4(om->xfm, oxf.xfm);
              if (om->prio_file[0]) {
                     fp = fopen(om->prio_file, "r");
                     if (fp == NULL) {
                            sprintf(errmsg,
                                   "cannot open priority file '%s'",
                                          om->prio_file);
                            error(SYSTEM, errmsg);
                     }
                     for (i = 0; i < n; i++)
                            if (fgets(abuf, sizeof(abuf), fp)
                                          == NULL) {
                                   sprintf(errmsg,
                                   "too few priorities in file '%s'",
                                                 om->prio_file);
                                   error(USER, errmsg);
                            }
                     fclose(fp);
                     cp = fskip(abuf);
                     if (cp != NULL)
                            while (isspace(*cp))
                                   *cp++ = '\0';
                     if (cp == NULL || *cp) {
                            sprintf(errmsg,
                            "priority '%s' in file '%s' not a number",
                                          abuf, om->prio_file);
                            error(USER, errmsg);
                     }
                     om->prio = atof(abuf);
              }
              framestep = (n == om->cfm + 1);
              om->cfm = n;
       }
                                   /* prepend to parent transform */
       if (om->xfs[0]) {
              i = strlen(om->xfs);
              if (xfp - i <= xfsbuf)
                     error(INTERNAL, "transform too long in getxf");
              cp = om->xfs + i;
              while (i--)
                     *--xfp = *--cp;
              *--xfp = ' ';
       }
       if (framestep)
              copymat4(oxf.xfm, om->cxfm);
       if (om->parent >= 0) {
              multmat4(om->cxfm, om->xfm, obj_move[om->parent].cxfm);
              om->cprio = obj_move[om->parent].cprio * om->prio;
       } else {
              copymat4(om->cxfm, om->xfm);
              om->cprio = om->prio;
       }
                                   /* XXX bxfm relies on call order */
       if (framestep) {
              if (invmat4(om->bxfm, om->cxfm))
                     multmat4(om->bxfm, om->bxfm, oxf.xfm);
              else
                     setident4(om->bxfm);
       }
                                   /* all done */
       return(xfp);
}

Here is the call graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 76 of file ranimove.c.

{
       int    explicate = 0;
       char   *cfname;
       int    i;

       progname = argv[0];                /* get arguments */
       gargc = argc;
       gargv = argv;
       for (i = 1; i < argc && argv[i][0] == '-'; i++)
              switch (argv[i][1]) {
              case 't':                   /* seconds per frame */
                     rtperfrm = atoi(argv[++i]);
                     break;
              case 'd':                   /* noticeable difference */
                     ndthresh = atof(argv[++i]);
                     ndtset = 1;
                     break;
              case 'e':                   /* print variables */
                     explicate++;
                     break;
              case 's':                   /* silent running */
                     silent++;
                     break;
              case 'q':                   /* start quickly */
                     quickstart++;
                     break;
              case 'w':                   /* turn off warnings */
                     nowarn++;
                     break;
              case 'f':                   /* frame range */
                     switch (sscanf(argv[++i], "%d,%d", &fbeg, &fend)) {
                     case 2:
                            if ((fbeg <= 0) | (fend < fbeg))
                                   goto userr;
                            break;
                     case 1:
                            if (fbeg <= 0)
                                   goto userr;
                            fend = 0;
                            break;
                     default:
                            goto userr;
                     }
                     break;
              case 'n':                   /* number of processes */
                     nprocs = atoi(argv[++i]);
                     break;
              default:
                     goto userr;
              }
       if (rtperfrm <= 0) {
              if (!ndtset)
                     error(USER, "specify -d jnd with -t 0");
              rtperfrm = 7*24*3600;
       }
       if (i != argc-1)
              goto userr;
       cfname = argv[i];
                                          /* load variables */
       loadvars(cfname);
                                          /* check variables */
       checkvalues();
                                          /* load RIF if any */
       if (vdef(RIF))
              getradfile(vval(RIF));
                                          /* set defaults */
       setdefaults();
                                          /* print variables */
       if (explicate)
              printvars(stdout);
                                          /* run animation */
       if (nprocs > 0)
              animate();
                                          /* all done */
       if (lorendoptf[0])
              unlink(lorendoptf);
       if (hirendoptf[0] && strcmp(hirendoptf, lorendoptf))
              unlink(hirendoptf);
       if (objtmpf[0])
              unlink(objtmpf);
       return(0);
userr:
       fprintf(stderr,
"Usage: %s [-n nprocs][-f beg,end][-t sec][-d jnd][-s][-w][-e] anim_file\n",
                     progname);
       quit(1);
       return 1; /* pro forma return */
}

Here is the call graph for this function:

double obj_prio ( OBJECT  obj)

Definition at line 843 of file ranimove.c.

{
       int    moi;
       
       if (obj == OVOID || (moi = getmove(obj)) < 0)
              return(1.0);
       return(obj_move[moi].cprio);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void quit ( int  ec)

Definition at line 192 of file ranimove.c.

{
       if (ray_pnprocs > 0) /* close children if any */
              ray_pclose(0);              
       exit(ec);
}

Here is the call graph for this function:

static void setdefaults ( void  ) [static]

Definition at line 202 of file ranimove.c.

{
       int    nviews;
       int    decades;
       char   buf[256];
       int    i;

       if (!vdef(OCTREEF)) {
              sprintf(errmsg, "%s or %s must be defined",
                            vnam(OCTREEF), vnam(RIF));
              error(USER, errmsg);
       }
       if (!vdef(VIEWFILE)) {
              sprintf(errmsg, "%s must be defined", vnam(VIEWFILE));
              error(USER, errmsg);
       }
       nviews = countviews();
       if (!nviews)
              error(USER, "no views in view file");
       if (!vdef(END)) {
              if (nviews == 1) {
                     sprintf(errmsg, "%s must be defined for single view",
                                   vnam(END));
                     error(USER, errmsg);
              }
              sprintf(buf, "%d", nviews);
              vval(END) = savqstr(buf);
              vdef(END)++;
       }
       if (!fend)
              fend = vint(END);
       if (fbeg > fend)
              error(USER, "begin after end");
       if (!vdef(BASENAME)) {
              decades = (int)log10((double)vint(END)) + 1;
              if (decades < 3) decades = 3;
              sprintf(buf, "frame%%0%dd", decades);
              vval(BASENAME) = savqstr(buf);
              vdef(BASENAME)++;
       }
       if (!vdef(RATE)) {
              vval(RATE) = "8";
              vdef(RATE)++;
       }
       rate = vflt(RATE);
       if (!vdef(RESOLUTION)) {
              vval(RESOLUTION) = "640";
              vdef(RESOLUTION)++;
       }
       if (!vdef(MBLUR)) {
              vval(MBLUR) = "0";
              vdef(MBLUR)++;
       }
       mblur = vflt(MBLUR);
       if (mblur > 1.)
              mblur = 1.;
                            /* set up objects */
       if (vdef(MOVE)) {
              obj_move = (struct ObjMove *)malloc(
                            sizeof(struct ObjMove)*vdef(MOVE) );
              if (obj_move == NULL)
                     error(SYSTEM, "out of memory in setdefaults");
              for (i = 0; i < vdef(MOVE); i++)
                     setmove(&obj_move[i], nvalue(MOVE, i));
       }
                            /* set up high quality options */
       setrendparams(hirendoptf, vval(HIGHQ));
       ray_save(&hirendparams);
                            /* set up low quality options */
       setrendparams(lorendoptf, vval(LOWQ));
       ray_save(&lorendparams);
       curparams = &lorendparams;
       twolevels = memcmp(&lorendparams, &hirendparams, sizeof(RAYPARAMS));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void setmove ( struct ObjMove om,
char *  ms 
) [static]

Definition at line 279 of file ranimove.c.

{
       char   parname[128];
       char   *cp;
       
       ms = nextword(parname, sizeof(parname), ms);
       if (!parname[0])
              goto badspec;
       for (cp = parname; *cp; cp++)
              if (isspace(*cp))
                     *cp = '_';
       for (om->parent = (om - obj_move); om->parent--; )
              if (!strcmp(parname, obj_move[om->parent].name))
                     break;
       if (om->parent < 0 &&
                     strcmp(parname, ".") && strcmp(parname, VOIDID)) {
              sprintf(errmsg, "undefined parent object '%s'", parname);
              error(USER, errmsg);
       }
       ms = nextword(om->name, sizeof(om->name), ms);
       if (!om->name[0])
              goto badspec;
       for (cp = om->name; *cp; cp++)
              if (isspace(*cp))
                     *cp = '_';
       ms = nextword(om->xf_file, sizeof(om->xf_file), ms);
       if (!strcmp(om->xf_file, "."))
              om->xf_file[0] = '\0';
       if (!om->xf_file[0]) {
              om->xfs[0] = '\0';
       } else if (om->xf_file[0] == '-') {
              strcpy(om->xfs, om->xf_file);
              om->xf_file[0] = '\0';
       }
       ms = nextword(om->spec, sizeof(om->spec), ms);
       if (om->spec[0]) {
              if (!strcmp(om->spec, ".") || !strcmp(om->spec, VOIDID))
                     om->spec[0] = '\0';
              ms = nextword(om->prio_file, sizeof(om->prio_file), ms);
       } else
              om->prio_file[0] = '\0';
       if (om->prio_file[0]) {
              if (isflt(om->prio_file)) {
                     om->prio = atof(om->prio_file);
                     om->prio_file[0] = '\0';
                     haveprio |= ((om->prio < 0.95) | (om->prio > 1.05));
              } else
                     haveprio = 1;
       } else
              om->prio = 1.;
       om->cfm = -1;
       return;
badspec:
       error(USER, "bad object specification");
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void setrendparams ( char *  optf,
char *  qval 
) [static]

Definition at line 340 of file ranimove.c.

{
       char   *argv[1024];
       char   **av = argv;
       int    ac, i, rval;

       av[ac=0] = NULL;
                            /* load options from file, first */
       if (optf != NULL && *optf) {
              ac = wordfile(av, optf);
              if (ac < 0) {
                     sprintf(errmsg, "cannot load options file \"%s\"",
                                   optf);
                     error(SYSTEM, errmsg);
              }
       }
                            /* then from options string */
       if (qval != NULL && qval[0] == '-')
              ac += wordstring(av+ac, qval);

                            /* restore default parameters */
       ray_restore(NULL);
                            /* set what we have */
       for (i = 0; i < ac; i++) {
              while ((rval = expandarg(&ac, &av, i)) > 0)
                     ;
              if (rval < 0) {
                     sprintf(errmsg, "cannot expand '%s'", av[i]);
                     error(SYSTEM, errmsg);
              }
              if (!strcmp(av[i], "-w")) {
                     nowarn++;
                     continue;
              }
              rval = getrenderopt(ac-i, av+i);
              if (rval < 0) {
                     sprintf(errmsg, "bad render option at '%s'", av[i]);
                     error(USER, errmsg);
              }
              i += rval;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 50 of file ranimove.c.

int fbeg = 1

Definition at line 42 of file ranimove.c.

int fcur

Definition at line 44 of file ranimove.c.

int fend = 0

Definition at line 43 of file ranimove.c.

int gargc

Definition at line 62 of file ranimove.c.

char** gargv

Definition at line 63 of file ranimove.c.

int haveprio = 0

Definition at line 60 of file ranimove.c.

char hirendoptf[32]

Definition at line 48 of file ranimove.c.

Definition at line 49 of file ranimove.c.

char lorendoptf[32]

Definition at line 46 of file ranimove.c.

Definition at line 47 of file ranimove.c.

double mblur

Definition at line 53 of file ranimove.c.

double ndthresh = 2.

Definition at line 39 of file ranimove.c.

int ndtset = 0

Definition at line 40 of file ranimove.c.

int nowarn

Definition at line 92 of file rcalc.c.

int nprocs = 1

Definition at line 35 of file ranimove.c.

int NVARS = NV_INIT

Definition at line 26 of file ranimove.c.

struct ObjMove* obj_move

Definition at line 58 of file ranimove.c.

char objtmpf[32]

Definition at line 56 of file ranimove.c.

int quickstart = 0

Definition at line 33 of file ranimove.c.

double rate

Definition at line 54 of file ranimove.c.

const char RCSid[] = "$Id: ranimove.c,v 3.13 2009/12/12 19:01:00 greg Exp $" [static]

Definition at line 2 of file ranimove.c.

int rtperfrm = 60

Definition at line 37 of file ranimove.c.

int silent = 0

Definition at line 31 of file ranimove.c.

int twolevels

Definition at line 51 of file ranimove.c.

Definition at line 28 of file ranimove.c.