From svnnotify @ sourceforge.jp Tue Dec 1 01:11:13 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 01 Dec 2015 01:11:13 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYxNzhdICDoi7HoqLPjgII=?= Message-ID: <1448899873.886173.103659.nullmailer@users.sourceforge.jp> Revision: 6178 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6178 Author: yutakapon Date: 2015-12-01 01:11:13 +0900 (Tue, 01 Dec 2015) Log Message: ----------- 英訳。 Modified Paths: -------------- trunk/doc/en/html/about/ctrlseq.html trunk/doc/en/html/about/history.html -------------- next part -------------- Modified: trunk/doc/en/html/about/ctrlseq.html =================================================================== --- trunk/doc/en/html/about/ctrlseq.html 2015-11-30 13:17:30 UTC (rev 6177) +++ trunk/doc/en/html/about/ctrlseq.html 2015-11-30 16:11:13 UTC (rev 6178) @@ -910,8 +910,8 @@ Pt = c ; spec Change special color number c to the color specified by spec.
- - +The Pt is the c ; spec format, and configure the color of the character attribute regarding the c at the spec.
+The c and character attribute are in the following:
 c = 0   Bold
   = 1   Underline

Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2015-11-30 13:17:30 UTC (rev 6177)
+++ trunk/doc/en/html/about/history.html	2015-11-30 16:11:13 UTC (rev 6178)
@@ -36,7 +36,7 @@
 
+ 104 Reset color number Pt. 105 Reset special color number Pt. From svnnotify @ sourceforge.jp Tue Dec 1 08:24:22 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 01 Dec 2015 08:24:22 +0900 Subject: [Ttssh2-commit] =?utf-8?q?=5B6185=5D__special_color_=E3=81=AE?= =?utf-8?b?6KiY6L+w44KS5L+u5q2j?= Message-ID: <1448925862.506215.64999.nullmailer@users.sourceforge.jp> Revision: 6185 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6185 Author: maya Date: 2015-12-01 08:24:22 +0900 (Tue, 01 Dec 2015) Log Message: ----------- special color の記述を修正 Modified Paths: -------------- trunk/doc/en/html/about/ctrlseq.html trunk/doc/ja/html/about/ctrlseq.html -------------- next part -------------- Modified: trunk/doc/en/html/about/ctrlseq.html =================================================================== --- trunk/doc/en/html/about/ctrlseq.html 2015-11-30 23:18:32 UTC (rev 6184) +++ trunk/doc/en/html/about/ctrlseq.html 2015-11-30 23:24:22 UTC (rev 6185) @@ -904,7 +904,7 @@ OSC 4 ; c ; rgb:rrrr/gggg/bbbb ST - 5 Change color. + 5 Change special color.
 Pt = c ; spec
 
Modified: trunk/doc/ja/html/about/ctrlseq.html =================================================================== --- trunk/doc/ja/html/about/ctrlseq.html 2015-11-30 23:18:32 UTC (rev 6184) +++ trunk/doc/ja/html/about/ctrlseq.html 2015-11-30 23:24:22 UTC (rev 6185) @@ -875,7 +875,7 @@ - - From svnnotify @ sourceforge.jp Wed Dec 2 00:39:57 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 02 Dec 2015 00:39:57 +0900 Subject: [Ttssh2-commit] [6188] Correct the English text. Message-ID: <1448984397.688036.3137.nullmailer@users.sourceforge.jp> Revision: 6188 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6188 Author: yutakapon Date: 2015-12-02 00:39:57 +0900 (Wed, 02 Dec 2015) Log Message: ----------- Correct the English text. Thanks to Boris. Modified Paths: -------------- trunk/doc/en/html/reference/image/dde.png trunk/doc/en/html/reference/image/dde.ppt trunk/doc/en/html/reference/image/dde_buffer.png trunk/doc/en/html/reference/image/dde_buffer.ppt trunk/doc/en/html/reference/image/dde_flowcontrol.png trunk/doc/en/html/reference/image/dde_flowcontrol.ppt trunk/doc/en/html/reference/image/devman_com0com.png trunk/doc/en/html/reference/image/library_relation.png trunk/doc/en/html/reference/image/library_relation.ppt trunk/doc/en/html/reference/image/module_relation.png trunk/doc/en/html/reference/image/module_relation.ppt trunk/doc/en/html/reference/image/pty.png trunk/doc/en/html/reference/image/pty.ppt trunk/doc/en/html/reference/image/ssh.png trunk/doc/en/html/reference/image/ssh.ppt trunk/doc/en/html/reference/image/ssh2_auth.ppt trunk/doc/en/html/reference/image/ssh2_auth1.png trunk/doc/en/html/reference/image/ssh2_auth2.png trunk/doc/en/html/reference/image/ssh2_sequence.ppt trunk/doc/en/html/reference/image/ssh2_sequence1.png trunk/doc/en/html/reference/image/ssh2_sequence2.png trunk/doc/en/html/reference/image/ssh2_sequence3.png trunk/doc/en/html/reference/image/ssh_packet_format.ppt trunk/doc/en/html/reference/image/ssh_packet_format1.png trunk/doc/en/html/reference/image/ssh_packet_format2.png trunk/doc/en/html/reference/image/ssh_recv_packet.png trunk/doc/en/html/reference/image/ssh_recv_packet.ppt trunk/doc/en/html/reference/image/x11forward.png trunk/doc/en/html/reference/image/x11forward.ppt -------------- next part -------------- Modified: trunk/doc/en/html/reference/image/dde.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/dde.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/dde_buffer.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/dde_buffer.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/dde_flowcontrol.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/dde_flowcontrol.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/devman_com0com.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/library_relation.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/library_relation.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/module_relation.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/module_relation.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/pty.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/pty.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_auth.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_auth1.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_auth2.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_sequence.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_sequence1.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_sequence2.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh2_sequence3.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh_packet_format.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh_packet_format1.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh_packet_format2.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh_recv_packet.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/ssh_recv_packet.ppt =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/x11forward.png =================================================================== (Binary files differ) Modified: trunk/doc/en/html/reference/image/x11forward.ppt =================================================================== (Binary files differ) From svnnotify @ sourceforge.jp Fri Dec 4 01:01:38 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Fri, 04 Dec 2015 01:01:38 +0900 Subject: [Ttssh2-commit] [6189] Update to OpenSSL 1.0.2e Message-ID: <1449158498.810574.31159.nullmailer@users.sourceforge.jp> Revision: 6189 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6189 Author: yutakapon Date: 2015-12-04 01:01:38 +0900 (Fri, 04 Dec 2015) Log Message: ----------- Update to OpenSSL 1.0.2e http://www.openssl.org/news/secadv/20151203.txt Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/en/html/reference/develop.txt trunk/doc/ja/html/about/history.html trunk/doc/ja/html/reference/develop.txt -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2015-12-01 15:39:57 UTC (rev 6188) +++ trunk/doc/en/html/about/history.html 2015-12-03 16:01:38 UTC (rev 6189) @@ -32,6 +32,27 @@

Tera Term

+

2016.xx.xx (Ver 4.90)

+ + + +

2015.12.01 (Ver 4.89)

+

