~ubuntu-branches/ubuntu/raring/luatex/raring

« back to all changes in this revision

Viewing changes to source/texk/web2c/luatexdir/lua/ltexlib.c

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2011-05-20 09:40:39 UTC
  • mfrom: (0.8.1) (1.8.1) (19.2.3 oneiric)
  • Revision ID: package-import@ubuntu.com-20110520094039-7sezr4kqonjqxqz6
Tags: 0.70.1-1
* new upstream release (probably) matching TeX Live 2011
* deactivate fix-luatex-build-with-old-libpng patch, included upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
 
25
25
static const char _svn_version[] =
26
 
    "$Id: ltexlib.c 3612 2010-04-13 09:29:42Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.60.2/source/texk/web2c/luatexdir/lua/ltexlib.c $";
 
26
    "$Id: ltexlib.c 4274 2011-05-18 11:23:45Z taco $ $URL: http://foundry.supelec.fr/svn/luatex/tags/beta-0.70.1/source/texk/web2c/luatexdir/lua/ltexlib.c $";
27
27
 
28
28
#define attribute(A) eqtb[attribute_base+(A)].hh.rh
29
29
#define dimen(A) eqtb[scaled_base+(A)].hh.rh
97
97
        if (lua_type(L, 1) == LUA_TNUMBER && n > 1) {
98
98
            lua_number2int(cattable, lua_tonumber(L, 1));
99
99
            startstrings = 2;
 
100
            if (cattable != -1 && cattable != -2 && !valid_catcode_table(cattable)) {
 
101
              cattable = DEFAULT_CAT_TABLE;
 
102
            }
100
103
        }
101
104
    }
102
105
    if (lua_type(L, startstrings) == LUA_TTABLE) {
152
155
        if (lua_type(L, -1) == LUA_TNUMBER) {
153
156
            lua_number2int(cattable, lua_tonumber(L, -1));
154
157
            startstrings = 2;
 
158
            if (cattable != -1 && cattable != -2 && !valid_catcode_table(cattable)) {
 
159
              cattable = DEFAULT_CAT_TABLE;
 
160
            }
155
161
        }
156
162
        lua_pop(L, 1);
157
163
 
574
580
    return 1;
575
581
}
576
582
 
 
583
static int texerror (lua_State * L)
 
584
{
 
585
    int i, n, l;
 
586
    const char **errhlp = NULL;
 
587
    const char *error = luaL_checkstring(L,1);
 
588
    n = lua_gettop(L);
 
589
    if (n==2 && lua_type(L, n) == LUA_TTABLE) {
 
590
        l = 1; /* |errhlp| is terminated by a NULL entry */
 
591
        for (i = 1;; i++) {
 
592
            lua_rawgeti(L, n, i);
 
593
            if (lua_isstring(L, -1)) {
 
594
                l++;
 
595
                lua_pop(L, 1);
 
596
            } else {
 
597
                lua_pop(L, 1);
 
598
                break;
 
599
            }
 
600
        }
 
601
        if (l>1) {
 
602
          errhlp = xmalloc(l * sizeof(char *));
 
603
          memset(errhlp,0,l * sizeof(char *));
 
604
          for (i = 1;; i++) {
 
605
            lua_rawgeti(L, n, i);
 
606
            if (lua_isstring(L, -1)) {
 
607
                errhlp[(i-1)] = lua_tostring(L,-1);
 
608
                lua_pop(L, 1);
 
609
            } else {
 
610
                break;
 
611
            }
 
612
          }
 
613
        }
 
614
    }
 
615
    deletions_allowed = false;
 
616
    tex_error(error, errhlp);
 
617
    if (errhlp)
 
618
      xfree(errhlp);
 
619
    deletions_allowed = true;
 
620
    return 0;
 
621
}
 
622
 
577
623
 
