There used to be primitive tokens ID_SAVE_INPUT and ID_RESTORE_INPUT
but those weren't used. Saving/restoring positions in files is
somewhat involved so I decided to it in Forth. To support this, I
re-purposed the codes of ID_SAVE_INPUT and ID_RESTORE_INPUT to
save/store the current line number (ID_SOURCE_LINE_NUMBER_FETCH, and
ID_SOURCE_LINE_NUMBER_STORE). Those can also be used for something
like C's __LINE__ macro.
* fth/save-input.fth: New file.
* fth/loadp4th.fth: Load it.
* fth/system.fth (D=): New. Needed to compare file positions.
* fth/t_corex.fth: Add simple tests.
* csrc/pf_guts.h (ID_SOURCE_LINE_NUMBER_FETCH,
ID_SOURCE_LINE_NUMBER_STORE): Renamed from ID_SAVE_INPUT and
ID_RESTORE_INPUT.
* csrc/pf_inner.c (ID_SOURCE_LINE_NUMBER_FETCH,
ID_SOURCE_LINE_NUMBER_STORE): Implement.
(ID_SAVE_INPUT): Deleted. It's now in Forth.
* csrc/pfcompil.c (pfBuildDictionary): Define SOURCE-LINE-NUMBER@ and
SOURCE-LINE-NUMBER!.