|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: B T
Length: 4530 (0x11b2)
Types: TextFile
Names: »B«
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
└─⟦129cab021⟧ »DATA«
└─⟦this⟧
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
└─⟦6f12a12be⟧ »DATA«
└─⟦this⟧
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
└─⟦d65440be7⟧ »DATA«
└─⟦this⟧
with Cmvc;
with Ftp;
with Ftp_Name_Map;
with Ftp_Profile;
with Io;
with Rpc;
with Rpc_Server;
with String_Utilities;
with Transport_Interchange;
with Transport_Stream;
package body Ncmvc_Server is
package Su renames String_Utilities;
package Ti renames Transport_Interchange;
Username : constant String := "ncmvc";
Password : constant String := "sauerkraut";
function Remote_To_Local
(Remote_Name, Server_Context : String) return String is
begin
return
Ftp_Name_Map.Remote_To_Local (File_Name => Remote_Name,
Local_Roof => Server_Context,
Remote_Roof => "",
Remote_Type => "unix");
end Remote_To_Local;
function Local_To_Remote
(Local_Name, Remote_Context : String) return String is
Ltr : constant String :=
Ftp_Name_Map.Local_To_Remote (File_Name => Local_Name,
Local_Roof => "",
Remote_Roof => Remote_Context,
Remote_Type => "unix");
Last_Slash : constant Natural :=
Su.Reverse_Locate
(Fragment => "/", Within => Ltr, Ignore_Case => True);
Last_Underscore : constant Natural :=
Su.Reverse_Locate
(Fragment => "_", Within => Ltr, Ignore_Case => True);
Has_Extension : constant Boolean := Last_Slash < Last_Underscore;
Remote_Name : String (Ltr'Range) := Ltr;
begin
if Has_Extension then
-- Hello_C is mapped to Hello.c
-- Hello_World is mapped to Hello.World (which is bad)
--[to be fixed]
--
Remote_Name (Last_Underscore) := '.';
Remote_Name (Last_Slash .. Last_Underscore) :=
Su.Capitalize (Remote_Name (Last_Slash .. Last_Underscore));
Remote_Name (Last_Underscore .. Remote_Name'Last) :=
Su.Lower_Case (Remote_Name
(Last_Underscore .. Remote_Name'Last));
else
-- Hello is mapped to Hello
--
Remote_Name (Last_Slash .. Remote_Name'Last) :=
Su.Capitalize (Remote_Name (Last_Slash .. Remote_Name'Last));
end if;
Io.Echo_Line ("Local_to_remote: remote_name = " & Remote_Name);
return Remote_Name;
end Local_To_Remote;
procedure Check_Out (Stream : Transport_Stream.Stream_Id;
Id : Rpc.Transaction_Id) is separate;
procedure Check_In (Stream : Transport_Stream.Stream_Id;
Id : Rpc.Transaction_Id) is separate;
procedure Make_Controlled (Stream : Transport_Stream.Stream_Id;
Id : Rpc.Transaction_Id) is separate;
procedure Make_Uncontrolled (Stream : Transport_Stream.Stream_Id;
Id : Rpc.Transaction_Id) is separate;
procedure Show_History (Stream : Transport_Stream.Stream_Id;
Id : Rpc.Transaction_Id) is separate;
procedure Process_Call (Stream : Transport_Stream.Stream_Id;
Id : Rpc.Transaction_Id;
Version : Rpc.Version_Number;
Proc : Rpc.Procedure_Number) is
begin
case Proc is
when Ncmvc_Defs.Proc_Number.Check_Out =>
Check_Out (Stream, Id);
when Ncmvc_Defs.Proc_Number.Check_In =>
Check_In (Stream, Id);
when Ncmvc_Defs.Proc_Number.Make_Controlled =>
Make_Controlled (Stream, Id);
when Ncmvc_Defs.Proc_Number.Make_Uncontrolled =>
Make_Uncontrolled (Stream, Id);
when Ncmvc_Defs.Proc_Number.Show_History =>
Show_History (Stream, Id);
when others =>
raise Rpc.No_Such_Procedure;
end case;
end Process_Call;
procedure Serve_Gets is new Rpc_Server.Serve
(Program => Ncmvc_Defs.Program,
Supported => (0, Rpc.Version_Number'Last),
Process_Call => Process_Call);
procedure Serve (Connection : Transport.Connection_Id) is
begin
Serve_Gets (Connection);
end Serve;
end Ncmvc_Server;