16
16
// utils.functionlist
17
17
// utils.getfontfamilies
18
18
// utils.info
19
+ // utils.infotypes
19
20
// utils.inputbox
20
21
// utils.listbox
21
22
// utils.metaphone
50
51
#include < direct.h>
51
52
52
53
extern char working_dir [_MAX_PATH];
54
+ extern tInfoTypeMapping InfoTypes [];
53
55
54
56
// recursive node outputter
55
57
static void xmlOuputNode (lua_State *L, CXMLelement & node)
@@ -894,7 +896,7 @@ CDC dc;
894
896
return 1 ; // one table
895
897
} // end of fontpicker
896
898
897
- int edit_distance (lua_State *L)
899
+ static int edit_distance (lua_State *L)
898
900
{
899
901
lua_pushinteger (L, EditDistance (luaL_checkstring (L, 1 ), luaL_checkstring (L, 2 )));
900
902
return 1 ;
@@ -1607,7 +1609,7 @@ static int shell_execute (lua_State *L)
1607
1609
// arg4 is "no sort" boolean
1608
1610
// arg5 is filter function
1609
1611
1610
- int filterpicker (lua_State *L)
1612
+ static int filterpicker (lua_State *L)
1611
1613
{
1612
1614
const char * filtertitle = luaL_optstring (L, 2 , " Filter" );
1613
1615
const char * initialfilter = luaL_optstring (L, 3 , " " );
@@ -1691,7 +1693,7 @@ CFunctionListDlg dlg;
1691
1693
1692
1694
} // end of filterpicker
1693
1695
1694
- int timer (lua_State *L)
1696
+ static int timer (lua_State *L)
1695
1697
{
1696
1698
if (App.m_iCounterFrequency )
1697
1699
{
@@ -1707,7 +1709,23 @@ int timer (lua_State *L)
1707
1709
}
1708
1710
1709
1711
return 1 ; // 1 result
1710
- }
1712
+ } // end timer
1713
+
1714
+
1715
+ // returns table of GetInfo selectors and their descriptions
1716
+ static int infotypes (lua_State *L)
1717
+ {
1718
+ lua_newtable (L);
1719
+
1720
+ for (int iCount = 0 ; InfoTypes [iCount].iInfoType ; iCount++)
1721
+ {
1722
+ lua_pushstring (L, InfoTypes [iCount].sDescription );
1723
+ lua_rawseti (L, -2 , InfoTypes [iCount].iInfoType );
1724
+ }
1725
+
1726
+ return 1 ; // 1 table
1727
+ } // end of infotypes
1728
+
1711
1729
1712
1730
// table of operations
1713
1731
static const struct luaL_reg xmllib [] =
@@ -1727,6 +1745,7 @@ static const struct luaL_reg xmllib [] =
1727
1745
{" functionlist" , functionlist},
1728
1746
{" getfontfamilies" , getfontfamilies},
1729
1747
{" info" , info},
1748
+ {" infotypes" , infotypes},
1730
1749
{" inputbox" , inputbox},
1731
1750
{" listbox" , listbox},
1732
1751
{" metaphone" , metaphone},
0 commit comments