Browse Source

* removed warnings

peter 26 years ago
parent
commit
3db89ed4f1
2 changed files with 28 additions and 23 deletions
  1. 16 13
      rtl/objpas/dati.inc
  2. 12 10
      rtl/objpas/sysstr.inc

+ 16 - 13
rtl/objpas/dati.inc

@@ -44,7 +44,7 @@ end ;
 
 
 function DoEncodeTime(Hour, Minute, Second, MilliSecond: word): longint;
 function DoEncodeTime(Hour, Minute, Second, MilliSecond: word): longint;
 begin
 begin
-If ((hour>=0) and (Hour<24)) and 
+If ((hour>=0) and (Hour<24)) and
    ((Minute>=0) and (Minute<60)) and
    ((Minute>=0) and (Minute<60)) and
    ((Second>=0) and (Second<60)) and
    ((Second>=0) and (Second<60)) and
    ((MilliSecond>=0) and (Millisecond<1000)) then
    ((MilliSecond>=0) and (Millisecond<1000)) then
@@ -81,7 +81,7 @@ end ;
 function MSecsToTimeStamp(MSecs: comp): TTimeStamp;
 function MSecsToTimeStamp(MSecs: comp): TTimeStamp;
 begin
 begin
   result.Date := trunc(msecs / msecsperday);
   result.Date := trunc(msecs / msecsperday);
-  msecs:= msecs - result.date * msecsperday;
+  msecs:= msecs - comp(result.date * msecsperday);
   result.Time := Trunc(MSecs);
   result.Time := Trunc(MSecs);
 end ;
 end ;
 
 
@@ -225,7 +225,7 @@ end ;
 function IncMonth(const DateTime: TDateTime; NumberOfMonths: integer): TDateTime;
 function IncMonth(const DateTime: TDateTime; NumberOfMonths: integer): TDateTime;
 var Year, Month, Day: word;
 var Year, Month, Day: word;
     S : Integer;
     S : Integer;
-    
+
 begin
 begin
 If NumberOfMonths>=0 then s:=1 else s:=-1;
 If NumberOfMonths>=0 then s:=1 else s:=-1;
 DecodeDate(DateTime, Year, Month, Day);
 DecodeDate(DateTime, Year, Month, Day);
@@ -284,7 +284,7 @@ var
    s1:string[4];
    s1:string[4];
    values:array[0..2] of longint;
    values:array[0..2] of longint;
    LocalTime:tsystemtime;
    LocalTime:tsystemtime;
-   
+
 begin
 begin
 df := UpperCase(ShortDateFormat);
 df := UpperCase(ShortDateFormat);
 { Determine order of D,M,Y }
 { Determine order of D,M,Y }
@@ -295,7 +295,7 @@ For I:=1 to Length(df) do
     'M' : mp:=which;
     'M' : mp:=which;
     'D' : dp:=which;
     'D' : dp:=which;
   else
   else
-    If df[i]=DateSeparator then 
+    If df[i]=DateSeparator then
      Inc(Which);
      Inc(Which);
   end;
   end;
 { Get actual values }
 { Get actual values }
@@ -319,7 +319,7 @@ If N=3 then
   m:=values[mp];
   m:=values[mp];
   d:=values[dp];
   d:=values[dp];
   end
   end
-Else 
+Else
   begin
   begin
   getLocalTime(LocalTime);
   getLocalTime(LocalTime);
   y := LocalTime.Year;
   y := LocalTime.Year;
@@ -329,7 +329,7 @@ Else
     m := LocalTime.Month;
     m := LocalTime.Month;
     end
     end
   else
   else
-    If dp<mp then 
+    If dp<mp then
       begin
       begin
       d:=values[0];
       d:=values[0];
       m:=values[1];
       m:=values[1];
@@ -374,7 +374,7 @@ var
          end
          end
       else if (S[Current] = TimeSeparator) or (S[Current] = ' ') then
       else if (S[Current] = TimeSeparator) or (S[Current] = ' ') then
          Inc(Current)
          Inc(Current)
-      else 
+      else
         raise EConvertError.Create('Invalid Time format');
         raise EConvertError.Create('Invalid Time format');
       end ;
       end ;
    end ;
    end ;
@@ -387,7 +387,7 @@ begin
 Current := 0;
 Current := 0;
 Len := length(s);
 Len := length(s);
 PM := False;
 PM := False;
-for i:=0 to 4 do 
+for i:=0 to 4 do
   timevalues[i]:=0;
   timevalues[i]:=0;
 i := 0;
 i := 0;
 TimeValues[i] := GetElement;
 TimeValues[i] := GetElement;
@@ -395,7 +395,7 @@ while (i < 5) and (TimeValues[i] <> -1) do begin
    i := i + 1;
    i := i + 1;
    TimeValues[i] := GetElement;
    TimeValues[i] := GetElement;
    end ;
    end ;
-If (i<5) and (TimeValues[I]=-1) then 
+If (i<5) and (TimeValues[I]=-1) then
   TimeValues[I]:=0;
   TimeValues[I]:=0;
 if PM then Inc(TimeValues[0], 12);
 if PM then Inc(TimeValues[0], 12);
 result := EncodeTime(TimeValues[0], TimeValues[1], TimeValues[2], TimeValues[3]);
 result := EncodeTime(TimeValues[0], TimeValues[1], TimeValues[2], TimeValues[3]);