578
624
static int get_item_index(lua_State * L, int i, int base)
579
625
{
783
829
    int i, err;
784
830
    int k;
785
831
    lstring str;
 
832
    char *s;
 
833
    const char *ss;
786
834
    int save_global_defs = int_par(global_defs_code);
787
835
    if (is_global)
788
836
        int_par(global_defs_code) = 1;
790
838
    if (!lua_isstring(L, i)) {
791
839
        luaL_error(L, "unsupported value type");
792
840
    }
793
 
    str.s = (unsigned char *) xstrdup(lua_tolstring(L, i, &str.l));
 
841
    ss = lua_tolstring(L, i, &str.l);
 
842
    s = xmalloc (str.l+1);
 
843
    memcpy (s, ss, str.l+1);
 
844
    str.s = (unsigned char *)s;
794
845
    k = get_item_index(L, (i - 1), toks_base);
795
846
    check_index_range(k, "settoks");
796
847
    err = set_tex_toks_register(k, str);
903
954
    return vsetbox(L, isglobal);
904
955
}
905
956
 
906
 
static int getboxdim(lua_State * L, int whichdim)
907
 
{
908
 
    int i, j;
909
 
    i = lua_gettop(L);
910
 
    j = get_box_id(L, i);
911
 
    lua_settop(L, (i - 2));     /* table at -1 */
912
 
    if (j < 0 || j > 65535) {
913
 
        luaL_error(L, "incorrect index");
914
 
    }
915
 
    switch (whichdim) {
916
 
    case width_offset:
917
 
        lua_pushnumber(L, get_tex_box_width(j));
918
 
        break;
919
 
    case height_offset:
920
 
        lua_pushnumber(L, get_tex_box_height(j));
921
 
        break;
922
 
    case depth_offset:
923
 
        lua_pushnumber(L, get_tex_box_depth(j));
924
 
    }
925
 
    return 1;
926
 
}
927
 
 
928
 
static int getboxwd(lua_State * L)
929
 
{
930
 
    return getboxdim(L, width_offset);
931
 
}
932
 
 
933
 
static int getboxht(lua_State * L)
934
 
{
935
 
    return getboxdim(L, height_offset);
936
 
}
937
 
 
938
 
static int getboxdp(lua_State * L)
939
 
{
940
 
    return getboxdim(L, depth_offset);
941
 
}
942
 
 
943
 
static int vsetboxdim(lua_State * L, int whichdim, int is_global)
944
 
{
945
 
    int i, j, k, err;
946
 
    int save_global_defs = int_par(global_defs_code);
947
 
    if (is_global)
948
 
        int_par(global_defs_code) = 1;
949
 
    i = lua_gettop(L);
950
 
    if (!lua_isnumber(L, i)) {
951
 
        j = dimen_to_number(L, lua_tostring(L, i));
952
 
    } else {
953
 
        lua_number2int(j, lua_tonumber(L, i));
954
 
    }
955
 
    k = get_box_id(L, (i - 1));
956
 
    lua_settop(L, (i - 3));     /* table at -2 */
957
 
    if (k < 0 || k > 65535) {
958
 
        luaL_error(L, "incorrect index");
959
 
    }
960
 
    err = 0;
961
 
    switch (whichdim) {
962
 
    case width_offset:
963
 
        err = set_tex_box_width(k, j);
964
 
        break;
965
 
    case height_offset:
966
 
        err = set_tex_box_height(k, j);
967
 
        break;
968
 
    case depth_offset:
969
 
        err = set_tex_box_depth(k, j);
970
 
    }
971
 
    int_par(global_defs_code) = save_global_defs;
972
 
    if (err) {
973
 
        luaL_error(L, "not a box");
974
 
    }
975
 
    return 0;
976
 
}
977
 
 
978
 
static int setboxwd(lua_State * L)
979
 
{
980
 
    int isglobal = 0;
981
 
    int n = lua_gettop(L);
982
 
    if (n == 3 && lua_isstring(L, 1)) {
983
 
        const char *s = lua_tostring(L, 1);
984
 
        if (strcmp(s, "global") == 0)
985
 
            isglobal = 1;
986
 
    }
987
 
    return vsetboxdim(L, width_offset, isglobal);
988
 
}
989
 
 
990
 
static int setboxht(lua_State * L)
991
 
{
992
 
    int isglobal = 0;
993
 
    int n = lua_gettop(L);
994
 
    if (n == 3 && lua_isstring(L, 1)) {
995
 
        const char *s = lua_tostring(L, 1);
996
 
        if (strcmp(s, "global") == 0)
997
 
            isglobal = 1;
998
 
    }
999
 
    return vsetboxdim(L, height_offset, isglobal);
1000
 
}
1001
 
 
1002
 
static int setboxdp(lua_State * L)
1003
 
