version working with also with redhat linux

This commit is contained in:
cvs
2002-06-13 13:05:44 +00:00
parent 442a784e5c
commit ae1ed10f5b
9 changed files with 42 additions and 71 deletions

View File

@@ -107,27 +107,9 @@ void TeccClose(pTecsClient conn) {
/* compile only when fortran c interface stuff is defined */
#ifdef __VMS
#define tecs_get_par_ tecs_get_par
#define tecs_get_mult_ tecs_get_mult
#define tecs_set_par_ tecs_set_par
#define tecs_init_ tecs_init
#define tecs_get3_ tecs_get3
#define tecs_get_ tecs_get
#define tecs_set_ tecs_set
#define tecs_is_open_ tecs_is_open
#define tecs_close_ tecs_close
#define tecs_quit_server_ tecs_quit_server
#define tecs_watch_log_ tecs_watch_log
#define tecs_get_data_ tecs_get_data
#define tecs_date_ tecs_date
#define tecs_time_ tecs_time
#define tecs_rights_ tecs_rights
#endif
static pTecsClient conn=NULL;
int tecs_set_par_(F_CHAR(name), F_CHAR(par), int *show, int name_len, int par_len) {
int F_FUN(tecs_set_par)(F_CHAR(name), F_CHAR(par), int *show, int name_len, int par_len) {
char nbuf[64], pbuf[COC_CMD_LEN];
int iret=-1;
@@ -144,7 +126,7 @@ int tecs_set_par_(F_CHAR(name), F_CHAR(par), int *show, int name_len, int par_le
OnError: return(-1);
}
int tecs_get_par_(F_CHAR(name), F_CHAR(par), int *show, int name_len, int par_len) {
int F_FUN(tecs_get_par)(F_CHAR(name), F_CHAR(par), int *show, int name_len, int par_len) {
char *b, nbuf[64], pbuf[COC_RES_LEN];
int iret=-1;
@@ -169,7 +151,7 @@ int tecs_get_par_(F_CHAR(name), F_CHAR(par), int *show, int name_len, int par_le
OnError: return(-1);
}
int tecs_get_mult_(F_CHAR(names), int *time, int *nvalues, float values[], int names_len) {
int F_FUN(tecs_get_mult)(F_CHAR(names), int *time, int *nvalues, float values[], int names_len) {
char *b, nbuf[64], pbuf[COC_RES_LEN];
char *nams, nam[32];
int i;
@@ -193,7 +175,7 @@ int tecs_get_mult_(F_CHAR(names), int *time, int *nvalues, float values[], int n
OnError: return(-1);
}
int tecs_init_(F_CHAR(startcmd), int *port, int startcmd_len) {
int F_FUN(tecs_init)(F_CHAR(startcmd), int *port, int startcmd_len) {
char sbuf[132];
STR_TO_C(sbuf, startcmd);
@@ -202,7 +184,7 @@ int tecs_init_(F_CHAR(startcmd), int *port, int startcmd_len) {
OnError: return(-1);
}
int tecs_rights_(int write) {
int F_FUN(tecs_rights)(int write) {
if (write) {
ERR_I(CocSendMagic(conn, rwCode));
} else {
@@ -212,34 +194,34 @@ int tecs_rights_(int write) {
OnError: return(-1);
}
int tecs_get_(float *temp) {
int F_FUN(tecs_get)(float *temp) {
ERR_I(TeccGet(conn, temp));
return(0);
OnError: return(-1);
}
int tecs_get3_(float *t1, float *t2, float *t3) {
int F_FUN(tecs_get3)(float *t1, float *t2, float *t3) {
ERR_I(TeccGet3(conn, t1, t2, t3));
return(0);
OnError: return(-1);
}
int tecs_set_(float *temp) {
int F_FUN(tecs_set)(float *temp) {
ERR_I(TeccSet(conn, *temp));
return(0);
OnError: return(-1);
}
int tecs_is_open_() {
int F_FUN(tecs_is_open)(void) {
return(conn!=NULL);
}
void tecs_close_(void) {
void F_FUN(tecs_close)(void) {
TeccClose(conn);
conn=NULL;
}
int tecs_quit_server_(int *kill) {
int F_FUN(tecs_quit_server)(int *kill) {
int iret;
ERR_I(iret=TeccQuitServer(conn, *kill));
@@ -247,7 +229,7 @@ int tecs_quit_server_(int *kill) {
OnError: return(-1);
}
int tecs_watch_log_(F_CHAR(list), int list_len) {
int F_FUN(tecs_watch_log)(F_CHAR(list), int list_len) {
char buf[16];
STR_TO_C(buf, list);
ERR_I(CocWatchLog(conn, buf));
@@ -255,7 +237,7 @@ int tecs_watch_log_(F_CHAR(list), int list_len) {
OnError: return(-1);
}
int tecs_get_data_(F_CHAR(names), int *startTime, int *endTime, int *step, int *tbase
int F_FUN(tecs_get_data)(F_CHAR(names), int *startTime, int *endTime, int *step, int *tbase
, float xdata[], float ydata[], int *maxLen, int *width
, int retLen[], int names_len) {
char nam[64];