+++ /dev/null
-/*****************************************************************************
-** FILE IDENTIFICATION
-**
-** File Name: kstddef.h
-** Author: Kevin Rosenberg
-** Purpose: Header file containing KRL standard C definitions
-** Date Started: Dec. 83
-**
-** This is part of the CTSim program
-** Copyright (C) 1983-2000 Kevin Rosenberg
-**
-** $Id: kstddef.h,v 1.18 2000/06/19 18:18:13 kevin Exp $
-**
-**
-** This program is free software; you can redistribute it and/or modify
-** it under the terms of the GNU General Public License (version 2) as
-** published by the Free Software Foundation.
-**
-** This program is distributed in the hope that it will be useful,
-** but WITHOUT ANY WARRANTY; without even the implied warranty of
-** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-** GNU General Public License for more details.
-**
-** You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software
-** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-******************************************************************************/
-
-#ifndef STDDEF_H
-#define STDDEF_H
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#ifdef _WIN32
-#define snprintf _snprintf
-#endif
-
-#define STR_MAX_LEN 255
-#define STR_SIZE STR_MAX_LEN+1
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#define TRUE 1
-#define FALSE 0
-#define OK TRUE
-#define ERROR FALSE
-#define YES TRUE
-#define NO FALSE
-
-/*----------------------------------------------------------------------*/
-
-#define SHOW(var, fmt) { cerr << "var = " << var << endl; }
-
-/*----------------------------------------------------------------------*/
-
-#define NEWLINE '\n'
-#define TAB '\t'
-#define EOS '\0'
-#define BLANK ' '
-
-/*----------------------------------------------------------------------*/
-
-struct time_st {
- int hour, minute, second, ms;
-};
-
-struct date_st {
- int year, month, date, dow;
-};
-
-struct timedate_st {
- struct time_st t;
- struct date_st d;
-};
-
-typedef struct time_st TIME;
-typedef struct date_st DATE;
-typedef struct timedate_st TIMEDATE;
-
-/*----------------------------------------------------------------------*/
-
-#define ERR_WARNING 0
-#define ERR_SEVERE 1
-#define ERR_FATAL 2
-
-/*----------------------------------------------------------------------*/
-
-
-/* codes for open command */
-#if MICROSOFT
-#define OPEN_RDONLY O_RDONLY /* other system use standard codes */
-#define OPEN_WRONLY O_WRONLY /* for binary */
-#define OPEN_RDWR O_RDWR
-#else
-#define OPEN_RDONLY 0 /* other system use standard codes */
-#define OPEN_WRONLY 1 /* for binary */
-#define OPEN_RDWR 2
-#endif
-
-/*----------------------------------------------------------------------*/
-
-#ifndef O_BINARY
-#define O_BINARY (0)
-#endif
-
-#ifndef S_IWRITE
-#define S_IWRITE S_IWUSR
-#endif
-
-/*----------------------------------------------------------------------*/
-
-#if defined(MICROSOFT) || ! defined(SIZEOF_INT)
- #define SIZEOF_INT 4
- #define SIZEOF_LONG 4
- #define SIZEOF_SHORT 2
- #define SIZEOF_FLOAT 4
- #define SIZEOF_DOUBLE 8
-#endif
-
-typedef signed char kint8;
-typedef unsigned char kuint8;
-
-#if SIZEOF_INT == 4
- typedef int kint32;
- typedef unsigned int kuint32;
-#elif SIZEOF_LONG == 4
- typedef long int kint32;
- typedef unsigned int kuint32;
-#endif
-
-#if SIZEOF_SHORT == 2
- typedef short int kint16;
- typedef unsigned short int kuint16;
-#elif SIZEOF_INT == 2
- typedef int kint16;
- typedef unsigned int kuint16;
-#endif
-
-#if SIZEOF_FLOAT == 4
- typedef float kfloat32;
-#endif
-#if SIZEOF_DOUBLE == 8
- typedef double kfloat64;
-#endif
-
-
-/* filefuncs.cpp */
-bool file_exists(const char* fname);
-const char* fileBasename(const char* filename);
-FILE *sys_fopen(const char *filename, const char *mode, const char *progname);
-
-/* strfuncs.cpp */
-char* str_skip_head(const char* str, const char* const charlist);
-char* str_skip_head(const char* str, char* charlist);
-char *str_lower(char *s);
-char *str_wrm_tail(char *str);
-char *str_rm_tail(char *str, const char* const charlist);
-char *str_upper(char *str);
-
-/* syserror.cpp */
-void sys_error(int severity, const char *msg, ...);
-void sys_verror(int severity, const char *msg, va_list arg);
-void sys_error_level(int severity);
-
-/* timedate.cpp */
-DATE *td_get_date(DATE *d);
-TIME *td_get_time(TIME *t);
-double td_current_sec(void);
-double td_time_to_sec(TIME *t);
-TIME *td_time_sub(const TIME *t1, const TIME *t2, TIME *tdiff);
-TIME *td_time_add(const TIME *t1, const TIME *t2, TIME *tsum);
-TIME *td_time_copy(TIME *to, const TIME *from);
-TIME *td_time_norm(TIME *t);
-void td_get_tmdt(TIMEDATE *td);
-const char *td_str_tmdt(const TIMEDATE *td);
-const char *td_str_time(const TIME *t);
-const char *td_str_stime(const TIME *t);
-const char *td_str_date(const DATE *d);
-char *td_str_cdate(DATE *d);
-char *td_month_name(int n);
-char *td_day_name(int n);
-
-#endif