master
Ondřej Hruška 3 years ago
parent a7d30a07c5
commit 41c152718b
  1. 11
      src/fh_builtins_meta.c
  2. 1
      testfiles/combinedtest.f

@ -911,6 +911,16 @@ static enum fh_error w_parse_name(struct fh_thread_s *fh, const struct fh_word_s
return FH_OK;
}
static enum fh_error w_refill(struct fh_thread_s *fh, const struct fh_word_s *w)
{
(void) w;
enum fh_error rv;
bool suc = fh->input->refill_input_buffer(fh, fh->input);
if (fh->input->source_id == -1) suc = false; // string always says it can't refill
TRY(ds_push(fh, TOBOOL(suc)));
return FH_OK;
}
const struct name_and_handler fh_builtins_meta[] = {
{"depth", w_depth, 0, 0},
{"unused", w_unused, 0, 0},
@ -957,5 +967,6 @@ const struct name_and_handler fh_builtins_meta[] = {
{"evaluate", w_evaluate, 0, 0},
{"included", w_included, 0, 0},
{"include", w_include, 0, 0},
{"refill", w_refill, 0, 0},
{ /* end marker */ }
};

@ -1788,7 +1788,6 @@ TESTING REFILL SOURCE-ID
\ REFILL and SOURCE-ID from the user input device can't be tested from a file,
\ can only be tested from a string via EVALUATE
1 debug
T{ : RF1 S" REFILL" EVALUATE ; RF1 -> FALSE }T
T{ : SID1 S" SOURCE-ID" EVALUATE ; SID1 -> -1 }T

Loading…
Cancel
Save