
/*---------------------------------------------------------------*/
/*   Copyright (c) 1988 Regents of the University of California  */
/*                 All Rights Reserved                           */
/*---------------------------------------------------------------*/
/*
       @(#)ext.c	1.1   (UCLA/IGPP)   11 Dec 1992
*/
/* -- STRIP_EXTENSION -------------------------------------- */
/*   Strips the . extension from the file (or path) name     */
/*							     */
/* ENTRY REQUIREMENTS:                                       */
/*    PATHNAME: a string which contains the the path and     */
/*       filename.					     */
/*                                                           */
/* RETURN VALUES:                                            */
/*    returns a pointer to PATHNAME                          */
/*    PATHNAME is modified to contain just the file name.    */
/*                                                           */
/* Development History:                                      */
/*   Begun:  7/18/88 - Scott Bendar                          */
/*            Under ???? support.                            */
/* --------------------------------------------------------- */

#include <stdio.h>

char *strip_extension(pathname)
char *pathname;
{
  char *last,
       *strrchr();

  if ((last = strrchr(pathname,'.')) != NULL)      /* check for extension */
     *last = '\0';                 /* mark end of string at extension point */               
  return pathname;       /* return ptr to string */
}

