version 1.4, 2002/04/10 08:55:45 |
version 1.6, 2003/06/02 10:25:57 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C; coding: euc-japan -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/oxf_old.c,v 1.3 2002/04/09 09:40:37 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/oxf_old.c,v 1.5 2002/04/24 07:45:14 ohara Exp $ */ |
|
|
/* このモジュールは互換性のためのものです。*/ |
/* このモジュールは互換性のためのものです。*/ |
|
|
Line 27 OXFILE *oxf_control_set(OXFILE *oxfp, OXFILE *ctl) |
|
Line 27 OXFILE *oxf_control_set(OXFILE *oxfp, OXFILE *ctl) |
|
return oxfp; |
return oxfp; |
} |
} |
|
|
|
static char *OpenXM_HOME = "/usr/local/OpenXM"; |
static char *concat_openxm_home_bin(char *s); |
static char *concat_openxm_home_bin(char *s); |
|
|
OXFILE * ox_start(char* host, char* prog1, char* prog2); |
OXFILE * ox_start(char* host, char* prog1, char* prog2); |
Line 82 static OXFILE *mysocketAccept2(int listened, char *pas |
|
Line 83 static OXFILE *mysocketAccept2(int listened, char *pas |
|
static char *concat_openxm_home_bin(char *s) |
static char *concat_openxm_home_bin(char *s) |
{ |
{ |
char *path; |
char *path; |
char *base; |
|
|
|
/* if s includes '/' then it is not concaticated. */ |
/* if s includes '/' then it is not concaticated. */ |
if (strchr(s, '/') != NULL) { |
if (strchr(s, '/') != NULL) { |
return s; |
return s; |
} |
} |
|
|
base = getenv("OpenXM_HOME"); |
path = MALLOC(strlen(OpenXM_HOME)+6+strlen(s)); |
path = malloc(strlen(base)+6+strlen(s)); |
sprintf(path, "%s/bin/%s", OpenXM_HOME, s); |
sprintf(path, "%s/bin/%s", base, s); |
|
return path; |
return path; |
} |
} |
|
|
void set_OpenXM_HOME() |
void set_OpenXM_HOME() |
{ |
{ |
/* Solaris does not have the setenv(). */ |
char *e; |
if (getenv("OpenXM_HOME") == NULL) { |
if ((e = getenv("OpenXM_HOME")) != NULL |
putenv("OpenXM_HOME=/usr/local/OpenXM"); |
#if defined(__CYGWIN__) |
|
|| (e = getenv("OPENXM_HOME")) != NULL |
|
#endif |
|
) { |
|
OpenXM_HOME = e; |
} |
} |
} |
} |
|
|
Line 108 void ox_exec_local(char* ctl_prog, char* dat_prog, int |
|
Line 111 void ox_exec_local(char* ctl_prog, char* dat_prog, int |
|
char ctl[128], dat[128]; |
char ctl[128], dat[128]; |
char localhost[MAXHOSTNAMELEN]; |
char localhost[MAXHOSTNAMELEN]; |
|
|
|
|
sprintf(ctl, "%d", portControl); |
sprintf(ctl, "%d", portControl); |
sprintf(dat, "%d", portStream); |
sprintf(dat, "%d", portStream); |
|
|
Line 201 OXFILE *ox_start_remote_with_ssh(char *dat_prog, char* |
|
Line 203 OXFILE *ox_start_remote_with_ssh(char *dat_prog, char* |
|
ssh_ox_server(remote_host, "ox", dat_prog, 1200, 1300); |
ssh_ox_server(remote_host, "ox", dat_prog, 1200, 1300); |
return ox_start_insecure(remote_host, 1200, 1300); |
return ox_start_insecure(remote_host, 1200, 1300); |
} |
} |
|
|