| 153 |
if (!suppress_errors) { |
if (!suppress_errors) { |
| 154 |
if (errno == ENOENT) { |
if (errno == ENOENT) { |
| 155 |
#ifdef I18N |
#ifdef I18N |
| 156 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to read a known_hosts file.\n" |
| 157 |
|
"The specified filename does not exist."); |
| 158 |
|
UTIL_get_lang_msg("MSG_HOSTS_READ_ENOENT_ERROR", pvar); |
| 159 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 160 |
#else |
#else |
| 161 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 162 |
"An error occurred while trying to read a known_hosts file.\n" |
"An error occurred while trying to read a known_hosts file.\n" |
| 164 |
#endif |
#endif |
| 165 |
} else { |
} else { |
| 166 |
#ifdef I18N |
#ifdef I18N |
| 167 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to read a known_hosts file."); |
| 168 |
|
UTIL_get_lang_msg("MSG_HOSTS_READ_ERROR", pvar); |
| 169 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 170 |
#else |
#else |
| 171 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 172 |
"An error occurred while trying to read a known_hosts file."); |
"An error occurred while trying to read a known_hosts file."); |
| 184 |
if (pvar->hosts_state.file_data == NULL) { |
if (pvar->hosts_state.file_data == NULL) { |
| 185 |
if (!suppress_errors) { |
if (!suppress_errors) { |
| 186 |
#ifdef I18N |
#ifdef I18N |
| 187 |
|
strcpy(pvar->ts->UIMsg, "Memory ran out while trying to allocate space to read a known_hosts file."); |
| 188 |
|
UTIL_get_lang_msg("MSG_HOSTS_ALLOC_ERROR", pvar); |
| 189 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 190 |
#else |
#else |
| 191 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 192 |
"Memory ran out while trying to allocate space to read a known_hosts file."); |
"Memory ran out while trying to allocate space to read a known_hosts file."); |
| 198 |
} else { |
} else { |
| 199 |
if (!suppress_errors) { |
if (!suppress_errors) { |
| 200 |
#ifdef I18N |
#ifdef I18N |
| 201 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to read a known_hosts file."); |
| 202 |
|
UTIL_get_lang_msg("MSG_HOSTS_READ_ERROR", pvar); |
| 203 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 204 |
#else |
#else |
| 205 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 206 |
"An error occurred while trying to read a known_hosts file."); |
"An error occurred while trying to read a known_hosts file."); |
| 218 |
if (amount_read != length) { |
if (amount_read != length) { |
| 219 |
if (!suppress_errors) { |
if (!suppress_errors) { |
| 220 |
#ifdef I18N |
#ifdef I18N |
| 221 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to read a known_hosts file."); |
| 222 |
|
UTIL_get_lang_msg("MSG_HOSTS_READ_ERROR", pvar); |
| 223 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 224 |
#else |
#else |
| 225 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 226 |
"An error occurred while trying to read a known_hosts file."); |
"An error occurred while trying to read a known_hosts file."); |
| 656 |
if (!is_pattern_char(ch) || ch == '*' || ch == '?') { |
if (!is_pattern_char(ch) || ch == '*' || ch == '?') { |
| 657 |
if (!suppress_errors) { |
if (!suppress_errors) { |
| 658 |
#ifdef I18N |
#ifdef I18N |
| 659 |
|
strcpy(pvar->ts->UIMsg, "The host name contains an invalid character.\n" |
| 660 |
|
"This session will be terminated."); |
| 661 |
|
UTIL_get_lang_msg("MSG_HOSTS_HOSTNAME_INVALID_ERROR", pvar); |
| 662 |
|
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 663 |
#else |
#else |
| 664 |
notify_fatal_error(pvar, |
notify_fatal_error(pvar, |
| 665 |
"The host name contains an invalid character.\n" |
"The host name contains an invalid character.\n" |
| 673 |
if (i == 0) { |
if (i == 0) { |
| 674 |
if (!suppress_errors) { |
if (!suppress_errors) { |
| 675 |
#ifdef I18N |
#ifdef I18N |
| 676 |
|
strcpy(pvar->ts->UIMsg, "The host name should not be empty.\n" |
| 677 |
|
"This session will be terminated."); |
| 678 |
|
UTIL_get_lang_msg("MSG_HOSTS_HOSTNAME_EMPTY_ERROR", pvar); |
| 679 |
|
notify_fatal_error(pvar, pvar->ts->UIMsg); |
| 680 |
#else |
#else |
| 681 |
notify_fatal_error(pvar, "The host name should not be empty.\n" |
notify_fatal_error(pvar, "The host name should not be empty.\n" |
| 682 |
"This session will be terminated."); |
"This session will be terminated."); |
| 955 |
|
|
| 956 |
if (name == NULL || name[0] == 0) { |
if (name == NULL || name[0] == 0) { |
| 957 |
#ifdef I18N |
#ifdef I18N |
| 958 |
|
strcpy(pvar->ts->UIMsg, "The host and its key cannot be added, because no known-hosts file has been specified.\n" |
| 959 |
|
"Restart Teraterm and specify a read/write known-hosts file in the TTSSH Setup dialog box."); |
| 960 |
|
UTIL_get_lang_msg("MSG_HOSTS_FILE_UNSPECIFY_ERROR", pvar); |
| 961 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 962 |
#else |
#else |
| 963 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 964 |
"The host and its key cannot be added, because no known-hosts file has been specified.\n" |
"The host and its key cannot be added, because no known-hosts file has been specified.\n" |
| 980 |
if (fd == -1) { |
if (fd == -1) { |
| 981 |
if (errno == EACCES) { |
if (errno == EACCES) { |
| 982 |
#ifdef I18N |
#ifdef I18N |
| 983 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to write the host key.\n" |
| 984 |
|
"You do not have permission to write to the known-hosts file."); |
| 985 |
|
UTIL_get_lang_msg("MSG_HOSTS_WRITE_EACCES_ERROR", pvar); |
| 986 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 987 |
#else |
#else |
| 988 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 989 |
"An error occurred while trying to write the host key.\n" |
"An error occurred while trying to write the host key.\n" |
| 991 |
#endif |
#endif |
| 992 |
} else { |
} else { |
| 993 |
#ifdef I18N |
#ifdef I18N |
| 994 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to write the host key.\n" |
| 995 |
|
"The host key could not be written."); |
| 996 |
|
UTIL_get_lang_msg("MSG_HOSTS_WRITE_ERROR", pvar); |
| 997 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 998 |
#else |
#else |
| 999 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 1000 |
"An error occurred while trying to write the host key.\n" |
"An error occurred while trying to write the host key.\n" |
| 1010 |
|
|
| 1011 |
if (amount_written != length || close_result == -1) { |
if (amount_written != length || close_result == -1) { |
| 1012 |
#ifdef I18N |
#ifdef I18N |
| 1013 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to write the host key.\n" |
| 1014 |
|
"The host key could not be written."); |
| 1015 |
|
UTIL_get_lang_msg("MSG_HOSTS_WRITE_ERROR", pvar); |
| 1016 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 1017 |
#else |
#else |
| 1018 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 1019 |
"An error occurred while trying to write the host key.\n" |
"An error occurred while trying to write the host key.\n" |
| 1045 |
|
|
| 1046 |
if (name == NULL || name[0] == 0) { |
if (name == NULL || name[0] == 0) { |
| 1047 |
#ifdef I18N |
#ifdef I18N |
| 1048 |
|
strcpy(pvar->ts->UIMsg, "The host and its key cannot be added, because no known-hosts file has been specified.\n" |
| 1049 |
|
"Restart Teraterm and specify a read/write known-hosts file in the TTSSH Setup dialog box."); |
| 1050 |
|
UTIL_get_lang_msg("MSG_HOSTS_FILE_UNSPECIFY_ERROR", pvar); |
| 1051 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 1052 |
#else |
#else |
| 1053 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 1054 |
"The host and its key cannot be added, because no known-hosts file has been specified.\n" |
"The host and its key cannot be added, because no known-hosts file has been specified.\n" |
| 1076 |
if (fd == -1) { |
if (fd == -1) { |
| 1077 |
if (errno == EACCES) { |
if (errno == EACCES) { |
| 1078 |
#ifdef I18N |
#ifdef I18N |
| 1079 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to write the host key.\n" |
| 1080 |
|
"You do not have permission to write to the known-hosts file."); |
| 1081 |
|
UTIL_get_lang_msg("MSG_HOSTS_WRITE_EACCES_ERROR", pvar); |
| 1082 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 1083 |
#else |
#else |
| 1084 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 1085 |
"An error occurred while trying to write the host key.\n" |
"An error occurred while trying to write the host key.\n" |
| 1087 |
#endif |
#endif |
| 1088 |
} else { |
} else { |
| 1089 |
#ifdef I18N |
#ifdef I18N |
| 1090 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to write the host key.\n" |
| 1091 |
|
"The host key could not be written."); |
| 1092 |
|
UTIL_get_lang_msg("MSG_HOSTS_WRITE_ERROR", pvar); |
| 1093 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 1094 |
#else |
#else |
| 1095 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 1096 |
"An error occurred while trying to write the host key.\n" |
"An error occurred while trying to write the host key.\n" |
| 1214 |
close_result = _close(fd); |
close_result = _close(fd); |
| 1215 |
if (amount_written != length || close_result == -1) { |
if (amount_written != length || close_result == -1) { |
| 1216 |
#ifdef I18N |
#ifdef I18N |
| 1217 |
|
strcpy(pvar->ts->UIMsg, "An error occurred while trying to write the host key.\n" |
| 1218 |
|
"The host key could not be written."); |
| 1219 |
|
UTIL_get_lang_msg("MSG_HOSTS_WRITE_ERROR", pvar); |
| 1220 |
|
notify_nonfatal_error(pvar, pvar->ts->UIMsg); |
| 1221 |
#else |
#else |
| 1222 |
notify_nonfatal_error(pvar, |
notify_nonfatal_error(pvar, |
| 1223 |
"An error occurred while trying to write the host key.\n" |
"An error occurred while trying to write the host key.\n" |
| 1547 |
|
|
| 1548 |
/* |
/* |
| 1549 |
* $Log: not supported by cvs2svn $ |
* $Log: not supported by cvs2svn $ |
| 1550 |
|
* Revision 1.11 2006/11/30 09:56:43 maya |
| 1551 |
|
* 表示メッセージの読み込み対応 |
| 1552 |
|
* |
| 1553 |
* Revision 1.10 2006/11/23 02:19:30 maya |
* Revision 1.10 2006/11/23 02:19:30 maya |
| 1554 |
* 表示メッセージを言語ファイルから読み込みむコードの作成を開始した。 |
* 表示メッセージを言語ファイルから読み込みむコードの作成を開始した。 |
| 1555 |
* |
* |