PROLOG FILE SEPARATOR Jocelyn Ireson-Paine Shelved on the 9th of December 1987 Amended on the 21st of December 1987 This program allows one to separate text files which have been packed into a larger file. In particular, you can use it to separate files belonging to the Prolog Library which have been packed in this way. (I wrote this when the library had to be distributed by Email. Now it's on FTP, SPLIT has probably had its day. - JNP 28/8/92.) The main predicate is 'split', of arity zero. It asks you for the name of a composite text file. Type this name on a line, terminated by RETURN. 'split' then splits that file into its component subfiles. Each subfile must have this structure:
zero or more times [JNP] SIZE : 7 kilobytes. CHECKED ON EDINBURGH-COMPATIBLE (POPLOG) PROLOG : yes. PORTABILITY : Should be easy. Hints are given in the program. INTERNAL DOCUMENTATION : Comments for each predicate, plus a more detailed description of the program, and a sample composite file. NB: If your implementation doesn't optimise tail recursion, or doesn't collect unused atoms, the program may run out of space (though I've tried to avoid recursion as much as possible).