r96: *** empty log message ***
[ctsim.git] / include / kstddef.h
index dfb35431e281c53a15218d0c0bc9fdc5165ece67..34e0b02dfb29526973559d835ee60f7eb87857e3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: kstddef.h,v 1.16 2000/06/13 16:20:31 kevin Exp $
+**  $Id: kstddef.h,v 1.17 2000/06/15 19:07:10 kevin Exp $
 **
 **
 **  This program is free software; you can redistribute it and/or modify
@@ -45,8 +45,6 @@
 #include <string.h>
 #include <stdarg.h>
 
-#undef SHELL
-
 #define TRUE   1
 #define FALSE  0
 #define OK     TRUE
@@ -56,7 +54,7 @@
 
 /*----------------------------------------------------------------------*/
 
-#define SHOW(var, fmt)  fprintf (stderr, "var = fmt\n", var)
+#define SHOW(var, fmt)  { cerr << "var = " << var << endl; }
 
 /*----------------------------------------------------------------------*/
 
 #define        TAB     '\t'
 #define EOS    '\0'
 #define BLANK  ' '
-#define ETX    26      /* end of text signal for PC-DOS */
-
-/*----------------------------------------------------------------------*/
-
-#define MAXPATHNAME  65                /* max length of pathname + 1 */
-#define MAXFILENAME  13                /* rootname(8) + '.'(1) + extension(3) + EOS */
-#define MAXROOTNAME   8
-#define MAXEXTNAME    3
-#define MAXFULLNAME  MAXPATHNAME + MAXFILENAME
-
-/*----------------------------------------------------------------------*/
-
-#define ABS(x)    ((x) < 0 ? -(x) : (x))
-#define SQR(x)    ((x) * (x))
-
-#define ISWAP(a,b) {int i; i = a; a = b; b = i;}
-
-#define CLIP(n,lb,ub)  if (n < lb) n = lb; else if (n > ub) n = ub
-#define STR_EQUAL(s1,s2) (strcmp (s1, s2) == 0)
 
 /*----------------------------------------------------------------------*/
 
@@ -125,15 +104,6 @@ typedef struct timedate_st TIMEDATE;
 
 /*----------------------------------------------------------------------*/
 
-/* codes for input (inp_*) routines */
-
-#define INP_ERROR   -1
-#define INP_NO      FALSE
-#define INP_YES     TRUE
-#define INP_NEITHER 'b'
-#define INP_RETURN  'r'
-#define INP_BREAK   0x8000
-
 #ifndef O_BINARY
 #define O_BINARY (0)
 #endif
@@ -178,6 +148,7 @@ typedef unsigned char kuint8;
     typedef double kfloat64;
 #endif
 
+
 /* filefuncs.cpp */
 bool file_exists(const char* fname);
 const char* fileBasename(const char* filename);
@@ -214,17 +185,4 @@ char *td_str_cdate(DATE *d);
 char *td_month_name(int n);
 char *td_day_name(int n);
 
-/* netorder.cpp */
-void *strreverse (void *dest, const void *src, size_t n);
-int read_nint16 (kuint16 *n, int fd);
-int write_nint16 (kuint16 const *n, int fd);
-int read_nint32 (kuint32 *n, int fd);
-int write_nint32 (kuint32 const *n, int fd);
-int read_nfloat32 (float *f, int fd);
-int write_nfloat32 (float const *f, int fd);
-int read_nfloat64 (double *d, int fd);
-int write_nfloat64 (double const *d, int fd);
-void ConvertNetworkOrder (void* buffer, size_t bytes);
-void ConvertReverseNetworkOrder (void* buffer, size_t bytes);
-
 #endif