! Program to connect a name with a username or vice versa
! MDP April '84

%include "Inc:Fs.Imp"
%include "Inc:Util.Imp"
%include "Useful:WhoDat.Inc"
%include "inc:fsutil.imp"

%begin
   %string (80) A,B, Who = CLI Param
   %integer Index

   %if Who = "" %start
      Who = Current User

      %if Who = "" %start
         Print Line ("You are not anybody (not logged on) !!!")
      %else
         Index = Find Index (Who)
         Print Line ("You are ".FS Names (Index)." (".Who.") !!!")
      %finish
   %else
      Who = "*" .Who. "*" %unless Who -> A .("*"). B

      %for Index = Min FS Users, 1, Max FS Users %cycle
         %if Matches (FS Names (Index), Who) %or %c
             Matches (FS Users (Index), Who) %start
            Print String (FS Names (Index)." (".FS Users (Index).")")
            New Line
         %finish
      %repeat
   %finish
%end %of %program
