Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/filesys_log.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5273 by maya, Tue May 21 03:15:39 2013 UTC revision 5281 by maya, Fri May 24 14:55:44 2013 UTC
# Line 1060  void FileSendStart() Line 1060  void FileSendStart()
1060          else          else
1061                  (*SetFileVar)(SendVar);                  (*SetFileVar)(SendVar);
1062    
1063    #ifdef FileVarWin16
1064          SendVar->FileHandle = _lopen(SendVar->FullName,OF_READ);          SendVar->FileHandle = _lopen(SendVar->FullName,OF_READ);
1065    #else
1066            SendVar->FileHandle = (int)CreateFile(SendVar->FullName, GENERIC_READ, FILE_SHARE_READ, NULL,
1067                                                  OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
1068    #endif
1069          SendVar->FileOpen = (SendVar->FileHandle>0);          SendVar->FileOpen = (SendVar->FileHandle>0);
1070          if (! SendVar->FileOpen)          if (! SendVar->FileOpen)
1071          {          {
# Line 1151  void FileSend() Line 1156  void FileSend()
1156  {  {
1157          WORD c, fc;          WORD c, fc;
1158          LONG BCOld;          LONG BCOld;
1159            DWORD read_bytes;
1160    
1161          if ((SendDlg==NULL) ||          if ((SendDlg==NULL) ||
1162              ((cv.FilePause & OpSendFile) !=0))              ((cv.FilePause & OpSendFile) !=0))
# Line 1187  void FileSend() Line 1193  void FileSend()
1193                          }                          }
1194                  }                  }
1195                  else if (! FileReadEOF) {                  else if (! FileReadEOF) {
1196    #ifdef FileVarWin16
1197                          fc = _lread(SendVar->FileHandle,&FileByte,1);                          fc = _lread(SendVar->FileHandle,&FileByte,1);
1198    #else
1199                            ReadFile((HANDLE)SendVar->FileHandle, &FileByte, 1, &read_bytes, NULL);
1200                            fc = LOWORD(read_bytes);
1201    #endif
1202                          SendVar->ByteCount = SendVar->ByteCount + fc;                          SendVar->ByteCount = SendVar->ByteCount + fc;
1203    
1204                          if (FileCRSend && (fc==1) && (FileByte==0x0A)) {                          if (FileCRSend && (fc==1) && (FileByte==0x0A)) {
1205    #ifdef FileVarWin16
1206                                  fc = _lread(SendVar->FileHandle,&FileByte,1);                                  fc = _lread(SendVar->FileHandle,&FileByte,1);
1207    #else
1208                                    ReadFile((HANDLE)SendVar->FileHandle, &FileByte, 1, &read_bytes, NULL);
1209                                    fc = LOWORD(read_bytes);
1210    #endif
1211                                  SendVar->ByteCount = SendVar->ByteCount + fc;                                  SendVar->ByteCount = SendVar->ByteCount + fc;
1212                          }                          }
1213                  }                  }

Legend:
Removed from v.5273  
changed lines
  Added in v.5281

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26