{
1004
 
    int isglobal = 0;
1005
 
    int n = lua_gettop(L);
1006
 
    if (n == 3 && lua_isstring(L, 1)) {
1007
 
        const char *s = lua_tostring(L, 1);
1008
 
        if (strcmp(s, "global") == 0)
1009
 
            isglobal = 1;
1010
 
    }
1011
 
    return vsetboxdim(L, depth_offset, isglobal);
1012
 
}
 
957
#define check_char_range(j,s,lim)                                       \
 
958
    if (j<0 || j >= lim) {                                              \
 
959
        luaL_error(L, "incorrect character value %d for tex.%s()", (int)j, s);  }
 
960
 
 
961
 
 
962
static int setcode (lua_State *L, void (*setone)(int,halfword,quarterword), 
 
963
                    void (*settwo)(int,halfword,quarterword), const char *name, int lim)
 
964
{
 
965
    int ch;
 
966
    halfword val, ucval;   
 
967
    int level = cur_level;
 
968
    int n = lua_gettop(L);
 
969
    int f = 1;
 
970
    if (n>1 && lua_type(L,1) == LUA_TTABLE)
 
971
        f++;
 
972
    if (n>2 && lua_isstring(L, f)) {
 
973
        const char *s = lua_tostring(L, f);
 
974
        if (strcmp(s, "global") == 0) {
 
975
            level = level_one; 
 
976
            f++;
 
977
        }
 
978
    }
 
979
    ch = (int) luaL_checkinteger(L, f);
 
980
    check_char_range(ch, name, 65536*17);
 
981
    val = (halfword) luaL_checkinteger(L, f+1);
 
982
    check_char_range(val, name, lim);
 
983
    (setone)(ch, val, level);
 
984
    if (settwo != NULL && n-f == 2) {
 
985
        ucval = (halfword) luaL_checkinteger(L, f+2);
 
986
        check_char_range(ucval, name, lim);
 
987
        (settwo)(ch, ucval, level);
 
988
    }
 
989
    return 0;
 
990
}
 
991
 
 
992
static int setlccode(lua_State * L)
 
993
{
 
994
    return setcode(L, &set_lc_code, &set_uc_code, "setlccode",  65536*17);
 
995
}
 
996
 
 
997
static int getlccode(lua_State * L)
 
998
{
 
999
    int ch = (int) luaL_checkinteger(L, -1);
 
1000
    check_char_range(ch, "getlccode", 65536*17);
 
1001
    lua_pushnumber(L, get_lc_code(ch));
 
1002
    return 1;
 
1003
}
 
1004
 
 
1005
static int setuccode(lua_State * L)
 
1006
{
 
1007
    return setcode(L, &set_uc_code, &set_lc_code, "setuccode", 65536*17);
 
1008
}
 
1009
 
 
1010
static int getuccode(lua_State * L)
 
1011
{
 
1012
    int ch = (int) luaL_checkinteger(L, -1);
 
1013
    check_char_range(ch, "getuccode",  65536*17);
 
1014
    lua_pushnumber(L, get_uc_code(ch));
 
1015
    return 1;
 
1016
}
 
1017
 
 
1018
static int setsfcode(lua_State * L)
 
1019
{
 
1020
    return setcode(L, &set_sf_code, NULL, "setsfcode", 32768);
 
1021
}
 
1022
 
 
1023
static int getsfcode(lua_State * L)
 
1024
{
 
1025
    int ch = (int) luaL_checkinteger(L, -1);
 
1026
    check_char_range(ch, "getsfcode",  65536*17);
 
1027
    lua_pushnumber(L, get_sf_code(ch));
 
1028
    return 1;
 
1029
}
 
1030
 
 
1031
static int setcatcode(lua_State * L)
 
