3488
static int lua_nodelib_currentattr(lua_State * L)
3490
int n = lua_gettop(L);
3493
if (max_used_attr >= 0) {
3494
if (attr_list_cache == cache_disabled) {
3495
update_attribute_cache();
3496
if (attr_list_cache == null) {
3501
attr_list_ref(attr_list_cache)++;
3502
lua_pushnumber(L, attr_list_cache);
3503
lua_nodelib_push(L);
3510
pdftex_warn("Assignment via node.current_attr(<list>) is not supported (yet)");
3359
3516
static const struct luaL_reg nodelib_f[] = {
3360
{"id", lua_nodelib_id},
3361
{"subtype", lua_nodelib_subtype},
3362
{"type", lua_nodelib_type},
3363
{"new", lua_nodelib_new},
3364
{"length", lua_nodelib_length},
3517
{"copy", lua_nodelib_copy},
3518
{"copy_list", lua_nodelib_copy_list},
3365
3519
{"count", lua_nodelib_count},
3366
{"traverse", lua_nodelib_traverse},
3367
{"traverse_id", lua_nodelib_traverse_filtered},
3368
{"tail", lua_nodelib_tail_only},
3369
{"slide", lua_nodelib_tail},
3370
{"types", lua_nodelib_types},
3371
{"whatsits", lua_nodelib_whatsits},
3520
{"current_attr", lua_nodelib_currentattr},
3521
{"dimensions", lua_nodelib_dimensions},
3522
{"do_ligature_n", lua_nodelib_do_ligature_n},
3523
{"family_font", lua_nodelib_mfont},
3372
3524
{"fields", lua_nodelib_fields},
3525
{"first_character", lua_nodelib_first_character},
3526
{"first_glyph", lua_nodelib_first_glyph},
3527
{"flush_list", lua_nodelib_flush_list},
3528
{"free", lua_nodelib_free},
3529
{"has_attribute", lua_nodelib_has_attribute},
3373
3530
{"has_field", lua_nodelib_has_field},
3374
{"free", lua_nodelib_free},
3375
{"flush_list", lua_nodelib_flush_list},
3376
{"remove", lua_nodelib_remove},
3531
{"hpack", lua_nodelib_hpack},
3532
{"id", lua_nodelib_id},
3533
{"insert_after", lua_nodelib_insert_after},
3377
3534
{"insert_before", lua_nodelib_insert_before},
3378
{"insert_after", lua_nodelib_insert_after},
3379
{"write", lua_nodelib_append},
3535
{"is_node", lua_nodelib_isnode},
3536
{"kerning", font_tex_kerning},
3380
3537
{"last_node", lua_nodelib_last_node},
3381
{"copy", lua_nodelib_copy},
3382
{"copy_list", lua_nodelib_copy_list},
3383
{"dimensions", lua_nodelib_dimensions},
3384
{"hpack", lua_nodelib_hpack},
3385
{"vpack", lua_nodelib_vpack},
3538
{"length", lua_nodelib_length},
3539
{"ligaturing", font_tex_ligaturing},
3386
3540
{"mlist_to_hlist", lua_nodelib_mlist_to_hlist},
3387
{"family_font", lua_nodelib_mfont},
3388
{"has_attribute", lua_nodelib_has_attribute},
3541
{"new", lua_nodelib_new},
3542
{"next", lua_nodelib_next},
3543
{"prev", lua_nodelib_prev},
3544
{"protect_glyphs", lua_nodelib_protect_glyphs},
3545
{"protrusion_skippable", lua_nodelib_cp_skipable},
3546
{"remove", lua_nodelib_remove},
3389
3547
{"set_attribute", lua_nodelib_set_attribute},
3548
{"slide", lua_nodelib_tail},
3549
{"subtype", lua_nodelib_subtype},
3550
{"tail", lua_nodelib_tail_only},
3551
{"traverse", lua_nodelib_traverse},
3552
{"traverse_id", lua_nodelib_traverse_filtered},
3553
{"type", lua_nodelib_type},
3554
{"types", lua_nodelib_types},
3555
{"unprotect_glyphs", lua_nodelib_unprotect_glyphs},
3390
3556
{"unset_attribute", lua_nodelib_unset_attribute},
3391
{"do_ligature_n", lua_nodelib_do_ligature_n},
3392
{"ligaturing", font_tex_ligaturing},
3393
{"kerning", font_tex_kerning},
3394
{"first_character", lua_nodelib_first_character},
3395
3557
{"usedlist", lua_nodelib_usedlist},
3396
{"protect_glyphs", lua_nodelib_protect_glyphs},
3397
{"unprotect_glyphs", lua_nodelib_unprotect_glyphs},
3398
{"protrusion_skipable", lua_nodelib_cp_skipable},
3399
{"protrusion_skippable", lua_nodelib_cp_skipable},
3558
{"vpack", lua_nodelib_vpack},
3559
{"whatsits", lua_nodelib_whatsits},
3560
{"write", lua_nodelib_append},
3400
3561
{NULL, NULL} /* sentinel */