Revision: 9689 https://osdn.net/projects/ttssh2/scm/svn/commits/9689 Author: zmatsuo Date: 2022-01-13 21:54:46 +0900 (Thu, 13 Jan 2022) Log Message: ----------- プロトタイプを厳密にした - 引数未指定をvoid指定に変更 - func() -> func(void) - ファイル内のみの関数に static を付けた Modified Paths: -------------- trunk/teraterm/teraterm/telnet.c trunk/teraterm/teraterm/telnet.h -------------- next part -------------- Modified: trunk/teraterm/teraterm/telnet.c =================================================================== --- trunk/teraterm/teraterm/telnet.c 2022-01-13 12:54:35 UTC (rev 9688) +++ trunk/teraterm/teraterm/telnet.c 2022-01-13 12:54:46 UTC (rev 9689) @@ -89,7 +89,7 @@ return NumberOfBytesWritten; } -void DefaultTelRec() +static void DefaultTelRec(void) { int i; @@ -107,7 +107,7 @@ tr.ChangeWinSize = FALSE; } -void InitTelnet() +void InitTelnet(void) { TelStatus = TelIdle; @@ -134,7 +134,7 @@ tr.LogFile = 0; } -void EndTelnet() +void EndTelnet(void) { if (tr.LogFile) { CloseHandle(tr.LogFile); @@ -144,7 +144,7 @@ TelStopKeepAliveThread(); } -void TelWriteLog1(BYTE b) +static void TelWriteLog1(BYTE b) { BYTE Temp[3]; BYTE Ch; @@ -166,7 +166,7 @@ win16_lwrite(tr.LogFile, Temp, 3); } -void TelWriteLog(PCHAR Buf, int C) +static void TelWriteLog(PCHAR Buf, int C) { int i; @@ -175,7 +175,7 @@ TelWriteLog1(Buf[i]); } -void SendBack(BYTE a, BYTE b) +static void SendBack(BYTE a, BYTE b) { BYTE Str3[3]; @@ -187,7 +187,7 @@ TelWriteLog(Str3, 3); } -void SendWinSize() +static void SendWinSize(void) { int i; BYTE TmpBuff[21]; @@ -226,7 +226,7 @@ TelWriteLog(TmpBuff, i); } -void ParseTelIAC(BYTE b) +static void ParseTelIAC(BYTE b) { switch (b) { case SE: break; @@ -265,7 +265,7 @@ } } -void ParseTelSB(BYTE b) +static void ParseTelSB(BYTE b) { BYTE TmpStr[51]; int i; @@ -362,7 +362,7 @@ } } -void ParseTelWill(BYTE b) +static void ParseTelWill(BYTE b) { if (b <= MaxTelOpt) { switch (tr.HisOpt[b].Status) { @@ -452,7 +452,7 @@ TelStatus = TelIdle; } -void ParseTelWont(BYTE b) +static void ParseTelWont(BYTE b) { if (b <= MaxTelOpt) { switch (tr.HisOpt[b].Status) { @@ -532,7 +532,7 @@ TelStatus = TelIdle; } -void ParseTelDo(BYTE b) +static void ParseTelDo(BYTE b) { if (b <= MaxTelOpt) { switch (tr.MyOpt[b].Status) { @@ -608,7 +608,7 @@ TelStatus = TelIdle; } -void ParseTelDont(BYTE b) +static void ParseTelDont(BYTE b) { if (b <= MaxTelOpt) { switch (tr.MyOpt[b].Status) { @@ -732,7 +732,7 @@ } } -void TelDisableHisOpt(BYTE b) +static void TelDisableHisOpt(BYTE b) { if (b <= MaxTelOpt) { switch (tr.HisOpt[b].Status) { @@ -782,7 +782,7 @@ } } -void TelDisableMyOpt(BYTE b) +static void TelDisableMyOpt(BYTE b) { if (b <= MaxTelOpt) { switch (tr.MyOpt[b].Status) { @@ -818,7 +818,7 @@ } } -void TelSendAYT() +void TelSendAYT(void) { BYTE Str[2]; @@ -830,7 +830,7 @@ TelWriteLog(Str, 2); } -void TelSendBreak() +void TelSendBreak(void) { BYTE Str[2]; @@ -842,7 +842,7 @@ TelWriteLog(Str, 2); } -void TelChangeEcho() +void TelChangeEcho(void) { if (ts.LocalEcho==0) TelEnableHisOpt(ECHO); @@ -850,7 +850,7 @@ TelDisableHisOpt(ECHO); } -static void TelSendNOP() +static void TelSendNOP(void) { BYTE Str[2]; @@ -901,7 +901,8 @@ } -static unsigned _stdcall TelKeepAliveThread(void *dummy) { +static unsigned _stdcall TelKeepAliveThread(void *dummy) +{ static int instance = 0; if (instance > 0) @@ -919,7 +920,8 @@ return 0; } -void TelStartKeepAliveThread() { +void TelStartKeepAliveThread(void) +{ unsigned tid; if (ts.TelKeepAliveInterval > 0) { @@ -937,7 +939,8 @@ } } -static void TelStopKeepAliveThread() { +static void TelStopKeepAliveThread(void) +{ if (keepalive_thread != INVALID_HANDLE_VALUE) { nop_interval = 0; WaitForSingleObject(keepalive_thread, INFINITE); @@ -948,7 +951,8 @@ } } -void TelUpdateKeepAliveInterval() { +void TelUpdateKeepAliveInterval(void) +{ if (cv.Open && cv.TelFlag && ts.TCPPort==ts.TelPort) { if (ts.TelKeepAliveInterval > 0 && keepalive_thread == INVALID_HANDLE_VALUE) TelStartKeepAliveThread(); Modified: trunk/teraterm/teraterm/telnet.h =================================================================== --- trunk/teraterm/teraterm/telnet.h 2022-01-13 12:54:35 UTC (rev 9688) +++ trunk/teraterm/teraterm/telnet.h 2022-01-13 12:54:46 UTC (rev 9689) @@ -101,17 +101,17 @@ extern "C" { #endif -void InitTelnet(); -void EndTelnet(); +void InitTelnet(void); +void EndTelnet(void); void ParseTel(BOOL *Size, int *Nx, int *Ny); void TelEnableHisOpt(BYTE b); void TelEnableMyOpt(BYTE b); void TelInformWinSize(int nx, int ny); -void TelSendAYT(); -void TelSendBreak(); -void TelChangeEcho(); -void TelStartKeepAliveThread(); -void TelUpdateKeepAliveInterval(); +void TelSendAYT(void); +void TelSendBreak(void); +void TelChangeEcho(void); +void TelStartKeepAliveThread(void); +void TelUpdateKeepAliveInterval(void); extern int TelStatus;