Back to index

radiance  4R0+20100331
Functions | Variables
fixargv0.c File Reference
#include "copyright.h"
#include <ctype.h>

Go to the source code of this file.

Functions

char * fixargv0 (char *av0)

Variables

static const char RCSid [] = "$Id: fixargv0.c,v 2.5 2003/10/27 10:19:31 schorsch Exp $"

Function Documentation

char* fixargv0 ( char *  av0)

Definition at line 15 of file fixargv0.c.

{
       register char  *cp = av0;

       while (*cp) cp++;           /* start from end */
       while (cp-- > av0)
              switch (*cp) {              /* fix up command name */
              case '.':                   /* remove extension */
                     *cp = '\0';
                     continue;
              case '\\':                  /* remove directory */
                     return(cp+1);
              default:                    /* convert to lower case */
                     *cp = tolower(*cp);
                     continue;
              }
       return(av0);
}

Here is the caller graph for this function:


Variable Documentation

const char RCSid[] = "$Id: fixargv0.c,v 2.5 2003/10/27 10:19:31 schorsch Exp $" [static]

Definition at line 2 of file fixargv0.c.