with Ada.Exceptions; with Mail_Folders; with Mail_Log; with Mail_Pending; package body Make_Remote is function Make (Folder : int; Name : System.Address; Length : int) return int is Path : constant String := Mail_Folders.Path_Of (Folder); Text : String (1 .. Natural (Length)) with Import, Address => Name; begin -- Senza nome non c'รจ niente da creare; senza percorso la cartella non -- esiste (indice vecchio, di un albero ricaricato). if Length <= 0 or else Path = "" then return -1; end if; -- Solo le cartelle di un account: sotto Local ci pensa Make_Folder. if Mail_Folders.Can_Hold (Folder) /= 2 then return -1; end if; Mail_Pending.Note_Make (Path, Text); return 1; exception when Error : others => Mail_Log.Write ("ERR make remote: " & Ada.Exceptions.Exception_Message (Error)); return -1; end Make; end Make_Remote;