Back to index

tetex-bin  3.0
Functions
basename.c File Reference
#include <stdio.h>
#include "basics.h"
#include "filenames.h"

Go to the source code of this file.

Functions

 main (int argc, char **argv)

Function Documentation

main ( int  argc,
char **  argv 
)

Definition at line 13 of file basename.c.

{
   if (argc < 2 || argc > 3) 
      fatal("Usage: basename string [suffix]\n");

   if (argc == 2) 
      printf("%s\n", basename(argv[1], NULL));
   else
      printf("%s\n", basename(argv[1], argv[2]));
   exit(0);
}

Here is the call graph for this function: