|
|
} | } |
| |
#ifdef WNN_CHECK_INODE | #ifdef WNN_CHECK_INODE |
|
|
|
static |
|
int |
|
check_inode(f, fh) |
|
FILE *f; |
|
struct wnn_file_head *fh; |
|
{ |
|
struct stat buf; |
|
if(fstat(fileno(f), &buf) == -1){ |
|
return(-1); |
|
} |
|
if((int)buf.st_ino != fh->file_uniq.inode){ |
|
return(-1); |
|
} |
|
return(0); |
|
} |
|
|
|
/*:::DOC_START |
|
* |
|
* Function Name: dic_check_inode |
|
* Description : check i-node of file |
|
* Parameter : |
|
* f: (In) file pointer for dictionary file |
|
* fh: (In) file header |
|
* |
|
* Return value : check result, 0: same, -1: different |
|
* |
|
* Revision history: |
|
* 22-Sep-94: initial |
|
* |
|
*:::DOC_END |
|
*/ |
|
#ifdef JS |
|
static |
|
#endif |
|
int |
|
dic_check_inode(f, fh) |
|
FILE *f; |
|
struct wnn_file_head *fh; |
|
{ |
|
return(check_inode(f, fh)); |
|
} /* End of dic_check_inode */ |
|
|
|
#ifdef WNN_CHECK_INODE |
static | static |
#else | #else |
#ifdef JS | #ifdef JS |
|
|
strncpy(fh.file_uniq_org.createhost, file_uniq->createhost, WNN_HOSTLEN - 1); | strncpy(fh.file_uniq_org.createhost, file_uniq->createhost, WNN_HOSTLEN - 1); |
| |
fh.file_type = file_type; | fh.file_type = file_type; |
if(file_passwd){ |
if(file_passwd) { |
strncpy(fh.file_passwd, file_passwd, WNN_PASSWD_LEN); | strncpy(fh.file_passwd, file_passwd, WNN_PASSWD_LEN); |
} else{ |
} else { |
memset(fh.file_passwd, 0, WNN_PASSWD_LEN); | memset(fh.file_passwd, 0, WNN_PASSWD_LEN); |
} | } |
if(output_file_header(ofpter, &fh) == -1) return(-1); | if(output_file_header(ofpter, &fh) == -1) return(-1); |
return(0); | return(0); |
} | } |
| |
#ifdef WNN_CHECK_INODE |
|
|
|
static |
|
int |
|
check_inode(f, fh) |
|
FILE *f; |
|
struct wnn_file_head *fh; |
|
{ |
|
struct stat buf; |
|
if(fstat(fileno(f), &buf) == -1){ |
|
return(-1); |
|
} |
|
if((int)buf.st_ino != fh->file_uniq.inode){ |
|
return(-1); |
|
} |
|
return(0); |
|
} |
|
|
|
/*:::DOC_START |
|
* |
|
* Function Name: dic_check_inode |
|
* Description : check i-node of file |
|
* Parameter : |
|
* f: (In) file pointer for dictionary file |
|
* fh: (In) file header |
|
* |
|
* Return value : check result, 0: same, -1: different |
|
* |
|
* Revision history: |
|
* 22-Sep-94: initial |
|
* |
|
*:::DOC_END |
|
*/ |
|
#ifdef JS |
|
static |
|
#endif |
|
int |
|
dic_check_inode(f, fh) |
|
FILE *f; |
|
struct wnn_file_head *fh; |
|
{ |
|
return(check_inode(f, fh)); |
|
} /* End of dic_check_inode */ |
|
|
|
#ifdef JS | #ifdef JS |
static | static |
#endif | #endif |
|
|
)); | )); |
} | } |
| |
|
static void |
|
jl_disconnect_if_server_dead_body_by_jsid(jsid) |
|
register WNN_JSERVER_ID *jsid; |
|
{ |
|
register struct wnn_env_int *same_env; |
| |
|
while ((same_env = find_env_of_same_js_id(jsid)) != 0) { |
|
if (delete_env(same_env)) |
|
js_disconnect((WNN_ENV *)same_env); |
|
} |
|
js_close(jsid); |
|
} |
| |
static struct wnn_env * | static struct wnn_env * |
jl_connect_lang_core(env_n, server_n, lang, wnnrc_n, | jl_connect_lang_core(env_n, server_n, lang, wnnrc_n, |
|
|
js_close(js_id); | js_close(js_id); |
} | } |
| |
static void |
|
jl_disconnect_if_server_dead_body_by_jsid(jsid) |
|
register WNN_JSERVER_ID *jsid; |
|
{ |
|
register struct wnn_env_int *same_env; |
|
|
|
while ((same_env = find_env_of_same_js_id(jsid)) != 0) { |
|
if (delete_env(same_env)) |
|
js_disconnect((WNN_ENV *)same_env); |
|
} |
|
js_close(jsid); |
|
} |
|
|
|
void | void |
jl_disconnect_if_server_dead(env) | jl_disconnect_if_server_dead(env) |
register struct wnn_env *env; | register struct wnn_env *env; |