Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
Functions | Variables
cmd_name.c File Reference

Go to the source code of this file.

Functions

char * cmd_name (char **argv)
 

Variables

static char no_name [] = "(no-name)"
 

Function Documentation

char* cmd_name ( char **  argv)

Definition at line 31 of file cmd_name.c.

33 {
34  register char *cp, *a;
35 
36  /* Be paranoid. */
37  if ( !argv || !(a = *argv) )
38  return no_name;
39 
40  /* Find end of file name. */
41  for ( cp = a; *cp; cp++ )
42  ;
43 
44  /* Find last / or beginning of command name. */
45  for ( cp--; *cp != '/' && cp > a; cp-- )
46  ;
47 
48  /* If it's a /, skip it. */
49  if ( *cp == '/' )
50  cp++;
51 
52  return cp;
53 }
static char no_name[]
Definition: cmd_name.c:28

Variable Documentation

char no_name[] = "(no-name)"
static

Definition at line 28 of file cmd_name.c.