Back to index

tetex-bin  3.0
Functions
xbasename.c File Reference
#include <kpathsea/config.h>
#include <kpathsea/c-pathch.h>

Go to the source code of this file.

Functions

const_string xbasename P1C (const_string, name)

Function Documentation

const_string xbasename P1C ( const_string  ,
name   
)

Definition at line 29 of file xbasename.c.

{
  const_string base = NULL;
  unsigned len;
  
  for (len = strlen (name); len > 0; len--) {
    if (IS_DIR_SEP (name[len - 1]) || IS_DEVICE_SEP (name[len - 1])) {
      base = name + len;
      break;
    }
  }

  if (!base)
    base = name;
  
  return base;
}

Here is the call graph for this function: