text stringlengths 0 234 |
|---|
GL.Immediate.Add_Vertex(Token, Vector2'(0.0, 0.0 )); |
GL.Immediate.Add_Vertex(Token, Vector2'(0.0, Double(WINDOW_HEIGHT))); |
GL.Immediate.Add_Vertex(Token, Vector2'(Double(WINDOW_WIDTH), Double(WINDOW_HEIGHT))); |
GL.Immediate.Add_Vertex(Token, Vector2'(Double(WINDOW_WIDTH), 0.0 )); |
Function Definition: procedure Print_Active_Map is |
Function Body: C: Active_Clients.Cursor := Active_Clients.First(Active_Map); |
EP_Image: ASU.Unbounded_String; |
begin |
Ada.Text_IO.Put_Line ("ACTIVE CLIENTS"); |
Ada.Text_IO.Put_Line ("=============="); |
while Active_Clients.Has_Element(C) loop |
EP_Image := ASU.To_Unbounded_String(LLU.Image(Active_Clients.Element |
(C).Value.Client_EP)); |
Ada.Text_IO.Put_Line (ASU.To_String(Active_Clients.Element(C).Key) & |
" " & |
ASU.To_String(Format_EP(EP_Image)) & " " & |
Time_Image(Active_Clients.Element(C).Value.Time)); |
Active_Clients.Next(C); |
end loop; |
ATI.New_Line; |
end Print_Active_Map; |
procedure Print_Old_Map is |
C: Old_Clients.Cursor := Old_Clients.First(Old_Map); |
begin |
Ada.Text_IO.Put_Line ("OLD CLIENTS"); |
Ada.Text_IO.Put_Line ("==========="); |
if not Old_Clients.Has_Element(C) then |
ATI.Put_Line("Old Clients not Found"); |
end if; |
while Old_Clients.Has_Element(C) loop |
Ada.Text_IO.Put_Line (ASU.To_String(Old_Clients.Element(C).Value.Nick) & |
": " & Time_Image(Old_Clients.Element(C).Value.Time)); |
Old_Clients.Next(C); |
end loop; |
ATI.New_Line; |
end Print_Old_Map; |
function Client_To_Ban (Active_Map: Active_Clients.Map) return ASU.Unbounded_String is |
C: Active_Clients.Cursor := Active_Clients.First(Active_Map); |
Min_Time: Ada.Calendar.Time; |
Nick: ASU.Unbounded_String; |
begin |
Min_Time := Active_Clients.Element(C).Value.Time; |
Nick := Active_Clients.Element(C).Key; |
while Active_Clients.Has_Element(C) loop |
if Active_Clients.Element(C).Value.Time < Min_Time then |
Min_Time := Active_Clients.Element(C).Value.Time; |
Nick := Active_Clients.Element(C).Key; |
end if; |
Active_Clients.Next(C); |
end loop; |
return Nick; |
end Client_To_Ban; |
procedure Server_To_All (Comment: ASU.Unbounded_String; |
O_Buffer: access LLU.Buffer_Type) is |
C: Active_Clients.Cursor := Active_Clients.First(Active_Map); |
Nick: ASU.Unbounded_String := ASU.To_Unbounded_String("Server"); |
begin |
while Active_Clients.Has_Element(C) loop |
CM.Server_Message (Active_Clients.Element(C).Value.Client_EP, |
Nick,Comment,O_Buffer); |
Active_Clients.Next(C); |
end loop; |
end Server_To_All; |
-- CHAT CASES -- |
procedure Case_Init (I_Buffer: access LLU.Buffer_Type; |
O_Buffer: access LLU.Buffer_Type) is |
Client_EP_Receive: LLU.End_Point_Type; |
Client_EP_Handler: LLU.End_Point_Type; |
Nick: ASU.Unbounded_String; |
Ban_Nick: ASU.Unbounded_String; |
Comment: ASU.Unbounded_String; |
Client_Data: Data; |
Old_Client: Old_Data; |
Accepted: Boolean; |
Success: Boolean; |
Ban_Message: ASU.Unbounded_String; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.