Changeset 87


Ignore:
Timestamp:
Sep 5, 2012, 9:16:25 PM (12 years ago)
Author:
chronos
Message:
Location:
trunk/Packages
Files:
20 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/synapse/synaser.pas

    r84 r87  
    250250
    251251  {:@abstract(Main class implementing all communication routines)}
    252   TBlockSerial = class(TObject)
     252  TBlockSerial = class
    253253  protected
    254254    FOnStatus: THookSerialStatus;
     
    813813begin
    814814  FComNr := PortIsClosed;
    815   if pos('COM', uppercase(Value)) = 1 then
    816     FComNr := StrToIntdef(copy(Value, 4, Length(Value) - 3), PortIsClosed + 1) - 1;
    817   if pos('/DEV/TTYS', uppercase(Value)) = 1 then
    818     FComNr := StrToIntdef(copy(Value, 10, Length(Value) - 9), PortIsClosed - 1);
     815  if Pos('COM', UpperCase(Value)) = 1 then
     816    FComNr := StrToIntdef(Copy(Value, 4, Length(Value) - 3), PortIsClosed + 1) - 1;
     817  if Pos('/DEV/TTYS', UpperCase(Value)) = 1 then begin
     818    FComNr := StrToIntdef(Copy(Value, 10, Length(Value) - 9), PortIsClosed);
     819  end;
    819820end;
    820821
     
    19001901  SerialCheck(ioctl(integer(FHandle), TCFLSH, TCIOFLUSH));
    19011902  {$ELSE}
    1902   SerialCheck(fpioctl(integer(FHandle), TCFLSH, TCIOFLUSH));
     1903  SerialCheck(fpioctl(integer(FHandle), TCFLSH, Pointer(TCIOFLUSH)));
    19031904  {$ENDIF}
    19041905  FBuffer := '';
Note: See TracChangeset for help on using the changeset viewer.