| 1226 |
*dst = '\0'; |
*dst = '\0'; |
| 1227 |
} |
} |
| 1228 |
|
|
| 1229 |
|
// copy from ttermpro/ttset.c (2006.8.21 maya) |
| 1230 |
|
void Dequote(PCHAR Source, PCHAR Dest) |
| 1231 |
|
{ |
| 1232 |
|
int i, j; |
| 1233 |
|
char q, c; |
| 1234 |
|
|
| 1235 |
|
Dest[0] = 0; |
| 1236 |
|
if (Source[0]==0) return; |
| 1237 |
|
i = 0; |
| 1238 |
|
/* quoting char */ |
| 1239 |
|
q = Source[i]; |
| 1240 |
|
/* only '"' is used as quoting char */ |
| 1241 |
|
if (q!='"') |
| 1242 |
|
q = 0; |
| 1243 |
|
else |
| 1244 |
|
i++; |
| 1245 |
|
|
| 1246 |
|
c = Source[i]; |
| 1247 |
|
i++; |
| 1248 |
|
j = 0; |
| 1249 |
|
while ((c!=0) && (c!=q)) |
| 1250 |
|
{ |
| 1251 |
|
Dest[j] = c; |
| 1252 |
|
j++; |
| 1253 |
|
c = Source[i]; |
| 1254 |
|
i++; |
| 1255 |
|
} |
| 1256 |
|
|
| 1257 |
|
Dest[j] = 0; |
| 1258 |
|
} |
| 1259 |
|
|
| 1260 |
/* returns 1 if the option text must be deleted */ |
/* returns 1 if the option text must be deleted */ |
| 1261 |
static int parse_option(PTInstVar pvar, char FAR * option) |
static int parse_option(PTInstVar pvar, char FAR * option) |
| 1262 |
{ |
{ |
| 1274 |
strcat(pvar->settings.DefaultForwarding, option + 5); |
strcat(pvar->settings.DefaultForwarding, option + 5); |
| 1275 |
} |
} |
| 1276 |
} else if (MATCH_STR(option + 4, "-f=") == 0) { |
} else if (MATCH_STR(option + 4, "-f=") == 0) { |
| 1277 |
read_ssh_options_from_user_file(pvar, option + 7); |
// ファイル名が `"' で囲まれていたら取り出す (2006.8.21 maya) |
| 1278 |
|
char* buf = (char *)calloc(strlen(option), sizeof(char)); |
| 1279 |
|
Dequote(option + 7, buf); |
| 1280 |
|
read_ssh_options_from_user_file(pvar, buf); |
| 1281 |
|
free(buf); |
| 1282 |
} else if (MATCH_STR(option + 4, "-v") == 0) { |
} else if (MATCH_STR(option + 4, "-v") == 0) { |
| 1283 |
pvar->settings.LogLevel = LOG_LEVEL_VERBOSE; |
pvar->settings.LogLevel = LOG_LEVEL_VERBOSE; |
| 1284 |
} else if (_stricmp(option + 4, "-autologin") == 0 |
} else if (_stricmp(option + 4, "-autologin") == 0 |
| 1286 |
pvar->settings.TryDefaultAuth = TRUE; |
pvar->settings.TryDefaultAuth = TRUE; |
| 1287 |
|
|
| 1288 |
} else if (MATCH_STR(option + 4, "-consume=") == 0) { |
} else if (MATCH_STR(option + 4, "-consume=") == 0) { |
| 1289 |
read_ssh_options_from_user_file(pvar, option + 13); |
// ファイル名が `"' で囲まれていたら取り出す (2006.8.21 maya) |
| 1290 |
|
char* buf = (char *)calloc(strlen(option), sizeof(char)); |
| 1291 |
|
Dequote(option + 13, buf); |
| 1292 |
|
read_ssh_options_from_user_file(pvar, buf); |
| 1293 |
|
free(buf); |
| 1294 |
DeleteFile(option + 13); |
DeleteFile(option + 13); |
| 1295 |
} else { |
} else { |
| 1296 |
char buf[1024]; |
char buf[1024]; |
| 1311 |
pvar->settings.Enabled = 0; |
pvar->settings.Enabled = 0; |
| 1312 |
} |
} |
| 1313 |
} else if (MATCH_STR(option + 1, "f=") == 0) { |
} else if (MATCH_STR(option + 1, "f=") == 0) { |
| 1314 |
read_ssh_options_from_user_file(pvar, option + 3); |
// ファイル名が `"' で囲まれていたら取り出す (2006.8.21 maya) |
| 1315 |
|
char* buf = (char *)calloc(strlen(option), sizeof(char)); |
| 1316 |
|
Dequote(option + 3, buf); |
| 1317 |
|
read_ssh_options_from_user_file(pvar, buf); |
| 1318 |
|
free(buf); |
| 1319 |
|
|
| 1320 |
// /1 および /2 オプションの新規追加 (2004.10.3 yutaka) |
// /1 および /2 オプションの新規追加 (2004.10.3 yutaka) |
| 1321 |
} else if (MATCH_STR(option + 1, "1") == 0) { |
} else if (MATCH_STR(option + 1, "1") == 0) { |
| 3176 |
|
|
| 3177 |
/* |
/* |
| 3178 |
* $Log: not supported by cvs2svn $ |
* $Log: not supported by cvs2svn $ |
| 3179 |
|
* Revision 1.37 2006/08/09 15:13:17 maya |
| 3180 |
|
* ttermpro.exe のアイコンハンドルを取得できない問題を修正した |
| 3181 |
|
* |
| 3182 |
* Revision 1.36 2006/08/09 09:13:49 maya |
* Revision 1.36 2006/08/09 09:13:49 maya |
| 3183 |
* タイトルバーのアイコンに小さいアイコンが使用されていなかったのを修正した |
* タイトルバーのアイコンに小さいアイコンが使用されていなかったのを修正した |
| 3184 |
* |
* |