• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision9689 (tree)
Time2022-01-13 21:54:46
Authorzmatsuo

Log Message

プロトタイプを厳密にした

- 引数未指定をvoid指定に変更

- func() -> func(void)

- ファイル内のみの関数に static を付けた

Change Summary

Incremental Difference

--- trunk/teraterm/teraterm/telnet.c (revision 9688)
+++ trunk/teraterm/teraterm/telnet.c (revision 9689)
@@ -89,7 +89,7 @@
8989 return NumberOfBytesWritten;
9090 }
9191
92-void DefaultTelRec()
92+static void DefaultTelRec(void)
9393 {
9494 int i;
9595
@@ -107,7 +107,7 @@
107107 tr.ChangeWinSize = FALSE;
108108 }
109109
110-void InitTelnet()
110+void InitTelnet(void)
111111 {
112112 TelStatus = TelIdle;
113113
@@ -134,7 +134,7 @@
134134 tr.LogFile = 0;
135135 }
136136
137-void EndTelnet()
137+void EndTelnet(void)
138138 {
139139 if (tr.LogFile) {
140140 CloseHandle(tr.LogFile);
@@ -144,7 +144,7 @@
144144 TelStopKeepAliveThread();
145145 }
146146
147-void TelWriteLog1(BYTE b)
147+static void TelWriteLog1(BYTE b)
148148 {
149149 BYTE Temp[3];
150150 BYTE Ch;
@@ -166,7 +166,7 @@
166166 win16_lwrite(tr.LogFile, Temp, 3);
167167 }
168168
169-void TelWriteLog(PCHAR Buf, int C)
169+static void TelWriteLog(PCHAR Buf, int C)
170170 {
171171 int i;
172172
@@ -175,7 +175,7 @@
175175 TelWriteLog1(Buf[i]);
176176 }
177177
178-void SendBack(BYTE a, BYTE b)
178+static void SendBack(BYTE a, BYTE b)
179179 {
180180 BYTE Str3[3];
181181
@@ -187,7 +187,7 @@
187187 TelWriteLog(Str3, 3);
188188 }
189189
190-void SendWinSize()
190+static void SendWinSize(void)
191191 {
192192 int i;
193193 BYTE TmpBuff[21];
@@ -226,7 +226,7 @@
226226 TelWriteLog(TmpBuff, i);
227227 }
228228
229-void ParseTelIAC(BYTE b)
229+static void ParseTelIAC(BYTE b)
230230 {
231231 switch (b) {
232232 case SE: break;
@@ -265,7 +265,7 @@
265265 }
266266 }
267267
268-void ParseTelSB(BYTE b)
268+static void ParseTelSB(BYTE b)
269269 {
270270 BYTE TmpStr[51];
271271 int i;
@@ -362,7 +362,7 @@
362362 }
363363 }
364364
365-void ParseTelWill(BYTE b)
365+static void ParseTelWill(BYTE b)
366366 {
367367 if (b <= MaxTelOpt) {
368368 switch (tr.HisOpt[b].Status) {
@@ -452,7 +452,7 @@
452452 TelStatus = TelIdle;
453453 }
454454
455-void ParseTelWont(BYTE b)
455+static void ParseTelWont(BYTE b)
456456 {
457457 if (b <= MaxTelOpt) {
458458 switch (tr.HisOpt[b].Status) {
@@ -532,7 +532,7 @@
532532 TelStatus = TelIdle;
533533 }
534534
535-void ParseTelDo(BYTE b)
535+static void ParseTelDo(BYTE b)
536536 {
537537 if (b <= MaxTelOpt) {
538538 switch (tr.MyOpt[b].Status) {
@@ -608,7 +608,7 @@
608608 TelStatus = TelIdle;
609609 }
610610
611-void ParseTelDont(BYTE b)
611+static void ParseTelDont(BYTE b)
612612 {
613613 if (b <= MaxTelOpt) {
614614 switch (tr.MyOpt[b].Status) {
@@ -732,7 +732,7 @@
732732 }
733733 }
734734
735-void TelDisableHisOpt(BYTE b)
735+static void TelDisableHisOpt(BYTE b)
736736 {
737737 if (b <= MaxTelOpt) {
738738 switch (tr.HisOpt[b].Status) {
@@ -782,7 +782,7 @@
782782 }
783783 }
784784
785-void TelDisableMyOpt(BYTE b)
785+static void TelDisableMyOpt(BYTE b)
786786 {
787787 if (b <= MaxTelOpt) {
788788 switch (tr.MyOpt[b].Status) {
@@ -818,7 +818,7 @@
818818 }
819819 }
820820
821-void TelSendAYT()
821+void TelSendAYT(void)
822822 {
823823 BYTE Str[2];
824824
@@ -830,7 +830,7 @@
830830 TelWriteLog(Str, 2);
831831 }
832832
833-void TelSendBreak()
833+void TelSendBreak(void)
834834 {
835835 BYTE Str[2];
836836
@@ -842,7 +842,7 @@
842842 TelWriteLog(Str, 2);
843843 }
844844
845-void TelChangeEcho()
845+void TelChangeEcho(void)
846846 {
847847 if (ts.LocalEcho==0)
848848 TelEnableHisOpt(ECHO);
@@ -850,7 +850,7 @@
850850 TelDisableHisOpt(ECHO);
851851 }
852852
853-static void TelSendNOP()
853+static void TelSendNOP(void)
854854 {
855855 BYTE Str[2];
856856
@@ -901,7 +901,8 @@
901901 }
902902
903903
904-static unsigned _stdcall TelKeepAliveThread(void *dummy) {
904+static unsigned _stdcall TelKeepAliveThread(void *dummy)
905+{
905906 static int instance = 0;
906907
907908 if (instance > 0)
@@ -919,7 +920,8 @@
919920 return 0;
920921 }
921922
922-void TelStartKeepAliveThread() {
923+void TelStartKeepAliveThread(void)
924+{
923925 unsigned tid;
924926
925927 if (ts.TelKeepAliveInterval > 0) {
@@ -937,7 +939,8 @@
937939 }
938940 }
939941
940-static void TelStopKeepAliveThread() {
942+static void TelStopKeepAliveThread(void)
943+{
941944 if (keepalive_thread != INVALID_HANDLE_VALUE) {
942945 nop_interval = 0;
943946 WaitForSingleObject(keepalive_thread, INFINITE);
@@ -948,7 +951,8 @@
948951 }
949952 }
950953
951-void TelUpdateKeepAliveInterval() {
954+void TelUpdateKeepAliveInterval(void)
955+{
952956 if (cv.Open && cv.TelFlag && ts.TCPPort==ts.TelPort) {
953957 if (ts.TelKeepAliveInterval > 0 && keepalive_thread == INVALID_HANDLE_VALUE)
954958 TelStartKeepAliveThread();
--- trunk/teraterm/teraterm/telnet.h (revision 9688)
+++ trunk/teraterm/teraterm/telnet.h (revision 9689)
@@ -101,17 +101,17 @@
101101 extern "C" {
102102 #endif
103103
104-void InitTelnet();
105-void EndTelnet();
104+void InitTelnet(void);
105+void EndTelnet(void);
106106 void ParseTel(BOOL *Size, int *Nx, int *Ny);
107107 void TelEnableHisOpt(BYTE b);
108108 void TelEnableMyOpt(BYTE b);
109109 void TelInformWinSize(int nx, int ny);
110-void TelSendAYT();
111-void TelSendBreak();
112-void TelChangeEcho();
113-void TelStartKeepAliveThread();
114-void TelUpdateKeepAliveInterval();
110+void TelSendAYT(void);
111+void TelSendBreak(void);
112+void TelChangeEcho(void);
113+void TelStartKeepAliveThread(void);
114+void TelUpdateKeepAliveInterval(void);
115115
116116 extern int TelStatus;
117117
Show on old repository browser