\x83p\x83X\x83\x8F\x81[\x83h / \x83p\x83X\x83t\x83\x8C\x81[\x83Y\x93\xFC\x97\xCD

+

+ \x83p\x83X\x83\x8F\x81[\x83h / \x83p\x83X\x83t\x83\x8C\x81[\x83Y\x82?\xFC\x97?\x93\x82?A\x92?\xED\x82?_\x83C\x83A\x83\x8D\x83O\x82??\x88?\xBA\x82?悤\x82?\xAE\x8D\xEC\x82??\xE8\x82?\xB7\x81B +

+ +

\x83Z\x83L\x83\x85\x83\x8A\x83e\x83B\x8Cx\x8D\x90

ssh_known_hosts \x83t\x83@\x83C\x83\x8B

From svnnotify @ sourceforge.jp Wed Dec 9 00:29:52 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 09 Dec 2015 00:29:52 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDFdICByYW5kb20g44Oe44Kv44Ot44Kz?= =?utf-8?b?44Oe44Oz44OJ44GM44CB5oyH5a6a44GX44Gf5pyA5aSn5YCk44KS6L+U44GZ?= =?utf-8?b?56K6546H44GM5qW144KB44Gm5bCR44Gq44GE5ZWP6aGM44KS5L+u5q2j?= Message-ID: <1449588592.044990.110216.nullmailer@users.sourceforge.jp> Revision: 6201 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6201 Author: maya Date: 2015-12-09 00:29:51 +0900 (Wed, 09 Dec 2015) Log Message: ----------- random マクロコマンドが、指定した最大値を返す確率が極めて少ない問題を修正 Modified Paths: -------------- trunk/teraterm/ttpmacro/ttl.c -------------- next part -------------- Modified: trunk/teraterm/ttpmacro/ttl.c =================================================================== --- trunk/teraterm/ttpmacro/ttl.c 2015-12-08 03:27:08 UTC (rev 6200) +++ trunk/teraterm/ttpmacro/ttl.c 2015-12-08 15:29:51 UTC (rev 6201) @@ -3550,7 +3550,7 @@ TVarId VarId; WORD Err; int MaxNum, Num; - double d; + //double d; Err = 0; GetIntVar(&VarId,&Err); @@ -3567,9 +3567,10 @@ srand((unsigned int)time(NULL)); } //d = (1.0 / (RAND_MAX + 1.0)) * (rand() + 0.5); - d = rand(); - d = (rand() / (double)RAND_MAX) * MaxNum; - Num = (int)d; + //d = rand(); + //d = (rand() / (double)RAND_MAX) * MaxNum; + //Num = (int)d; + Num = (int)(rand() / (RAND_MAX + 1.0) * (MaxNum + 1)); SetIntVal(VarId,Num); From svnnotify @ sourceforge.jp Wed Dec 9 00:32:40 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 09 Dec 2015 00:32:40 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDJdICDlpInmm7TlsaXmrbTmm7TmlrAg?= =?utf-8?q?r6201?= Message-ID: <1449588760.625051.118802.nullmailer@users.sourceforge.jp> Revision: 6202 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6202 Author: maya Date: 2015-12-09 00:32:40 +0900 (Wed, 09 Dec 2015) Log Message: ----------- 変更履歴更新 r6201 Revision Links: -------------- http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6201 Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2015-12-08 15:29:51 UTC (rev 6201) +++ trunk/doc/en/html/about/history.html 2015-12-08 15:32:40 UTC (rev 6202) @@ -42,6 +42,7 @@
  • Bug fixes
  • @@ -53,7 +54,6 @@ -

    2015.12.01 (Ver 4.89)

    -

    Security Warning

    Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2015-12-08 15:47:37 UTC (rev 6203) +++ trunk/doc/ja/html/about/history.html 2015-12-09 15:47:09 UTC (rev 6204) @@ -42,7 +42,7 @@
  • \x83o\x83O\x8FC\x90\xB3
  • From svnnotify @ sourceforge.jp Thu Dec 10 00:56:56 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 10 Dec 2015 00:56:56 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDVdICDoi7HoqLPjgII=?= Message-ID: <1449676616.969625.14577.nullmailer@users.sourceforge.jp> Revision: 6205 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6205 Author: yutakapon Date: 2015-12-10 00:56:56 +0900 (Thu, 10 Dec 2015) Log Message: ----------- 英訳。 Modified Paths: -------------- trunk/doc/en/html/macro/command/exec.html -------------- next part -------------- Modified: trunk/doc/en/html/macro/command/exec.html =================================================================== --- trunk/doc/en/html/macro/command/exec.html 2015-12-09 15:47:09 UTC (rev 6204) +++ trunk/doc/en/html/macro/command/exec.html 2015-12-09 15:56:56 UTC (rev 6205) @@ -77,14 +77,16 @@

    Note

    - +Please use the sysnative alias and launches the native application in the system directory to resolve this problem. +

     ; fail
    
    From svnnotify @ sourceforge.jp  Thu Dec 10 01:36:28 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Thu, 10 Dec 2015 01:36:28 +0900
    Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDZdICDjg7vmk6zkvLzkubHmlbDnlJ8=?=
     =?utf-8?b?5oiQ5Zmo44Go44GX44GmIFNGTVQgWzFdICDjgpLliKnnlKjjgZnjgovjgog=?=
     =?utf-8?b?44GG44Gr44GX44Gf?=
    Message-ID: <1449678988.625806.70485.nullmailer@users.sourceforge.jp>
    
    Revision: 6206
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6206
    Author:   doda
    Date:     2015-12-10 01:36:28 +0900 (Thu, 10 Dec 2015)
    Log Message:
    -----------
    ・擬似乱数生成器として SFMT [1] を利用するようにした
    ・乱数が偏る問題を修正 [2][3][4]
    
    1: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index-jp.html
    2: https://osdn.jp/ticket/browse.php?group_id=1412&tid=35822
    3: https://osdn.jp/ticket/browse.php?group_id=1412&tid=35823
    4: https://osdn.jp/ticket/browse.php?group_id=1412&tid=35824
    
    Modified Paths:
    --------------
        trunk/teraterm/ttpmacro/ttl.c
        trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj
        trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj
        trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj
        trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj
        trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj
        trunk/teraterm/ttpmacro/ttpmacro.vcproj
    
    Added Paths:
    -----------
        trunk/teraterm/ttpmacro/SFMT-common.h
        trunk/teraterm/ttpmacro/SFMT-params.h
        trunk/teraterm/ttpmacro/SFMT-params19937.h
        trunk/teraterm/ttpmacro/SFMT.c
        trunk/teraterm/ttpmacro/SFMT.h
    
    -------------- next part --------------
    Added: trunk/teraterm/ttpmacro/SFMT-common.h
    ===================================================================
    --- trunk/teraterm/ttpmacro/SFMT-common.h	                        (rev 0)
    +++ trunk/teraterm/ttpmacro/SFMT-common.h	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -0,0 +1,164 @@
    +#pragma once
    +/**
    + * @file SFMT-common.h
    + *
    + * @brief SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom
    + * number generator with jump function. This file includes common functions
    + * used in random number generation and jump.
    + *
    + * @author Mutsuo Saito (Hiroshima University)
    + * @author Makoto Matsumoto (The University of Tokyo)
    + *
    + * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
    + * University.
    + * Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima
    + * University and The University of Tokyo.
    + * All rights reserved.
    + *
    + * The 3-clause BSD License is applied to this software, see
    + * LICENSE.txt
    + */
    +#ifndef SFMT_COMMON_H
    +#define SFMT_COMMON_H
    +
    +#if defined(__cplusplus)
    +extern "C" {
    +#endif
    +
    +#include "SFMT.h"
    +
    +inline static void do_recursion(w128_t * r, w128_t * a, w128_t * b,
    +				w128_t * c, w128_t * d);
    +
    +inline static void rshift128(w128_t *out,  w128_t const *in, int shift);
    +inline static void lshift128(w128_t *out,  w128_t const *in, int shift);
    +
    +/**
    + * This function simulates SIMD 128-bit right shift by the standard C.
    + * The 128-bit integer given in in is shifted by (shift * 8) bits.
    + * This function simulates the LITTLE ENDIAN SIMD.
    + * @param out the output of this function
    + * @param in the 128-bit data to be shifted
    + * @param shift the shift value
    + */
    +#ifdef ONLY64
    +inline static void rshift128(w128_t *out, w128_t const *in, int shift) {
    +    uint64_t th, tl, oh, ol;
    +
    +    th = ((uint64_t)in->u[2] << 32) | ((uint64_t)in->u[3]);
    +    tl = ((uint64_t)in->u[0] << 32) | ((uint64_t)in->u[1]);
    +
    +    oh = th >> (shift * 8);
    +    ol = tl >> (shift * 8);
    +    ol |= th << (64 - shift * 8);
    +    out->u[0] = (uint32_t)(ol >> 32);
    +    out->u[1] = (uint32_t)ol;
    +    out->u[2] = (uint32_t)(oh >> 32);
    +    out->u[3] = (uint32_t)oh;
    +}
    +#else
    +inline static void rshift128(w128_t *out, w128_t const *in, int shift)
    +{
    +    uint64_t th, tl, oh, ol;
    +
    +    th = ((uint64_t)in->u[3] << 32) | ((uint64_t)in->u[2]);
    +    tl = ((uint64_t)in->u[1] << 32) | ((uint64_t)in->u[0]);
    +
    +    oh = th >> (shift * 8);
    +    ol = tl >> (shift * 8);
    +    ol |= th << (64 - shift * 8);
    +    out->u[1] = (uint32_t)(ol >> 32);
    +    out->u[0] = (uint32_t)ol;
    +    out->u[3] = (uint32_t)(oh >> 32);
    +    out->u[2] = (uint32_t)oh;
    +}
    +#endif
    +/**
    + * This function simulates SIMD 128-bit left shift by the standard C.
    + * The 128-bit integer given in in is shifted by (shift * 8) bits.
    + * This function simulates the LITTLE ENDIAN SIMD.
    + * @param out the output of this function
    + * @param in the 128-bit data to be shifted
    + * @param shift the shift value
    + */
    +#ifdef ONLY64
    +inline static void lshift128(w128_t *out, w128_t const *in, int shift) {
    +    uint64_t th, tl, oh, ol;
    +
    +    th = ((uint64_t)in->u[2] << 32) | ((uint64_t)in->u[3]);
    +    tl = ((uint64_t)in->u[0] << 32) | ((uint64_t)in->u[1]);
    +
    +    oh = th << (shift * 8);
    +    ol = tl << (shift * 8);
    +    oh |= tl >> (64 - shift * 8);
    +    out->u[0] = (uint32_t)(ol >> 32);
    +    out->u[1] = (uint32_t)ol;
    +    out->u[2] = (uint32_t)(oh >> 32);
    +    out->u[3] = (uint32_t)oh;
    +}
    +#else
    +inline static void lshift128(w128_t *out, w128_t const *in, int shift)
    +{
    +    uint64_t th, tl, oh, ol;
    +
    +    th = ((uint64_t)in->u[3] << 32) | ((uint64_t)in->u[2]);
    +    tl = ((uint64_t)in->u[1] << 32) | ((uint64_t)in->u[0]);
    +
    +    oh = th << (shift * 8);
    +    ol = tl << (shift * 8);
    +    oh |= tl >> (64 - shift * 8);
    +    out->u[1] = (uint32_t)(ol >> 32);
    +    out->u[0] = (uint32_t)ol;
    +    out->u[3] = (uint32_t)(oh >> 32);
    +    out->u[2] = (uint32_t)oh;
    +}
    +#endif
    +/**
    + * This function represents the recursion formula.
    + * @param r output
    + * @param a a 128-bit part of the internal state array
    + * @param b a 128-bit part of the internal state array
    + * @param c a 128-bit part of the internal state array
    + * @param d a 128-bit part of the internal state array
    + */
    +#ifdef ONLY64
    +inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b, w128_t *c,
    +				w128_t *d) {
    +    w128_t x;
    +    w128_t y;
    +
    +    lshift128(&x, a, SFMT_SL2);
    +    rshift128(&y, c, SFMT_SR2);
    +    r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SFMT_SR1) & SFMT_MSK2) ^ y.u[0]
    +	^ (d->u[0] << SFMT_SL1);
    +    r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SFMT_SR1) & SFMT_MSK1) ^ y.u[1]
    +	^ (d->u[1] << SFMT_SL1);
    +    r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SFMT_SR1) & SFMT_MSK4) ^ y.u[2]
    +	^ (d->u[2] << SFMT_SL1);
    +    r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SFMT_SR1) & SFMT_MSK3) ^ y.u[3]
    +	^ (d->u[3] << SFMT_SL1);
    +}
    +#else
    +inline static void do_recursion(w128_t *r, w128_t *a, w128_t *b,
    +				w128_t *c, w128_t *d)
    +{
    +    w128_t x;
    +    w128_t y;
    +
    +    lshift128(&x, a, SFMT_SL2);
    +    rshift128(&y, c, SFMT_SR2);
    +    r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SFMT_SR1) & SFMT_MSK1)
    +	^ y.u[0] ^ (d->u[0] << SFMT_SL1);
    +    r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SFMT_SR1) & SFMT_MSK2)
    +	^ y.u[1] ^ (d->u[1] << SFMT_SL1);
    +    r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SFMT_SR1) & SFMT_MSK3)
    +	^ y.u[2] ^ (d->u[2] << SFMT_SL1);
    +    r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SFMT_SR1) & SFMT_MSK4)
    +	^ y.u[3] ^ (d->u[3] << SFMT_SL1);
    +}
    +#endif
    +#endif
    +
    +#if defined(__cplusplus)
    +}
    +#endif
    
    
    Property changes on: trunk/teraterm/ttpmacro/SFMT-common.h
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Added: trunk/teraterm/ttpmacro/SFMT-params.h
    ===================================================================
    --- trunk/teraterm/ttpmacro/SFMT-params.h	                        (rev 0)
    +++ trunk/teraterm/ttpmacro/SFMT-params.h	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -0,0 +1,98 @@
    +#pragma once
    +#ifndef SFMT_PARAMS_H
    +#define SFMT_PARAMS_H
    +
    +#if !defined(SFMT_MEXP)
    +#if defined(__GNUC__) && !defined(__ICC)
    +  #warning "SFMT_MEXP is not defined. I assume MEXP is 19937."
    +#endif
    +  #define SFMT_MEXP 19937
    +#endif
    +/*-----------------
    +  BASIC DEFINITIONS
    +  -----------------*/
    +/** Mersenne Exponent. The period of the sequence
    + *  is a multiple of 2^MEXP-1.
    + * #define SFMT_MEXP 19937 */
    +/** SFMT generator has an internal state array of 128-bit integers,
    + * and N is its size. */
    +#define SFMT_N (SFMT_MEXP / 128 + 1)
    +/** N32 is the size of internal state array when regarded as an array
    + * of 32-bit integers.*/
    +#define SFMT_N32 (SFMT_N * 4)
    +/** N64 is the size of internal state array when regarded as an array
    + * of 64-bit integers.*/
    +#define SFMT_N64 (SFMT_N * 2)
    +
    +/*----------------------
    +  the parameters of SFMT
    +  following definitions are in paramsXXXX.h file.
    +  ----------------------*/
    +/** the pick up position of the array.
    +#define SFMT_POS1 122
    +*/
    +
    +/** the parameter of shift left as four 32-bit registers.
    +#define SFMT_SL1 18
    + */
    +
    +/** the parameter of shift left as one 128-bit register.
    + * The 128-bit integer is shifted by (SFMT_SL2 * 8) bits.
    +#define SFMT_SL2 1
    +*/
    +
    +/** the parameter of shift right as four 32-bit registers.
    +#define SFMT_SR1 11
    +*/
    +
    +/** the parameter of shift right as one 128-bit register.
    + * The 128-bit integer is shifted by (SFMT_SL2 * 8) bits.
    +#define SFMT_SR21 1
    +*/
    +
    +/** A bitmask, used in the recursion.  These parameters are introduced
    + * to break symmetry of SIMD.
    +#define SFMT_MSK1 0xdfffffefU
    +#define SFMT_MSK2 0xddfecb7fU
    +#define SFMT_MSK3 0xbffaffffU
    +#define SFMT_MSK4 0xbffffff6U
    +*/
    +
    +/** These definitions are part of a 128-bit period certification vector.
    +#define SFMT_PARITY1	0x00000001U
    +#define SFMT_PARITY2	0x00000000U
    +#define SFMT_PARITY3	0x00000000U
    +#define SFMT_PARITY4	0xc98e126aU
    +*/
    +
    +#if SFMT_MEXP == 607
    +  #include "SFMT-params607.h"
    +#elif SFMT_MEXP == 1279
    +  #include "SFMT-params1279.h"
    +#elif SFMT_MEXP == 2281
    +  #include "SFMT-params2281.h"
    +#elif SFMT_MEXP == 4253
    +  #include "SFMT-params4253.h"
    +#elif SFMT_MEXP == 11213
    +  #include "SFMT-params11213.h"
    +#elif SFMT_MEXP == 19937
    +  #include "SFMT-params19937.h"
    +#elif SFMT_MEXP == 44497
    +  #include "SFMT-params44497.h"
    +#elif SFMT_MEXP == 86243
    +  #include "SFMT-params86243.h"
    +#elif SFMT_MEXP == 132049
    +  #include "SFMT-params132049.h"
    +#elif SFMT_MEXP == 216091
    +  #include "SFMT-params216091.h"
    +#else
    +#if defined(__GNUC__) && !defined(__ICC)
    +  #error "SFMT_MEXP is not valid."
    +  #undef SFMT_MEXP
    +#else
    +  #undef SFMT_MEXP
    +#endif
    +
    +#endif
    +
    +#endif /* SFMT_PARAMS_H */
    
    
    Property changes on: trunk/teraterm/ttpmacro/SFMT-params.h
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Added: trunk/teraterm/ttpmacro/SFMT-params19937.h
    ===================================================================
    --- trunk/teraterm/ttpmacro/SFMT-params19937.h	                        (rev 0)
    +++ trunk/teraterm/ttpmacro/SFMT-params19937.h	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -0,0 +1,50 @@
    +#pragma once
    +#ifndef SFMT_PARAMS19937_H
    +#define SFMT_PARAMS19937_H
    +
    +#define SFMT_POS1	122
    +#define SFMT_SL1	18
    +#define SFMT_SL2	1
    +#define SFMT_SR1	11
    +#define SFMT_SR2	1
    +#define SFMT_MSK1	0xdfffffefU
    +#define SFMT_MSK2	0xddfecb7fU
    +#define SFMT_MSK3	0xbffaffffU
    +#define SFMT_MSK4	0xbffffff6U
    +#define SFMT_PARITY1	0x00000001U
    +#define SFMT_PARITY2	0x00000000U
    +#define SFMT_PARITY3	0x00000000U
    +#define SFMT_PARITY4	0x13c9e684U
    +
    +
    +/* PARAMETERS FOR ALTIVEC */
    +#if defined(__APPLE__)	/* For OSX */
    +    #define SFMT_ALTI_SL1 \
    +	(vector unsigned int)(SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1)
    +    #define SFMT_ALTI_SR1 \
    +	(vector unsigned int)(SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1)
    +    #define SFMT_ALTI_MSK \
    +	(vector unsigned int)(SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4)
    +    #define SFMT_ALTI_MSK64 \
    +	(vector unsigned int)(SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3)
    +    #define SFMT_ALTI_SL2_PERM \
    +	(vector unsigned char)(1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8)
    +    #define SFMT_ALTI_SL2_PERM64 \
    +	(vector unsigned char)(1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0)
    +    #define SFMT_ALTI_SR2_PERM \
    +	(vector unsigned char)(7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14)
    +    #define SFMT_ALTI_SR2_PERM64 \
    +	(vector unsigned char)(15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14)
    +#else	/* For OTHER OSs(Linux?) */
    +    #define SFMT_ALTI_SL1	{SFMT_SL1, SFMT_SL1, SFMT_SL1, SFMT_SL1}
    +    #define SFMT_ALTI_SR1	{SFMT_SR1, SFMT_SR1, SFMT_SR1, SFMT_SR1}
    +    #define SFMT_ALTI_MSK	{SFMT_MSK1, SFMT_MSK2, SFMT_MSK3, SFMT_MSK4}
    +    #define SFMT_ALTI_MSK64	{SFMT_MSK2, SFMT_MSK1, SFMT_MSK4, SFMT_MSK3}
    +    #define SFMT_ALTI_SL2_PERM	{1,2,3,23,5,6,7,0,9,10,11,4,13,14,15,8}
    +    #define SFMT_ALTI_SL2_PERM64 {1,2,3,4,5,6,7,31,9,10,11,12,13,14,15,0}
    +    #define SFMT_ALTI_SR2_PERM	{7,0,1,2,11,4,5,6,15,8,9,10,17,12,13,14}
    +    #define SFMT_ALTI_SR2_PERM64 {15,0,1,2,3,4,5,6,17,8,9,10,11,12,13,14}
    +#endif	/* For OSX */
    +#define SFMT_IDSTR	"SFMT-19937:122-18-1-11-1:dfffffef-ddfecb7f-bffaffff-bffffff6"
    +
    +#endif /* SFMT_PARAMS19937_H */
    
    
    Property changes on: trunk/teraterm/ttpmacro/SFMT-params19937.h
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Added: trunk/teraterm/ttpmacro/SFMT.c
    ===================================================================
    --- trunk/teraterm/ttpmacro/SFMT.c	                        (rev 0)
    +++ trunk/teraterm/ttpmacro/SFMT.c	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -0,0 +1,433 @@
    +/**
    + * @file  SFMT.c
    + * @brief SIMD oriented Fast Mersenne Twister(SFMT)
    + *
    + * @author Mutsuo Saito (Hiroshima University)
    + * @author Makoto Matsumoto (Hiroshima University)
    + *
    + * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
    + * University.
    + * Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima
    + * University and The University of Tokyo.
    + * Copyright (C) 2013 Mutsuo Saito, Makoto Matsumoto and Hiroshima
    + * University.
    + * All rights reserved.
    + *
    + * The 3-clause BSD License is applied to this software, see
    + * LICENSE.txt
    + */
    +
    +#if defined(__cplusplus)
    +extern "C" {
    +#endif
    +
    +#include 
    +#include 
    +#include "SFMT.h"
    +#include "SFMT-params.h"
    +#include "SFMT-common.h"
    +
    +#if defined(__BIG_ENDIAN__) && !defined(__amd64) && !defined(BIG_ENDIAN64)
    +#define BIG_ENDIAN64 1
    +#endif
    +#if defined(HAVE_ALTIVEC) && !defined(BIG_ENDIAN64)
    +#define BIG_ENDIAN64 1
    +#endif
    +#if defined(ONLY64) && !defined(BIG_ENDIAN64)
    +  #if defined(__GNUC__)
    +    #error "-DONLY64 must be specified with -DBIG_ENDIAN64"
    +  #endif
    +#undef ONLY64
    +#endif
    +
    +/**
    + * parameters used by sse2.
    + */
    +static const w128_t sse2_param_mask = {{SFMT_MSK1, SFMT_MSK2,
    +                                        SFMT_MSK3, SFMT_MSK4}};
    +/*----------------
    +  STATIC FUNCTIONS
    +  ----------------*/
    +inline static int idxof(int i);
    +inline static void gen_rand_array(sfmt_t * sfmt, w128_t *array, int size);
    +inline static uint32_t func1(uint32_t x);
    +inline static uint32_t func2(uint32_t x);
    +static void period_certification(sfmt_t * sfmt);
    +#if defined(BIG_ENDIAN64) && !defined(ONLY64)
    +inline static void swap(w128_t *array, int size);
    +#endif
    +
    +#if defined(HAVE_ALTIVEC)
    +  #include "SFMT-alti.h"
    +#elif defined(HAVE_SSE2)
    +  #if defined(_MSC_VER)
    +    #include "SFMT-sse2-msc.h"
    +  #else
    +    #include "SFMT-sse2.h"
    +  #endif
    +#endif
    +
    +/**
    + * This function simulate a 64-bit index of LITTLE ENDIAN
    + * in BIG ENDIAN machine.
    + */
    +#ifdef ONLY64
    +inline static int idxof(int i) {
    +    return i ^ 1;
    +}
    +#else
    +inline static int idxof(int i) {
    +    return i;
    +}
    +#endif
    +
    +#if (!defined(HAVE_ALTIVEC)) && (!defined(HAVE_SSE2))
    +/**
    + * This function fills the user-specified array with pseudorandom
    + * integers.
    + *
    + * @param sfmt SFMT internal state
    + * @param array an 128-bit array to be filled by pseudorandom numbers.
    + * @param size number of 128-bit pseudorandom numbers to be generated.
    + */
    +inline static void gen_rand_array(sfmt_t * sfmt, w128_t *array, int size) {
    +    int i, j;
    +    w128_t *r1, *r2;
    +
    +    r1 = &sfmt->state[SFMT_N - 2];
    +    r2 = &sfmt->state[SFMT_N - 1];
    +    for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
    +        do_recursion(&array[i], &sfmt->state[i], &sfmt->state[i + SFMT_POS1], r1, r2);
    +        r1 = r2;
    +        r2 = &array[i];
    +    }
    +    for (; i < SFMT_N; i++) {
    +        do_recursion(&array[i], &sfmt->state[i],
    +                     &array[i + SFMT_POS1 - SFMT_N], r1, r2);
    +        r1 = r2;
    +        r2 = &array[i];
    +    }
    +    for (; i < size - SFMT_N; i++) {
    +        do_recursion(&array[i], &array[i - SFMT_N],
    +                     &array[i + SFMT_POS1 - SFMT_N], r1, r2);
    +        r1 = r2;
    +        r2 = &array[i];
    +    }
    +    for (j = 0; j < 2 * SFMT_N - size; j++) {
    +        sfmt->state[j] = array[j + size - SFMT_N];
    +    }
    +    for (; i < size; i++, j++) {
    +        do_recursion(&array[i], &array[i - SFMT_N],
    +                     &array[i + SFMT_POS1 - SFMT_N], r1, r2);
    +        r1 = r2;
    +        r2 = &array[i];
    +        sfmt->state[j] = array[i];
    +    }
    +}
    +#endif
    +
    +#if defined(BIG_ENDIAN64) && !defined(ONLY64) && !defined(HAVE_ALTIVEC)
    +inline static void swap(w128_t *array, int size) {
    +    int i;
    +    uint32_t x, y;
    +
    +    for (i = 0; i < size; i++) {
    +        x = array[i].u[0];
    +        y = array[i].u[2];
    +        array[i].u[0] = array[i].u[1];
    +        array[i].u[2] = array[i].u[3];
    +        array[i].u[1] = x;
    +        array[i].u[3] = y;
    +    }
    +}
    +#endif
    +/**
    + * This function represents a function used in the initialization
    + * by init_by_array
    + * @param x 32-bit integer
    + * @return 32-bit integer
    + */
    +static uint32_t func1(uint32_t x) {
    +    return (x ^ (x >> 27)) * (uint32_t)1664525UL;
    +}
    +
    +/**
    + * This function represents a function used in the initialization
    + * by init_by_array
    + * @param x 32-bit integer
    + * @return 32-bit integer
    + */
    +static uint32_t func2(uint32_t x) {
    +    return (x ^ (x >> 27)) * (uint32_t)1566083941UL;
    +}
    +
    +/**
    + * This function certificate the period of 2^{MEXP}
    + * @param sfmt SFMT internal state
    + */
    +static void period_certification(sfmt_t * sfmt) {
    +    int inner = 0;
    +    int i, j;
    +    uint32_t work;
    +    uint32_t *psfmt32 = &sfmt->state[0].u[0];
    +    const uint32_t parity[4] = {SFMT_PARITY1, SFMT_PARITY2,
    +                                SFMT_PARITY3, SFMT_PARITY4};
    +
    +    for (i = 0; i < 4; i++)
    +        inner ^= psfmt32[idxof(i)] & parity[i];
    +    for (i = 16; i > 0; i >>= 1)
    +        inner ^= inner >> i;
    +    inner &= 1;
    +    /* check OK */
    +    if (inner == 1) {
    +        return;
    +    }
    +    /* check NG, and modification */
    +    for (i = 0; i < 4; i++) {
    +        work = 1;
    +        for (j = 0; j < 32; j++) {
    +            if ((work & parity[i]) != 0) {
    +                psfmt32[idxof(i)] ^= work;
    +                return;
    +            }
    +            work = work << 1;
    +        }
    +    }
    +}
    +
    +/*----------------
    +  PUBLIC FUNCTIONS
    +  ----------------*/
    +#define UNUSED_VARIABLE(x) (void)(x)
    +/**
    + * This function returns the identification string.
    + * The string shows the word size, the Mersenne exponent,
    + * and all parameters of this generator.
    + * @param sfmt SFMT internal state
    + */
    +const char *sfmt_get_idstring(sfmt_t * sfmt) {
    +    UNUSED_VARIABLE(sfmt);
    +    return SFMT_IDSTR;
    +}
    +
    +/**
    + * This function returns the minimum size of array used for \b
    + * fill_array32() function.
    + * @param sfmt SFMT internal state
    + * @return minimum size of array used for fill_array32() function.
    + */
    +int sfmt_get_min_array_size32(sfmt_t * sfmt) {
    +    UNUSED_VARIABLE(sfmt);
    +    return SFMT_N32;
    +}
    +
    +/**
    + * This function returns the minimum size of array used for \b
    + * fill_array64() function.
    + * @param sfmt SFMT internal state
    + * @return minimum size of array used for fill_array64() function.
    + */
    +int sfmt_get_min_array_size64(sfmt_t * sfmt) {
    +    UNUSED_VARIABLE(sfmt);
    +    return SFMT_N64;
    +}
    +
    +#if !defined(HAVE_SSE2) && !defined(HAVE_ALTIVEC)
    +/**
    + * This function fills the internal state array with pseudorandom
    + * integers.
    + * @param sfmt SFMT internal state
    + */
    +void sfmt_gen_rand_all(sfmt_t * sfmt) {
    +    int i;
    +    w128_t *r1, *r2;
    +
    +    r1 = &sfmt->state[SFMT_N - 2];
    +    r2 = &sfmt->state[SFMT_N - 1];
    +    for (i = 0; i < SFMT_N - SFMT_POS1; i++) {
    +        do_recursion(&sfmt->state[i], &sfmt->state[i],
    +                     &sfmt->state[i + SFMT_POS1], r1, r2);
    +        r1 = r2;
    +        r2 = &sfmt->state[i];
    +    }
    +    for (; i < SFMT_N; i++) {
    +        do_recursion(&sfmt->state[i], &sfmt->state[i],
    +                     &sfmt->state[i + SFMT_POS1 - SFMT_N], r1, r2);
    +        r1 = r2;
    +        r2 = &sfmt->state[i];
    +    }
    +}
    +#endif
    +
    +#ifndef ONLY64
    +/**
    + * This function generates pseudorandom 32-bit integers in the
    + * specified array[] by one call. The number of pseudorandom integers
    + * is specified by the argument size, which must be at least 624 and a
    + * multiple of four.  The generation by this function is much faster
    + * than the following gen_rand function.
    + *
    + * For initialization, init_gen_rand or init_by_array must be called
    + * before the first call of this function. This function can not be
    + * used after calling gen_rand function, without initialization.
    + *
    + * @param sfmt SFMT internal state
    + * @param array an array where pseudorandom 32-bit integers are filled
    + * by this function.  The pointer to the array must be \b "aligned"
    + * (namely, must be a multiple of 16) in the SIMD version, since it
    + * refers to the address of a 128-bit integer.  In the standard C
    + * version, the pointer is arbitrary.
    + *
    + * @param size the number of 32-bit pseudorandom integers to be
    + * generated.  size must be a multiple of 4, and greater than or equal
    + * to (MEXP / 128 + 1) * 4.
    + *
    + * @note \b memalign or \b posix_memalign is available to get aligned
    + * memory. Mac OSX doesn't have these functions, but \b malloc of OSX
    + * returns the pointer to the aligned memory block.
    + */
    +void sfmt_fill_array32(sfmt_t * sfmt, uint32_t *array, int size) {
    +    assert(sfmt->idx == SFMT_N32);
    +    assert(size % 4 == 0);
    +    assert(size >= SFMT_N32);
    +
    +    gen_rand_array(sfmt, (w128_t *)array, size / 4);
    +    sfmt->idx = SFMT_N32;
    +}
    +#endif
    +
    +/**
    + * This function generates pseudorandom 64-bit integers in the
    + * specified array[] by one call. The number of pseudorandom integers
    + * is specified by the argument size, which must be at least 312 and a
    + * multiple of two.  The generation by this function is much faster
    + * than the following gen_rand function.
    + *
    + * @param sfmt SFMT internal state
    + * For initialization, init_gen_rand or init_by_array must be called
    + * before the first call of this function. This function can not be
    + * used after calling gen_rand function, without initialization.
    + *
    + * @param array an array where pseudorandom 64-bit integers are filled
    + * by this function.  The pointer to the array must be "aligned"
    + * (namely, must be a multiple of 16) in the SIMD version, since it
    + * refers to the address of a 128-bit integer.  In the standard C
    + * version, the pointer is arbitrary.
    + *
    + * @param size the number of 64-bit pseudorandom integers to be
    + * generated.  size must be a multiple of 2, and greater than or equal
    + * to (MEXP / 128 + 1) * 2
    + *
    + * @note \b memalign or \b posix_memalign is available to get aligned
    + * memory. Mac OSX doesn't have these functions, but \b malloc of OSX
    + * returns the pointer to the aligned memory block.
    + */
    +void sfmt_fill_array64(sfmt_t * sfmt, uint64_t *array, int size) {
    +    assert(sfmt->idx == SFMT_N32);
    +    assert(size % 2 == 0);
    +    assert(size >= SFMT_N64);
    +
    +    gen_rand_array(sfmt, (w128_t *)array, size / 2);
    +    sfmt->idx = SFMT_N32;
    +
    +#if defined(BIG_ENDIAN64) && !defined(ONLY64)
    +    swap((w128_t *)array, size /2);
    +#endif
    +}
    +
    +/**
    + * This function initializes the internal state array with a 32-bit
    + * integer seed.
    + *
    + * @param sfmt SFMT internal state
    + * @param seed a 32-bit integer used as the seed.
    + */
    +void sfmt_init_gen_rand(sfmt_t * sfmt, uint32_t seed) {
    +    int i;
    +
    +    uint32_t *psfmt32 = &sfmt->state[0].u[0];
    +
    +    psfmt32[idxof(0)] = seed;
    +    for (i = 1; i < SFMT_N32; i++) {
    +        psfmt32[idxof(i)] = 1812433253UL * (psfmt32[idxof(i - 1)]
    +                                            ^ (psfmt32[idxof(i - 1)] >> 30))
    +            + i;
    +    }
    +    sfmt->idx = SFMT_N32;
    +    period_certification(sfmt);
    +}
    +
    +/**
    + * This function initializes the internal state array,
    + * with an array of 32-bit integers used as the seeds
    + * @param sfmt SFMT internal state
    + * @param init_key the array of 32-bit integers, used as a seed.
    + * @param key_length the length of init_key.
    + */
    +void sfmt_init_by_array(sfmt_t * sfmt, uint32_t *init_key, int key_length) {
    +    int i, j, count;
    +    uint32_t r;
    +    int lag;
    +    int mid;
    +    int size = SFMT_N * 4;
    +    uint32_t *psfmt32 = &sfmt->state[0].u[0];
    +
    +    if (size >= 623) {
    +        lag = 11;
    +    } else if (size >= 68) {
    +        lag = 7;
    +    } else if (size >= 39) {
    +        lag = 5;
    +    } else {
    +        lag = 3;
    +    }
    +    mid = (size - lag) / 2;
    +
    +    memset(sfmt, 0x8b, sizeof(sfmt_t));
    +    if (key_length + 1 > SFMT_N32) {
    +        count = key_length + 1;
    +    } else {
    +        count = SFMT_N32;
    +    }
    +    r = func1(psfmt32[idxof(0)] ^ psfmt32[idxof(mid)]
    +              ^ psfmt32[idxof(SFMT_N32 - 1)]);
    +    psfmt32[idxof(mid)] += r;
    +    r += key_length;
    +    psfmt32[idxof(mid + lag)] += r;
    +    psfmt32[idxof(0)] = r;
    +
    +    count--;
    +    for (i = 1, j = 0; (j < count) && (j < key_length); j++) {
    +        r = func1(psfmt32[idxof(i)] ^ psfmt32[idxof((i + mid) % SFMT_N32)]
    +                  ^ psfmt32[idxof((i + SFMT_N32 - 1) % SFMT_N32)]);
    +        psfmt32[idxof((i + mid) % SFMT_N32)] += r;
    +        r += init_key[j] + i;
    +        psfmt32[idxof((i + mid + lag) % SFMT_N32)] += r;
    +        psfmt32[idxof(i)] = r;
    +        i = (i + 1) % SFMT_N32;
    +    }
    +    for (; j < count; j++) {
    +        r = func1(psfmt32[idxof(i)] ^ psfmt32[idxof((i + mid) % SFMT_N32)]
    +                  ^ psfmt32[idxof((i + SFMT_N32 - 1) % SFMT_N32)]);
    +        psfmt32[idxof((i + mid) % SFMT_N32)] += r;
    +        r += i;
    +        psfmt32[idxof((i + mid + lag) % SFMT_N32)] += r;
    +        psfmt32[idxof(i)] = r;
    +        i = (i + 1) % SFMT_N32;
    +    }
    +    for (j = 0; j < SFMT_N32; j++) {
    +        r = func2(psfmt32[idxof(i)] + psfmt32[idxof((i + mid) % SFMT_N32)]
    +                  + psfmt32[idxof((i + SFMT_N32 - 1) % SFMT_N32)]);
    +        psfmt32[idxof((i + mid) % SFMT_N32)] ^= r;
    +        r -= i;
    +        psfmt32[idxof((i + mid + lag) % SFMT_N32)] ^= r;
    +        psfmt32[idxof(i)] = r;
    +        i = (i + 1) % SFMT_N32;
    +    }
    +
    +    sfmt->idx = SFMT_N32;
    +    period_certification(sfmt);
    +}
    +#if defined(__cplusplus)
    +}
    +#endif
    
    
    Property changes on: trunk/teraterm/ttpmacro/SFMT.c
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Added: trunk/teraterm/ttpmacro/SFMT.h
    ===================================================================
    --- trunk/teraterm/ttpmacro/SFMT.h	                        (rev 0)
    +++ trunk/teraterm/ttpmacro/SFMT.h	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -0,0 +1,295 @@
    +#pragma once
    +/**
    + * @file SFMT.h
    + *
    + * @brief SIMD oriented Fast Mersenne Twister(SFMT) pseudorandom
    + * number generator using C structure.
    + *
    + * @author Mutsuo Saito (Hiroshima University)
    + * @author Makoto Matsumoto (The University of Tokyo)
    + *
    + * Copyright (C) 2006, 2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima
    + * University.
    + * Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima
    + * University and The University of Tokyo.
    + * All rights reserved.
    + *
    + * The 3-clause BSD License is applied to this software, see
    + * LICENSE.txt
    + *
    + * @note We assume that your system has inttypes.h.  If your system
    + * doesn't have inttypes.h, you have to typedef uint32_t and uint64_t,
    + * and you have to define PRIu64 and PRIx64 in this file as follows:
    + * @verbatim
    + typedef unsigned int uint32_t
    + typedef unsigned long long uint64_t
    + #define PRIu64 "llu"
    + #define PRIx64 "llx"
    + @ endverbatim
    + * uint32_t must be exactly 32-bit unsigned integer type (no more, no
    + * less), and uint64_t must be exactly 64-bit unsigned integer type.
    + * PRIu64 and PRIx64 are used for printf function to print 64-bit
    + * unsigned int and 64-bit unsigned int in hexadecimal format.
    + */
    +
    +#ifndef SFMTST_H
    +#define SFMTST_H
    +#if defined(__cplusplus)
    +extern "C" {
    +#endif
    +
    +#include 
    +#include 
    +
    +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
    +  #include 
    +#elif defined(_MSC_VER) || defined(__BORLANDC__)
    +  typedef unsigned int uint32_t;
    +  typedef unsigned __int64 uint64_t;
    +  #define inline __inline
    +#else
    +  #include 
    +  #if defined(__GNUC__)
    +    #define inline __inline__
    +  #endif
    +#endif
    +
    +#ifndef PRIu64
    +  #if defined(_MSC_VER) || defined(__BORLANDC__)
    +    #define PRIu64 "I64u"
    +    #define PRIx64 "I64x"
    +  #else
    +    #define PRIu64 "llu"
    +    #define PRIx64 "llx"
    +  #endif
    +#endif
    +
    +#include "SFMT-params.h"
    +
    +/*------------------------------------------
    +  128-bit SIMD like data type for standard C
    +  ------------------------------------------*/
    +#if defined(HAVE_ALTIVEC)
    +  #if !defined(__APPLE__)
    +    #include 
    +  #endif
    +/** 128-bit data structure */
    +union W128_T {
    +    vector unsigned int s;
    +    uint32_t u[4];
    +    uint64_t u64[2];
    +};
    +#elif defined(HAVE_SSE2)
    +  #include 
    +
    +/** 128-bit data structure */
    +union W128_T {
    +    uint32_t u[4];
    +    uint64_t u64[2];
    +    __m128i si;
    +};
    +#else
    +/** 128-bit data structure */
    +union W128_T {
    +    uint32_t u[4];
    +    uint64_t u64[2];
    +};
    +#endif
    +
    +/** 128-bit data type */
    +typedef union W128_T w128_t;
    +
    +/**
    + * SFMT internal state
    + */
    +struct SFMT_T {
    +    /** the 128-bit internal state array */
    +    w128_t state[SFMT_N];
    +    /** index counter to the 32-bit internal state array */
    +    int idx;
    +};
    +
    +typedef struct SFMT_T sfmt_t;
    +
    +void sfmt_fill_array32(sfmt_t * sfmt, uint32_t * array, int size);
    +void sfmt_fill_array64(sfmt_t * sfmt, uint64_t * array, int size);
    +void sfmt_init_gen_rand(sfmt_t * sfmt, uint32_t seed);
    +void sfmt_init_by_array(sfmt_t * sfmt, uint32_t * init_key, int key_length);
    +const char * sfmt_get_idstring(sfmt_t * sfmt);
    +int sfmt_get_min_array_size32(sfmt_t * sfmt);
    +int sfmt_get_min_array_size64(sfmt_t * sfmt);
    +void sfmt_gen_rand_all(sfmt_t * sfmt);
    +
    +#ifndef ONLY64
    +/**
    + * This function generates and returns 32-bit pseudorandom number.
    + * init_gen_rand or init_by_array must be called before this function.
    + * @param sfmt SFMT internal state
    + * @return 32-bit pseudorandom number
    + */
    +inline static uint32_t sfmt_genrand_uint32(sfmt_t * sfmt) {
    +    uint32_t r;
    +    uint32_t * psfmt32 = &sfmt->state[0].u[0];
    +
    +    if (sfmt->idx >= SFMT_N32) {
    +        sfmt_gen_rand_all(sfmt);
    +        sfmt->idx = 0;
    +    }
    +    r = psfmt32[sfmt->idx++];
    +    return r;
    +}
    +#endif
    +/**
    + * This function generates and returns 64-bit pseudorandom number.
    + * init_gen_rand or init_by_array must be called before this function.
    + * The function gen_rand64 should not be called after gen_rand32,
    + * unless an initialization is again executed.
    + * @param sfmt SFMT internal state
    + * @return 64-bit pseudorandom number
    + */
    +inline static uint64_t sfmt_genrand_uint64(sfmt_t * sfmt) {
    +#if defined(BIG_ENDIAN64) && !defined(ONLY64)
    +    uint32_t * psfmt32 = &sfmt->state[0].u[0];
    +    uint32_t r1, r2;
    +#else
    +    uint64_t r;
    +#endif
    +    uint64_t * psfmt64 = &sfmt->state[0].u64[0];
    +    assert(sfmt->idx % 2 == 0);
    +
    +    if (sfmt->idx >= SFMT_N32) {
    +        sfmt_gen_rand_all(sfmt);
    +        sfmt->idx = 0;
    +    }
    +#if defined(BIG_ENDIAN64) && !defined(ONLY64)
    +    r1 = psfmt32[sfmt->idx];
    +    r2 = psfmt32[sfmt->idx + 1];
    +    sfmt->idx += 2;
    +    return ((uint64_t)r2 << 32) | r1;
    +#else
    +    r = psfmt64[sfmt->idx / 2];
    +    sfmt->idx += 2;
    +    return r;
    +#endif
    +}
    +
    +/* =================================================
    +   The following real versions are due to Isaku Wada
    +   ================================================= */
    +/**
    + * converts an unsigned 32-bit number to a double on [0,1]-real-interval.
    + * @param v 32-bit unsigned integer
    + * @return double on [0,1]-real-interval
    + */
    +inline static double sfmt_to_real1(uint32_t v)
    +{
    +    return v * (1.0/4294967295.0);
    +    /* divided by 2^32-1 */
    +}
    +
    +/**
    + * generates a random number on [0,1]-real-interval
    + * @param sfmt SFMT internal state
    + * @return double on [0,1]-real-interval
    + */
    +inline static double sfmt_genrand_real1(sfmt_t * sfmt)
    +{
    +    return sfmt_to_real1(sfmt_genrand_uint32(sfmt));
    +}
    +
    +/**
    + * converts an unsigned 32-bit integer to a double on [0,1)-real-interval.
    + * @param v 32-bit unsigned integer
    + * @return double on [0,1)-real-interval
    + */
    +inline static double sfmt_to_real2(uint32_t v)
    +{
    +    return v * (1.0/4294967296.0);
    +    /* divided by 2^32 */
    +}
    +
    +/**
    + * generates a random number on [0,1)-real-interval
    + * @param sfmt SFMT internal state
    + * @return double on [0,1)-real-interval
    + */
    +inline static double sfmt_genrand_real2(sfmt_t * sfmt)
    +{
    +    return sfmt_to_real2(sfmt_genrand_uint32(sfmt));
    +}
    +
    +/**
    + * converts an unsigned 32-bit integer to a double on (0,1)-real-interval.
    + * @param v 32-bit unsigned integer
    + * @return double on (0,1)-real-interval
    + */
    +inline static double sfmt_to_real3(uint32_t v)
    +{
    +    return (((double)v) + 0.5)*(1.0/4294967296.0);
    +    /* divided by 2^32 */
    +}
    +
    +/**
    + * generates a random number on (0,1)-real-interval
    + * @param sfmt SFMT internal state
    + * @return double on (0,1)-real-interval
    + */
    +inline static double sfmt_genrand_real3(sfmt_t * sfmt)
    +{
    +    return sfmt_to_real3(sfmt_genrand_uint32(sfmt));
    +}
    +
    +/**
    + * converts an unsigned 32-bit integer to double on [0,1)
    + * with 53-bit resolution.
    + * @param v 32-bit unsigned integer
    + * @return double on [0,1)-real-interval with 53-bit resolution.
    + */
    +inline static double sfmt_to_res53(uint64_t v)
    +{
    +    return v * (1.0/18446744073709551616.0);
    +}
    +
    +/**
    + * generates a random number on [0,1) with 53-bit resolution
    + * @param sfmt SFMT internal state
    + * @return double on [0,1) with 53-bit resolution
    + */
    +inline static double sfmt_genrand_res53(sfmt_t * sfmt)
    +{
    +    return sfmt_to_res53(sfmt_genrand_uint64(sfmt));
    +}
    +
    +
    +/* =================================================
    +   The following function are added by Saito.
    +   ================================================= */
    +/**
    + * generates a random number on [0,1) with 53-bit resolution from two
    + * 32 bit integers
    + */
    +inline static double sfmt_to_res53_mix(uint32_t x, uint32_t y)
    +{
    +    return sfmt_to_res53(x | ((uint64_t)y << 32));
    +}
    +
    +/**
    + * generates a random number on [0,1) with 53-bit resolution
    + * using two 32bit integers.
    + * @param sfmt SFMT internal state
    + * @return double on [0,1) with 53-bit resolution
    + */
    +inline static double sfmt_genrand_res53_mix(sfmt_t * sfmt)
    +{
    +    uint32_t x, y;
    +
    +    x = sfmt_genrand_uint32(sfmt);
    +    y = sfmt_genrand_uint32(sfmt);
    +    return sfmt_to_res53_mix(x, y);
    +}
    +
    +#if defined(__cplusplus)
    +}
    +#endif
    +
    +#endif
    
    
    Property changes on: trunk/teraterm/ttpmacro/SFMT.h
    ___________________________________________________________________
    Added: svn:executable
       + *
    
    Modified: trunk/teraterm/ttpmacro/ttl.c
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttl.c	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttl.c	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -35,6 +35,7 @@
     #include 
     
     #include "ttl.h"
    +#include "SFMT.h"
     
     #include 
     #include 
    @@ -3544,13 +3545,14 @@
     // This command generates the random value from 0 to  and
     // stores the value to .
     // (2006.2.11 yutaka)
    -WORD TTLRecvRandom()
    +WORD TTLRandom()
     {
    -	static int srand_init = 0;
    +	static int init_done = 0;
    +	static sfmt_t sfmt;
     	TVarId VarId;
     	WORD Err;
    -	int MaxNum, Num;
    -	//double d;
    +	int MaxNum;
    +	unsigned int Num, RandMin;
     
     	Err = 0;
     	GetIntVar(&VarId,&Err);
    @@ -3560,24 +3562,25 @@
     		Err = ErrSyntax;
     	if (Err!=0) return Err;
     
    -	// \x97\x90\x90\x94 0 \x81`  \x82?\xAC\x82\xB7\x82\xE9
    -	if (srand_init == 0) {
    -		srand_init = 1;
    -		// VS2005\x82ł\xCD time_t \x82\xAA64\x83r\x83b\x83g\x89\xBB\x82\xB3\x82?\x82?ŁA\x83L\x83\x83\x83X\x83g\x82\xF0\x92?\xC1\x81B(2006.2.18 yutaka)
    -		srand((unsigned int)time(NULL));
    +	MaxNum++;
    +
    +	/* 2**32 % x == (2**32 - x) % x */
    +	RandMin = (unsigned int) -MaxNum % MaxNum;
    +
    +	if (!init_done) {
    +		init_done = 1;
    +		sfmt_init_gen_rand(&sfmt, (unsigned int)time(NULL));
     	}
    -	//d = (1.0 / (RAND_MAX + 1.0)) * (rand() + 0.5);
    -	//d = rand();
    -	//d = (rand() / (double)RAND_MAX) * MaxNum;
    -	//Num = (int)d;
    -	Num = (int)(rand() / (RAND_MAX + 1.0) * (MaxNum + 1));
     
    -	SetIntVal(VarId,Num);
    +	do {
    +		Num = sfmt_genrand_uint32(&sfmt);
    +	} while (Num < RandMin);
     
    +	SetIntVal(VarId, (int)(Num % MaxNum));
    +
     	return Err;
     }
     
    -
     WORD TTLRecvLn()
     {
     	TStrVal Str;
    @@ -6139,7 +6142,7 @@
     		case RsvQuickVANSend:
     			Err = TTLCommCmdFile(CmdQVSend,IdTTLWaitCmndResult); break;
     		case RsvRandom:
    -			Err = TTLRecvRandom(); break;   // add 'random'
    +			Err = TTLRandom(); break;
     		case RsvRecvLn:
     			Err = TTLRecvLn(); break;
     		case RsvRegexOption:
    
    Modified: trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttpmacro.v10.vcxproj	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -142,6 +142,7 @@
         
         
         
    +    
       
       
         
    @@ -162,6 +163,10 @@
         
         
         
    +    
    +    
    +    
    +    
       
       
         
    @@ -188,4 +193,4 @@
           
         
       
    -
    \ No newline at end of file
    +
    
    Modified: trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttpmacro.v11.vcxproj	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -142,6 +142,7 @@
         
         
         
    +    
       
       
         
    @@ -162,6 +163,10 @@
         
         
         
    +    
    +    
    +    
    +    
       
       
         
    @@ -186,4 +191,4 @@
           
         
       
    -
    \ No newline at end of file
    +
    
    Modified: trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttpmacro.v12.vcxproj	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -144,6 +144,7 @@
         
         
         
    +    
       
       
         
    @@ -164,6 +165,10 @@
         
         
         
    +    
    +    
    +    
    +    
       
       
         
    @@ -188,4 +193,4 @@
           
         
       
    -
    \ No newline at end of file
    +
    
    Modified: trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttpmacro.v14.vcxproj	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -144,6 +144,7 @@
         
         
         
    +    
       
       
         
    @@ -164,6 +165,10 @@
         
         
         
    +    
    +    
    +    
    +    
       
       
         
    @@ -188,4 +193,4 @@
           
         
       
    -
    \ No newline at end of file
    +
    
    Modified: trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttpmacro.v9.vcproj	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -311,6 +311,22 @@
     				RelativePath="ttmparse.h"
     				>
     			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
     		
     		
     			
    +			
    +			
     		
     	
     	
    
    Modified: trunk/teraterm/ttpmacro/ttpmacro.vcproj
    ===================================================================
    --- trunk/teraterm/ttpmacro/ttpmacro.vcproj	2015-12-09 15:56:56 UTC (rev 6205)
    +++ trunk/teraterm/ttpmacro/ttpmacro.vcproj	2015-12-09 16:36:28 UTC (rev 6206)
    @@ -312,6 +312,22 @@
     				RelativePath="ttmparse.h"
     				>
     			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
    +			
     		
     		
     			
    +			
    +			
     		
     	
     	
    
    From svnnotify @ sourceforge.jp  Mon Dec 14 17:05:10 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Mon, 14 Dec 2015 17:05:10 +0900
    Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDddICDjgqrjg6rjgrjjg4rjg6vjga4g?=
     =?utf-8?b?Y3lndGVybSDjga4gVVJMIOOCkuWkieabtA==?=
    Message-ID: <1450080310.463637.85845.nullmailer@users.sourceforge.jp>
    
    Revision: 6207
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6207
    Author:   doda
    Date:     2015-12-14 17:05:10 +0900 (Mon, 14 Dec 2015)
    Log Message:
    -----------
    オリジナルの cygterm の URL を変更
    
    Modified Paths:
    --------------
        trunk/cygterm/README
        trunk/cygterm/README-j
    
    -------------- next part --------------
    Modified: trunk/cygterm/README
    ===================================================================
    --- trunk/cygterm/README	2015-12-09 16:36:28 UTC (rev 6206)
    +++ trunk/cygterm/README	2015-12-14 08:05:10 UTC (rev 6207)
    @@ -11,9 +11,9 @@
     
                     nsym @ dd.iij4u.or.jp
     
    -      (English) http://www.dd.iij4u.or.jp/~nsym/cygwin/cygterm/index-e.html
    +      (English) https://googledrive.com/host/0B1s-dM6d6yC4fmhEZ3c0VTNFWEFtV3daUlRGQmFHVnBmVHRybUNnUVliNWktNDRlZ2NnZTQ/index-e.html
     
    -     (Japanese) http://www.dd.iij4u.or.jp/~nsym/cygwin/cygterm/index.html
    +     (Japanese) https://googledrive.com/host/0B1s-dM6d6yC4fmhEZ3c0VTNFWEFtV3daUlRGQmFHVnBmVHRybUNnUVliNWktNDRlZ2NnZTQ/index.html
     
     
     // P R E F A C E //
    
    Modified: trunk/cygterm/README-j
    ===================================================================
    --- trunk/cygterm/README-j	2015-12-09 16:36:28 UTC (rev 6206)
    +++ trunk/cygterm/README-j	2015-12-14 08:05:10 UTC (rev 6207)
    @@ -9,8 +9,8 @@
                     Based on CygTerm by Original developer:
                     Copyright (C) 2000-2006 NSym
                     nsym @ dd.iij4u.or.jp
    -      (English) http://www.dd.iij4u.or.jp/~nsym/cygwin/cygterm/index-e.html
    -     (Japanese) http://www.dd.iij4u.or.jp/~nsym/cygwin/cygterm/index.html
    +      (English) https://googledrive.com/host/0B1s-dM6d6yC4fmhEZ3c0VTNFWEFtV3daUlRGQmFHVnBmVHRybUNnUVliNWktNDRlZ2NnZTQ/index-e.html
    +     (Japanese) https://googledrive.com/host/0B1s-dM6d6yC4fmhEZ3c0VTNFWEFtV3daUlRGQmFHVnBmVHRybUNnUVliNWktNDRlZ2NnZTQ/index.html
     
     
     // $B$O(B $B$8(B $B$a(B $B$K(B //
    
    From svnnotify @ sourceforge.jp  Mon Dec 14 17:11:16 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Mon, 14 Dec 2015 17:11:16 +0900
    Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDhdICBzc2ggYWdlbnQg6Lui6YCB44Gn?=
     =?utf-8?b?6KSH5pWw5o6l57aa44Gr5a++5b+c44CC?=
    Message-ID: <1450080676.628858.95636.nullmailer@users.sourceforge.jp>
    
    Revision: 6208
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6208
    Author:   doda
    Date:     2015-12-14 17:11:16 +0900 (Mon, 14 Dec 2015)
    Log Message:
    -----------
    ssh agent 転送で複数接続に対応。
    
    Modified Paths:
    --------------
        trunk/cygterm/README
        trunk/cygterm/README-j
        trunk/cygterm/cygterm.cc
    
    -------------- next part --------------
    Modified: trunk/cygterm/README
    ===================================================================
    --- trunk/cygterm/README	2015-12-14 08:05:10 UTC (rev 6207)
    +++ trunk/cygterm/README	2015-12-14 08:11:16 UTC (rev 6208)
    @@ -266,6 +266,9 @@
                     zsh 4.3.10
     
     // C H A N G E S //
    +v1.07_26 2015/12/14 (by doda)
    +        * Add multiple connections support for the ssh-agent proxy.
    +
     v1.07_25 2015/02/21 (by doda)
             * Bug fix: The TERM environment variable can not be configured.
     
    
    Modified: trunk/cygterm/README-j
    ===================================================================
    --- trunk/cygterm/README-j	2015-12-14 08:05:10 UTC (rev 6207)
    +++ trunk/cygterm/README-j	2015-12-14 08:11:16 UTC (rev 6208)
    @@ -278,7 +278,10 @@
                     zsh 4.3.10
     
     // $BJQ(B $B99(B $BMz(B $BNr(B //
    -v1.07_25 2015/02/21 (by maya)
    +v1.07_26 2015/12/14 (by doda)
    +        * ssh $BG'>Z%(!<%8%'%s%HE>Aw$GJ#?t%3%M%/%7%g%s$KBP1~$7$?!#(B
    +
    +v1.07_25 2015/02/21 (by doda)
             * TERM $B4D6-JQ?t$, @ 5$7$/@_Dj$5$l$k$h$&$K$7$?!#(B
     
     v1.07_24 2013/08/15 (by maya)
    
    Modified: trunk/cygterm/cygterm.cc
    ===================================================================
    --- trunk/cygterm/cygterm.cc	2015-12-14 08:05:10 UTC (rev 6207)
    +++ trunk/cygterm/cygterm.cc	2015-12-14 08:11:16 UTC (rev 6208)
    @@ -33,7 +33,7 @@
     //
     
     static char Program[] = "CygTerm+";
    -static char Version[] = "version 1.07_25 (2015/02/21)";
    +static char Version[] = "version 1.07_26 (2015/12/14)";
     
     #include 
     #include 
    @@ -525,18 +525,68 @@
     	exit(0);
     };
     
    -//=================//
    -// ssh-agent proxy //
    -//-----------------//
    +struct connList {
    +	int sock;
    +	int recvlen;
    +	int sendlen;
    +	struct connList *next;
    +	unsigned char ibuff[AGENT_MAX_MSGLEN];
    +	unsigned char obuff[AGENT_MAX_MSGLEN];
    +};
    +
    +int proc_recvd(struct connList *conn)
    +{
    +	int reqlen, len;
    +
    +	if (conn->sendlen > 0) {
    +		return 0;
    +	}
    +
    +	if (conn->recvlen < 4) {
    +		return 0;
    +	}
    +
    +	reqlen = get_uint32(conn->ibuff) + 4;
    +	if (conn->recvlen < reqlen) {
    +		return 0;
    +	}
    +
    +	len = agent_request(conn->obuff, sizeof(conn->obuff), conn->ibuff);
    +
    +	if (len > 0) {
    +		conn->sendlen = len;
    +	}
    +	else {
    +		set_uint32(conn->obuff, 1);
    +		conn->obuff[4] = 5; // SSH_AGENT_FAILURE
    +		conn->sendlen = 1;
    +	}
    +
    +	if (conn->recvlen == reqlen) {
    +		conn->recvlen = 0;
    +	}
    +	else {
    +		conn->recvlen -= reqlen;
    +		memmove(conn->ibuff, conn->ibuff + reqlen, conn->recvlen);
    +	}
    +
    +	return 1;
    +}
    +
     void agent_proxy()
     {
    -	int sock, asock;
    -	unsigned long readlen, reqlen, recvlen;
    +	int sock, asock, ret;
    +	long len;
    +	unsigned long reqlen;
     	struct sockaddr_un addr;
    -	unsigned char buff[AGENT_MAX_MSGLEN];
    +	unsigned char tmpbuff[AGENT_MAX_MSGLEN];
    +	struct connList connections, *new_conn, *prev, *cur;
    +	fd_set readfds, writefds, rfds, wfds;
     	struct sigaction act;
     	sigset_t blk;
     
    +	connections.next = NULL;
    +
     	if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) {
     		msg_print("socket failed.");
     		exit(0);
    @@ -564,46 +614,113 @@
     	sigaction(SIGHUP, &act, NULL);
     	sigaction(SIGQUIT, &act, NULL);
     
    +	FD_ZERO(&readfds);
    +	FD_ZERO(&writefds);
    +	FD_SET(sock, &readfds);
    +
     	while (1) {
    -		if ((asock = accept(sock, NULL, NULL)) < 0) {
    -			switch (errno) {
    -			case EINTR:
    -			case ECONNABORTED:
    -				continue;
    +		memcpy(&rfds, &readfds, sizeof(fd_set));
    +		memcpy(&wfds, &writefds, sizeof(fd_set));
    +
    +		select(FD_SETSIZE, &rfds, &wfds, NULL, NULL);
    +
    +		if (FD_ISSET(sock, &rfds)) {
    +			asock = accept(sock, NULL, NULL);
    +			if (asock < 0) {
    +				if (!(errno == EINTR || errno == ECONNABORTED)) {
    +					break;
    +				}
     			}
    -			break;
    +			else {
    +				new_conn = (struct connList *)malloc(sizeof(struct connList));
    +				if (new_conn == NULL) {
    +					// no memory
    +					close(sock);
    +				}
    +				else {
    +					new_conn->sock = asock;
    +					new_conn->recvlen = 0;
    +					new_conn->sendlen = 0;
    +					new_conn->next = connections.next;
    +					connections.next = new_conn;
    +					FD_SET(asock, &readfds);
    +				}
    +			}
     		}
    -		recvlen = 0;
    -		while ((readlen = read(asock, buff+recvlen, 4-recvlen)) > 0) {
    -			recvlen += readlen;
    -			if (recvlen < 4) {
    -				continue;
    -			}
    -			recvlen = 0;
    -			reqlen = get_uint32(buff);
    -			while ((readlen = read(asock, buff+4+recvlen, reqlen-recvlen)) > 0) {
    -				recvlen += readlen;
    -				if (recvlen < reqlen) {
    -					continue;
    -				}
     
    -				sigprocmask(SIG_BLOCK, &blk, NULL);
    -				readlen = agent_request(buff, sizeof(buff), buff);
    -				sigprocmask(SIG_UNBLOCK, &blk, NULL);
    +		prev = &connections;
    +		for (cur=connections.next; cur != NULL; cur = cur->next) {
    +			if (FD_ISSET(cur->sock, &wfds)) {
    +				if (cur->sendlen > 0) {
    +					len = send(cur->sock, cur->obuff, cur->sendlen, 0);
    +					if (len < 0) {
    +						// write error
    +						prev->next = cur->next;
    +						shutdown(cur->sock, SHUT_RDWR);
    +						close(cur->sock);
    +						FD_CLR(cur->sock, &writefds);
    +						FD_CLR(cur->sock, &readfds);
    +						free(cur);
    +						cur = prev;
    +						continue;
    +					}
    +					else if (len >= cur->sendlen) {
    +						cur->sendlen = 0;
     
    -				if (readlen > 0) {
    -					write(asock, buff, readlen);
    +						sigprocmask(SIG_BLOCK, &blk, NULL);
    +						ret = proc_recvd(cur);
    +						sigprocmask(SIG_UNBLOCK, &blk, NULL);
    +
    +						if (ret) {
    +							FD_SET(cur->sock, &writefds);
    +							FD_CLR(cur->sock, &readfds);
    +						}
    +						else {
    +							FD_CLR(cur->sock, &writefds);
    +							FD_SET(cur->sock, &readfds);
    +						}
    +					}
    +					else if (len > 0) {
    +						cur->sendlen -= len;
    +						memmove(cur->obuff, cur->obuff+len, cur->sendlen);
    +					}
     				}
     				else {
    -					set_uint32(buff, 1);
    -					buff[4] = 5; // SSH_AGENT_FAILURE
    -					write(asock, buff, 5);
    +					FD_CLR(cur->sock, &writefds);
     				}
     			}
    -			recvlen = 0;
    +
    +			if (FD_ISSET(cur->sock, &rfds)) {
    +				len = recv(cur->sock, cur->ibuff + cur->recvlen, sizeof(cur->ibuff) - cur->recvlen, 0);
    +				if (len > 0) {
    +					cur->recvlen += len;
    +
    +					sigprocmask(SIG_BLOCK, &blk, NULL);
    +					ret = proc_recvd(cur);
    +					sigprocmask(SIG_UNBLOCK, &blk, NULL);
    +
    +					if (ret) {
    +						FD_SET(cur->sock, &writefds);
    +						FD_CLR(cur->sock, &readfds);
    +					}
    +					else {
    +						FD_CLR(cur->sock, &writefds);
    +						FD_SET(cur->sock, &readfds);
    +					}
    +				}
    +				else if (len < 0) {
    +					// read error
    +					prev->next = cur->next;
    +					shutdown(cur->sock, SHUT_RDWR);
    +					close(cur->sock);
    +					FD_CLR(cur->sock, &readfds);
    +					FD_CLR(cur->sock, &writefds);
    +					free(cur);
    +					cur = prev;
    +					continue;
    +				}
    +			}
     		}
    -		shutdown(asock, SHUT_RDWR);
    -		close(asock);
     	}
     
     agent_thread_cleanup:
    
    From svnnotify @ sourceforge.jp  Tue Dec 15 11:03:48 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Tue, 15 Dec 2015 11:03:48 +0900
    Subject: [Ttssh2-commit] =?utf-8?b?WzYyMDldICDlpInmm7TlsaXmrbTmm7TmlrAg?=
     =?utf-8?q?=28_r6206=29?=
    Message-ID: <1450145028.225341.109450.nullmailer@users.sourceforge.jp>
    
    Revision: 6209
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6209
    Author:   doda
    Date:     2015-12-15 11:03:47 +0900 (Tue, 15 Dec 2015)
    Log Message:
    -----------
    変更履歴更新 (r6206)
    
    Revision Links:
    --------------
        http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6206
    
    Modified Paths:
    --------------
        trunk/doc/en/html/about/history.html
        trunk/doc/ja/html/about/history.html
    
    -------------- next part --------------
    Modified: trunk/doc/en/html/about/history.html
    ===================================================================
    --- trunk/doc/en/html/about/history.html	2015-12-14 08:11:16 UTC (rev 6208)
    +++ trunk/doc/en/html/about/history.html	2015-12-15 02:03:47 UTC (rev 6209)
    @@ -42,7 +42,12 @@
       
  • Bug fixes
    • Eterm look-feel: When invalid image file is specified as background, an application fault occurs.
    • -
    • The random macro command has a very low probability of the maximum value generating.
    • + +
  • Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2015-12-14 08:11:16 UTC (rev 6208) +++ trunk/doc/ja/html/about/history.html 2015-12-15 02:03:47 UTC (rev 6209) @@ -42,7 +42,11 @@
  • \x83o\x83O\x8FC\x90\xB3
    • Eterm look-feel: \x95s\x93K\x90??摜\x83t\x83@\x83C\x83\x8B\x82\xF0\x94w\x8Ci\x82?w\x92?\x82\xE9\x82?A\x83v\x83\x8D\x83O\x83\x89\x83\x80\x82\xAA\x97\x8E\x82\xBF\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B
    • -
    • random \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82\xAA\x81A\x8Ew\x92?\x82\xBD\x8Dő\xE5\x92l\x82\xF0\x95?\xB7\x8Am\x97\xA6\x82\xAA\x8B??Ē?\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3
    • +
    • random \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82\xAA\x95?\xB7\x92l\x82\xAA\x95?\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B +
        +
      • \x8Ew\x92?\x82\xBD\x8Dő\xE5\x92l\x82\xF0\x95?\xB7\x8Am\x97\xA6\x82\xAA\x8B??Ē?\x82\xC1\x82\xBD\x81B
      • +
      • \x8Dő\xE5\x92l\x82\xC932768\x88?\xE3\x82\xF0\x8Ew\x92?\x82\xBD\x8E\x9E\x81A\x90\xE2\x91???\xB3\x82?\xA2\x92l\x82\xAA\x97L\x82\xC1\x82\xBD\x81B
      • +
  • From svnnotify @ sourceforge.jp Tue Dec 15 11:57:25 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 15 Dec 2015 11:57:25 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMTBdICDlpInmm7TlsaXmrbTmm7TmlrAg?= =?utf-8?q?=28_r6208=29?= Message-ID: <1450148245.013837.50928.nullmailer@users.sourceforge.jp> Revision: 6210 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6210 Author: doda Date: 2015-12-15 11:57:24 +0900 (Tue, 15 Dec 2015) Log Message: ----------- 変更履歴更新 (r6208) Revision Links: -------------- http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6208 Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2015-12-15 02:03:47 UTC (rev 6209) +++ trunk/doc/en/html/about/history.html 2015-12-15 02:57:24 UTC (rev 6210) @@ -54,6 +54,7 @@
  • Misc
    • upgraded TTSSH to 2.76
    • +
    • upgraded CygTerm+ to 1.07_26
  • @@ -3761,6 +3762,11 @@

    CygTerm+

    +

    v1.07_26 2015/12/14 (by doda)

    +
      +
    • Add multiple connections support for the ssh-agent proxy.
    • +
    +

    v1.07_25 2015/02/21 (by doda)

    • Bug fix: The TERM environment variable can not be configured.
    • Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2015-12-15 02:03:47 UTC (rev 6209) +++ trunk/doc/ja/html/about/history.html 2015-12-15 02:57:24 UTC (rev 6210) @@ -53,6 +53,7 @@
    • \x82\xBB\x82?\xBC
    @@ -3763,6 +3764,11 @@

    CygTerm+

    +

    v1.07_26 2015/12/14 (by doda)

    +
      +
    • ssh \x94F\x8F?G\x81[\x83W\x83F\x83\x93\x83g\x93]\x91\x97\x82ŕ\xA1\x90\x94\x83R\x83l\x83N\x83V\x83\x87\x83\x93\x82?Ή\x9E\x82\xB5\x82\xBD\x81B
    • +
    +

    v1.07_25 2015/02/21 (by doda)

    • TERM \x8A?\xAB\x95?\x94\x82\xAA\x90\xB3\x82\xB5\x82\xAD\x90??\x82\xEA\x82\xE9\x82悤\x82?\xB5\x82\xBD\x81B
    • From svnnotify @ sourceforge.jp Wed Dec 16 00:30:06 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 16 Dec 2015 00:30:06 +0900 Subject: [Ttssh2-commit] [6211] English document was proofread. Message-ID: <1450193406.701103.142840.nullmailer@users.sourceforge.jp> Revision: 6211 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6211 Author: yutakapon Date: 2015-12-16 00:30:06 +0900 (Wed, 16 Dec 2015) Log Message: ----------- English document was proofread. Special thanks to Boris. Added Copyright at the bottom of document. Modified Paths: -------------- trunk/doc/en/html/reference/sourcecode.html trunk/doc/ja/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/en/html/reference/sourcecode.html =================================================================== --- trunk/doc/en/html/reference/sourcecode.html 2015-12-15 02:57:24 UTC (rev 6210) +++ trunk/doc/en/html/reference/sourcecode.html 2015-12-15 15:30:06 UTC (rev 6211) @@ -34,8 +34,13 @@
      + This article was written by TeraTerm Project in Februry 2008. The original is in Japanese language and is available from ttssh2.osdn.jp. Yutaka Hirata and Boris Maisuradze translated the article to English in December 2015.

      + +

      Copyright © of below article belongs to TeraTerm Project. Rupublishing of this article or any part of this article whithout prior written permission of copyright owner is prohibited.

      + +

      Foreword

      - This document describes the source code of Tera Term. The target of description is the "4.58" version as of February 2008. + This article describes the source code of Tera Term version 4.58 released in February 2008. The general architecture of Tera Term did not change since then, so this description can be considered as up-to-date.
      @@ -2031,6 +2036,7 @@ --> +

      Copyright © 2008-2015 TeraTerm Project.

      Modified: trunk/doc/ja/html/reference/sourcecode.html =================================================================== --- trunk/doc/ja/html/reference/sourcecode.html 2015-12-15 02:57:24 UTC (rev 6210) +++ trunk/doc/ja/html/reference/sourcecode.html 2015-12-15 15:30:06 UTC (rev 6211) @@ -2009,6 +2009,7 @@ V Variable <%command[%argument[%argument]]>
    +

    Copyright © 2008-2015 TeraTerm Project.

    From svnnotify @ sourceforge.jp Wed Dec 16 00:36:42 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 16 Dec 2015 00:36:42 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMTJdICDoi7HoqLPjgII=?= Message-ID: <1450193802.857913.7942.nullmailer@users.sourceforge.jp> Revision: 6212 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6212 Author: yutakapon Date: 2015-12-16 00:36:42 +0900 (Wed, 16 Dec 2015) Log Message: ----------- 英訳。 Modified Paths: -------------- trunk/doc/en/html/about/history.html -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2015-12-15 15:30:06 UTC (rev 6211) +++ trunk/doc/en/html/about/history.html 2015-12-15 15:36:42 UTC (rev 6212) @@ -42,12 +42,11 @@
  • Bug fixes
  • From svnnotify @ sourceforge.jp Thu Dec 17 00:08:06 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 17 Dec 2015 00:08:06 +0900 Subject: [Ttssh2-commit] [6213] typo fix. Message-ID: <1450278486.754922.140918.nullmailer@users.sourceforge.jp> Revision: 6213 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6213 Author: yutakapon Date: 2015-12-17 00:08:06 +0900 (Thu, 17 Dec 2015) Log Message: ----------- typo fix. Modified Paths: -------------- trunk/doc/en/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/en/html/reference/sourcecode.html =================================================================== --- trunk/doc/en/html/reference/sourcecode.html 2015-12-15 15:36:42 UTC (rev 6212) +++ trunk/doc/en/html/reference/sourcecode.html 2015-12-16 15:08:06 UTC (rev 6213) @@ -36,7 +36,7 @@ This article was written by TeraTerm Project in Februry 2008. The original is in Japanese language and is available from ttssh2.osdn.jp. Yutaka Hirata and Boris Maisuradze translated the article to English in December 2015.

    -

    Copyright © of below article belongs to TeraTerm Project. Rupublishing of this article or any part of this article whithout prior written permission of copyright owner is prohibited.

    +

    Copyright © of below article belongs to TeraTerm Project. Republishing of this article or any part of this article whithout prior written permission of copyright owner is prohibited.

    Foreword

    From svnnotify @ sourceforge.jp Fri Dec 18 00:15:37 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Fri, 18 Dec 2015 00:15:37 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMTRdICBDb3B5cmlnaHQg44Gv44OY44Or?= =?utf-8?b?44OX44Gu44OI44OD44OX44Oa44O844K444Gn6KGo6KiY44GX44Gm44GE44KL?= =?utf-8?b?44Gu44Gn44CB44GT44GT44GL44KJ44Gv5YmK6Zmk44Go44GZ44KL44CC?= Message-ID: <1450365337.234801.123424.nullmailer@users.sourceforge.jp> Revision: 6214 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6214 Author: yutakapon Date: 2015-12-18 00:15:36 +0900 (Fri, 18 Dec 2015) Log Message: ----------- Copyright はヘルプのトップページで表記しているので、ここからは削除とする。 Modified Paths: -------------- trunk/doc/en/html/reference/sourcecode.html trunk/doc/ja/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/en/html/reference/sourcecode.html =================================================================== --- trunk/doc/en/html/reference/sourcecode.html 2015-12-16 15:08:06 UTC (rev 6213) +++ trunk/doc/en/html/reference/sourcecode.html 2015-12-17 15:15:36 UTC (rev 6214) @@ -36,9 +36,7 @@ This article was written by TeraTerm Project in Februry 2008. The original is in Japanese language and is available from ttssh2.osdn.jp. Yutaka Hirata and Boris Maisuradze translated the article to English in December 2015.

    -

    Copyright © of below article belongs to TeraTerm Project. Republishing of this article or any part of this article whithout prior written permission of copyright owner is prohibited.

    -

    Foreword

    This article describes the source code of Tera Term version 4.58 released in February 2008. The general architecture of Tera Term did not change since then, so this description can be considered as up-to-date.
    @@ -2036,7 +2034,5 @@ --> -

    Copyright © 2008-2015 TeraTerm Project.

    - Modified: trunk/doc/ja/html/reference/sourcecode.html =================================================================== --- trunk/doc/ja/html/reference/sourcecode.html 2015-12-16 15:08:06 UTC (rev 6213) +++ trunk/doc/ja/html/reference/sourcecode.html 2015-12-17 15:15:36 UTC (rev 6214) @@ -2009,7 +2009,5 @@ V Variable <%command[%argument[%argument]]> -

    Copyright © 2008-2015 TeraTerm Project.

    - From svnnotify @ sourceforge.jp Mon Dec 21 00:16:08 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Mon, 21 Dec 2015 00:16:08 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMTVdICDjg6rjg7Pjgq/liIfjgozjgpI=?= =?utf-8?b?5L+u5q2j44GX44Gf44CC?= Message-ID: <1450624568.780856.39434.nullmailer@users.sourceforge.jp> Revision: 6215 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6215 Author: yutakapon Date: 2015-12-21 00:16:08 +0900 (Mon, 21 Dec 2015) Log Message: ----------- リンク切れを修正した。 Modified Paths: -------------- trunk/doc/ja/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/ja/html/reference/sourcecode.html =================================================================== --- trunk/doc/ja/html/reference/sourcecode.html 2015-12-17 15:15:36 UTC (rev 6214) +++ trunk/doc/ja/html/reference/sourcecode.html 2015-12-20 15:16:08 UTC (rev 6215) @@ -1152,7 +1152,7 @@
  • ShowCaret
  • -\x81@CreateCaret\x82?h\x83L\x83\x85\x83\x81\x83\x93\x83g\x82?\xE6\x82\xE9\x82?A +\x81@CreateCaret\x82?h\x83L\x83\x85\x83\x81\x83\x93\x83g\x82?\xE6\x82\xE9\x82?A
     \x83V\x83X\x83e\x83\x80\x82\xCD 1 \x82??L\x83\x85\x81[\x82??\xAB 1 \x82??L\x83\x83\x83\x8C\x83b\x83g\x82\xF0\x92?\xB5\x82?\xB7\x81B\x83E\x83B\x83\x93\x83h\x83E\x82\xAA
    
    From svnnotify @ sourceforge.jp  Mon Dec 21 00:16:40 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Mon, 21 Dec 2015 00:16:40 +0900
    Subject: [Ttssh2-commit] [6216] Added Caret Control chapter.
    Message-ID: <1450624600.413612.39592.nullmailer@users.sourceforge.jp>
    
    Revision: 6216
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6216
    Author:   yutakapon
    Date:     2015-12-21 00:16:40 +0900 (Mon, 21 Dec 2015)
    Log Message:
    -----------
    Added Caret Control chapter.
    Special thanks to Boris.
    
    Modified Paths:
    --------------
        trunk/doc/en/html/reference/sourcecode.html
    
    -------------- next part --------------
    Modified: trunk/doc/en/html/reference/sourcecode.html
    ===================================================================
    --- trunk/doc/en/html/reference/sourcecode.html	2015-12-20 15:16:08 UTC (rev 6215)
    +++ trunk/doc/en/html/reference/sourcecode.html	2015-12-20 15:16:40 UTC (rev 6216)
    @@ -1155,13 +1155,12 @@
     
     
     

    Caret Control

    -
    From svnnotify @ sourceforge.jp Mon Dec 21 20:56:58 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Mon, 21 Dec 2015 20:56:58 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMTddICDjgrfjg6rjgqLjg6vjg53jg7w=?= =?utf-8?b?44OI6ISx552A5pmC44Gu6Ieq5YuV5YiH5pat44O75YaN5o6l57aa44KS44Oq?= =?utf-8?b?44OV44Kh44Kv44K/44Oq44Oz44Kw?= Message-ID: <1450699018.601118.70480.nullmailer@users.sourceforge.jp> Revision: 6217 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6217 Author: maya Date: 2015-12-21 20:56:58 +0900 (Mon, 21 Dec 2015) Log Message: ----------- シリアルポート脱着時の自動切断・再接続をリファクタリング COMポートをチェックにし行くデバイスタイプを限定 デバイス削除時と追加時の処理を分離した Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2015-12-20 15:16:40 UTC (rev 6216) +++ trunk/teraterm/teraterm/vtwin.cpp 2015-12-21 11:56:58 UTC (rev 6217) @@ -3115,22 +3115,21 @@ BOOL CVTWindow::OnDeviceChange(UINT nEventType, DWORD_PTR dwData) { - if (nEventType == DBT_DEVICEARRIVAL || nEventType == DBT_DEVICEREMOVECOMPLETE) { - if (ts.PortType == IdSerial) { - if (!ts.AutoComPortReconnect) { - return CFrameWnd::OnDeviceChange(nEventType, dwData); - } + PDEV_BROADCAST_PORT pDevPort; - if (cv.Open != 0) { - /* \x90?\xB1\x92\x86 */ - if (AutoDisconnectedPort == -1 && CheckComPort(cv.ComPort) == 0) { - AutoDisconnectedPort = cv.ComPort; - Disconnect(TRUE); - } - } - else { - /* \x96\xA2\x90?\xB1 */ - if (AutoDisconnectedPort == ts.ComPort && CheckComPort(ts.ComPort) == 1) { + pDevPort = (PDEV_BROADCAST_PORT)dwData; + + switch (nEventType) { + case DBT_DEVICEARRIVAL: + //OutputDebugPrintf("DBT_DEVICEARRIVAL %d\n", pDevPort->dbcp_devicetype); + if (pDevPort->dbcp_devicetype == DBT_DEVTYP_PORT && + ts.PortType == IdSerial && + ts.AutoComPortReconnect && + AutoDisconnectedPort == ts.ComPort) { + if (!cv.Open) { + /* Tera Term \x96\xA2\x90?\xB1 */ + if (CheckComPort(ts.ComPort) == 1) { + /* \x83|\x81[\x83g\x82\xAA\x97L\x8C\xF8 */ AutoDisconnectedPort = -1; Connecting = TRUE; ChangeTitle(); @@ -3138,7 +3137,25 @@ } } } + break; + case DBT_DEVICEREMOVECOMPLETE: + //OutputDebugPrintf("DBT_DEVICEREMOVECOMPLETE %d\n", pDevPort->dbcp_devicetype); + if (pDevPort->dbcp_devicetype == DBT_DEVTYP_PORT && + ts.PortType == IdSerial && + ts.AutoComPortReconnect && + AutoDisconnectedPort == -1) { + if (cv.Open) { + /* Tera Term \x90?\xB1\x92\x86 */ + if (CheckComPort(cv.ComPort) == 0) { + /* \x83|\x81[\x83g\x82\xAA\x96\xB3\x8C\xF8 */ + AutoDisconnectedPort = cv.ComPort; + Disconnect(TRUE); + } + } + } + break; } + return CFrameWnd::OnDeviceChange(nEventType, dwData); } From svnnotify @ sourceforge.jp Mon Dec 21 22:56:21 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Mon, 21 Dec 2015 22:56:21 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMThdICDjg4fjg5Djg4PjgrDjgrPjg7w=?= =?utf-8?b?44OJ44KS6L+95Yqg?= Message-ID: <1450706181.633911.115623.nullmailer@users.sourceforge.jp> Revision: 6218 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6218 Author: maya Date: 2015-12-21 22:56:21 +0900 (Mon, 21 Dec 2015) Log Message: ----------- デバッグコードを追加 Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2015-12-21 11:56:58 UTC (rev 6217) +++ trunk/teraterm/teraterm/vtwin.cpp 2015-12-21 13:56:21 UTC (rev 6218) @@ -3116,16 +3116,25 @@ BOOL CVTWindow::OnDeviceChange(UINT nEventType, DWORD_PTR dwData) { PDEV_BROADCAST_PORT pDevPort; +#ifdef DEBUG + char port_name[8]; /* COMxxxx + NULL */ +#endif pDevPort = (PDEV_BROADCAST_PORT)dwData; switch (nEventType) { case DBT_DEVICEARRIVAL: - //OutputDebugPrintf("DBT_DEVICEARRIVAL %d\n", pDevPort->dbcp_devicetype); +#ifdef DEBUG + OutputDebugPrintf("DBT_DEVICEARRIVAL devicetype=%d PortType=%d AutoDisconnectedPort=%d\n", pDevPort->dbcp_devicetype, ts.PortType, AutoDisconnectedPort); +#endif if (pDevPort->dbcp_devicetype == DBT_DEVTYP_PORT && ts.PortType == IdSerial && ts.AutoComPortReconnect && AutoDisconnectedPort == ts.ComPort) { +#ifdef DEBUG + strncpy_s(port_name, sizeof(port_name), pDevPort->dbcp_name, _TRUNCATE); + OutputDebugPrintf("%s\n", port_name); +#endif if (!cv.Open) { /* Tera Term \x96\xA2\x90?\xB1 */ if (CheckComPort(ts.ComPort) == 1) { @@ -3139,11 +3148,17 @@ } break; case DBT_DEVICEREMOVECOMPLETE: - //OutputDebugPrintf("DBT_DEVICEREMOVECOMPLETE %d\n", pDevPort->dbcp_devicetype); +#ifdef DEBUG + OutputDebugPrintf("DBT_DEVICEREMOVECOMPLETE devicetype=%d PortType=%d AutoDisconnectedPort=%d\n", pDevPort->dbcp_devicetype, ts.PortType, AutoDisconnectedPort); +#endif if (pDevPort->dbcp_devicetype == DBT_DEVTYP_PORT && ts.PortType == IdSerial && ts.AutoComPortReconnect && AutoDisconnectedPort == -1) { +#ifdef DEBUG + strncpy_s(port_name, sizeof(port_name), pDevPort->dbcp_name, _TRUNCATE); + OutputDebugPrintf("%s\n", port_name); +#endif if (cv.Open) { /* Tera Term \x90?\xB1\x92\x86 */ if (CheckComPort(cv.ComPort) == 0) { From svnnotify @ sourceforge.jp Tue Dec 22 21:28:21 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Tue, 22 Dec 2015 21:28:21 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMTldICBYTU9ERU0g44Gu44Kq44OX44K3?= =?utf-8?b?44On44Oz5oyH5a6a44Gu5oyZ5YuV44KS5L+u5q2jIFtUdHNzaDItZGV2ZWwg?= =?utf-8?q?2814=5D?= Message-ID: <1450787301.047047.98099.nullmailer@users.sourceforge.jp> Revision: 6219 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6219 Author: doda Date: 2015-12-22 21:28:20 +0900 (Tue, 22 Dec 2015) Log Message: ----------- XMODEM のオプション指定の挙動を修正 [Ttssh2-devel 2814] ・checksum での受信時に相手が 1k なパケットを送ってきた場合は checksum/1k として扱うようにした ・送信オプションで CRC を指定した時、相手からの NAK で checksum に fallback するようにした ・送信オプション 1k 指定時に相手からの NAK で chesksum/1k に fallback した時、 ダイアログでの表示を XMODEM (1k*) に変更するようにした Modified Paths: -------------- trunk/teraterm/common/tttypes.h trunk/teraterm/ttpfile/xmodem.c trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2015-12-21 13:56:21 UTC (rev 6218) +++ trunk/teraterm/common/tttypes.h 2015-12-22 12:28:20 UTC (rev 6219) @@ -167,9 +167,10 @@ #define IdNamedPipe 4 /* XMODEM option */ -#define XoptCheck 1 -#define XoptCRC 2 -#define Xopt1K 3 +#define XoptCheck 1 +#define XoptCRC 2 +#define Xopt1kCRC 3 +#define Xopt1kCksum 4 /* YMODEM option */ #define Yopt1K 1 Modified: trunk/teraterm/ttpfile/xmodem.c =================================================================== --- trunk/teraterm/ttpfile/xmodem.c 2015-12-21 13:56:21 UTC (rev 6218) +++ trunk/teraterm/ttpfile/xmodem.c 2015-12-22 12:28:20 UTC (rev 6219) @@ -83,11 +83,16 @@ xv->DataLen = 128; xv->CheckLen = 2; break; - case Xopt1K: /* 1K */ - strncat_s(Tmp, sizeof(Tmp), "1K)", _TRUNCATE); + case Xopt1kCRC: /* 1k */ + strncat_s(Tmp, sizeof(Tmp), "1k)", _TRUNCATE); xv->DataLen = 1024; xv->CheckLen = 2; break; + case Xopt1kCksum: /* 1k with Checksum (unofficial) */ + strncat_s(Tmp, sizeof(Tmp), "1k*)", _TRUNCATE); + xv->DataLen = 1024; + xv->CheckLen = 1; + break; } SetDlgItemText(fv->HWin, IDC_PROTOPROT, Tmp); } @@ -263,13 +268,18 @@ if (b == SOH) { xv->PktIn[0] = b; xv->PktReadMode = XpktBLK; - if (xv->XOpt == Xopt1K) + if (xv->XOpt == Xopt1kCRC) XSetOpt(fv, xv, XoptCRC); + else if (xv->XOpt == Xopt1kCksum) + XSetOpt(fv, xv, XoptCheck); FTSetTimeOut(fv, xv->TOutShort); } else if (b == STX) { xv->PktIn[0] = b; xv->PktReadMode = XpktBLK; - XSetOpt(fv, xv, Xopt1K); + if (xv->XOpt == XoptCRC) + XSetOpt(fv, xv, Xopt1kCRC); + else if (xv->XOpt == XoptCheck) + XSetOpt(fv, xv, Xopt1kCksum); FTSetTimeOut(fv, xv->TOutShort); } else if (b == EOT) { b = ACK; @@ -406,11 +416,15 @@ } break; case NAK: - if (xv->PktNum == 0 && xv->XOpt == Xopt1K) { - /* we wanted 1k with CRC, but the other end specified checksum */ - /* keep the 1k block, but move back to checksum mode. */ - xv->XOpt = XoptCheck; - xv->CheckLen = 1; + if (xv->PktNum == 0) { + if (xv->XOpt == XoptCRC) { + // receiver wants to use checksum. + XSetOpt(fv, xv, XoptCheck); + } else if (xv->XOpt == Xopt1kCRC) { + /* we wanted 1k with CRC, but the other end specified checksum */ + /* keep the 1k block, but move back to checksum mode. */ + XSetOpt(fv, xv, Xopt1kCksum); + } } SendFlag = TRUE; break; Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2015-12-21 13:56:21 UTC (rev 6218) +++ trunk/teraterm/ttpset/ttset.c 2015-12-22 12:28:20 UTC (rev 6219) @@ -1076,7 +1076,7 @@ if (_stricmp(Temp, "crc") == 0) ts->XmodemOpt = XoptCRC; else if (_stricmp(Temp, "1k") == 0) - ts->XmodemOpt = Xopt1K; + ts->XmodemOpt = Xopt1kCRC; else ts->XmodemOpt = XoptCheck; @@ -2475,7 +2475,8 @@ case XoptCRC: strncpy_s(Temp, sizeof(Temp), "crc", _TRUNCATE); break; - case Xopt1K: + case Xopt1kCRC: + case Xopt1kCksum: /* Checksum/1k \x82?\xB3\x8BK\x82?\xA8\x82ł??\xA2\x88?A\x90?\xE8\x95?\xB6\x8E\x9E\x82\xCD CRC/1k \x82?\xB7\x82\xE9 */ strncpy_s(Temp, sizeof(Temp), "1k", _TRUNCATE); break; default: From svnnotify @ sourceforge.jp Wed Dec 23 19:47:58 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 23 Dec 2015 19:47:58 +0900 Subject: [Ttssh2-commit] =?utf-8?q?=5B6220=5D__Visual_Studio_2015=E3=81=A7?= =?utf-8?b?44OT44Or44OJ44GZ44KL44Go44CB44OQ44O844K444On44Oz5oOF5aCx44Gu?= =?utf-8?b?ICJWaXN1YWwgQysrIiDjg5Djg7zjgrjjg6fjg7PjgYw=?= Message-ID: <1450867678.985015.82525.nullmailer@users.sourceforge.jp> Revision: 6220 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6220 Author: yutakapon Date: 2015-12-23 19:47:58 +0900 (Wed, 23 Dec 2015) Log Message: ----------- Visual Studio 2015でビルドすると、バージョン情報の"Visual C++"バージョンが 誤って 14 ではなく 13 と表記されることへの修正を行った。 Modified Paths: -------------- trunk/teraterm/ttpdlg/ttdlg.c -------------- next part -------------- Modified: trunk/teraterm/ttpdlg/ttdlg.c =================================================================== --- trunk/teraterm/ttpdlg/ttdlg.c 2015-12-22 12:28:20 UTC (rev 6219) +++ trunk/teraterm/ttpdlg/ttdlg.c 2015-12-23 10:47:58 UTC (rev 6220) @@ -2675,6 +2675,7 @@ char uimsg[MAX_UIMSG], uimsg2[MAX_UIMSG]; LOGFONT logfont; HFONT font; + int msc_ver, vs_ver; #if defined(EFFECT_ENABLED) || defined(TEXTURE_ENABLED) // for animation @@ -2777,8 +2778,19 @@ // \x83r\x83\x8B\x83h\x82\xB5\x82\xBD\x82?\xAB\x82?g\x82\xED\x82?Visual C++\x82?o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x90??\x82\xE9\x81B(2009.3.3 yutaka) _snprintf_s(buf, sizeof(buf), _TRUNCATE, "Built using Microsoft Visual C++"); #ifdef _MSC_FULL_VER + // VS2015\x82ł\xCD Compiler version = 19 \x82\xBE\x82\xAA\x81AVisual Studio version = 14 \x82??\xC1\x82Ă\xA2\x82邽\x82?A + // \x8C\xB8\x8EZ\x82?\xAE\x82\xB7\x82\xE9\x81B + // (2015.12.23 yutaka) + msc_ver = (_MSC_FULL_VER / 10000000); + if (msc_ver < 19) { + vs_ver = msc_ver - 6; + } + else { + vs_ver = msc_ver - 5; + } + _snprintf_s(tmpbuf, sizeof(tmpbuf), _TRUNCATE, " %d.%d", - (_MSC_FULL_VER / 10000000) - 6, + vs_ver, (_MSC_FULL_VER / 100000) % 100); strncat_s(buf, sizeof(buf), tmpbuf, _TRUNCATE); if (_MSC_FULL_VER % 100000) { From svnnotify @ sourceforge.jp Wed Dec 23 22:22:21 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Wed, 23 Dec 2015 22:22:21 +0900 Subject: [Ttssh2-commit] =?utf-8?b?WzYyMjFdICDjg4HjgrHjg4Pjg4ggIzM1NzQ0?= =?utf-8?b?IFZTMjAxNeOBruitpuWRiumZpOWOuw==?= Message-ID: <1450876941.726086.113203.nullmailer@users.sourceforge.jp> Revision: 6221 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6221 Author: yutakapon Date: 2015-12-23 22:22:21 +0900 (Wed, 23 Dec 2015) Log Message: ----------- チケット #35744 VS2015の警告除去 ttlib.c の GetVersionEx() で警告が出ないようにした。 Ticket Links: ------------ http://sourceforge.jp/projects/ttssh2/tracker/detail/35744 Modified Paths: -------------- branches/vs2015_warn/teraterm/common/ttlib.c -------------- next part -------------- Modified: branches/vs2015_warn/teraterm/common/ttlib.c =================================================================== --- branches/vs2015_warn/teraterm/common/ttlib.c 2015-12-23 10:47:58 UTC (rev 6220) +++ branches/vs2015_warn/teraterm/common/ttlib.c 2015-12-23 13:22:21 UTC (rev 6221) @@ -16,6 +16,29 @@ // for _ismbblead #include +/* OS version with GetVersionEx(*1) + + dwMajorVersion dwMinorVersion dwPlatformId +Windows95 4 0 VER_PLATFORM_WIN32_WINDOWS +Windows98 4 10 VER_PLATFORM_WIN32_WINDOWS +WindowsMe 4 90 VER_PLATFORM_WIN32_WINDOWS +WindowsNT4.0 4 0 VER_PLATFORM_WIN32_NT +Windows2000 5 0 VER_PLATFORM_WIN32_NT +WindowsXP 5 1 VER_PLATFORM_WIN32_NT +WindowsXPx64 5 2 VER_PLATFORM_WIN32_NT +WindowsVista 6 0 VER_PLATFORM_WIN32_NT +Windows7 6 1 VER_PLATFORM_WIN32_NT +Windows8 6 2 VER_PLATFORM_WIN32_NT +Windows8.1(*2) 6 2 VER_PLATFORM_WIN32_NT +Windows8.1(*3) 6 3 VER_PLATFORM_WIN32_NT +Windows10(*2) 6 2 VER_PLATFORM_WIN32_NT +Windows10(*3) 10 0 VER_PLATFORM_WIN32_NT + +(*1) GetVersionEx()\x82\xAA c4996 warning \x82??\xE9\x82??AVS2013(_MSC_VER=1800) \x82\xA9\x82\xE7\x82ł\xB7\x81B +(*2) manifest\x82\xC9 supportedOS Id \x82\xF0\x92?\xC1\x82\xB5\x82Ă\xA2\x82?\xA2\x81B +(*3) manifest\x82\xC9 supportedOS Id \x82\xF0\x92?\xC1\x82\xB5\x82Ă\xA2\x82\xE9\x81B +*/ + // for isInvalidFileNameChar / replaceInvalidFileNameChar static char *invalidFileNameChars = "\\/:*?\"<>|"; @@ -955,8 +978,28 @@ OutputDebugString(tmp); } +// OS\x82\xAA WindowsNT4.0 \x82\xA9\x82?\xA4\x82\xA9\x82??\xB7\x82\xE9\x81B +// +// return TRUE: NT4.0 +// FALSE: Not NT4.0 BOOL is_NT4() { +#if (_MSC_VER >= 1800) + // VS2013\x88?ゾ\x82\xC6 GetVersionEx() \x82\xAA\x8Cx\x8D\x90\x82??邽\x82?AVerifyVersionInfo() \x82\xF0\x8Eg\x82\xA4\x81B + // \x82\xB5\x82\xA9\x82\xB5\x81AVS2013\x82Ńr\x83\x8B\x83h\x82\xB5\x82\xBD\x83v\x83\x8D\x83O\x83\x89\x83\x80\x82?A\x82\xBB\x82\xE0\x82\xBB\x82\xE0 NT4.0 \x82ł?\xAE\x8D?\x82?\xA2\x82\xBD\x82?A + // \x96\xB3\x8F\xF0\x8C\x8F\x82\xC9 FALSE \x82\xF0\x95?\xB5\x82Ă\xE0\x82悢\x82\xA9\x82\xE0\x82\xB5\x82\xEA\x82?\xA2\x81B + OSVERSIONINFOEX osvi; + DWORDLONG dwlConditionMask = 0; + int op = VER_EQUAL; + BOOL ret; + + ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + osvi.dwMajorVersion = 4; + VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, op); + ret = VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask); + return (ret); +#else OSVERSIONINFO osvi; osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); @@ -966,16 +1009,46 @@ return TRUE; } return FALSE; +#endif } -int get_OPENFILENAME_SIZE() +// OS\x82\xAA Windows2000 \x88?~ \x82\xA9\x82?\xA4\x82\xA9\x82??\xB7\x82\xE9\x81B +// +// return TRUE: +// FALSE: +BOOL IsWindows2000OrLater(void) { +#if (_MSC_VER >= 1800) + // VS2013\x88?ゾ\x82\xC6 GetVersionEx() \x82\xAA\x8Cx\x8D\x90\x82??邽\x82?AVerifyVersionInfo() \x82\xF0\x8Eg\x82\xA4\x81B + // \x82\xB5\x82\xA9\x82\xB5\x81AVS2013\x82Ńr\x83\x8B\x83h\x82\xB5\x82\xBD\x83v\x83\x8D\x83O\x83\x89\x83\x80\x82?A\x82\xBB\x82\xE0\x82\xBB\x82\xE0 2000 \x82ł?\xAE\x8D?\x82?\xA2\x82\xBD\x82?A + // \x96\xB3\x8F\xF0\x8C\x8F\x82\xC9 TRUE \x82\xF0\x95?\xB5\x82Ă\xE0\x82悢\x82\xA9\x82\xE0\x82\xB5\x82\xEA\x82?\xA2\x81B + OSVERSIONINFOEX osvi; + DWORDLONG dwlConditionMask = 0; + int op = VER_GREATER_EQUAL; + BOOL ret; + + ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + osvi.dwMajorVersion = 5; + VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, op); + ret = VerifyVersionInfo(&osvi, VER_MAJORVERSION, dwlConditionMask); + return (ret); +#else OSVERSIONINFO osvi; osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&osvi); if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT && - osvi.dwMajorVersion >= 5) { + osvi.dwMajorVersion >= 5) { + return TRUE; + } + return FALSE; +#endif +} + +int get_OPENFILENAME_SIZE() +{ + if (IsWindows2000OrLater()) { return sizeof(OPENFILENAME); } //return OPENFILENAME_SIZE_VERSION_400; From svnnotify @ sourceforge.jp Fri Dec 25 00:57:20 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Fri, 25 Dec 2015 00:57:20 +0900 Subject: [Ttssh2-commit] [6222] Added English text for Macro Language Design and Implementation. Message-ID: <1450972640.703808.94853.nullmailer@users.sourceforge.jp> Revision: 6222 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6222 Author: yutakapon Date: 2015-12-25 00:57:20 +0900 (Fri, 25 Dec 2015) Log Message: ----------- Added English text for Macro Language Design and Implementation. Modified Paths: -------------- trunk/doc/en/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/en/html/reference/sourcecode.html =================================================================== --- trunk/doc/en/html/reference/sourcecode.html 2015-12-23 13:22:21 UTC (rev 6221) +++ trunk/doc/en/html/reference/sourcecode.html 2015-12-24 15:57:20 UTC (rev 6222) @@ -1041,114 +1041,112 @@

    Macro Language Design and Implementation

    - - +GetString() function is responsible for finding string values. Since string are surrounded by singe or double quotas ('or "), it is easy to retrieve them.
    +GetExpression() function detects the formulas that require calculations. It uses recursive descent method for parsing.
    +CheckVar() function can tell whether the variable exists and if it has numeric or string type. If variable not found, NewStrVar() function will register a new variable.
    +
    From svnnotify @ sourceforge.jp Mon Dec 28 23:17:47 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Mon, 28 Dec 2015 23:17:47 +0900 Subject: [Ttssh2-commit] [6223] Proofread title message. Message-ID: <1451312267.745802.51581.nullmailer@users.sourceforge.jp> Revision: 6223 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6223 Author: yutakapon Date: 2015-12-28 23:17:47 +0900 (Mon, 28 Dec 2015) Log Message: ----------- Proofread title message. Modified Paths: -------------- trunk/doc/en/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/en/html/reference/sourcecode.html =================================================================== --- trunk/doc/en/html/reference/sourcecode.html 2015-12-24 15:57:20 UTC (rev 6222) +++ trunk/doc/en/html/reference/sourcecode.html 2015-12-28 14:17:47 UTC (rev 6223) @@ -15,21 +15,21 @@
    1. Foreword
    2. -
    3. Skill Sets
    4. -
    5. Module Composition
    6. -
    7. Library Composition
    8. -
    9. Supporting Plug-in
    10. -
    11. Read and Write Configuration File
    12. +
    13. Required Skill Sets
    14. +
    15. Tera Term Package Content
    16. +
    17. Third Party Libraries
    18. +
    19. Plug-in Support
    20. +
    21. Reading and Writing Configuration File
    22. Secure Programming
    23. -
    24. Compatible with obsolete Windows
    25. -
    26. Debugging Method
    27. +
    28. Compatibility with Obsolete Windows Versions
    29. +
    30. Debugging Methods
    31. Multithreading
    32. DDE Communication
    33. -
    34. SSH Design and Implementation by TTSSH
    35. +
    36. SSH Design and Implementation in TTSSH
    37. Macro Language Design and Implementation
    38. Caret Control
    39. Serial Port
    40. -
    41. Binary Transfer Protocol
    42. +
    43. Binary Transfer Protocols

    @@ -42,7 +42,7 @@
    -

    Skill Sets

    +

    Required Skill Sets

    Most program included in the Tera Term package are described with the C language. A part of code is described with the C++ language and used by MFC(Microsoft Foundation Class). The Win32 API knowledge is required because the source code uses a lot of Win32 API to process the Windows specific function.
    @@ -64,7 +64,7 @@
    -

    Module Composition

    +

    Tera Term Package Content

    Tera Term contains many executable module(.exe and .dll) and the association figure are below shown. An extension of an executable file is ".exe" and any DLL files are dynamically linked as needed. Every module is the 32-bit program(x86) and the developer team will not validate the Tera Term software on the 64-bit environment like the x86-64 and IA-64.
    @@ -87,7 +87,7 @@
    -

    Library Composition

    +

    Third Party Libraries

    It is not efficiently performed to build a software from scratch for advanced feature. So, Tera Term actively uses the open source library. However, we need to be careful with the license violation, especially GPL.
    Some modules linked with the open source library and the linkage status are below shown. The macro program links the regular expression library that is called Oniguruma to use the regular expression by the "waitregex" and "sprintf" macro command. Also, Tera Term program links the same library to display the Oniguruma version on the version dialog. @@ -107,7 +107,7 @@
    -

    Supporting Plug-in

    +

    Plug-in Support

    Tera Term can support the plug-in mechanism by using the DLL module. A user can add new feature without source code modifying when the DLL plug-in module is copied into the Tera Term installation directory. The TTSSH module is typical plug-in module.
    A sample code for plug-in programming is into the TTXSamples\ttxtest\ttxtest.c file. It is recommended that a user develop the plug-in module based on this file. The "TTX KanjiMenu" source code(TTXKanjiMenu\ directory) is practical and simple module.

    @@ -271,7 +271,7 @@ -

    Read and Write Configuration File

    +

    Reading and Writing Configuration File

    The registry system is traditionally used on the general Windows application to record the application data. However, Tera Term basically uses the .ini file to reading and writing the application data because the Tera Term's birth goes back to the Windows 3.1.
    The Collector, LogMeTT and CygTerm program included in the Tera Term package are recording the application data to the local storage.
    The TeraTerm Menu records the application data to the registry as an exception. However, the application uses the .ini file instead of the registry when the "ttpmenu.ini"(it is possible to 0 byte) is created on the current directory. Note that your registry data is automatically translated to the .ini file, so you need to configure again.
    @@ -372,7 +372,7 @@ -

    Compatible with obsolete Windows

    +

    Compatibility with Obsolete Windows Versions

    Dynamic Loading

    Microsoft Windows application can work well on every Windows version by using same executing program, however it is necessary to devise a way to make a programming.
    @@ -421,7 +421,7 @@
    -

    Debugging Method

    +

    Debugging Methods

    Debug printf

    The Windows application can not generally use the printf() function because the standard output is not assigned anywhere on the application. However, the application can use the printf() function by using the AllocConsole() and freopen().
    The application can display the message on the debug console of the Visual Studio by using the OutputDebugString() API. When the debugger launches, the debugging message can be shown regardless of the "Debug build" and "Release build". So, when a user uses the debugger like as the DBCon by not using the Visual Studio, the debugging message of the application can be caught.
    @@ -769,7 +769,7 @@ -

    SSH Design and Implementation by TTSSH

    +

    SSH Design and Implementation in TTSSH

    Modified: trunk/doc/ja/html/reference/sourcecode.html =================================================================== --- trunk/doc/ja/html/reference/sourcecode.html 2015-12-30 15:20:35 UTC (rev 6225) +++ trunk/doc/ja/html/reference/sourcecode.html 2015-12-31 12:21:39 UTC (rev 6226) @@ -1530,11 +1530,11 @@ \x81@\x8F\xE3\x8BL\x83\x8D\x83O\x82??\xA1\x82??\xBA\x82??\xA8\x82\xE8\x82ł\xB7\x81B \x81@
      -
    1. NAK\x8E\xF3\x90M
    2. +
    3. NAK\x8E\xF3\x90M(15)
    4. \x83u\x83\x8D\x83b\x83N\x83f\x81[\x83^\x82?\x97\x90M
    5. -
    6. ACK\x8E\xF3\x90M
    7. -
    8. EOT\x82?\x97\x90M
    9. -
    10. ACK\x8E\xF3\x90M
    11. +
    12. ACK\x8E\xF3\x90M(06)
    13. +
    14. EOT\x82?\x97\x90M(04)
    15. +
    16. ACK\x8E\xF3\x90M(06)
    \x81@\x83u\x83\x8D\x83b\x83N\x83f\x81[\x83^\x82?A\x81u\x83w\x83b\x83_(3byte)\x81{\x83f\x81[\x83^(128byte)\x81{CRC(1byte)\x81v\x82\xA9\x82\xE7\x8D\\x90\xAC\x82\xB3\x82\xEA\x82?\xB7\x81B\x82\xB1\x82?\xE1\x82ł?A\x91\x97\x90M\x83f\x81[\x83^\x82\xAA128byte\x96\xA2\x96\x9E\x82??ŁA\x83p\x83f\x83B\x83\x93\x83O\x82?\xB5\x82\xC4CPMEOF(0x1A)\x82Ŗ\x84\x82?\xE7\x82\xEA\x82Ă\xA2\x82?\xB7\x81B @@ -1859,17 +1859,17 @@ \x81@\x8F\xE3\x8BL\x83\x8D\x83O\x82??\xA1\x82??\xBA\x82??\xA8\x82\xE8\x82ł\xB7\x81B \x81@
      -
    1. 'C'\x81i\x91\x97\x90M\x97v\x8B\x81\x81j\x8E\xF3\x90M
    2. +
    3. 'C'\x81i\x91\x97\x90M\x97v\x8B\x81\x81j\x8E\xF3\x90M(43)
    4. \x83u\x83\x8D\x83b\x83N0\x81i\x83t\x83@\x83C\x83\x8B\x8F\xEE\x95\xF1\x81j\x82?\x97\x90M
    5. -
    6. ACK\x8E\xF3\x90M
    7. -
    8. 'C'\x81i\x91\x97\x90M\x97v\x8B\x81\x81j\x8E\xF3\x90M
    9. +
    10. ACK\x8E\xF3\x90M(06)
    11. +
    12. 'C'\x81i\x91\x97\x90M\x97v\x8B\x81\x81j\x8E\xF3\x90M (43)
    13. \x83u\x83\x8D\x83b\x83N1\x82?\x97\x90M
    14. -
    15. ACK\x8E\xF3\x90M
    16. -
    17. EOT\x82?\x97\x90M
    18. -
    19. ACK\x8E\xF3\x90M
    20. -
    21. 'C'\x81i\x91\x97\x90M\x97v\x8B\x81\x81j\x8E\xF3\x90M
    22. +
    23. ACK\x8E\xF3\x90M (06)
    24. +
    25. EOT\x82?\x97\x90M (04)
    26. +
    27. ACK\x8E\xF3\x90M(06)
    28. +
    29. 'C'\x81i\x91\x97\x90M\x97v\x8B\x81\x81j\x8E\xF3\x90M (43)
    30. \x83u\x83\x8D\x83b\x83N0\x81i\x83I\x81[\x83\x8B\x83[\x83\x8D\x81j\x82?\x97\x90M
    31. -
    32. ACK\x8E\xF3\x90M
    33. +
    34. ACK\x8E\xF3\x90M(06)
    @@ -1916,6 +1916,7 @@ TYPE \x91?\x8E\x9A\x83A\x83\x8B\x83t\x83@\x83x\x83b\x83g\x82Ńp\x83P\x83b\x83g\x82?\xED\x95?\xF0\x95\\x82\xB7\x81B DATA \x83f\x81[\x83^ CHECK \x89\xC1\x8EZ\x83`\x83F\x83b\x83N\x83T\x83\x80\x81B1,2,3\x83o\x83C\x83g\x82?\xA2\x82\xB8\x82?\x82?`\x8E\xAE\x82\xF0\x91I\x82?\xE9\x81B + <terminator> \x90\xA7\x8C\xE4\x83R\x81[\x83h
    \x81@\x88?\xBA\x82?g\x92\xA3\x8C`\x8E\xAE\x82ł\xB7\x81B From svnnotify @ sourceforge.jp Thu Dec 31 21:25:23 2015 From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp) Date: Thu, 31 Dec 2015 21:25:23 +0900 Subject: [Ttssh2-commit] [6227] Fixed spelling error. Message-ID: <1451564723.598438.85540.nullmailer@users.sourceforge.jp> Revision: 6227 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6227 Author: yutakapon Date: 2015-12-31 21:25:23 +0900 (Thu, 31 Dec 2015) Log Message: ----------- Fixed spelling error. Modified Paths: -------------- trunk/doc/en/html/reference/sourcecode.html -------------- next part -------------- Modified: trunk/doc/en/html/reference/sourcecode.html =================================================================== --- trunk/doc/en/html/reference/sourcecode.html 2015-12-31 12:21:39 UTC (rev 6226) +++ trunk/doc/en/html/reference/sourcecode.html 2015-12-31 12:25:23 UTC (rev 6227) @@ -1504,7 +1504,7 @@

    XMODEM

    XMODEM divides the data files into blocks with predetermined size (128 bytes or 1,024 bytes) and expects ACK after sending each block. At low transmission speeds implementing a mechanism of sending/receiving ACK-s after every single block is not difficult.
    -If the data is shorter than predetermined block size, it will be padded with CPMEOF (0x1A). In other words, when you send a file, the size of transmitted data is always equal to a multiple of predetermined block size. Therefore, if integrity of transmited file has to be determined, XMOMDEM won't be able to do that. It should be noted that term CPMEOF is related to MS-DOS operating system. Its predecessor - CP/M called this character EOF which meant end of text file.
    +If the data is shorter than predetermined block size, it will be padded with CPMEOF (0x1A). In other words, when you send a file, the size of transmitted data is always equal to a multiple of predetermined block size. Therefore, if integrity of transmitted file has to be determined, XMOMDEM won't be able to do that. It should be noted that term CPMEOF is related to MS-DOS operating system. Its predecessor - CP/M called this character EOF which meant end of text file.
    More information about XMODEM protocol can be found on Wikipedia. @@ -1964,7 +1964,7 @@ HCHECK is a single-character type 1 checksum -In order to send more than 94 bytes of data, extended format's field containing data size is increased to two bytes. "LEN" is always zero of basic format (after adding 32 it is equal to ASCII code of whitespace character). Additionally, the size of the header increased by 3 bytes and haeder checksum was added.
    +In order to send more than 94 bytes of data, extended format's field containing data size is increased to two bytes. "LEN" is always zero of basic format (after adding 32 it is equal to ASCII code of whitespace character). Additionally, the size of the header increased by 3 bytes and header checksum was added.

    Initialization String
    Ps \x8B@\x94\
    0, 1, 2 \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82\xF0 Pt \x82?ύX\x82\xB7\x82\xE9\x81B
    4 \x90F\x90?\xE8\x81B +
    4 \x90F\x82\xF0\x90??\x82\xE9\x81B Pt \x82\xCD c ; spec \x82?\xA2\x82\xA4\x8F\x91\x8E\xAE\x82ŁA\x90F\x94?\x86 c \x82?F\x82\xF0 spec \x82???\x82\xE9\x81B
    spec \x82??\xBA\x82?`\x8E\xAE\x82\xF0\x8E?t\x82\xAF\x82\xE9\x81B
    @@ -894,7 +894,7 @@
     OSC 4 ; c ; rgb:rrrr/gggg/bbbb ST
     
    5 \x90F\x90?\xE8\x81B +
    5 \x95\xB6\x8E\x9A\x91\xAE\x90\xAB\x82?F\x82\xF0\x90??\x82\xE9\x81B Pt \x82\xCD c ; spec \x82?\xA2\x82\xA4\x8F\x91\x8E\xAE\x82ŁAc \x82?Ή\x9E\x82\xB7\x82?\x8E\x9A\x91\xAE\x90\xAB\x82?F\x82\xF0 spec \x82???\x82\xE9\x81B
    c \x82?\xB6\x8E\x9A\x91\xAE\x90\xAB\x82?Ή\x9E\x82??\xBA\x82??\xE8\x81B
    
    From svnnotify @ sourceforge.jp  Tue Dec  1 08:31:41 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Tue, 01 Dec 2015 08:31:41 +0900
    Subject: [Ttssh2-commit] =?utf-8?b?WzYxODZdICDjg6rjg6rjg7zjgrnmiYvpoIY=?=
     =?utf-8?b?44GrIFR3aXR0ZXIg44Gr44Gk44GE44Gm6KiY6L+w?=
    Message-ID: <1448926301.684763.71574.nullmailer@users.sourceforge.jp>
    
    Revision: 6186
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6186
    Author:   maya
    Date:     2015-12-01 08:31:41 +0900 (Tue, 01 Dec 2015)
    Log Message:
    -----------
    リリース手順に Twitter について記述
    
    Modified Paths:
    --------------
        trunk/doc/en/html/reference/develop.txt
        trunk/doc/ja/html/reference/develop.txt
    
    -------------- next part --------------
    Modified: trunk/doc/en/html/reference/develop.txt
    ===================================================================
    --- trunk/doc/en/html/reference/develop.txt	2015-11-30 23:24:22 UTC (rev 6185)
    +++ trunk/doc/en/html/reference/develop.txt	2015-11-30 23:31:41 UTC (rev 6186)
    @@ -293,3 +293,7 @@
             Create new topic in `Announcements' entry.
             Change the type of previous Announcement from Announcement to Normal.
             Delete third previous Announcement.
    +
    +  13. Announce release to Twitter.
    +      https://twitter.com/Tera_Term
    +      Post release announcement and pin.
    
    Modified: trunk/doc/ja/html/reference/develop.txt
    ===================================================================
    --- trunk/doc/ja/html/reference/develop.txt	2015-11-30 23:24:22 UTC (rev 6185)
    +++ trunk/doc/ja/html/reference/develop.txt	2015-11-30 23:31:41 UTC (rev 6186)
    @@ -309,3 +309,7 @@
             Announcements \x82?V\x8BK\x93\x8A\x8De\x82\xB7\x82\xE9\x81B\x8E\xED\x97?\xCD Announcement
             \x88\xEA\x82?O\x82\xCC Announcement \x82?\xED\x97?\xF0 Normal \x82?ύX\x82\xB7\x82\xE9
             Announcement \x82?O\x8C?c\x82\xB7\x82\xB1\x82???\xC1\x82Ă\xA2\x82\xE9\x82?ŁA\x8EO\x82?O\x82\xCC Announcement \x82\xF0\x8D?\x82\xB7\x82\xE9
    +
    +  13. Twitter \x82?\x90\x92m\x82\xB7\x82\xE9
    +      https://twitter.com/Tera_Term
    +      \x83\x8A\x83\x8A\x81[\x83X\x8D\x90\x92m\x82\xF0\x83c\x83C\x81[\x83g\x82\xB5\x82ČŒ?\x82\xE9
    
    From svnnotify @ sourceforge.jp  Tue Dec  1 23:10:17 2015
    From: svnnotify @ sourceforge.jp (svnnotify @ sourceforge.jp)
    Date: Tue, 01 Dec 2015 23:10:17 +0900
    Subject: [Ttssh2-commit] =?utf-8?b?WzYxODddICDoi7HoqLPjgII=?=
    Message-ID: <1448979017.379340.58711.nullmailer@users.sourceforge.jp>
    
    Revision: 6187
              http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6187
    Author:   yutakapon
    Date:     2015-12-01 23:10:17 +0900 (Tue, 01 Dec 2015)
    Log Message:
    -----------
    英訳。
    
    Modified Paths:
    --------------
        trunk/doc/en/html/about/ctrlseq.html
    
    -------------- next part --------------
    Modified: trunk/doc/en/html/about/ctrlseq.html
    ===================================================================
    --- trunk/doc/en/html/about/ctrlseq.html	2015-11-30 23:31:41 UTC (rev 6186)
    +++ trunk/doc/en/html/about/ctrlseq.html	2015-12-01 14:10:17 UTC (rev 6187)
    @@ -939,7 +939,7 @@
     Pc: ignored.
     Pd: new clipboard contents. encoded in base64.
     
    - +When the Pd is the "?", the request does. The clipboard content responses as same style.
    104 Reset color number Pt.
    105 Reset special color number Pt.