** 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.7 2000/11/28 14:54:07 kevin Exp $
**
**
** This program is free software; you can redistribute it and/or modify
#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);
// Math Section
-#include <math.h>
+#include <cmath>
#define PI 3.14159265358979323846
#define HALFPI 1.57079632679489661923 /* PI divided by 2 */
double integrateSimpson (const double xmin, const double xmax, const double *y, const int np);
-// Console I/O Section
-
-#define C_BLACK 0 /* color codes */
-#define C_BLUE 1
-#define C_GREEN 2
-#define C_CYAN 3
-#define C_RED 4
-#define C_MAGENTA 5
-#define C_BROWN 6
-#define C_WHITE 7
-#define C_GREY 8
-#define C_LTBLUE 9
-#define C_LTGREEN 10
-#define C_LTCYAN 11
-#define C_LTRED 12
-#define C_LTMAGENTA 13
-#define C_YELLOW 14
-#define C_LTWHITE 15
-
/*----------------------------------------------------------------------*/
/* screen character codes */