1032
{
 
1033
    int ch;
 
1034
    halfword val;
 
1035
    int level = cur_level;
 
1036
    int cattable = int_par(cat_code_table_code);
 
1037
    int n = lua_gettop(L);
 
1038
    int f = 1;
 
1039
    if (n>1 && lua_type(L,1) == LUA_TTABLE)
 
1040
        f++;
 
1041
    if (n>2 && lua_isstring(L, f)) {
 
1042
        const char *s = lua_tostring(L, f);
 
1043
        if (strcmp(s, "global") == 0) {
 
1044
            level = level_one; 
 
1045
            f++;
 
1046
        }
 
1047
    }
 
1048
    if (n-f == 2) {
 
1049
        cattable = (int) luaL_checkinteger(L, -3);
 
1050
    }
 
1051
    ch = (int) luaL_checkinteger(L, -2);
 
1052
    check_char_range(ch, "setcatcode", 65536*17);
 
1053
    val = (halfword) luaL_checkinteger(L, -1);
 
1054
    check_char_range(val, "setcatcode", 16);
 
1055
    set_cat_code(cattable, ch, val, level);
 
1056
    return 0;
 
1057
}
 
1058
 
 
1059
static int getcatcode(lua_State * L)
 
1060
{
 
1061
    int cattable = int_par(cat_code_table_code);
 
1062
    int ch = (int) luaL_checkinteger(L, -1);
 
1063
    if (lua_gettop(L)>=2 && lua_type(L,-2)==LUA_TNUMBER) {
 
1064
        cattable = luaL_checkinteger(L, -2);
 
1065
    }
 
1066
    check_char_range(ch, "getcatcode",  65536*17);
 
1067
    lua_pushnumber(L, get_cat_code(cattable, ch));
 
1068
    return 1;
 
1069
}
 
1070
 
 
1071
 
 
1072
static int setmathcode(lua_State * L)
 
1073
{
 
1074
    int ch;
 
1075
    halfword cval, fval, chval;
 
1076
    int level = cur_level;
 
1077
    int n = lua_gettop(L);
 
1078
    int f = 1;
 
1079
    if (n>1 && lua_type(L,1) == LUA_TTABLE)
 
1080
        f++;
 
1081
    if (n>2 && lua_isstring(L, f)) {
 
1082
        const char *s = lua_tostring(L, f);
 
1083
        if (strcmp(s, "global") == 0) {
 
1084
            level = level_one; 
 
1085
            f++;
 
1086
        }
 
1087
    }
 
1088
    if (n-f!=1 || lua_type(L,f+1) != LUA_TTABLE) {
 
1089
        luaL_error(L, "Bad arguments for tex.setmathcode()");
 
1090
    }
 
1091
    ch = (int) luaL_checkinteger(L, -2);
 
1092
    check_char_range(ch, "setmathcode", 65536*17);
 
1093
 
 
1094
    lua_rawgeti(L, -1, 1);
 
1095
    cval = (halfword) luaL_checkinteger(L, -1);
 
1096
    lua_rawgeti(L, -2, 2);
 
1097
    fval = (halfword) luaL_checkinteger(L, -1);
 
1098
    lua_rawgeti(L, -3, 3);
 
1099
    chval = (halfword) luaL_checkinteger(L, -1);
 
1100
    lua_pop(L,3);
 
1101
 
 
1102
    check_char_range(cval, "setmathcode", 8);
 
1103
    check_char_range(fval, "setmathcode", 256);
 
1104
    check_char_range(chval, "setmathcode", 65536*17);
 
1105
    set_math_code(ch, xetex_mathcode, cval,fval, chval, (quarterword) (level));
 
1106
    return 0;
 
1107
}
 
1108
 
 
1109
static int getmathcode(lua_State * L)
 
1110
{
 
1111
    mathcodeval mval = { 0, 0, 0, 0 };
 
1112
    int ch = (int) luaL_checkinteger(L, -1);
 
1113
    check_char_range(ch, "getmathcode",  65536*17);
 
1114
    mval = get_math_code(ch);
 
1115
    lua_newtable(L);
 
1116
    lua_pushnumber(L,mval.class_value);
 
1117
    lua_rawseti(L, -2, 1);
 
1118
    lua_pushnumber(L,mval.family_value);
 
1119
    lua_rawseti(L, -2, 2);
 
1120
    lua_pushnumber(L,mval.character_value);
 
1121
    lua_rawseti(L, -2, 3);
 
1122
    return 1;
 
1123
}
 
1124
 
 
1125
 
 
1126
 
 
1127
static int setdelcode(lua_State * L)
 
