projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r4208: Auto commit for Debian build
[ctsim.git]
/
include
/
ctsupport.h
diff --git
a/include/ctsupport.h
b/include/ctsupport.h
index d843a085b9cb899eb3936e42c1711f7c2d9fb723..9df0c68db548251c05b63e4e97bc40ad6987d468 100644
(file)
--- a/
include/ctsupport.h
+++ b/
include/ctsupport.h
@@
-7,9
+7,9
@@
** Date Started: Dec. 83
**
** This is part of the CTSim program
** Date Started: Dec. 83
**
** This is part of the CTSim program
-** Copyright (
C) 1983-2000
Kevin Rosenberg
+** Copyright (
c) 1983-2001
Kevin Rosenberg
**
**
-** $Id: ctsupport.h,v 1.2
2 2001/01/02 16:02:12
kevin Exp $
+** $Id: ctsupport.h,v 1.2
5 2003/01/22 22:15:10
kevin Exp $
**
**
** This program is free software; you can redistribute it and/or modify
**
**
** This program is free software; you can redistribute it and/or modify
@@
-54,8
+54,12
@@
#include <sstream_subst>
#endif
#include <sstream_subst>
#endif
+#ifndef TRUE
#define TRUE 1
#define TRUE 1
+#endif
+#ifndef FALSE
#define FALSE 0
#define FALSE 0
+#endif
#define OK TRUE
/*----------------------------------------------------------------------*/
#define OK TRUE
/*----------------------------------------------------------------------*/
@@
-191,6
+195,10
@@
template<class T>
inline T nearest (double x)
{ return (x > 0 ? static_cast<T>(x+0.5) : static_cast<T>(x-0.5)); }
inline T nearest (double x)
{ return (x > 0 ? static_cast<T>(x+0.5) : static_cast<T>(x-0.5)); }
+template<class T>
+inline T maxValue (T x, T y)
+{ return (x > y ? x : y); }
+
inline bool isEven (int n)
{ return (n % 2) == 0; }
inline bool isEven (int n)
{ return (n % 2) == 0; }
@@
-295,8
+303,8
@@
unsigned int cio_kb_waitc(const char *astr, int beep);
// ASCII Section
#define BACKSPACE 8
// ASCII Section
#define BACKSPACE 8
-
#define LF
0x0A
-
#define CR
0x0D
+
// #define LF
0x0A
+
// #define CR
0x0D
#define BELL 0x07
#define SQUOTE '\''
#define BELL 0x07
#define SQUOTE '\''