X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=include%2Fkstddef.h;h=00fbddd2c206dc587c7b25429942c4e491955611;hp=f02ea8dd6b27c01201fa949e409a08d91b7d5cc3;hb=2451ac413848718a1dd666ce6f6464e974680f47;hpb=c15d94034f5f815fc058c49c4b16f48ded042fd9 diff --git a/include/kstddef.h b/include/kstddef.h index f02ea8d..00fbddd 100644 --- a/include/kstddef.h +++ b/include/kstddef.h @@ -2,8 +2,17 @@ ** 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.15 2000/06/09 01:35:33 kevin Exp $ ** $Log: kstddef.h,v $ +** Revision 1.15 2000/06/09 01:35:33 kevin +** Convert MPI structure to C++ class +** +** Revision 1.14 2000/06/07 03:49:54 kevin +** *** empty log message *** +** +** 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 +95,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 +217,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 +243,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,12 +312,16 @@ 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); int write_nfloat64 (double const *d, int fd); +void ConvertNetworkOrder (void* buffer, size_t bytes); +void ConvertReverseNetworkOrder (void* buffer, size_t bytes); #ifdef __cplusplus }