filesys.cpp で定義しているグローバル変数 FSend をファイル内変数へ変更
- FileSnedIsSending() を追加
@@ -90,7 +90,7 @@ | ||
90 | 90 | static char BracketStartStr[] = "\033[200~"; |
91 | 91 | static char BracketEndStr[] = "\033[201~"; |
92 | 92 | |
93 | -BOOL FSend = FALSE; | |
93 | +static BOOL FSend = FALSE; | |
94 | 94 | |
95 | 95 | static PFileTransDlg SendDlg = NULL; |
96 | 96 |
@@ -604,3 +604,11 @@ | ||
604 | 604 | { |
605 | 605 | return SendVar == NULL; |
606 | 606 | } |
607 | + | |
608 | +/** | |
609 | + * TODO: IsSendVarNULL() との違いは? | |
610 | + */ | |
611 | +BOOL FileSnedIsSending(void) | |
612 | +{ | |
613 | + return FSend; | |
614 | +} |
@@ -36,7 +36,7 @@ | ||
36 | 36 | |
37 | 37 | // filesys.cpp |
38 | 38 | BOOL IsSendVarNULL(void); |
39 | - | |
39 | +BOOL FileSnedIsSending(void); | |
40 | 40 | BOOL FileSendStart(const wchar_t *filename, int binary); |
41 | 41 | void FileSend(void); |
42 | 42 | void FileSendEnd(void); |
@@ -98,9 +98,6 @@ | ||
98 | 98 | |
99 | 99 | static PFileVarProto FileVar = NULL; |
100 | 100 | static int ProtoId; |
101 | - | |
102 | -extern BOOL FSend; | |
103 | - | |
104 | 101 | static PProtoDlg PtDlg = NULL; |
105 | 102 | static BOOL cv_ProtoFlag = FALSE; |
106 | 103 |
@@ -365,8 +362,8 @@ | ||
365 | 362 | { |
366 | 363 | if (cv_ProtoFlag) |
367 | 364 | return FALSE; |
368 | - if (FSend) | |
369 | - { | |
365 | + if (FileSnedIsSending()) | |
366 | + { // ファイル送信中 | |
370 | 367 | FreeFileVar_(&FileVar); |
371 | 368 | return FALSE; |
372 | 369 | } |