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 2476 by maya, Mon Apr 14 17:35:50 2008 UTC revision 2511 by yutakapon, Wed May 14 16:33:09 2008 UTC
# Line 941  BOOL OpenProtoDlg(PFileVar fv, int IdPro Line 941  BOOL OpenProtoDlg(PFileVar fv, int IdPro
941                  case PROTO_XM:                  case PROTO_XM:
942                          vsize = sizeof(TXVar);                          vsize = sizeof(TXVar);
943                          break;                          break;
944                    case PROTO_YM:
945                            vsize = sizeof(TYVar);
946                            break;
947                  case PROTO_ZM:                  case PROTO_ZM:
948                          vsize = sizeof(TZVar);                          vsize = sizeof(TZVar);
949                          break;                          break;
# Line 964  BOOL OpenProtoDlg(PFileVar fv, int IdPro Line 967  BOOL OpenProtoDlg(PFileVar fv, int IdPro
967                          ((PXVar)ProtoVar)->XOpt = Opt1;                          ((PXVar)ProtoVar)->XOpt = Opt1;
968                          ((PXVar)ProtoVar)->TextFlag = 1 - (Opt2 & 1);                          ((PXVar)ProtoVar)->TextFlag = 1 - (Opt2 & 1);
969                          break;                          break;
970                    case PROTO_YM:  // TBD
971                            ((PYVar)ProtoVar)->YMode = Mode;
972                            ((PYVar)ProtoVar)->YOpt = Opt1;
973                            ((PYVar)ProtoVar)->TextFlag = 1 - (Opt2 & 1);
974                            break;
975                  case PROTO_ZM:                  case PROTO_ZM:
976                          ((PZVar)ProtoVar)->BinFlag = (Opt1 & 1) != 0;                          ((PZVar)ProtoVar)->BinFlag = (Opt1 & 1) != 0;
977                          ((PZVar)ProtoVar)->ZMode = Mode;                          ((PZVar)ProtoVar)->ZMode = Mode;
# Line 1218  void XMODEMStart(int mode) Line 1226  void XMODEMStart(int mode)
1226                             ts.XmodemOpt,ts.XmodemBin))                             ts.XmodemOpt,ts.XmodemBin))
1227                  ProtoEnd();                  ProtoEnd();
1228  }  }
1229    }
1230    
1231    extern "C" {
1232    void YMODEMStart(int mode)
1233    {
1234            LONG Option;
1235    
1236            if (! ProtoStart())
1237                    return;
1238    
1239            if (mode==IdYReceive)
1240                    FileVar->OpId = OpYRcv;
1241            else
1242                    FileVar->OpId = OpYSend;
1243    
1244            if (strlen(&(FileVar->FullName[FileVar->DirLen]))==0)
1245            {
1246                    Option = MAKELONG(ts.XmodemBin,ts.XmodemOpt);
1247                    if (! (*GetXFname)(FileVar->HMainWin,  // TBD
1248                                       mode==IdYReceive,&Option,FileVar,ts.FileDir))
1249                    {
1250                            ProtoEnd();
1251                            return;
1252                    }
1253                    ts.XmodemOpt = HIWORD(Option);  // TBD
1254                    ts.XmodemBin = LOWORD(Option);
1255            }
1256            else
1257                    (*SetFileVar)(FileVar);
1258    
1259            if (mode==IdYReceive)
1260                    FileVar->FileHandle = _lcreat(FileVar->FullName,0);
1261            else
1262                    FileVar->FileHandle = _lopen(FileVar->FullName,OF_READ);
1263    
1264            FileVar->FileOpen = FileVar->FileHandle>0;
1265            if (! FileVar->FileOpen)
1266            {
1267                    ProtoEnd();
1268                    return;
1269            }
1270            TalkStatus = IdTalkQuiet;
1271    
1272            /* disable transmit delay (serial port) */
1273            cv.DelayFlag = FALSE;
1274    
1275            if (! OpenProtoDlg(FileVar,PROTO_YM,mode,
1276                               ts.XmodemOpt,ts.XmodemBin))
1277                    ProtoEnd();
1278    }
1279  }  }
1280    
1281  extern "C" {  extern "C" {

Legend:
Removed from v.2476  
changed lines
  Added in v.2511

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