** 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
#include <string.h>
#include <stdarg.h>
-#undef SHELL
-
#define TRUE 1
#define FALSE 0
#define OK TRUE
/*----------------------------------------------------------------------*/
-#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)
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
-/* 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
typedef double kfloat64;
#endif
+
/* filefuncs.cpp */
bool file_exists(const char* fname);
const char* fileBasename(const char* filename);
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