[inherit('sys$library:starlet','lib$spawn','smgdefs','smg$repaint_line',
'BB.PEN')]
module get_username;

[global] 
procedure get_username;

{Use system routines to obtain username info used by the program for
 validating Bulletin Board manager status and creating mail header 
 information.}

var
  fullnam : [volatile] nametype;

begin
  with item_list[1] do
    begin
      length := username_length;
      code := jpi$_username;
      adr::name_ptr := address(fullnam);
      retlen::integer := 0;
    end;
  with item_list[2] do
    begin
      length := 0;
      code := 0;
    end;
  $getjpi(itmlst:=item_list);
  username := pad(substr(fullnam,1,12),' ',username_length);

end;
end.
