Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2897 by maya, Wed Aug 9 15:13:17 2006 UTC revision 2901 by maya, Mon Aug 21 12:21:33 2006 UTC
# Line 1226  static void replace_to_blank(char *src, Line 1226  static void replace_to_blank(char *src,
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  {  {
# Line 1243  static int parse_option(PTInstVar pvar, Line 1274  static int parse_option(PTInstVar pvar,
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
# Line 1251  static int parse_option(PTInstVar pvar, Line 1286  static int parse_option(PTInstVar pvar,
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];
# Line 1272  static int parse_option(PTInstVar pvar, Line 1311  static int parse_option(PTInstVar pvar,
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) {
# Line 3133  int CALLBACK LibMain(HANDLE hInstance, W Line 3176  int CALLBACK LibMain(HANDLE hInstance, W
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   *   *

Legend:
Removed from v.2897  
changed lines
  Added in v.2901

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26