+ local node_traverse = node.traverse
+ local STCK = luatexja.userid_table.STCK
+ local IHB = luatexja.userid_table.IHB
+
+ local function test_list(h, lv)
+ if not h then
+ return 2 -- need to create dir_whatsit
+ else
+ local flag = 2 -- need to create dir_whatsit
+ local w
+ for p in node_traverse(h) do
+ if p.id==id_whatsit then
+ if p.subtype==sid_user then
+ local uid= p.user_id
+ if uid==DIR then
+ flag = 1; w = w or p -- found
+ elseif not(uid==IHB or uid==STCK) then
+ flag = 0; break -- error
+ end
+ else
+ flag = 0; break
+ end
+ else
+ flag = 0; break
+ end
+ end
+ if flag==1 then -- move dir_whatsit w
+ return 1,w -- TODO
+ else
+ return flag
+ end
+ end
+ end