| version 1.4, 2002/04/10 08:55:45 |
version 1.7, 2003/09/15 09:31:42 |
|
|
| /* -*- 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.6 2003/06/02 10:25:57 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 141 OXFILE *ox_start(char* host, char* ctl_prog, char* dat |
|
| Line 143 OXFILE *ox_start(char* host, char* ctl_prog, char* dat |
|
| OXFILE *st, *ct; |
OXFILE *st, *ct; |
| char *passwd = generate_otp(); |
char *passwd = generate_otp(); |
| int listen[2]; |
int listen[2]; |
| int ports[2] = {0}; /* short! */ |
int ports[2] = {0}; |
| |
|
| /* host を無視 */ |
/* host を無視 */ |
| listen[0] = oxf_listen(&ports[0]); |
listen[0] = oxf_listen(&ports[0]); |
| 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); |
| } |
} |
| |
|