X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fkstddef.h;h=a6543dc9c8e3adccee11dae3088916be2c3c75d6;hp=f02ea8dd6b27c01201fa949e409a08d91b7d5cc3;hb=07b93dbf2b66fa23c5378ab0fa42f9a7f0083380;hpb=931d1a7f12bb4ec7895c4b1300bd7df2ce758497 diff --git a/include/kstddef.h b/include/kstddef.h index f02ea8d..a6543dc 100644 --- a/include/kstddef.h +++ b/include/kstddef.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: kstddef.h,v 1.12 2000/06/05 01:32:45 kevin Exp $ +** $Id: kstddef.h,v 1.13 2000/06/07 00:59:38 kevin Exp $ ** $Log: kstddef.h,v $ +** Revision 1.13 2000/06/07 00:59:38 kevin +** added imagefiles +** ** Revision 1.12 2000/06/05 01:32:45 kevin ** Added C++ compatibility ** @@ -86,12 +89,9 @@ typedef int bool; /* Boolean variable type */ #define STR_MAX_LEN 255 #define STR_SIZE STR_MAX_LEN+1 +#if !defined(__cplusplus) typedef unsigned char string[STR_SIZE]; - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - +#endif #include #include @@ -211,6 +211,9 @@ typedef struct timedate_st TIMEDATE; #define SIZEOF_DOUBLE 8 #endif +typedef signed char kint8; +typedef unsigned char kuint8; + #if SIZEOF_INT == 4 typedef int kint32; typedef unsigned int kuint32; @@ -234,6 +237,11 @@ typedef struct timedate_st TIMEDATE; typedef double kfloat64; #endif +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + /* allocnum.c */ float *alloc_float(int n); double *alloc_double(int n); @@ -298,8 +306,10 @@ char *td_day_name(int n); /* netorder.c */ void *strreverse (void *dest, const void *src, size_t n); -int read_n32bint (kuint32 *n, int fd); -int write_n32bint (kuint32 const *n, int fd); +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);