Back to index

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

Go to the source code of this file.

Functions

string find_suffix P1C (const_string, name)

Function Documentation

string find_suffix P1C ( const_string  ,
name   
)

Definition at line 28 of file find-suffix.c.

{
  const_string slash_pos;
  string dot_pos = strrchr (name, '.');
  
  if (dot_pos == NULL)
    return NULL;
  
  for (slash_pos = name + strlen (name);
       slash_pos > dot_pos && !IS_DIR_SEP (*slash_pos);
       slash_pos--)
    ;
  
  return slash_pos > dot_pos ? NULL : dot_pos + 1;
}

Here is the call graph for this function: