[pdftex] Experiment with a new TeX primitive

Nagy Bence tipogral at freemail.hu
Thu Feb 5 10:56:48 CET 2004


Dear Taco and Hans,

>   begin
>     scan_toks(false, true);
>     str_toks(str_start[experiment(tokens_to_string(def_ref))]);
>     ins_list(link(temp_head));
>     delete_token_ref(def_ref);
>   end

thanks for our mails. I will try this tomorrow.

> - I don't understand why these call_func's in the pdftex code exist.
>   (If anybody knows and can explain that would be great ;))

You can not call a function without getting its result. call_func is
like a black hole, it absorbs the output of scan_toks, so you do not
need to write an own procedure and a variable declaration.

> - you need to call tokens_to_string() so that experiment receives
>   a tex string (instead of a token list)

No, this part of my code works see, the C-code is almost the same as in
the pdfmapfile function in config.c. And the code

tex_printf("<%s>",makecstring(tokenstostring(t)));

writes out its input perfectly.

Greetings,

Bence


More information about the pdftex mailing list