From: Helmut Eller Date: Mon, 2 Jan 2017 18:28:25 +0000 (+0100) Subject: Implement RENAME-FILE X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/commitdiff_plain/6f3de3962bb26f4e1be714dfefc78de0fc16b376?ds=sidebyside;hp=6f3de3962bb26f4e1be714dfefc78de0fc16b376 Implement RENAME-FILE This introduces a primitive (RENAME-FILE) which takes C-strings as arguments. The conversion from Forth-strings to C-strings is done in Forth code as it doesn't seem to be any easier to do it in C. * csrc/pf_io.h (sdRenameFile): New. It has the same semantics as rename(2) from * csrc/pf_io.c (sdRenameFile): New stub. * csrc/pf_guts.h (cforth_primitive_ids): ID_FILE_RENAME added, ID_RESERVED12 removed * csrc/pf_inner.c: Add case for ID_FILE_RENAME. * csrc/pfcompil.c (pfBuildDictionary): Create entry for (RENAME-FILE). * fth/file.fth (RENAME-FILE): New. (THROW_RENAME_FILE): New constant. * fth/t_file.fth: Remove stub and uncomment some tests. ---