{$M 32768,0,655360}
Program FSizes;
Procedure Histogramm(Filesystem:String;Size:LongInt); Far; External;
{$L HISTOGRA}
Var Syntax : Boolean;
Filesystem : String;
Size : LongInt;
Index : Byte;
Wrong : Integer;
Begin
Syntax := True;
Filesystem := '.';
Size := 0;
Index := 1;
While Index <= ParamCount Do Begin
If ParamStr(Index) = '-f' Then
If Index < ParamCount Then
Filesystem := ParamStr(Index+1)
Else
Syntax := False
Else
If ParamStr(Index) = '-c' Then
If Index < ParamCount Then Begin
Val(ParamStr(Index+1),Size,Wrong);
If Wrong <> 0 Then Syntax := False
End Else
Syntax := False
Else
Syntax := False;
If Syntax Then
Index := Index+2
Else
Index := ParamCount+1
End;
If Not Syntax Then
WriteLn('Bad Parameter :-(')
Else
Histogramm(Filesystem,Size)
End.