r123: *** empty log message ***
[ctsim.git] / include / ctsupport.h
index f1800919f5e05df620af48d1a20352d2fc98ce5d..58274ee3039a9e37c7157a73f3dbcb7a70eef987 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsupport.h,v 1.4 2000/06/22 10:17:28 kevin Exp $
+**  $Id: ctsupport.h,v 1.5 2000/06/28 15:25:34 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -149,9 +149,13 @@ typedef unsigned char kuint8;
 #endif
 
 
-/* filefuncs.cpp */
-bool fileExists (const char* fname);
-const char* fileBasename (const char* filename);
+inline const char* 
+fileBasename (const char* const filename)
+{
+  const char* p = strrchr (filename, '/');
+  return (p ? p + 1 : filename);
+}
+
 
 /* strfuncs.cpp */
 char* str_skip_head(const char* str, const char* const charlist);