1128
{
 
1129
    int ch;
 
1130
    halfword sfval, scval, lfval, lcval;
 
1131
    int level = cur_level;
 
1132
    int n = lua_gettop(L);
 
1133
    int f = 1;
 
1134
    if (n>1 && lua_type(L,1) == LUA_TTABLE)
 
1135
        f++;
 
1136
    if (n>2 && lua_isstring(L, f)) {
 
1137
        const char *s = lua_tostring(L, f);
 
1138
        if (strcmp(s, "global") == 0) {
 
1139
            level = level_one; 
 
1140
            f++;
 
1141
        }
 
1142
    }
 
1143
    if (n-f!=1 || lua_type(L,f+1) != LUA_TTABLE) {
 
1144
        luaL_error(L, "Bad arguments for tex.setdelcode()");
 
1145
    }
 
1146
    ch = (int) luaL_checkinteger(L, -2);
 
1147
    check_char_range(ch, "setdelcode", 65536*17);
 
1148
    lua_rawgeti(L, -1, 1);
 
1149
    sfval = (halfword) luaL_checkinteger(L, -1);
 
1150
    lua_rawgeti(L, -2, 2);
 
1151
    scval = (halfword) luaL_checkinteger(L, -1);
 
1152
    lua_rawgeti(L, -3, 3);
 
1153
    lfval = (halfword) luaL_checkinteger(L, -1);
 
1154
    lua_rawgeti(L, -4, 4);
 
1155
    lcval = (halfword) luaL_checkinteger(L, -1);
 
1156
    lua_pop(L,4);
 
1157
 
 
1158
    check_char_range(sfval, "setdelcode", 256);
 
1159
    check_char_range(scval, "setdelcode", 65536*17);
 
1160
    check_char_range(lfval, "setdelcode", 256);
 
1161
    check_char_range(lcval, "setdelcode", 65536*17);
 
1162
    set_del_code(ch, xetex_mathcode, sfval, scval, lfval, lcval, (quarterword) (level));
 
1163
 
 
1164
    return 0;
 
1165
}
 
1166
 
 
1167
static int getdelcode(lua_State * L)
 
1168
{
 
1169
    delcodeval mval = { 0, 0, 0, 0, 0, 0 };
 
1170
    int ch = (int) luaL_checkinteger(L, -1);
 
1171
    check_char_range(ch, "getdelcode",  65536*17);
 
1172
    mval = get_del_code(ch);
 
1173
    /* lua_pushnumber(L, mval.class_value); */
 
1174
    /* lua_pushnumber(L, mval.origin_value); */
 
1175
    lua_newtable(L);
 
1176
    lua_pushnumber(L,mval.small_family_value);
 
1177
    lua_rawseti(L, -2, 1);
 
1178
    lua_pushnumber(L,mval.small_character_value);
 
1179
    lua_rawseti(L, -2, 2);
 
1180
    lua_pushnumber(L,mval.large_family_value);
 
1181
    lua_rawseti(L, -2, 3);
 
1182
    lua_pushnumber(L,mval.large_character_value);
 
1183
    lua_rawseti(L, -2, 4);
 
1184
    return 1;
 
1185
}
 
1186
 
 
1187
 
1013
1188
 
1014
1189
static int settex(lua_State * L)
1015
1190
{
1052
1227
                    lua_number2int(j, lua_tonumber(L, i));
1053
1228
                }
1054
1229
                assign_internal_value((isglobal ? 4 : 0), equiv(cur_cs), j);
 
1230
            } else if (is_glue_assign(cur_cmd)) {
 
1231
                halfword *j = check_isnode(L, i);     /* the value */
 
1232
                    { int a = isglobal;
 
1233
                      define(equiv(cur_cs), assign_glue_cmd, *j);
 
1234
                    }
1055
1235
            } else if (is_toks_assign(cur_cmd)) {
1056
1236
                if (lua_isstring(L, i)) {
1057
1237
                    j = tokenlist_from_lua(L);  /* uses stack -1 */
1062
1242
                }
1063
1243
 
1064
1244
            } else {
1065
 
                luaL_error(L, "unsupported tex internal assignment");
 
1245
                /* people may want to add keys that are also primitives
 
1246
                   (|tex.wd| for example) so creating an error is not
 
1247
                   right here */
 
1248
                if (lua_istable(L, (i - 2)))
 
1249
                    lua_rawset(L, (i - 2));
 
1250
                /* luaL_error(L, "unsupported tex internal assignment"); */
1066
1251
            }
