From 44ba0e9facc91003bf3ef32876f8b8ac5439c3c1 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Sun, 7 May 2000 12:46:19 +0000 Subject: [PATCH] r40: made c++ compatible --- include/cio.h | 49 +++++++++++++---------------------------------- include/ezplot.h | 15 ++++++++++++++- include/ir.h | 13 ++++++++++++- include/kmath.h | 14 +++++++++++--- include/kstddef.h | 14 +++++++++++++- include/pol.h | 13 ++++++++++++- include/sdf.h | 12 +++++++++++- include/sgp.h | 14 +++++++++++++- 8 files changed, 99 insertions(+), 45 deletions(-) diff --git a/include/cio.h b/include/cio.h index a96a67f..7057bd4 100644 --- a/include/cio.h +++ b/include/cio.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: cio.h,v 1.4 2000/04/28 18:18:59 kevin Exp $ +** $Id: cio.h,v 1.5 2000/05/07 12:46:19 kevin Exp $ ** $Log: cio.h,v $ +** Revision 1.5 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.4 2000/04/28 18:18:59 kevin ** removed unused files ** @@ -27,6 +30,11 @@ #ifndef __CIO_H #define __CIO_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + struct crtv_st { int init; /* True if initialized */ int bios_mode; /* Current BIOS crt mode */ @@ -46,34 +54,6 @@ struct crtv_st { #define CRT_ROWS 25 #define CRT_COLS 80 -/* crt modes */ - -#define GM_TEXT40 1 /* color */ -#define GM_TEXT80 3 /* color */ -#define GM_320x200 4 /* color */ -#define GM_640x200 6 -#define GM_MONOTEXT 7 -#define GM_E320x200 13 -#define GM_E640x200 14 -#define GM_MONOGRF 15 -#define GM_ENHANCED 16 - -#define GM_640x480x16 0x12 -#define GM_640x480x256 0x2E -#define GM_1024x768x16 0x37 -#define GM_1024x768x256 0x38 - - - -#define GM_TEXT -1 -#define GM_HIGHRES -2 -#define GM_MEDRES -3 - -#define CRT_NONE -1 -#define CRT_MONO 0 -#define CRT_COLOR 1 -#define CRT_ENHANCED 2 - /*----------------------------------------------------------------------*/ #define ATTR_NORMAL 7 @@ -105,13 +85,6 @@ struct crtv_st { #define SC_TAB 9 #define SC_BLANK ' ' -#define SC_TOP_LEFT 218 -#define SC_TOP_RIGHT 191 -#define SC_BOTT_LEFT 192 -#define SC_BOTT_RIGHT 217 -#define SC_HORIZ 196 -#define SC_VERTICAL 179 - #define WAITKEY() {cio_kb_clr(); while (cio_kb_read() == 0);} @@ -173,4 +146,8 @@ void cio_tone(double freq, double length); /* check_kb */ int cio_check_kb_escape(void); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/include/ezplot.h b/include/ezplot.h index 26a4c34..988c053 100644 --- a/include/ezplot.h +++ b/include/ezplot.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezplot.h,v 1.2 2000/04/28 14:14:16 kevin Exp $ +** $Id: ezplot.h,v 1.3 2000/05/07 12:46:19 kevin Exp $ ** $Log: ezplot.h,v $ +** Revision 1.3 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.2 2000/04/28 14:14:16 kevin ** *** empty log message *** ** @@ -29,6 +32,11 @@ #ifndef __H_EZPLOT #define __H_EZPLOT +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + #include #include #include "kstddef.h" @@ -331,4 +339,9 @@ int ezset(char *command); /* makefmt.c */ void make_numfmt(char *fmtstr, int *fldwid, int *nfrac, double min, double max, int nint); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + #endif diff --git a/include/ir.h b/include/ir.h index 5a0b729..fbab3fc 100644 --- a/include/ir.h +++ b/include/ir.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ir.h,v 1.11 2000/05/05 02:37:31 kevin Exp $ +** $Id: ir.h,v 1.12 2000/05/07 12:46:19 kevin Exp $ ** $Log: ir.h,v $ +** Revision 1.12 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.11 2000/05/05 02:37:31 kevin ** renamed phmelm to pelm ** @@ -63,6 +66,10 @@ #ifndef IR_H #define IR_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #ifdef MPI_CT #define MPI_MAX_PROCESS 128 struct mpi_ct_st @@ -500,4 +507,8 @@ int detarray_read(RAYSUM *rs, DETARRAY *darray, const int view_num); int detarray_write(RAYSUM *rs, const DETARRAY *darray, const int view_num); int raysum_print(const RAYSUM *rs); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/include/kmath.h b/include/kmath.h index 2a81454..e250a06 100644 --- a/include/kmath.h +++ b/include/kmath.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: kmath.h,v 1.7 2000/05/04 18:16:34 kevin Exp $ +** $Id: kmath.h,v 1.8 2000/05/07 12:46:19 kevin Exp $ ** $Log: kmath.h,v $ +** Revision 1.8 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.7 2000/05/04 18:16:34 kevin ** renamed filter definitions ** @@ -47,6 +50,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define PI 3.14159265358979323846 #define HALFPI 1.57079632679489661923 /* PI divided by 2 */ #define QUARTPI 0.78539816339744830962 /* PI divided by 4 */ @@ -219,7 +226,8 @@ void rotate2d(double x[], double y[], int pts, double angle); void xlat2d(double x[], double y[], int pts, double xoffset, double yoffset); void scale2d(double x[], double y[], int pts, double xfact, double yfact); - - +#ifdef __cplusplus +} +#endif /* __cplusplus */ #endif diff --git a/include/kstddef.h b/include/kstddef.h index 5634ef9..4a5771c 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.6 2000/05/03 19:51:41 kevin Exp $ +** $Id: kstddef.h,v 1.7 2000/05/07 12:46:19 kevin Exp $ ** $Log: kstddef.h,v $ +** Revision 1.7 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.6 2000/05/03 19:51:41 kevin ** function renaming for phantoms and phantom elements ** @@ -52,6 +55,11 @@ #ifndef STDDEF_H #define STDDEF_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + #include #include #include @@ -233,4 +241,8 @@ char *td_str_cdate(DATE *d); char *td_month_name(int n); char *td_day_name(int n); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/include/pol.h b/include/pol.h index b7a484b..2d89324 100644 --- a/include/pol.h +++ b/include/pol.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: pol.h,v 1.2 2000/04/28 14:14:16 kevin Exp $ +** $Id: pol.h,v 1.3 2000/05/07 12:46:19 kevin Exp $ ** $Log: pol.h,v $ +** Revision 1.3 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.2 2000/04/28 14:14:16 kevin ** *** empty log message *** ** @@ -24,6 +27,10 @@ #ifndef __H_POL #define __H_POL +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* codes for pol_usefile */ #define P_USE_STR 1 /* use string as input source */ @@ -112,4 +119,8 @@ void pol_ungetch(int c); int get_inputline(FILE *fp); void set_inputline(char *line); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/include/sdf.h b/include/sdf.h index be1c793..a158550 100644 --- a/include/sdf.h +++ b/include/sdf.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sdf.h,v 1.2 2000/04/28 14:14:16 kevin Exp $ +** $Id: sdf.h,v 1.3 2000/05/07 12:46:19 kevin Exp $ ** $Log: sdf.h,v $ +** Revision 1.3 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.2 2000/04/28 14:14:16 kevin ** *** empty log message *** ** @@ -34,6 +37,9 @@ #include "kmath.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ /*----------------*/ /* SYSTEM ALIASES */ @@ -338,4 +344,8 @@ char *sdf_2d_alloc_row(const int nrow, SDF_2D *imp); char *sdf_2d_alloc_col(const int ncol, SDF_2D *imp); void sdf_2d_error(const SDF_2D *imp, const char *str, ...); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif diff --git a/include/sgp.h b/include/sgp.h index e6a9305..fc878ec 100644 --- a/include/sgp.h +++ b/include/sgp.h @@ -2,8 +2,11 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: sgp.h,v 1.4 2000/04/30 19:17:35 kevin Exp $ +** $Id: sgp.h,v 1.5 2000/05/07 12:46:19 kevin Exp $ ** $Log: sgp.h,v $ +** Revision 1.5 2000/05/07 12:46:19 kevin +** made c++ compatible +** ** Revision 1.4 2000/04/30 19:17:35 kevin ** Set up include files for conditional INTERACTIVE_GRAPHICS ** @@ -37,6 +40,11 @@ #include "kstddef.h" #include "kmath.h" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + /* device names */ #define CRTDEV 1 @@ -267,5 +275,9 @@ void wrtchar(int ch, int x, int y, CHARSPEC *cspec, DEVICE *dev); void wrttext(char txtstr[], int x, int y, CHARSPEC *cspec, DEVICE *dev); void crtcolor(int mode, int *f, int *b); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif -- 2.34.1