@@ -515,7 +515,7 @@ var
                   if Hour < 12 then StoreStr('a', 1)
                   if Hour < 12 then StoreStr('a', 1)
                   else StoreStr('p', 1);
                   else StoreStr('p', 1);
                   end
                   end
-               else 
+               else
                  Raise EConvertError.Create('Illegal character in format string');
                  Raise EConvertError.Create('Illegal character in format string');
                end ;
                end ;
             '/': StoreStr(@DateSeparator, 1);
             '/': StoreStr(@DateSeparator, 1);
@@ -576,7 +576,7 @@ var
                      'C': StoreFormat(ShortDateFormat + ' ' + ShortTimeFormat);
                      'C': StoreFormat(ShortDateFormat + ' ' + ShortTimeFormat);
                   end ;
                   end ;
                end ;
                end ;
-            else 
+            else
               Raise EConvertError.Create('Illegal character in format string');
               Raise EConvertError.Create('Illegal character in format string');
          end ;
          end ;
       FormatCurrent := FormatCurrent + Count;
       FormatCurrent := FormatCurrent + Count;
@@ -632,7 +632,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.12  1999-05-13 21:51:41  michael
+  Revision 1.13  1999-05-31 20:50:44  peter
+    * removed warnings
+
+  Revision 1.12  1999/05/13 21:51:41  michael
   * several fixes
   * several fixes
 
 
   Revision 1.11  1999/05/11 09:05:13  michael
   Revision 1.11  1999/05/11 09:05:13  michael

+ 12 - 10
rtl/objpas/sysstr.inc

@@ -26,7 +26,7 @@
 
 
 function NewStr(const S: string): PString;
 function NewStr(const S: string): PString;
 
 
-Type 
+Type
   PPointer = ^pointer;
   PPointer = ^pointer;
 
 
 begin
 begin
@@ -461,7 +461,7 @@ count := Length(S);
 while i < count do begin
 while i < count do begin
    i := i + 1;
    i := i + 1;
 {$ifndef linux}
 {$ifndef linux}
-   if (S[i] = #13) and ((i = count) or (S[i + 1] <> #10)) then 
+   if (S[i] = #13) and ((i = count) or (S[i + 1] <> #10)) then
      begin
      begin
      result := result + Copy(S, 1 + j, i - j) + #10;
      result := result + Copy(S, 1 + j, i - j) + #10;
      j := i;
      j := i;
@@ -470,11 +470,11 @@ while i < count do begin
    If S[i]=#13 then
    If S[i]=#13 then
      begin
      begin
      Result:= Result+Copy(S,J+1,i-j-1)+#10;
      Result:= Result+Copy(S,J+1,i-j-1)+#10;
-     If I<>Count Then 
+     If I<>Count Then
        If S[I+1]=#10 then inc(i);
        If S[I+1]=#10 then inc(i);
      J :=I;
      J :=I;
      end;
      end;
-{$endif}      
+{$endif}
    end ;
    end ;
 if j <> i then
 if j <> i then
    result := result + copy(S, 1 + j, i - j);
    result := result + copy(S, 1 + j, i - j);
@@ -592,7 +592,6 @@ Var ChPos,OldPos,ArgPos,DoArg,Len : Longint;
     Hs,ToAdd : String;
     Hs,ToAdd : String;
     Index,Width,Prec : Longint;
     Index,Width,Prec : Longint;
     Left : Boolean;
     Left : Boolean;
-    ExtVal: Extended;
     Fchar : char;
     Fchar : char;
 
 
   {
   {
@@ -894,14 +893,14 @@ Begin
   Result := Length(Tmp);
   Result := Length(Tmp);
   Move(Tmp[1], Buffer[0], Result);
   Move(Tmp[1], Buffer[0], Result);
 End;
 End;
-        
+
 
 
 Function FloatToStrF(Value: Extended; format: TFloatFormat; Precision, Digits: Integer): String;
 Function FloatToStrF(Value: Extended; format: TFloatFormat; Precision, Digits: Integer): String;
 Var
 Var
   P: Integer;
   P: Integer;
   Negative, TooSmall, TooLarge: Boolean;
   Negative, TooSmall, TooLarge: Boolean;
-  
-    
+
+
 Begin
 Begin
   Case format Of
   Case format Of
 
 
@@ -948,7 +947,7 @@ Begin
         P:=4;
         P:=4;
         While (P>0) and (Digits < P) And (Result[Precision + 5] = '0') do
         While (P>0) and (Digits < P) And (Result[Precision + 5] = '0') do
           Begin
           Begin
-          If P<>1 then 
+          If P<>1 then
             system.Delete(Result, Precision + 5, 1)
             system.Delete(Result, Precision + 5, 1)
           else
           else
             system.Delete(Result, Precision + 3, 3);
             system.Delete(Result, Precision + 3, 3);
@@ -1129,7 +1128,10 @@ const
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.19  1999-05-30 07:53:15  michael
+  Revision 1.20  1999-05-31 20:50:45  peter
+    * removed warnings
+
+  Revision 1.19  1999/05/30 07:53:15  michael
   + Small fix. Delete not recognised without system in front of it  ?
   + Small fix. Delete not recognised without system in front of it  ?
 
 
   Revision 1.18  1999/05/28 20:08:20  michael
   Revision 1.18  1999/05/28 20:08:20  michael