svnno****@sourc*****
svnno****@sourc*****
2015年 5月 16日 (土) 23:33:43 JST
Revision: 5873 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5873 Author: maya Date: 2015-05-16 23:33:41 +0900 (Sat, 16 May 2015) Log Message: ----------- GetParam を ttpcm.dll に移動した Modified Paths: -------------- trunk/TTProxy/ProxyWSockHook.h trunk/TTProxy/TTProxy.h trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.c trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v10.vcxproj trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v11.vcxproj trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v12.vcxproj trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.vcproj trunk/teraterm/common/ttcommon.h trunk/teraterm/ttpcmn/ttcmn.c trunk/teraterm/ttpcmn/ttpcmn.def trunk/ttssh2/ttxssh/ttxssh.c -------------- next part -------------- Modified: trunk/TTProxy/ProxyWSockHook.h =================================================================== --- trunk/TTProxy/ProxyWSockHook.h 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTProxy/ProxyWSockHook.h 2015-05-16 14:33:41 UTC (rev 5873) @@ -15,6 +15,7 @@ #include "Logger.h" #include "SSLSocket.h" +#include "ttcommon.h" #include "ttlib.h" #include "i18n.h" Modified: trunk/TTProxy/TTProxy.h =================================================================== --- trunk/TTProxy/TTProxy.h 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTProxy/TTProxy.h 2015-05-16 14:33:41 UTC (rev 5873) @@ -86,35 +86,7 @@ buffer.append(basename); return buffer.toString(); } -#if 1 - // TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.c \x82Ɠ\xAF\x82\xB6 - static PCHAR GetParam(PCHAR buff, int size, PCHAR param) { - int i = 0; - BOOL quoted = FALSE; - - while (*param == ' ' || *param == '\t') { - param++; - } - - if (*param == '\0' || *param == ';') { - return NULL; - } - - while (*param != '\0' && (quoted || (*param != ';' && *param != ' ' && *param != '\t'))) { - if (*param == '"' && (*++param != '"' || !quoted)) { - quoted = !quoted; - continue; - } - else if (i < size - 1) { - buff[i++] = *param; - } - param++; - } - - buff[i] = '\0'; - return (param); - } -#else +#if 0 static int parse_option(char* option) { if ((*option == '/' || *option == '-')) { if ((option[1] == 'F' || option[1] == 'f') && option[2] == '=') { Modified: trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.c =================================================================== --- trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.c 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.c 2015-05-16 14:33:41 UTC (rev 5873) @@ -1,6 +1,7 @@ #include "teraterm.h" #include "tttypes.h" #include "ttplugin.h" +#include "ttcommon.h" #include "tt_res.h" #include <stdlib.h> #include <stdio.h> @@ -25,33 +26,6 @@ pvar->cv = cv; } -PCHAR GetParam(PCHAR buff, int size, PCHAR param) { - int i = 0; - BOOL quoted = FALSE; - - while (*param == ' ' || *param == '\t') { - param++; - } - - if (*param == '\0' || *param == ';') { - return NULL; - } - - while (*param != '\0' && (quoted || (*param != ';' && *param != ' ' && *param != '\t'))) { - if (*param == '"' && (*++param != '"' || !quoted)) { - quoted = !quoted; - continue; - } - else if (i < size - 1) { - buff[i++] = *param; - } - param++; - } - - buff[i] = '\0'; - return (param); -} - BOOL ColorStr2ColorRef(COLORREF *color, PCHAR Str) { int TmpColor[3]; int i, result; Modified: trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v10.vcxproj =================================================================== --- trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v10.vcxproj 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v10.vcxproj 2015-05-16 14:33:41 UTC (rev 5873) @@ -59,6 +59,7 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> + <AdditionalDependencies>$(SolutionDir)..\teraterm\$(Configuration)\ttpcmn.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> <TargetMachine>MachineX86</TargetMachine> @@ -75,6 +76,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> + <AdditionalDependencies>$(SolutionDir)..\teraterm\$(Configuration)\ttpcmn.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> Modified: trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v11.vcxproj =================================================================== --- trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v11.vcxproj 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v11.vcxproj 2015-05-16 14:33:41 UTC (rev 5873) @@ -64,6 +64,7 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> + <AdditionalDependencies>$(SolutionDir)..\teraterm\$(Configuration)\ttpcmn.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> <TargetMachine>MachineX86</TargetMachine> @@ -79,6 +80,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> + <AdditionalDependencies>$(SolutionDir)..\teraterm\$(Configuration)\ttpcmn.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> Modified: trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v12.vcxproj =================================================================== --- trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v12.vcxproj 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.v12.vcxproj 2015-05-16 14:33:41 UTC (rev 5873) @@ -64,6 +64,7 @@ <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> + <AdditionalDependencies>$(SolutionDir)..\teraterm\$(Configuration)\ttpcmn.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> <TargetMachine>MachineX86</TargetMachine> @@ -79,6 +80,7 @@ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> + <AdditionalDependencies>$(SolutionDir)..\teraterm\$(Configuration)\ttpcmn.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> <OptimizeReferences>true</OptimizeReferences> Modified: trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.vcproj =================================================================== --- trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.vcproj 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.vcproj 2015-05-16 14:33:41 UTC (rev 5873) @@ -61,6 +61,7 @@ /> <Tool Name="VCLinkerTool" + AdditionalDependencies=""$(SolutionDir)..\teraterm\$(ConfigurationName)\ttpcmn.lib"" LinkIncremental="2" GenerateDebugInformation="true" SubSystem="2" @@ -135,6 +136,7 @@ /> <Tool Name="VCLinkerTool" + AdditionalDependencies=""$(SolutionDir)..\teraterm\$(ConfigurationName)\ttpcmn.lib"" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" Modified: trunk/teraterm/common/ttcommon.h =================================================================== --- trunk/teraterm/common/ttcommon.h 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/teraterm/common/ttcommon.h 2015-05-16 14:33:41 UTC (rev 5873) @@ -41,6 +41,7 @@ void FAR PASCAL BroadcastClosingMessage(HWND myhwnd); void FAR PASCAL UndoAllWin(); void FAR PASCAL OpenHelp(UINT Command, DWORD Data, char *UILanguageFile); +PCHAR FAR PASCAL GetParam(PCHAR buff, int size, PCHAR param); int FAR PASCAL CommReadRawByte(PComVar cv, LPBYTE b); int FAR PASCAL CommRead1Byte(PComVar cv, LPBYTE b); Modified: trunk/teraterm/ttpcmn/ttcmn.c =================================================================== --- trunk/teraterm/ttpcmn/ttcmn.c 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/teraterm/ttpcmn/ttcmn.c 2015-05-16 14:33:41 UTC (rev 5873) @@ -1155,6 +1155,34 @@ } } +PCHAR FAR PASCAL GetParam(PCHAR buff, int size, PCHAR param) +{ + int i = 0; + BOOL quoted = FALSE; + + while (*param == ' ' || *param == '\t') { + param++; + } + + if (*param == '\0' || *param == ';') { + return NULL; + } + + while (*param != '\0' && (quoted || (*param != ';' && *param != ' ' && *param != '\t'))) { + if (*param == '"' && (*++param != '"' || !quoted)) { + quoted = !quoted; + continue; + } + else if (i < size - 1) { + buff[i++] = *param; + } + param++; + } + + buff[i] = '\0'; + return (param); +} + HWND FAR PASCAL GetNthWin(int n) { if (n<pm->NWin) { Modified: trunk/teraterm/ttpcmn/ttpcmn.def =================================================================== --- trunk/teraterm/ttpcmn/ttpcmn.def 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/teraterm/ttpcmn/ttpcmn.def 2015-05-16 14:33:41 UTC (rev 5873) @@ -54,3 +54,5 @@ UndoAllWin @60 OpenHelp @61 + + GetParam @62 Modified: trunk/ttssh2/ttxssh/ttxssh.c =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.c 2015-05-16 10:32:37 UTC (rev 5872) +++ trunk/ttssh2/ttxssh/ttxssh.c 2015-05-16 14:33:41 UTC (rev 5873) @@ -1633,34 +1633,6 @@ } #if 1 -// TTXSamples/TTXCommandLineOpt/TTXCommandLineOpt.c \x82Ɠ\xAF\x82\xB6 -static PCHAR GetParam(PCHAR buff, int size, PCHAR param) { - int i = 0; - BOOL quoted = FALSE; - - while (*param == ' ' || *param == '\t') { - param++; - } - - if (*param == '\0' || *param == ';') { - return NULL; - } - - while (*param != '\0' && (quoted || (*param != ';' && *param != ' ' && *param != '\t'))) { - if (*param == '"' && (*++param != '"' || !quoted)) { - quoted = !quoted; - continue; - } - else if (i < size - 1) { - buff[i++] = *param; - } - param++; - } - - buff[i] = '\0'; - return (param); -} - static void FAR PASCAL TTXParseParam(PCHAR param, PTTSet ts, PCHAR DDETopic) { int param_len=strlen(param); int opt_len = param_len+1;