Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 148961
Collapse All | Expand All

(-)Wnn/etc/bdic.c.old (-46 / +46 lines)
Lines 1013-1018 Link Here
1013
}
1013
}
1014
1014
1015
#ifdef WNN_CHECK_INODE
1015
#ifdef WNN_CHECK_INODE
1016
1017
static
1018
int
1019
check_inode(f, fh)
1020
FILE *f;
1021
struct wnn_file_head *fh;
1022
{
1023
	struct stat buf;
1024
	if(fstat(fileno(f), &buf) == -1){
1025
		return(-1);
1026
	}
1027
	if((int)buf.st_ino != fh->file_uniq.inode){
1028
		return(-1);
1029
	}
1030
	return(0);
1031
}
1032
1033
/*:::DOC_START
1034
 *
1035
 *    Function Name: dic_check_inode
1036
 *    Description  : check i-node of file
1037
 *    Parameter    :
1038
 *         f:           (In) file pointer for dictionary file
1039
 *         fh:          (In) file header
1040
 *
1041
 *    Return value : check result, 0: same, -1: different
1042
 *
1043
 *    Revision history:
1044
 *         22-Sep-94: initial
1045
 *
1046
 *:::DOC_END
1047
 */
1048
#ifdef JS
1049
static
1050
#endif
1051
int
1052
dic_check_inode(f, fh)
1053
FILE *f;
1054
struct wnn_file_head *fh;
1055
{
1056
	return(check_inode(f, fh));
1057
} /* End of dic_check_inode */
1058
1059
#ifdef WNN_CHECK_INODE
1016
static
1060
static
1017
#else 
1061
#else 
1018
#ifdef JS
1062
#ifdef JS
Lines 1050-1108 Link Here
1050
	strncpy(fh.file_uniq_org.createhost, file_uniq->createhost, WNN_HOSTLEN - 1);
1094
	strncpy(fh.file_uniq_org.createhost, file_uniq->createhost, WNN_HOSTLEN - 1);
1051
1095
1052
	fh.file_type = file_type;
1096
	fh.file_type = file_type;
1053
	if(file_passwd){
1097
	if(file_passwd) {
1054
		strncpy(fh.file_passwd, file_passwd, WNN_PASSWD_LEN);
1098
		strncpy(fh.file_passwd, file_passwd, WNN_PASSWD_LEN);
1055
	} else{
1099
	} else {
1056
		memset(fh.file_passwd, 0, WNN_PASSWD_LEN);
1100
		memset(fh.file_passwd, 0, WNN_PASSWD_LEN);
1057
	}
1101
	}
1058
	if(output_file_header(ofpter, &fh) == -1) return(-1);
1102
	if(output_file_header(ofpter, &fh) == -1) return(-1);
1059
	return(0);
1103
	return(0);
1060
}
1104
}
1061
1105
1062
#ifdef WNN_CHECK_INODE
1063
1064
static
1065
int
1066
check_inode(f, fh)
1067
FILE *f;
1068
struct wnn_file_head *fh;
1069
{
1070
	struct stat buf;
1071
	if(fstat(fileno(f), &buf) == -1){
1072
		return(-1);
1073
	}
1074
	if((int)buf.st_ino != fh->file_uniq.inode){
1075
		return(-1);
1076
	}
1077
	return(0);
1078
}
1079
1080
/*:::DOC_START
1081
 *
1082
 *    Function Name: dic_check_inode
1083
 *    Description  : check i-node of file
1084
 *    Parameter    :
1085
 *         f:           (In) file pointer for dictionary file
1086
 *         fh:          (In) file header
1087
 *
1088
 *    Return value : check result, 0: same, -1: different
1089
 *
1090
 *    Revision history:
1091
 *         22-Sep-94: initial
1092
 *
1093
 *:::DOC_END
1094
 */
1095
#ifdef JS
1096
static
1097
#endif
1098
int
1099
dic_check_inode(f, fh)
1100
FILE *f;
1101
struct wnn_file_head *fh;
1102
{
1103
	return(check_inode(f, fh));
1104
} /* End of dic_check_inode */
1105
1106
#ifdef JS
1106
#ifdef JS
1107
static
1107
static
1108
#endif
1108
#endif
(-)Wnn/jlib/jl.c.old (-13 / +11 lines)
Lines 558-564 Link Here
558
	    ));
558
	    ));
559
}
559
}
560
560
561
static void
562
jl_disconnect_if_server_dead_body_by_jsid(jsid)
563
register WNN_JSERVER_ID	*jsid;
564
{
565
	register struct wnn_env_int *same_env;
561
566
567
	while ((same_env = find_env_of_same_js_id(jsid)) != 0) {
568
		if (delete_env(same_env))
569
			js_disconnect((WNN_ENV *)same_env);
570
	}
571
	js_close(jsid);
572
}
562
573
563
static struct wnn_env *
574
static struct wnn_env *
564
jl_connect_lang_core(env_n, server_n, lang, wnnrc_n,
575
jl_connect_lang_core(env_n, server_n, lang, wnnrc_n,
Lines 734-752 Link Here
734
	js_close(js_id);
745
	js_close(js_id);
735
}
746
}
736
747
737
static void
738
jl_disconnect_if_server_dead_body_by_jsid(jsid)
739
register WNN_JSERVER_ID	*jsid;
740
{
741
	register struct wnn_env_int *same_env;
742
743
	while ((same_env = find_env_of_same_js_id(jsid)) != 0) {
744
		if (delete_env(same_env))
745
			js_disconnect((WNN_ENV *)same_env);
746
	}
747
	js_close(jsid);
748
}
749
750
void
748
void
751
jl_disconnect_if_server_dead(env)
749
jl_disconnect_if_server_dead(env)
752
register struct wnn_env *env;
750
register struct wnn_env *env;

Return to bug 148961