1067
1252
        } else {
1068
1253
            if (lua_istable(L, (i - 2)))
2018
2203
        pdflastlinedepth, pdfignoreddimen, parshape;
2019
2204
    int fewest_demerits = 0, actual_looseness = 0;
2020
2205
    halfword clubpenalties, interlinepenalties, widowpenalties;
2021
 
 
 
2206
    int save_vlink_tmp_head;
2022
2207
    /* push a new nest level */
2023
2208
    push_nest();
2024
 
    /* save_vlink_cur_head = vlink(cur_list.head_field); */
 
2209
    save_vlink_tmp_head = vlink(temp_head);
2025
2210
 
2026
2211
    j = check_isnode(L, 1);     /* the value */
2027
2212
    vlink(temp_head) = *j;
2139
2324
    lua_settable(L, -3);
2140
2325
 
2141
2326
    /* restore nest stack */
 
2327
    vlink(temp_head) = save_vlink_tmp_head;
2142
2328
    pop_nest();
2143
2329
    if (parshape != equiv(par_shape_loc))
2144
2330
        flush_node(parshape);
2148
2334
static int tex_shipout(lua_State * L)
2149
2335
{
2150
2336
    int boxnum = get_box_id(L, 1);
2151
 
    ship_out(static_pdf, box(boxnum), true);
 
2337
    ship_out(static_pdf, box(boxnum), SHIPPING_PAGE);
2152
2338
    box(boxnum) = null;
2153
2339
    return 0;
2154
2340
}
2250
2436
    {"write", luacwrite},
2251
2437
    {"print", luacprint},
2252
2438
    {"tprint", luactprint},
 
2439
    {"error", texerror},
2253
2440
    {"sprint", luacsprint},
2254
2441
    {"set", settex},
2255
2442
    {"get", gettex},
2267
2454
    {"getbox", getbox},
2268
2455
    {"setlist", setlist},
2269
2456
    {"getlist", getlist},
2270
 
    {"setboxwd", setboxwd},
2271
 
    {"getboxwd", getboxwd},
2272
 
    {"setboxht", setboxht},
2273
 
    {"getboxht", getboxht},
2274
 
    {"setboxdp", setboxdp},
2275
 
    {"getboxdp", getboxdp},
2276
2457
    {"setnest", setnest},
2277
2458
    {"getnest", getnest},
 
2459
    {"setcatcode", setcatcode},
 
2460
    {"getcatcode", getcatcode},
 
2461
    {"setdelcode", setdelcode},
 
2462
    {"getdelcode", getdelcode},
 
2463
    {"setlccode", setlccode},
 
2464
    {"getlccode", getlccode},
 
2465
    {"setmathcode", setmathcode},
 
2466
    {"getmathcode", getmathcode},
 
2467
    {"setsfcode", setsfcode},
 
2468
    {"getsfcode", getsfcode},
 
2469
    {"setuccode", setuccode},
 
2470
    {"getuccode", getuccode},
2278
2471
    {"round", tex_roundnumber},
2279
2472
    {"scale", tex_scaletable},
2280
2473
    {"sp", tex_scaledimen},
2311
2504
    make_table(L, "count",      "getcount",     "setcount");
2312
2505
    make_table(L, "toks",       "gettoks",      "settoks");
2313
2506
    make_table(L, "box",        "getbox",       "setbox");
2314
 
    make_table(L, "wd",         "getboxwd",     "setboxwd");
2315
 
    make_table(L, "ht",         "getboxht",     "setboxht");
2316
 
    make_table(L, "dp",         "getboxdp",     "setboxdp");
 
2507
    make_table(L, "sfcode",     "getsfcode",    "setsfcode");
 
2508
    make_table(L, "lccode",     "getlccode",    "setlccode");
 
2509
    make_table(L, "uccode",     "getuccode",    "setuccode");
 
2510
    make_table(L, "catcode",    "getcatcode",   "setcatcode");
 
2511
    make_table(L, "mathcode",   "getmathcode",  "setmathcode");
 
2512
    make_table(L, "delcode",    "getdelcode",   "setdelcode");
2317
2513
    make_table(L, "lists",      "getlist",      "setlist");
2318
2514
    make_table(L, "nest",       "getnest",      "setnest");
2319
2515
    /* *INDENT-ON* */