aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/ansi_c
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-04-11 09:34:17 -0400
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-04-11 09:34:17 -0400
commitde3a745e1af2e441de868c2aa4849102d376acb5 (patch)
treec2d7767600dc519b2613ddecaf7e53fb5e8867a2 /modules/ansi_c
parent03fab17277fee7387fd93a9c2774b1ebf3f80fe4 (diff)
Initial pass reformatting all code.
Use clang-format, LuaFormatter, and 100 character limit on lines.
Diffstat (limited to 'modules/ansi_c')
-rw-r--r--modules/ansi_c/api536
-rw-r--r--modules/ansi_c/init.lua30
-rw-r--r--modules/ansi_c/lua_api330
3 files changed, 449 insertions, 447 deletions
diff --git a/modules/ansi_c/api b/modules/ansi_c/api
index 58902be2..0bb18062 100644
--- a/modules/ansi_c/api
+++ b/modules/ansi_c/api
@@ -1,290 +1,290 @@
-assert assert(int expression) [void]\nMacro used for internal error detection. (Ignored if NDEBUG is defined where \n<assert.h> is included.) If `expression` equals zero, message printed on stderr\nand abort called to terminate execution. Source filename and line number in\nmessage are from preprocessor macros __FILE__ and __LINE__.
+assert assert(int expression) [void]\nMacro used for internal error detection. (Ignored if NDEBUG is defined where <assert.h> is\nincluded.) If `expression` equals zero, message printed on stderr and abort called to terminate\nexecution. Source filename and line number in message are from preprocessor macros __FILE__\nand __LINE__.\n
-isalnum isalnum(int c) [int]\nisalpha(c) or isdigit(c)
-isalpha isalpha(int c) [int]\nisupper(c) or islower(c)
-iscntrl iscntrl(int c) [int]\nis control character. In ASCII, control characters are 0x00 (NUL) to 0x1F (US),\nand 0x7F (DEL)
-isdigit isdigit(int c) [int]\nis decimal digit
-isgraph isgraph(int c) [int]\nis printing character other than space
-islower islower(int c) [int]\nis lower-case letter
-isprint isprint(int c) [int]\nis printing character (including space). In ASCII, printing characters are 0x20\n(' ') to 0x7E ('~')
-ispunct ispunct(int c) [int]\nis printing character other than space, letter, digit
-isspace isspace(int c) [int]\nis space, formfeed, newline, carriage return, tab, vertical tab
-isupper isupper(int c) [int]\nis upper-case letter
-isxdigit isxdigit(int c) [int]\nis hexadecimal digit
-tolower tolower(int c) [int]\nreturn lower-case equivalent
-toupper toupper(int c) [int]\nreturn upper-case equivalent
+isalnum isalnum(int c) [int]\nisalpha(c) or isdigit(c)\n
+isalpha isalpha(int c) [int]\nisupper(c) or islower(c)\n
+iscntrl iscntrl(int c) [int]\nis control character. In ASCII, control characters are 0x00 (NUL) to 0x1F (US), and 0x7F (DEL)\n
+isdigit isdigit(int c) [int]\nis decimal digit\n
+isgraph isgraph(int c) [int]\nis printing character other than space\n
+islower islower(int c) [int]\nis lower-case letter\n
+isprint isprint(int c) [int]\nis printing character (including space). In ASCII, printing characters are 0x20 (' ') to 0x7E ('~')\n
+ispunct ispunct(int c) [int]\nis printing character other than space, letter, digit\n
+isspace isspace(int c) [int]\nis space, formfeed, newline, carriage return, tab, vertical tab\n
+isupper isupper(int c) [int]\nis upper-case letter\n
+isxdigit isxdigit(int c) [int]\nis hexadecimal digit\n
+tolower tolower(int c) [int]\nreturn lower-case equivalent\n
+toupper toupper(int c) [int]\nreturn upper-case equivalent\n
-errno errno\nobject to which certain library functions assign specific positive values on\nerror
-EDOM EDOM\ncode used for domain errors
-ERANGE ERANGE\ncode used for range errors
+errno errno\nobject to which certain library functions assign specific positive values on\nerror\n
+EDOM EDOM\ncode used for domain errors\n
+ERANGE ERANGE\ncode used for range errors\n
-FLT_RADIX FLT_RADIX\nradix of floating-point representations
-FLT_ROUNDS FLT_ROUNDS\nfloating-point rounding mode
+FLT_RADIX FLT_RADIX\nradix of floating-point representations\n
+FLT_ROUNDS FLT_ROUNDS\nfloating-point rounding mode\n
-FLT_DIG FLT_DIG\nprecision of float (in decimal digits)
-DBL_DIG DBL_DIG\nprecision of double (in decimal digits)
-LDBL_DIG LDBL_DIG\nprecision of long double (in decimal digits)
+FLT_DIG FLT_DIG\nprecision of float (in decimal digits)\n
+DBL_DIG DBL_DIG\nprecision of double (in decimal digits)\n
+LDBL_DIG LDBL_DIG\nprecision of long double (in decimal digits)\n
-FLT_EPSILON FLT_EPSILON\nsmallest float number x such that 1.0 + x != 1.0
-DBL_EPSILON DBL_EPSILON\nsmallest double number x such that 1.0 + x != 1.0
-LDBL_EPSILON LDBL_EPSILON\nsmallest long double number x such that 1.0 + x != 1.0
+FLT_EPSILON FLT_EPSILON\nsmallest float number x such that 1.0 + x != 1.0\n
+DBL_EPSILON DBL_EPSILON\nsmallest double number x such that 1.0 + x != 1.0\n
+LDBL_EPSILON LDBL_EPSILON\nsmallest long double number x such that 1.0 + x != 1.0\n
-FLT_MANT_DIG FLT_MANT_DIG\nnumber of float digits, base FLT_RADIX, in mantissa
-DBL_MANT_DIG DBL_MANT_DIG\nnumber of double digits, base FLT_RADIX, in mantissa
-LDBL_MANT_DIG LDBL_MANT_DIG\nnumber of long double digits, base FLT_RADIX, in mantissa
+FLT_MANT_DIG FLT_MANT_DIG\nnumber of float digits, base FLT_RADIX, in mantissa\n
+DBL_MANT_DIG DBL_MANT_DIG\nnumber of double digits, base FLT_RADIX, in mantissa\n
+LDBL_MANT_DIG LDBL_MANT_DIG\nnumber of long double digits, base FLT_RADIX, in mantissa\n
-FLT_MAX FLT_MAX\nmaximum float number
-DBL_MAX DBL_MAX\nmaximum double number
-LDBL_MAX LDBL_MAX\nmaximum long double number
+FLT_MAX FLT_MAX\nmaximum float number\n
+DBL_MAX DBL_MAX\nmaximum double number\n
+LDBL_MAX LDBL_MAX\nmaximum long double number\n
-FLT_MAX_EXP FLT_MAX_EXP\nlargest positive integer exponent to which FLT_RADIX can be raised and remain\nrepresentable
-DBL_MAX_EXP DBL_MAX_EXP\nlargest positive integer exponent to which FLT_RADIX can be raised and remain\nrepresentable
-LDBL_MAX_EXP LDBL_MAX_EXP\nlargest positive integer exponent to which FLT_RADIX can be raised and remain\nrepresentable
+FLT_MAX_EXP FLT_MAX_EXP\nlargest positive integer exponent to which FLT_RADIX can be raised and remain representable\n
+DBL_MAX_EXP DBL_MAX_EXP\nlargest positive integer exponent to which FLT_RADIX can be raised and remain representable\n
+LDBL_MAX_EXP LDBL_MAX_EXP\nlargest positive integer exponent to which FLT_RADIX can be raised and remain representable\n
-FLT_MIN FLT_MIN\nminimum normalised float number
-DBL_MIN DBL_MIN\nminimum normalised double number
-LDBL_MIN LDBL_MIN\nminimum normalised long double number
+FLT_MIN FLT_MIN\nminimum normalised float number\n
+DBL_MIN DBL_MIN\nminimum normalised double number\n
+LDBL_MIN LDBL_MIN\nminimum normalised long double number\n
-FLT_MIN_EXP FLT_MIN_EXP\nsmallest negative integer exponent to which FLT_RADIX can be raised and remain\nrepresentable
-DBL_MIN_EXP DBL_MIN_EXP\nsmallest negative integer exponent to which FLT_RADIX can be raised and remain\nrepresentable
-LDBL_MIN_EXP LDBL_MIN_EXP\nsmallest negative integer exponent to which FLT_RADIX can be raised and remain\nrepresentable
+FLT_MIN_EXP FLT_MIN_EXP\nsmallest negative integer exponent to which FLT_RADIX can be raised and remain representable\n
+DBL_MIN_EXP DBL_MIN_EXP\nsmallest negative integer exponent to which FLT_RADIX can be raised and remain representable\n
+LDBL_MIN_EXP LDBL_MIN_EXP\nsmallest negative integer exponent to which FLT_RADIX can be raised and remain representable\n
-CHAR_BIT CHAR_BIT\nnumber of bits in a char
-CHAR_MAX CHAR_MAX\nmaximum value of type char
-CHAR_MIN CHAR_MIN\nminimum value of type char
-SCHAR_MAX SCHAR_MAX\nmaximum value of type signed char
-SCHAR_MIN SCHAR_MIN\nminimum value of type signed char
-UCHAR_MAX UCHAR_MAX\nmaximum value of type unsigned char
-SHRT_MAX SHRT_MAX\nmaximum value of type short
-SHRT_MIN SHRT_MIN\nminimum value of type short
-USHRT_MAX USHRT_MAX\nmaximum value of type unsigned short
-INT_MAX INT_MAX\nmaximum value of type int
-INT_MIN INT_MIN\nminimum value of type int
-UINT_MAX UINT_MAX\nmaximum value of type unsigned int
-LONG_MAX LONG_MAX\nmaximum value of type long
-LONG_MIN LONG_MIN\nminimum value of type long
-ULONG_MAX ULONG_MAX\nmaximum value of type unsigned long
+CHAR_BIT CHAR_BIT\nnumber of bits in a char\n
+CHAR_MAX CHAR_MAX\nmaximum value of type char\n
+CHAR_MIN CHAR_MIN\nminimum value of type char\n
+SCHAR_MAX SCHAR_MAX\nmaximum value of type signed char\n
+SCHAR_MIN SCHAR_MIN\nminimum value of type signed char\n
+UCHAR_MAX UCHAR_MAX\nmaximum value of type unsigned char\n
+SHRT_MAX SHRT_MAX\nmaximum value of type short\n
+SHRT_MIN SHRT_MIN\nminimum value of type short\n
+USHRT_MAX USHRT_MAX\nmaximum value of type unsigned short\n
+INT_MAX INT_MAX\nmaximum value of type int\n
+INT_MIN INT_MIN\nminimum value of type int\n
+UINT_MAX UINT_MAX\nmaximum value of type unsigned int\n
+LONG_MAX LONG_MAX\nmaximum value of type long\n
+LONG_MIN LONG_MIN\nminimum value of type long\n
+ULONG_MAX ULONG_MAX\nmaximum value of type unsigned long\n
-lconv lconv [struct]\nDescribes formatting of monetary and other numeric values\nImplementations may change field order and include additional fields. Standard C\nLibrary functions use only `decimal_point`.
-decimal_point lconv.decimal_point [char*]\ndecimal point for non-monetary values
-grouping lconv.grouping [char*]\nsizes of digit groups for non-monetary values
-thousands_sep lconv.thousands_sep [char*]\nseparator for digit groups for non-monetary values (left of "decimal point")
-currency_symbol lconv.currency_symbol [char*]\ncurrency symbol
-int_curr_symbol lconv.int_curr_symbol [char*]\ninternational currency symbol
-mon_decimal_point lconv.mon_decimal_point [char*]\ndecimal point for monetary values
-mon_grouping lconv.mon_grouping [char*]\nsizes of digit groups for monetary values
-mon_thousands_sep lconv.mon_thousands_sep [char*]\nseparator for digit groups for monetary values (left of "decimal point")
-negative_sign lconv.negative_sign [char*]\nnegative sign for monetary values
-positive_sign lconv.positive_sign [char*]\npositive sign for monetary values
-frac_digits lconv.frac_digits [char]\nnumber of digits to be displayed to right of "decimal point" for monetary values
-int_frac_digits lconv.int_frac_digits [char]\nnumber of digits to be displayed to right of "decimal point" for international\nmonetary values
-n_cs_precedes lconv.n_cs_precedes [char]\nwhether currency symbol precedes (1) or follows (0) negative monetary values
-n_sep_by_space lconv.n_sep_by_space [char]\nwhether currency symbol is (1) or is not (0) separated by space from negative\nmonetary values
-n_sign_posn lconv.n_sign_posn [char]\nformat for negative monetary values:\n0: parentheses surround quantity and currency symbol\n 1: sign precedes quantity and currency symbol\n 2: sign follows quantity and currency symbol\n 3: sign immediately precedes currency symbol\n 4: sign immediately follows currency symbol
-p_cs_precedes lconv.p_cs_precedes [char]\nwhether currency symbol precedes (1) or follows (0) positive monetary values
-p_sep_by_space lconv.p_sep_by_space [char]\nwhether currency symbol is (1) or is not (0) separated by space from\nnon-negative monetary values
-p_sign_posn lconv.p_sign_posn [char]\nformat for non-negative monetary values, with values as for n_sign_posn
+lconv lconv [struct]\nDescribes formatting of monetary and other numeric values Implementations may change field\norder and include additional fields. Standard C Library functions use only `decimal_point`.\n
+decimal_point lconv.decimal_point [char*]\ndecimal point for non-monetary values\n
+grouping lconv.grouping [char*]\nsizes of digit groups for non-monetary values\n
+thousands_sep lconv.thousands_sep [char*]\nseparator for digit groups for non-monetary values (left of "decimal point")\n
+currency_symbol lconv.currency_symbol [char*]\ncurrency symbol\n
+int_curr_symbol lconv.int_curr_symbol [char*]\ninternational currency symbol\n
+mon_decimal_point lconv.mon_decimal_point [char*]\ndecimal point for monetary values\n
+mon_grouping lconv.mon_grouping [char*]\nsizes of digit groups for monetary values\n
+mon_thousands_sep lconv.mon_thousands_sep [char*]\nseparator for digit groups for monetary values (left of "decimal point")\n
+negative_sign lconv.negative_sign [char*]\nnegative sign for monetary values\n
+positive_sign lconv.positive_sign [char*]\npositive sign for monetary values\n
+frac_digits lconv.frac_digits [char]\nnumber of digits to be displayed to right of "decimal point" for monetary values\n
+int_frac_digits lconv.int_frac_digits [char]\nnumber of digits to be displayed to right of "decimal point" for international monetary values\n
+n_cs_precedes lconv.n_cs_precedes [char]\nwhether currency symbol precedes (1) or follows (0) negative monetary values\n
+n_sep_by_space lconv.n_sep_by_space [char]\nwhether currency symbol is (1) or is not (0) separated by space from negative monetary values\n
+n_sign_posn lconv.n_sign_posn [char]\nformat for negative monetary values:\n\n * 0: parentheses surround quantity and currency symbol\n * 1: sign precedes quantity and currency symbol\n * 2: sign follows quantity and currency symbol\n * 3: sign immediately precedes currency symbol\n * 4: sign immediately follows currency symbol\n
+p_cs_precedes lconv.p_cs_precedes [char]\nwhether currency symbol precedes (1) or follows (0) positive monetary values\n
+p_sep_by_space lconv.p_sep_by_space [char]\nwhether currency symbol is (1) or is not (0) separated by space from non-negative monetary values\n
+p_sign_posn lconv.p_sign_posn [char]\nformat for non-negative monetary values, with values as for n_sign_posn\n
-localeconv localeconv(void) [lconv*]\nreturns pointer to formatting information for current locale
-setlocale setlocale(int category, const char* locale) [char*]\nSets components of locale according to specified `category` and `locale`.\nReturns string describing new locale or null on error. (Implementations are\npermitted to define values of `category` additional to those describe here.)
-LC_ALL LC_ALL\ncategory argument for all categories
-LC_NUMERIC LC_NUMERIC\ncategory for numeric formatting information
-LC_MONETARY LC_MONETARY\ncategory for monetary formatting information
-LC_COLLATE LC_COLLATE\ncategory for information affecting collating functions
-LC_CTYPE LC_CTYPE\ncategory for information affecting character class tests functions
-LC_TIME LC_TIME\ncategory for information affecting time conversions functions
-NULL NULL\nnull pointer constant
+localeconv localeconv(void) [lconv*]\nreturns pointer to formatting information for current locale\n
+setlocale setlocale(int category, const char* locale) [char*]\nSets components of locale according to specified `category` and `locale`. Returns string\ndescribing new locale or null on error. (Implementations are permitted to define values of\n`category` additional to those describe here.)\n
+LC_ALL LC_ALL\ncategory argument for all categories\n
+LC_NUMERIC LC_NUMERIC\ncategory for numeric formatting information\n
+LC_MONETARY LC_MONETARY\ncategory for monetary formatting information\n
+LC_COLLATE LC_COLLATE\ncategory for information affecting collating functions\n
+LC_CTYPE LC_CTYPE\ncategory for information affecting character class tests functions\n
+LC_TIME LC_TIME\ncategory for information affecting time conversions functions\n
+NULL NULL\nnull pointer constant\n
-HUGE_VAL HUGE_VAL\nmagnitude returned (with correct sign) on overflow error
-exp exp(double x) [double]\nexponential of `x`
-log log(double x) [double]\nnatural logarithm of `x`
-log10 log10(double x) [double]\nbase-10 logarithm of `x`
-pow pow(double x, double y) [double]\n`x` raised to power `y`
-sqrt sqrt(double x) [double]\nsquare root of `x`
-ceil ceil(double x) [double]\nsmallest integer not less than `x`
-floor floor(double x) [double]\nlargest integer not greater than `x`
-fabs fabs(double x) [double]\nabsolute value of `x`
-ldexp ldexp(double x, int n) [double]\n`x` times 2 to the power `n`
-frexp frexp(double x, int* exp) [double]\nif `x` non-zero, returns value, with absolute value in interval [1/2, 1), and\nassigns to `*exp` integer such that product of return value and 2 raised to the\npower `*exp` equals `x`; if `x` zero, both return value and `*exp` are zero
-modf modf(double x, double* ip) [double]\nreturns fractional part and assigns to `*ip` integral part of `x`, both with\nsame sign as `x`
-fmod fmod(double x, double y) [double]\nif `y` non-zero, floating-point remainder of `x`/`y`, with same sign as `x`; if\n`y` zero, result is implementation-defined
-sin sin(double x) [double]\nsine of `x`
-cos cos(double x) [double]\ncosine of `x`
-tan tan(double x) [double]\ntangent of `x`
-asin asin(double x) [double]\narc-sine of `x`
-acos acos(double x) [double]\narc-cosine of `x`
-atan atan(double x) [double]\narc-tangent of `x`
-atan2 atan2(double y, double x) [double]\narc-tangent of `y`/`x`
-sinh sinh(double x) [double]\nhyperbolic sine of `x`
-cosh cosh(double x) [double]\nhyperbolic cosine of `x`
-tanh tanh(double x) [double]\nhyperbolic tangent of `x`
+HUGE_VAL HUGE_VAL\nmagnitude returned (with correct sign) on overflow error\n
+exp exp(double x) [double]\nexponential of `x`\n
+log log(double x) [double]\nnatural logarithm of `x`\n
+log10 log10(double x) [double]\nbase-10 logarithm of `x`\n
+pow pow(double x, double y) [double]\n`x` raised to power `y`\n
+sqrt sqrt(double x) [double]\nsquare root of `x`\n
+ceil ceil(double x) [double]\nsmallest integer not less than `x`\n
+floor floor(double x) [double]\nlargest integer not greater than `x`\n
+fabs fabs(double x) [double]\nabsolute value of `x`\n
+ldexp ldexp(double x, int n) [double]\n`x` times 2 to the power `n`\n
+frexp frexp(double x, int* exp) [double]\nif `x` non-zero, returns value, with absolute value in interval [1/2, 1), and assigns to `*exp`\ninteger such that product of return value and 2 raised to the power `*exp` equals `x`; if `x`\nzero, both return value and `*exp` are zero\n
+modf modf(double x, double* ip) [double]\nreturns fractional part and assigns to `*ip` integral part of `x`, both with same sign as `x`\n
+fmod fmod(double x, double y) [double]\nif `y` non-zero, floating-point remainder of `x`/`y`, with same sign as `x`; if `y` zero,\nresult is implementation-defined\n
+sin sin(double x) [double]\nsine of `x`\n
+cos cos(double x) [double]\ncosine of `x`\n
+tan tan(double x) [double]\ntangent of `x`\n
+asin asin(double x) [double]\narc-sine of `x`\n
+acos acos(double x) [double]\narc-cosine of `x`\n
+atan atan(double x) [double]\narc-tangent of `x`\n
+atan2 atan2(double y, double x) [double]\narc-tangent of `y`/`x`\n
+sinh sinh(double x) [double]\nhyperbolic sine of `x`\n
+cosh cosh(double x) [double]\nhyperbolic cosine of `x`\n
+tanh tanh(double x) [double]\nhyperbolic tangent of `x`\n
-jmp_buf jmp_buf\ntype of object holding context information
-setjmp setjmp(jmp_buf env) [int]\nSaves context information in `env` and returns zero. Subsequent call to longjmp\nwith same `env` returns non-zero.
-longjmp longjmp(jmp_buf env, int val) [void]\nRestores context saved by most recent call to setjmp with specified `env`.\nExecution resumes as a second return from setjmp, with returned value `val` if\nspecified value non-zero, or 1 otherwise.
+jmp_buf jmp_buf\ntype of object holding context information\n
+setjmp setjmp(jmp_buf env) [int]\nSaves context information in `env` and returns zero. Subsequent call to longjmp with same `env`\nreturns non-zero.\n
+longjmp longjmp(jmp_buf env, int val) [void]\nRestores context saved by most recent call to setjmp with specified `env`. Execution resumes as\na second return from setjmp, with returned value `val` if specified value non-zero, or 1 otherwise.\n
-SIGABRT SIGABRT\nabnormal termination
-SIGFPE SIGFPE\narithmetic error
-SIGILL SIGILL\ninvalid execution
-SIGINT SIGINT\n(asynchronous) interactive attention
-SIGSEGV SIGSEGV\nillegal storage access
-SIGTERM SIGTERM\n(asynchronous) termination request
-SIG_DFL SIG_DFL\nspecifies default signal handling
-SIG_ERR SIG_ERR\nsignal return value indicating error
-SIG_IGN SIG_IGN\nspecifies that signal should be ignored
-raise raise(int sig) [int]\nSends signal sig. Returns zero on success.
+SIGABRT SIGABRT\nabnormal termination\n
+SIGFPE SIGFPE\narithmetic error\n
+SIGILL SIGILL\ninvalid execution\n
+SIGINT SIGINT\n(asynchronous) interactive attention\n
+SIGSEGV SIGSEGV\nillegal storage access\n
+SIGTERM SIGTERM\n(asynchronous) termination request\n
+SIG_DFL SIG_DFL\nspecifies default signal handling\n
+SIG_ERR SIG_ERR\nsignal return value indicating error\n
+SIG_IGN SIG_IGN\nspecifies that signal should be ignored\n
+raise raise(int sig) [int]\nSends signal sig. Returns zero on success.\n
-va_list va_list\ntype of object holding context information
-va_start va_start(va_list ap, lastarg) [void]\nInitialisation macro which must be called once before any unnamed argument is\naccessed. Stores context information in `ap`. `lastarg` is the last named\nparameter of the function.
-va_arg va_arg(va_list ap, type) [type]\nYields value of the type (`type`) and value of the next unnamed argument.
-va_end va_end(va_list ap) [void]\nTermination macro which must be called once after argument processing and before\nexit from function.
+va_list va_list\ntype of object holding context information\n
+va_start va_start(va_list ap, lastarg) [void]\nInitialisation macro which must be called once before any unnamed argument is accessed. Stores\ncontext information in `ap`. `lastarg` is the last named parameter of the function.\n
+va_arg va_arg(va_list ap, type) [type]\nYields value of the type (`type`) and value of the next unnamed argument.\n
+va_end va_end(va_list ap) [void]\nTermination macro which must be called once after argument processing and before exit from\nfunction.\n
-NULL NULL\nNull pointer constant.
-offsetof offsetof(stype, m)\nOffset (in bytes) of member m from start of structure type `stype`.
-ptrdiff_t ptrdiff_t\nType for objects declared to store result of subtracting pointers.
-size_t size_t\nType for objects declared to store result of sizeof operator.
+NULL NULL\nNull pointer constant.\n
+offsetof offsetof(stype, m)\nOffset (in bytes) of member m from start of structure type `stype`.\n
+ptrdiff_t ptrdiff_t\nType for objects declared to store result of subtracting pointers.\n
+size_t size_t\nType for objects declared to store result of sizeof operator.\n
-BUFSIZ BUFSIZ\nSize of buffer used by setbuf.
-EOF EOF\nValue used to indicate end-of-stream or to report an error.
-FILENAME_MAX FILENAME_MAX\nMaximum length required for array of characters to hold a filename.
-FOPEN_MAX FOPEN_MAX\nMaximum number of files which may be open simultaneously.
-L_tmpnam L_tmpnam\nNumber of characters required for temporary filename generated by tmpnam.
-NULL NULL\nNull pointer constant.
-SEEK_CUR SEEK_CUR\nValue for origin argument to fseek specifying current file position.
-SEEK_END SEEK_END\nValue for origin argument to fseek specifying end of file.
-SEEK_SET SEEK_SET\nValue for origin argument to fseek specifying beginning of file.
-TMP_MAX TMP_MAX\nMinimum number of unique filenames generated by calls to tmpnam.
-_IOFBF _IOFBF\nValue for mode argument to setvbuf specifying full buffering.
-_IOLBF _IOLBF\nValue for mode argument to setvbuf specifying line buffering.
-_IONBF _IONBF\nValue for mode argument to setvbuf specifying no buffering.
-stdin stdin\nFile pointer for standard input stream. Automatically opened when program\nexecution begins.
-stdout stdout\nFile pointer for standard output stream. Automatically opened when program\nexecution begins.
-stderr stderr\nFile pointer for standard error stream. Automatically opened when program\nexecution begins.
-FILE FILE\nType of object holding information necessary to control a stream.
-fpos_t fpos_t\nType for objects declared to store file position information.
-size_t size_t\nType for objects declared to store result of sizeof operator.
-fopen fopen(const char* filename, const char* mode) [FILE*]\nOpens file named `filename` and returns a stream, or NULL on failure. `mode` may\nbe one of the following for text files:\n "r": text reading\n "w": text writing\n "a": text append\n "r+": text update (reading and writing)\n "w+": text update, discarding previous content (if any)\n "a+": text append, reading, and writing at end\nor one of those strings with b included (after the first character), for\nbinary files.
-freopen freopen(const char* filename, const char* mode, FILE* stream) [FILE*]\nCloses file associated with `stream`, then opens file `filename` with specified\nmode and associates it with `stream`. Returns `stream` or NULL on error.
-fflush fflush(FILE* stream) [int]\nFlushes stream `stream` and returns zero on success or EOF on error. Effect\nundefined for input stream. fflush(NULL) flushes all output streams.
-fclose fclose(FILE* stream) [int]\nCloses stream `stream` (after flushing, if output stream). Returns EOF on error,\nzero otherwise.
-remove remove(const char* filename) [int]\nRemoves specified file. Returns non-zero on failure.
-rename rename(const char* oldname, const char* newname) [int]\nChanges name of file `oldname` to `newname`. Returns non-zero on failure.
-tmpfile tmpfile() [FILE*]\nCreates temporary file (mode "wb+") which will be removed when closed or on\nnormal program termination. Returns stream or NULL on failure.
-tmpnam tmpnam(char s[L_tmpnam]) [char*]\nAssigns to `s` (if `s` non-null) and returns unique name for a temporary file.\nUnique name is returned for each of the first TMP_MAX invocations.
-setvbuf setvbuf(FILE* stream, char* buf, int mode, size_t size) [int]\nControls buffering for stream `stream`. mode is _IOFBF for full buffering,\n_IOLBF for line buffering, _IONBF for no buffering. Non-null `buf` specifies\nbuffer of size `size` to be used; otherwise, a buffer is allocated. Returns\nnon-zero on error. Call must be before any other operation on stream.
-setbuf setbuf(FILE* stream, char* buf) [void]\nControls buffering for stream `stream`. For null `buf`, turns off buffering,\notherwise equivalent to `(void)setvbuf(stream, buf, _IOFBF, BUFSIZ)`.
-fprintf fprintf(FILE* stream, const char* format, ...) [int]\nConverts (according to format `format`) and writes output to stream `stream`.\nNumber of characters written, or negative value on error, is returned.\nConversion specifications consist of:\n * %\n * (optional) flag:\n -: left adjust\n +: always sign\n space: space if no sign\n 0: zero pad\n #: Alternate form: for conversion character o, first digit will be zero, for\n [xX], prefix 0x or 0X to non-zero value, for [eEfgG], always decimal\n point, for [gG] trailing zeros not removed.\n * (optional) minimum width: if specified as *, value taken from next argument\n (which must be int).\n * (optional) . (separating width from precision):\n * (optional) precision: for conversion character s, maximum characters to be\n printed from the string, for [eEf], digits after decimal point, for [gG],\n significant digits, for an integer, minimum number of digits to be printed.\n If specified as *, value taken from next argument (which must be int).\n * (optional) length modifier:\n h: short or unsigned short\n l: long or unsigned long\n L: long double\n * conversion character:\n d,i: int argument, printed in signed decimal notation\n o: int argument, printed in unsigned octal notation\n x,X: int argument, printed in unsigned hexadecimal notation\n u: int argument, printed in unsigned decimal notation\n c: int argument, printed as single character\n s: char* argument\n f: double argument, printed with format [-]mmm.ddd\n e,E: double argument, printed with format [-]m.dddddd(e|E)(+|-)xx\n g,G: double argument\n p: void* argument, printed as pointer\n n: int* argument : the number of characters written to this point is written\n into argument\n %: no argument; prints %
-printf printf(const char* format, ...) [int]\nprintf(f, ...) is equivalent to fprintf(stdout, f, ...)
-sprintf sprintf(char* s, const char* format, ...) [int]\nLike fprintf, but output written into string `s`, which *must be large enough to\nhold the output*, rather than to a stream. Output is NUL-terminated. Returns\nlength (excluding the terminating NUL).
-vfprintf vfprintf(FILE* stream, const char* format, va_list arg) [int]\nEquivalent to fprintf with variable argument list replaced by `arg`, which must\nhave been initialised by the va_start macro (and may have been used in calls to\nva_arg).
-vprintf vprintf(const char* format, va_list arg) [int]\nEquivalent to printf with variable argument list replaced by `arg`, which must\nhave been initialised by the va_start macro (and may have been used in calls to\nva_arg).
-vsprintf vsprintf(char* s, const char* format, va_list arg) [int]\nEquivalent to sprintf with variable argument list replaced by `arg`, which must\nhave been initialised by the va_start macro (and may have been used in calls to\nva_arg).
-fscanf fscanf(FILE* stream, const char* format, ...) [int]\nPerforms formatted input conversion, reading from stream `stream` according to\nformat `format`. The function returns when `format` is fully processed. Returns\nnumber of items converted and assigned, or EOF if end-of-file or error occurs\nbefore any conversion. Each of the arguments following format *must be a\npointer*. Format string may contain:\n * blanks and tabs, which are ignored\n * ordinary characters, which are expected to match next non-white-space of\n input\n * conversion specifications, consisting of:\n * %\n * (optional) assignment suppression character "*"\n * (optional) maximum field width\n * (optional) target width indicator:\n h: argument is pointer to short rather than int\n l: argument is pointer to long rather than int, or double rather than\n float\n L: argument is pointer to long double rather than float\n * conversion character:\n d: decimal integer; int* parameter required\n i: integer; int* parameter required; decimal, octal or hex\n o: octal integer; int* parameter required\n u: unsigned decimal integer; unsigned int* parameter required\n x: hexadecimal integer; int* parameter required\n c: characters; char* parameter required; white-space is not skipped, and\n NUL-termination is not performed\n s: string of non-white-space; char* parameter required; string is\n NUL-terminated\n e,f,g: floating-point number; float* parameter required\n p: pointer value; void* parameter required\n n: chars read so far; int* parameter required\n [...]: longest non-empty string from specified set; char* parameter\n required; string is NUL-terminated\n [^...]: longest non-empty string not from specified set; char* parameter\n required; string is NUL-terminated\n %: literal %; no assignment
-scanf scanf(const char* format, ...) [int]\nscanf(f, ...) is equivalent to fscanf(stdin, f, ...)
-sscanf sscanf(char* s, const char* format, ...) [int]\nLike fscanf, but input read from string `s`.
-fgetc fgetc(FILE* stream) [int]\nReturns next character from (input) stream `stream`, or EOF on end-of-file or\nerror.
-fgets fgets(char* s, int n, FILE* stream) [char*]\nCopies characters from (input) stream `stream` to `s`, stopping when `n`-1\ncharacters copied, newline copied, end-of-file reached or error occurs. If no\nerror, `s` is NUL-terminated. Returns NULL on end-of-file or error, `s`\notherwise.
-fputc fputc(int c, FILE* stream) [int]\nWrites `c`, to stream `stream`. Returns `c`, or EOF on error.
-fputs fputs(const char* s, FILE* stream) [char*]\nWrites `s`, to (output) stream `stream`. Returns non-negative on success or EOF\non error.
-getc getc(FILE* stream) [int]\nEquivalent to fgetc except that it may be a macro.
-getchar getchar(void) [int]\nEquivalent to getc(stdin).
-gets gets(char* s) [char*]\nCopies characters from stdin into `s` until newline encountered, end-of-file\nreached, or error occurs. Does not copy newline. NUL-terminates `s`. Returns\n`s`, or NULL on end-of-file or error. *Should not be used because of the\npotential for buffer overflow.*
-putc putc(int c, FILE* stream) [int]\nEquivalent to fputc except that it may be a macro.
-putchar putchar(int c) [int]\nputchar(c) is equivalent to putc(c, stdout).
-puts puts(const char* s) [int]\nWrites `s` (excluding terminating NUL) and a newline to stdout. Returns\nnon-negative on success, EOF on error.
-ungetc ungetc(int c, FILE* stream) [int]\nPushes `c` (which must not be EOF), onto (input) stream `stream` such that it\nwill be returned by the next read. Only one character of pushback is guaranteed\n(for each stream). Returns `c`, or EOF on error.
-fread fread(void* ptr, size_t size, size_t nobj, FILE* stream) [size_t]\nReads (at most) `nobj` objects of size `size` from stream `stream` into `ptr`\nand returns number of objects read. (feof and ferror can be used to check\nstatus.)
-fwrite fwrite(const void* ptr, size_t size, size_t nobj, FILE* stream) [size_t]\nWrites to stream `stream`, `nobj` objects of size `size` from array `ptr`.\nReturns number of objects written.
-fseek fseek(FILE* stream, long offset, int origin) [int]\nSets file position for stream `stream` and clears end-of-file indicator. For a\nbinary stream, file position is set to `offset` bytes from the position\nindicated by `origin`: beginning of file for SEEK_SET, current position for\nSEEK_CUR, or end of file for SEEK_END. Behaviour is similar for a text stream,\nbut `offset` must be zero or, for SEEK_SET only, a value returned by ftell.\nReturns non-zero on error.
-ftell ftell(FILE* stream) [long]\nReturns current file position for stream `stream`, or -1 on error.
-rewind rewind(FILE* stream) [void]\nEquivalent to fseek(stream, 0L, SEEK_SET); clearerr(stream).
-fgetpos fgetpos(FILE* stream, fpos_t* ptr) [int]\nStores current file position for stream `stream` in `*ptr`. Returns non-zero on\nerror.
-fsetpos fsetpos(FILE* stream, const fpos_t* ptr) [int]\nSets current position of stream `stream` to `*ptr`. Returns non-zero on error.
-clearerr clearerr(FILE* stream) [void]\nClears end-of-file and error indicators for stream `stream`.
-feof feof(FILE* stream) [int]\nReturns non-zero if end-of-file indicator is set for stream `stream`.
-ferror ferror(FILE* stream) [int]\nReturns non-zero if error indicator is set for stream `stream`.
-perror perror(const char* s) [void]\nPrints `s` (if non-null) and strerror(errno) to standard error as would:\n fprintf(stderr, "%s: %s\\n", (s != NULL ? s : ""), strerror(errno))
+BUFSIZ BUFSIZ\nSize of buffer used by setbuf.\n
+EOF EOF\nValue used to indicate end-of-stream or to report an error.\n
+FILENAME_MAX FILENAME_MAX\nMaximum length required for array of characters to hold a filename.\n
+FOPEN_MAX FOPEN_MAX\nMaximum number of files which may be open simultaneously.\n
+L_tmpnam L_tmpnam\nNumber of characters required for temporary filename generated by tmpnam.\n
+NULL NULL\nNull pointer constant.\n
+SEEK_CUR SEEK_CUR\nValue for origin argument to fseek specifying current file position.\n
+SEEK_END SEEK_END\nValue for origin argument to fseek specifying end of file.\n
+SEEK_SET SEEK_SET\nValue for origin argument to fseek specifying beginning of file.\n
+TMP_MAX TMP_MAX\nMinimum number of unique filenames generated by calls to tmpnam.\n
+_IOFBF _IOFBF\nValue for mode argument to setvbuf specifying full buffering.\n
+_IOLBF _IOLBF\nValue for mode argument to setvbuf specifying line buffering.\n
+_IONBF _IONBF\nValue for mode argument to setvbuf specifying no buffering.\n
+stdin stdin\nFile pointer for standard input stream. Automatically opened when program execution begins.\n
+stdout stdout\nFile pointer for standard output stream. Automatically opened when program execution begins.\n
+stderr stderr\nFile pointer for standard error stream. Automatically opened when program execution begins.\n
+FILE FILE\nType of object holding information necessary to control a stream.\n
+fpos_t fpos_t\nType for objects declared to store file position information.\n
+size_t size_t\nType for objects declared to store result of sizeof operator.\n
+fopen fopen(const char* filename, const char* mode) [FILE*]\nOpens file named `filename` and returns a stream, or NULL on failure. `mode` may be one of the\nfollowing for text files:\n\n * "r": text reading\n * "w": text writing\n * "a": text append\n * "r+": text update (reading and writing)\n * "w+": text update, discarding previous content (if any)\n * "a+": text append, reading, and writing at end\n \nor one of those strings with b included (after the first character), for binary files.\n
+freopen freopen(const char* filename, const char* mode, FILE* stream) [FILE*]\nCloses file associated with `stream`, then opens file `filename` with specified mode and\nassociates it with `stream`. Returns `stream` or NULL on error.\n
+fflush fflush(FILE* stream) [int]\nFlushes stream `stream` and returns zero on success or EOF on error. Effect undefined for input\nstream. fflush(NULL) flushes all output streams.\n
+fclose fclose(FILE* stream) [int]\nCloses stream `stream` (after flushing, if output stream). Returns EOF on error, zero otherwise.\n
+remove remove(const char* filename) [int]\nRemoves specified file. Returns non-zero on failure.\n
+rename rename(const char* oldname, const char* newname) [int]\nChanges name of file `oldname` to `newname`. Returns non-zero on failure.\n
+tmpfile tmpfile() [FILE*]\nCreates temporary file (mode "wb+") which will be removed when closed or on normal program\ntermination. Returns stream or NULL on failure.\n
+tmpnam tmpnam(char s[L_tmpnam]) [char*]\nAssigns to `s` (if `s` non-null) and returns unique name for a temporary file. Unique name is\nreturned for each of the first TMP_MAX invocations.\n
+setvbuf setvbuf(FILE* stream, char* buf, int mode, size_t size) [int]\nControls buffering for stream `stream`. mode is _IOFBF for full buffering, _IOLBF for line\nbuffering, _IONBF for no buffering. Non-null `buf` specifies buffer of size `size` to be used;\notherwise, a buffer is allocated. Returns non-zero on error. Call must be before any other\noperation on stream.\n
+setbuf setbuf(FILE* stream, char* buf) [void]\nControls buffering for stream `stream`. For null `buf`, turns off buffering, otherwise equivalent\nto `(void)setvbuf(stream, buf, _IOFBF, BUFSIZ)`.\n
+fprintf fprintf(FILE* stream, const char* format, ...) [int]\nConverts (according to format `format`) and writes output to stream `stream`. Number of\ncharacters written, or negative value on error, is returned. Conversion specifications consist of:\n\n * %\n * (optional) flag:\n -: left adjust\n +: always sign\n space: space if no sign\n 0: zero pad\n #: Alternate form: for conversion character o, first digit will be zero, for [xX], prefix 0x or\n 0X to non-zero value, for [eEfgG], always decimal point, for [gG] trailing zeros not removed.\n * (optional) minimum width: if specified as *, value taken from next argument (which must\n be int).\n * (optional) . (separating width from precision):\n * (optional) precision: for conversion character s, maximum characters to be printed from the\n string, for [eEf], digits after decimal point, for [gG], significant digits, for an integer,\n minimum number of digits to be printed. If specified as *, value taken from next argument\n (which must be int).\n * (optional) length modifier:\n h: short or unsigned short\n l: long or unsigned long\n L: long double\n * conversion character:\n d,i: int argument, printed in signed decimal notation\n o: int argument, printed in unsigned octal notation\n x,X: int argument, printed in unsigned hexadecimal notation\n u: int argument, printed in unsigned decimal notation\n c: int argument, printed as single character\n s: char* argument\n f: double argument, printed with format [-]mmm.ddd\n e,E: double argument, printed with format [-]m.dddddd(e|E)(+|-)xx\n g,G: double argument\n p: void* argument, printed as pointer\n n: int* argument : the number of characters written to this point is written into argument\n %: no argument; prints %\n
+printf printf(const char* format, ...) [int]\nprintf(f, ...) is equivalent to fprintf(stdout, f, ...)\n
+sprintf sprintf(char* s, const char* format, ...) [int]\nLike fprintf, but output written into string `s`, which *must be large enough to hold the output*,\nrather than to a stream. Output is NUL-terminated. Returns length (excluding the terminating NUL).\n
+vfprintf vfprintf(FILE* stream, const char* format, va_list arg) [int]\nEquivalent to fprintf with variable argument list replaced by `arg`, which must have been\ninitialised by the va_start macro (and may have been used in calls to va_arg).\n
+vprintf vprintf(const char* format, va_list arg) [int]\nEquivalent to printf with variable argument list replaced by `arg`, which must have been\ninitialised by the va_start macro (and may have been used in calls to va_arg).\n
+vsprintf vsprintf(char* s, const char* format, va_list arg) [int]\nEquivalent to sprintf with variable argument list replaced by `arg`, which must have been\ninitialised by the va_start macro (and may have been used in calls to va_arg).\n
+fscanf fscanf(FILE* stream, const char* format, ...) [int]\nPerforms formatted input conversion, reading from stream `stream` according to format `format`. The\nfunction returns when `format` is fully processed. Returns number of items converted and assigned,\nor EOF if end-of-file or error occurs before any conversion. Each of the arguments following\nformat *must be a pointer*. Format string may contain:\n\n * blanks and tabs, which are ignored\n * ordinary characters, which are expected to match next non-white-space of input\n * conversion specifications, consisting of:\n * %\n * (optional) assignment suppression character "*"\n * (optional) maximum field width\n * (optional) target width indicator:\n h: argument is pointer to short rather than int\n l: argument is pointer to long rather than int, or double rather than float\n L: argument is pointer to long double rather than float\n * conversion character:\n d: decimal integer; int* parameter required\n i: integer; int* parameter required; decimal, octal or hex\n o: octal integer; int* parameter required\n u: unsigned decimal integer; unsigned int* parameter required\n x: hexadecimal integer; int* parameter required\n c: characters; char* parameter required; white-space is not skipped, and NUL-termination is\n not performed\n s: string of non-white-space; char* parameter required; string is NUL-terminated\n e,f,g: floating-point number; float* parameter required\n p: pointer value; void* parameter required\n n: chars read so far; int* parameter required\n [...]: longest non-empty string from specified set; char* parameter required; string is\n NUL-terminated\n [^...]: longest non-empty string not from specified set; char* parameter required; string is\n NUL-terminated\n %: literal %; no assignment\n
+scanf scanf(const char* format, ...) [int]\nscanf(f, ...) is equivalent to fscanf(stdin, f, ...)\n
+sscanf sscanf(char* s, const char* format, ...) [int]\nLike fscanf, but input read from string `s`.\n
+fgetc fgetc(FILE* stream) [int]\nReturns next character from (input) stream `stream`, or EOF on end-of-file or error.\n
+fgets fgets(char* s, int n, FILE* stream) [char*]\nCopies characters from (input) stream `stream` to `s`, stopping when `n`-1 characters copied,\nnewline copied, end-of-file reached or error occurs. If no error, `s` is NUL-terminated. Returns\nNULL on end-of-file or error, `s` otherwise.\n
+fputc fputc(int c, FILE* stream) [int]\nWrites `c`, to stream `stream`. Returns `c`, or EOF on error.\n
+fputs fputs(const char* s, FILE* stream) [char*]\nWrites `s`, to (output) stream `stream`. Returns non-negative on success or EOF on error.\n
+getc getc(FILE* stream) [int]\nEquivalent to fgetc except that it may be a macro.\n
+getchar getchar(void) [int]\nEquivalent to getc(stdin).\n
+gets gets(char* s) [char*]\nCopies characters from stdin into `s` until newline encountered, end-of-file reached, or error\noccurs. Does not copy newline. NUL-terminates `s`. Returns `s`, or NULL on end-of-file or\nerror. *Should not be used because of the potential for buffer overflow.*\n
+putc putc(int c, FILE* stream) [int]\nEquivalent to fputc except that it may be a macro.\n
+putchar putchar(int c) [int]\nputchar(c) is equivalent to putc(c, stdout).\n
+puts puts(const char* s) [int]\nWrites `s` (excluding terminating NUL) and a newline to stdout. Returns non-negative on success,\nEOF on error.\n
+ungetc ungetc(int c, FILE* stream) [int]\nPushes `c` (which must not be EOF), onto (input) stream `stream` such that it will be returned\nby the next read. Only one character of pushback is guaranteed (for each stream). Returns `c`,\nor EOF on error.\n
+fread fread(void* ptr, size_t size, size_t nobj, FILE* stream) [size_t]\nReads (at most) `nobj` objects of size `size` from stream `stream` into `ptr` and returns number\nof objects read. (feof and ferror can be used to check status.)\n
+fwrite fwrite(const void* ptr, size_t size, size_t nobj, FILE* stream) [size_t]\nWrites to stream `stream`, `nobj` objects of size `size` from array `ptr`. Returns number of\nobjects written.\n
+fseek fseek(FILE* stream, long offset, int origin) [int]\nSets file position for stream `stream` and clears end-of-file indicator. For a binary stream,\nfile position is set to `offset` bytes from the position indicated by `origin`: beginning of file\nfor SEEK_SET, current position for SEEK_CUR, or end of file for SEEK_END. Behaviour is similar\nfor a text stream, but `offset` must be zero or, for SEEK_SET only, a value returned by ftell.\nReturns non-zero on error.\n
+ftell ftell(FILE* stream) [long]\nReturns current file position for stream `stream`, or -1 on error.\n
+rewind rewind(FILE* stream) [void]\nEquivalent to fseek(stream, 0L, SEEK_SET); clearerr(stream).\n
+fgetpos fgetpos(FILE* stream, fpos_t* ptr) [int]\nStores current file position for stream `stream` in `*ptr`. Returns non-zero on error.\n
+fsetpos fsetpos(FILE* stream, const fpos_t* ptr) [int]\nSets current position of stream `stream` to `*ptr`. Returns non-zero on error.\n
+clearerr clearerr(FILE* stream) [void]\nClears end-of-file and error indicators for stream `stream`.\n
+feof feof(FILE* stream) [int]\nReturns non-zero if end-of-file indicator is set for stream `stream`.\n
+ferror ferror(FILE* stream) [int]\nReturns non-zero if error indicator is set for stream `stream`.\n
+perror perror(const char* s) [void]\nPrints `s` (if non-null) and strerror(errno) to standard error as would:\n\n fprintf(stderr, "%s: %s\n", (s != NULL ? s : ""), strerror(errno))\n
-EXIT_FAILURE EXIT_FAILURE\nValue for status argument to exit indicating failure.
-EXIT_SUCCESS EXIT_SUCCESS\nValue for status argument to exit indicating success.
-RAND_MAX RAND_MAX\nMaximum value returned by rand().
-NULL NULL\nNull pointer constant.
-div_t div_t\nReturn type of div().
-quot div_t.quot [int]\nquotient
-rem div_t.rem [int]\nremainder
-ldiv_t ldiv_t\nReturn type of ldiv().
-qout ldiv_t.quot [long]\nquotient
-rem ldiv_t.rem [long]\nremainder
-size_t size_t\nType for objects declared to store result of sizeof operator.
-abs abs(int n) [int]
-labs labs(long n) [long]\nReturns absolute value of `n`.
-div div(int num, int denom) [div_t]
-ldiv ldiv(long num, long denom) [ldiv_t]\nReturns quotient and remainder of `num`/`denom`.
-atof atof(const char* s) [double]\nEquivalent to strtod(s, (char**)NULL) except that errno is not necessarily set\non conversion error.
-atoi atoi(const char* s) [int]\nEquivalent to (int)strtol(s, (char**)NULL, 10) except that errno is not\nnecessarily set on conversion error.
-atol atol(const char* s) [long]\nEquivalent to strtol(s, (char**)NULL, 10) except that errno is not necessarily\nset on conversion error.
-strtod strtod(const char* s, char** endp) [double]\nConverts initial characters (ignoring leading white space) of `s` to type\ndouble. If `endp` non-null, stores pointer to unconverted suffix in `*endp`. On\noverflow, sets errno to ERANGE and returns HUGE_VAL with the appropriate sign;\non underflow, sets errno to ERANGE and returns zero; otherwise returns converted\nvalue.
-strtol strtol(const char* s, char** endp, int base) [long]\nConverts initial characters (ignoring leading white space) of `s` to type long.\nIf `endp` non-null, stores pointer to unconverted suffix in `*endp`. If base\nbetween 2 and 36, that base used for conversion; if zero, leading (after any\nsign) 0X or 0x implies hexadecimal, leading 0 (after any sign) implies octal,\notherwise decimal assumed. Leading 0X or 0x permitted for base hexadecimal. On\noverflow, sets errno to ERANGE and returns LONG_MAX or LONG_MIN (as appropriate\nfor sign); otherwise returns converted value.
-strtoul strtoul(const char* s, char** endp, int base) [unsigned long]\nAs for strtol except result is unsigned long and value on overflow is ULONG_MAX.
-calloc calloc(size_t nobj, size_t size) [void*]\nReturns pointer to _zero-initialised_ newly-allocated space for an array of\n`nobj` objects each of size `size`, or NULL on error.
-malloc malloc(size_t size) [void*]\nReturns pointer to _uninitialised_ newly-allocated space for an object of size\n`size`, or NULL on error.
-realloc realloc(void* p, size_t size) [void*]\nReturns pointer to newly-allocated space for an object of size `size`,\ninitialised, to minimum of old and new sizes, to existing contents of `p` (if\nnon-null), or NULL on error. On success, old object deallocated, otherwise\nunchanged.
-free free(void* p) [void]\nIf `p` non-null, deallocates space to which it points.
-abort abort() [void]\nTerminates program abnormally, by calling raise(SIGABRT).
-exit exit(int status) [void]\nTerminates program normally. Functions installed using atexit are called (in\nreverse order to that in which installed), open files are flushed, open streams\nare closed and control is returned to environment. `status` is returned to\nenvironment in implementation-dependent manner. Zero or EXIT_SUCCESS indicates\nsuccessful termination and EXIT_FAILURE indicates unsuccessful termination.\nImplementations may define other values.
-atexit atexit(void (*fcm)(void)) [int]\nRegisters `fcn` to be called when program terminates normally (or when main\nreturns). Returns non-zero on failure.
-system system(const char* s) [int]\nIf `s` is not NULL, passes `s` to environment for execution, and returns \nreported by command processor; if `s` is NULL, non-zero returned if environment\nhas a command processor.
-getenv getenv(const char* name) [char*]\nReturns string associated with name `name` from implementation's environment, or\nNULL if no such string exists.
-bsearch bsearch(const void* key, const void* base, size_t n, size_t size, int (*cmp)(const void* keyval, const void* datum)) [void*]\nSearches ordered array `base` (of `n` objects each of size `size`) for item\nmatching key according to comparison function `cmp`. `cmp` must return negative\nvalue if first argument is less than second, zero if equal and positive if\ngreater. Items of `base` are assumed to be in ascending order (according to\n`cmp`). Returns a pointer to an item matching `key`, or NULL if none found.
-qsort qsort(void* base, size_t n, size_t size, int (*cmp)(const void*, const void*)) [void]\nArranges into ascending order array `base` (of `n` objects each of size `size`)\naccording to comparison function `cmp`. `cmp` must return negative value if\nfirst argument is less than second, zero if equal and positive if greater.
-rand rand(void) [int]\nReturns pseudo-random number in range 0 to RAND_MAX.
-srand srand(unsigned int seed) [void]\nUses seed as seed for new sequence of pseudo-random numbers. Initial seed is 1.
+EXIT_FAILURE EXIT_FAILURE\nValue for status argument to exit indicating failure.\n
+EXIT_SUCCESS EXIT_SUCCESS\nValue for status argument to exit indicating success.\n
+RAND_MAX RAND_MAX\nMaximum value returned by rand().\n
+NULL NULL\nNull pointer constant.\n
+div_t div_t\nReturn type of div().\n
+quot div_t.quot [int]\nquotient\n
+rem div_t.rem [int]\nremainder\n
+ldiv_t ldiv_t\nReturn type of ldiv().\n
+qout ldiv_t.quot [long]\nquotient\n
+rem ldiv_t.rem [long]\nremainder\n
+size_t size_t\nType for objects declared to store result of sizeof operator.\n
+abs abs(int n) [int]\n
+labs labs(long n) [long]\nReturns absolute value of `n`.\n
+div div(int num, int denom) [div_t]\n
+ldiv ldiv(long num, long denom) [ldiv_t]\nReturns quotient and remainder of `num`/`denom`.\n
+atof atof(const char* s) [double]\nEquivalent to strtod(s, (char**)NULL) except that errno is not necessarily set on conversion error.\n
+atoi atoi(const char* s) [int]\nEquivalent to (int)strtol(s, (char**)NULL, 10) except that errno is not necessarily set on\nconversion error.\n
+atol atol(const char* s) [long]\nEquivalent to strtol(s, (char**)NULL, 10) except that errno is not necessarily set on conversion\nerror.\n
+strtod strtod(const char* s, char** endp) [double]\nConverts initial characters (ignoring leading white space) of `s` to type double. If `endp`\nnon-null, stores pointer to unconverted suffix in `*endp`. On overflow, sets errno to ERANGE and\nreturns HUGE_VAL with the appropriate sign; on underflow, sets errno to ERANGE and returns zero;\notherwise returns converted value.\n
+strtol strtol(const char* s, char** endp, int base) [long]\nConverts initial characters (ignoring leading white space) of `s` to type long. If `endp`\nnon-null, stores pointer to unconverted suffix in `*endp`. If base between 2 and 36, that base\nused for conversion; if zero, leading (after any sign) 0X or 0x implies hexadecimal, leading 0\n(after any sign) implies octal, otherwise decimal assumed. Leading 0X or 0x permitted for base\nhexadecimal. On overflow, sets errno to ERANGE and returns LONG_MAX or LONG_MIN (as appropriate\nfor sign); otherwise returns converted value.\n
+strtoul strtoul(const char* s, char** endp, int base) [unsigned long]\nAs for strtol except result is unsigned long and value on overflow is ULONG_MAX.\n
+calloc calloc(size_t nobj, size_t size) [void*]\nReturns pointer to _zero-initialised_ newly-allocated space for an array of `nobj` objects each\nof size `size`, or NULL on error.\n
+malloc malloc(size_t size) [void*]\nReturns pointer to _uninitialised_ newly-allocated space for an object of size `size`, or NULL\non error.\n
+realloc realloc(void* p, size_t size) [void*]\nReturns pointer to newly-allocated space for an object of size `size`, initialised, to minimum\nof old and new sizes, to existing contents of `p` (if non-null), or NULL on error. On success,\nold object deallocated, otherwise unchanged.\n
+free free(void* p) [void]\nIf `p` non-null, deallocates space to which it points.\n
+abort abort() [void]\nTerminates program abnormally, by calling raise(SIGABRT).\n
+exit exit(int status) [void]\nTerminates program normally. Functions installed using atexit are called (in reverse order to\nthat in which installed), open files are flushed, open streams are closed and control is returned\nto environment. `status` is returned to environment in implementation-dependent manner. Zero or\nEXIT_SUCCESS indicates successful termination and EXIT_FAILURE indicates unsuccessful termination.\nImplementations may define other values.\n
+atexit atexit(void (*fcm)(void)) [int]\nRegisters `fcn` to be called when program terminates normally (or when main returns). Returns\nnon-zero on failure.\n
+system system(const char* s) [int]\nIf `s` is not NULL, passes `s` to environment for execution, and returns reported by command\nprocessor; if `s` is NULL, non-zero returned if environment has a command processor.\n
+getenv getenv(const char* name) [char*]\nReturns string associated with name `name` from implementation's environment, or NULL if no\nsuch string exists.\n
+bsearch bsearch(const void* key, const void* base, size_t n, size_t size, int (*cmp)(const void* keyval, const void* datum)) [void*]\nSearches ordered array `base` (of `n` objects each of size `size`) for item matching key according\nto comparison function `cmp`. `cmp` must return negative value if first argument is less than\nsecond, zero if equal and positive if greater. Items of `base` are assumed to be in ascending\norder (according to `cmp`). Returns a pointer to an item matching `key`, or NULL if none found.\n
+qsort qsort(void* base, size_t n, size_t size, int (*cmp)(const void*, const void*)) [void]\nArranges into ascending order array `base` (of `n` objects each of size `size`) according to\ncomparison function `cmp`. `cmp` must return negative value if first argument is less than\nsecond, zero if equal and positive if greater.\n
+rand rand(void) [int]\nReturns pseudo-random number in range 0 to RAND_MAX.\n
+srand srand(unsigned int seed) [void]\nUses seed as seed for new sequence of pseudo-random numbers. Initial seed is 1.\n
-NULL NULL\nNull pointer constant.
-size_t size_t\nType for objects declared to store result of sizeof operator.
-strcpy strcpy(char* s, const char* ct) [char*]\nCopies `ct` to `s` including terminating NUL and returns `s`.
-strncpy strncpy(char* s, const char* ct, size_t n) [char*]\nCopies at most `n` characters of `ct` to `s`. Pads with NUL characters if `ct`\nis of length less than `n`. *Note that this may leave `s` without\nNUL-termination.* Return `s`.
-strcat strcat(char* s, const char* ct) [char*]\nConcatenate `ct` to `s` and return `s`.
-strncat strncat(char* s, const char* ct, size_t n) [char*]\nConcatenate at most `n` characters of `ct` to `s`. NUL-terminates `s` and return it.
-strcmp strcmp(const char* cs, const char* ct) [int]\nCompares `cs` with `ct`, returning negative value if `cs`<`ct`, zero if\n`cs`==`ct`, positive value if `cs`>`ct`.
-strncmp strncmp(const char* cs, const char* ct, size_t n) [int]\nCompares at most (the first) `n` characters of `cs` and `ct`, returning negative\nvalue if `cs`<`ct`, zero if `cs`==`ct`, positive value if `cs`>`ct`.
-strcoll strcoll(const char* cs, const char* ct) [int]\nCompares `cs` with `ct` according to locale, returning negative value if\n`cs`<`ct`, zero if `cs`==`ct`, positive value if `cs`>`ct`.
-strchr strchr(const char* cs, int c) [char*]\nReturns pointer to first occurrence of `c` in `cs`, or NULL if not found.
-strrchr strrchr(const char* cs, int c) [char*]\nReturns pointer to last occurrence of `c` in `cs`, or NULL if not found.
-strspn strspn(const char* cs, const char* ct) [size_t]\nReturns length of prefix of `cs` which consists of characters which are in `ct`.
-strcspn strcspn(const char* cs, const char* ct) [size_t]\nReturns length of prefix of `cs` which consists of characters which are not in\n`ct`.
-strpbrk strpbrk(const char* cs, const char* ct) [char*]\nReturns pointer to first occurrence in `cs` of any character of `ct`, or NULL if\nnone is found.
-strstr strstr(const char* cs, const char* ct) [char*]\nReturns pointer to first occurrence of `ct` within `cs`, or NULL if none is\nfound.
-strlen strlen(const char* cs) [size_t]\nReturns length of `cs`.
-strerror strerror(int n) [char*]\nReturns pointer to implementation-defined message string corresponding with\nerror `n`.
-strtok strtok(char* s, const char* t) [char*]\nSearches `s` for next token delimited by any character from `ct`. Non-NULL `s`\nindicates the first call of a sequence. If a token is found, it is\nNUL-terminated and returned, otherwise NULL is returned. `ct` need not be\nidentical for each call in a sequence.
-strxfrm strxfrm(char* s, const char* ct, size_t n) [size_t]\nStores in `s` no more than `n` characters (including terminating NUL) of a\nstring produced from `ct` according to a locale-specific transformation. Returns\nlength of entire transformed string.
-memcpy memcpy(void* s, const void* ct, size_t n) [void*]\nCopies `n` characters from `ct` to `s` and returns `s`. *`s` may be corrupted if\nobjects overlap.*
-memmove memmove(void* s, const void* ct, size_t n) [void*]\nCopies `n` characters from `ct` to `s` and returns `s`. *`s` will not be\ncorrupted if objects overlap.*
-memcmp memcmp(const void* cs, const void* ct, size_t n) [int]\nCompares at most (the first) `n` characters of `cs` and `ct`, returning negative\nvalue if `cs`<`ct`, zero if `cs`==`ct`, positive value if `cs`>`ct`.
-memchr memchr(const void* cs, int c, size_t n) [void*]\nReturns pointer to first occurrence of `c` in first `n` characters of `cs`, or\nNULL if not found.
-memset memset(void* s, int c, size_t n) [void*]\nReplaces each of the first `n` characters of `s` by `c` and returns `s`.
+NULL NULL\nNull pointer constant.\n
+size_t size_t\nType for objects declared to store result of sizeof operator.\n
+strcpy strcpy(char* s, const char* ct) [char*]\nCopies `ct` to `s` including terminating NUL and returns `s`.\n
+strncpy strncpy(char* s, const char* ct, size_t n) [char*]\nCopies at most `n` characters of `ct` to `s`. Pads with NUL characters if `ct` is of length\nless than `n`. *Note that this may leave `s` without NUL-termination.* Return `s`.\n
+strcat strcat(char* s, const char* ct) [char*]\nConcatenate `ct` to `s` and return `s`.\n
+strncat strncat(char* s, const char* ct, size_t n) [char*]\nConcatenate at most `n` characters of `ct` to `s`. NUL-terminates `s` and return it.\n
+strcmp strcmp(const char* cs, const char* ct) [int]\nCompares `cs` with `ct`, returning negative value if `cs`<`ct`, zero if `cs`==`ct`, positive\nvalue if `cs`>`ct`.\n
+strncmp strncmp(const char* cs, const char* ct, size_t n) [int]\nCompares at most (the first) `n` characters of `cs` and `ct`, returning negative value if\n`cs`<`ct`, zero if `cs`==`ct`, positive value if `cs`>`ct`.\n
+strcoll strcoll(const char* cs, const char* ct) [int]\nCompares `cs` with `ct` according to locale, returning negative value if `cs`<`ct`, zero if\n`cs`==`ct`, positive value if `cs`>`ct`.\n
+strchr strchr(const char* cs, int c) [char*]\nReturns pointer to first occurrence of `c` in `cs`, or NULL if not found.\n
+strrchr strrchr(const char* cs, int c) [char*]\nReturns pointer to last occurrence of `c` in `cs`, or NULL if not found.\n
+strspn strspn(const char* cs, const char* ct) [size_t]\nReturns length of prefix of `cs` which consists of characters which are in `ct`.\n
+strcspn strcspn(const char* cs, const char* ct) [size_t]\nReturns length of prefix of `cs` which consists of characters which are not in `ct`.\n
+strpbrk strpbrk(const char* cs, const char* ct) [char*]\nReturns pointer to first occurrence in `cs` of any character of `ct`, or NULL if none is found.\n
+strstr strstr(const char* cs, const char* ct) [char*]\nReturns pointer to first occurrence of `ct` within `cs`, or NULL if none is found.\n
+strlen strlen(const char* cs) [size_t]\nReturns length of `cs`.\n
+strerror strerror(int n) [char*]\nReturns pointer to implementation-defined message string corresponding with error `n`.\n
+strtok strtok(char* s, const char* t) [char*]\nSearches `s` for next token delimited by any character from `ct`. Non-NULL `s` indicates the\nfirst call of a sequence. If a token is found, it is NUL-terminated and returned, otherwise\nNULL is returned. `ct` need not be identical for each call in a sequence.\n
+strxfrm strxfrm(char* s, const char* ct, size_t n) [size_t]\nStores in `s` no more than `n` characters (including terminating NUL) of a string produced from\n`ct` according to a locale-specific transformation. Returns length of entire transformed string.\n
+memcpy memcpy(void* s, const void* ct, size_t n) [void*]\nCopies `n` characters from `ct` to `s` and returns `s`. *`s` may be corrupted if objects overlap.*\n
+memmove memmove(void* s, const void* ct, size_t n) [void*]\nCopies `n` characters from `ct` to `s` and returns `s`. *`s` will not be corrupted if objects\noverlap.*\n
+memcmp memcmp(const void* cs, const void* ct, size_t n) [int]\nCompares at most (the first) `n` characters of `cs` and `ct`, returning negative value if\n`cs`<`ct`, zero if `cs`==`ct`, positive value if `cs`>`ct`.\n
+memchr memchr(const void* cs, int c, size_t n) [void*]\nReturns pointer to first occurrence of `c` in first `n` characters of `cs`, or NULL if not found.\n
+memset memset(void* s, int c, size_t n) [void*]\nReplaces each of the first `n` characters of `s` by `c` and returns `s`.\n
-CLOCKS_PER_SEC CLOCKS_PER_SEC\nThe number of clock_t units per second.
-NULL NULL\nNull pointer constant.
-clock_t clock_t\nAn arithmetic type elapsed processor representing time.
-time_t time_t\nAn arithmetic type representing calendar time.
-tm tm [struct]\nRepresents the components of calendar time\nImplementations may change field order and include additional fields.
-tm_set tm.tm_sec [int]\nseconds after the minute
-tm_min tm.tm_min [int]\nminutes after the hour
-tm_hour tm.tm_hour [int]\nhours since midnight
-tm_mday tm.tm_mday [int]\nday of the month
-tm_mon tm.tm_mon [int]\nmonths *since* January
-tm_year tm.tm_year [int]\nyears since 1900
-tm_wday tm.tm_wday [int]\ndays since Sunday
-tm_yday tm.tm_yday [int]\ndays since January 1
-tm_isdst tm.tm_isdst [int]\nDaylight Saving Time flag : is positive if DST is in effect, zero if not in\neffect, negative if information not known.
-clock clock(void) [clock_t]\nReturns elapsed processor time used by program or -1 if not available.
-time time(time_t* tp) [time_t]\nReturns current calendar time or -1 if not available. If `tp` is non-NULL,\nreturn value is also assigned to `*tp`.
-difftime difftime(time_t time2, time_t time1) [double]\nReturns the difference in seconds between `time2` and `time1`.
-mktime mktime(struct tm* tp) [time_t]\nIf necessary, adjusts fields of `*tp` to fall withing normal ranges. Returns the\ncorresponding calendar time, or -1 if it cannot be represented.
-asctime asctime(const struct tm* tp) [char*]\nReturns the given time as a string of the form:\n Sun Jan 3 13:08:42 1988\n\0
-ctime ctime(const time_t* tp) [char*]\nReturns string equivalent to calendar time `tp` converted to local time.\nEquivalent to: asctime(localtime(tp))
-gmtime gmtime(const time_t* tp) [struct tm*]\nReturns calendar time `*tp` converted to Coordinated Universal Time, or NULL if\nnot available.
-localtime localtime(const time_t* tp) [struct tm*]\nReturns calendar time `*tp` converted into local time.
-strftime strftime(char* s, size_t smax, const char* fmt, const struct tm* tp) [size_t]\nFormats `*tp` into `s` according to `fmt`. Places no more than `smax` characters\ninto `s`, and returns number of characters produced (excluding terminating NUL),\nor 0 if greater than `smax`. Formatting conversions (`%c`) are:\n A: name of weekday\n a: abbreviated name of weekday\n B: name of month\n b: abbreviated name of month\n c: local date and time representation\n d: day of month [01-31]\n H: hour (24-hour clock) [00-23]\n I: hour (12-hour clock) [01-12]\n j: day of year [001-366]\n M: minute [00-59]\n m: month [01-12]\n p: local equivalent of "AM" or "PM"\n S: second [00-61]\n U: week number of year (Sunday as 1st day of week) [00-53]\n W: week number of year (Monday as 1st day of week) [00-53]\n w: weekday (Sunday as 0) [0-6]\n X: local time representation\n x: local date representation\n Y: year with century\n y: year without century [00-99]\n Z: name (if any) of time zone\n %: %\nLocal time may differ from calendar time because of time zone.
+CLOCKS_PER_SEC CLOCKS_PER_SEC\nThe number of clock_t units per second.\n
+NULL NULL\nNull pointer constant.\n
+clock_t clock_t\nAn arithmetic type elapsed processor representing time.\n
+time_t time_t\nAn arithmetic type representing calendar time.\n
+tm tm [struct]\nRepresents the components of calendar time. Implementations may change field order and include\nadditional fields.\n
+tm_set tm.tm_sec [int]\nseconds after the minute\n
+tm_min tm.tm_min [int]\nminutes after the hour\n
+tm_hour tm.tm_hour [int]\nhours since midnight\n
+tm_mday tm.tm_mday [int]\nday of the month\n
+tm_mon tm.tm_mon [int]\nmonths *since* January\n
+tm_year tm.tm_year [int]\nyears since 1900\n
+tm_wday tm.tm_wday [int]\ndays since Sunday\n
+tm_yday tm.tm_yday [int]\ndays since January 1\n
+tm_isdst tm.tm_isdst [int]\nDaylight Saving Time flag : is positive if DST is in effect, zero if not in effect, negative\nif information not known.\n
+clock clock(void) [clock_t]\nReturns elapsed processor time used by program or -1 if not available.\n
+time time(time_t* tp) [time_t]\nReturns current calendar time or -1 if not available. If `tp` is non-NULL, return value is also\nassigned to `*tp`.\n
+difftime difftime(time_t time2, time_t time1) [double]\nReturns the difference in seconds between `time2` and `time1`.\n
+mktime mktime(struct tm* tp) [time_t]\nIf necessary, adjusts fields of `*tp` to fall withing normal ranges. Returns the corresponding\ncalendar time, or -1 if it cannot be represented.\n
+asctime asctime(const struct tm* tp) [char*]\nReturns the given time as a string of the form:\n\n Sun Jan 3 13:08:42 1988\0\n
+ctime ctime(const time_t* tp) [char*]\nReturns string equivalent to calendar time `tp` converted to local time. Equivalent to:\nasctime(localtime(tp))\n
+gmtime gmtime(const time_t* tp) [struct tm*]\nReturns calendar time `*tp` converted to Coordinated Universal Time, or NULL if not available.\n
+localtime localtime(const time_t* tp) [struct tm*]\nReturns calendar time `*tp` converted into local time.\n
+strftime strftime(char* s, size_t smax, const char* fmt, const struct tm* tp) [size_t]\nFormats `*tp` into `s` according to `fmt`. Places no more than `smax` characters into `s`,\nand returns number of characters produced (excluding terminating NUL), or 0 if greater than\n`smax`. Formatting conversions (`%c`) are:\n\n * A: name of weekday\n * a: abbreviated name of weekday\n * B: name of month\n * b: abbreviated name of month\n * c: local date and time representation\n * d: day of month [01-31]\n * H: hour (24-hour clock) [00-23]\n * I: hour (12-hour clock) [01-12]\n * j: day of year [001-366]\n * M: minute [00-59]\n * m: month [01-12]\n * p: local equivalent of "AM" or "PM"\n * S: second [00-61]\n * U: week number of year (Sunday as 1st day of week) [00-53]\n * W: week number of year (Monday as 1st day of week) [00-53]\n * w: weekday (Sunday as 0) [0-6]\n * X: local time representation\n * x: local date representation\n * Y: year with century\n * y: year without century [00-99]\n * Z: name (if any) of time zone\n * %: %\n\nLocal time may differ from calendar time because of time zone.\n
diff --git a/modules/ansi_c/init.lua b/modules/ansi_c/init.lua
index 05579c5c..c8c15d17 100644
--- a/modules/ansi_c/init.lua
+++ b/modules/ansi_c/init.lua
@@ -14,8 +14,8 @@ module('_M.ansi_c')]]
-- Autocompletion and documentation.
---
--- List of ctags files to use for autocompletion in addition to the current
--- project's top-level *tags* file or the current directory's *tags* file.
+-- List of ctags files to use for autocompletion in addition to the current project's top-level
+-- *tags* file or the current directory's *tags* file.
-- @class table
-- @name tags
M.tags = {
@@ -25,14 +25,15 @@ M.tags = {
M.autocomplete_snippets = true
+-- LuaFormatter off
local XPM = textadept.editing.XPM_IMAGES
local xpms = setmetatable({c=XPM.CLASS,d=XPM.SLOT,e=XPM.VARIABLE,f=XPM.METHOD,g=XPM.TYPEDEF,m=XPM.VARIABLE,s=XPM.STRUCT,t=XPM.TYPEDEF,v=XPM.VARIABLE},{__index=function()return 0 end})
+-- LuaFormatter on
textadept.editing.autocompleters.ansi_c = function()
-- Retrieve the symbol behind the caret.
local line, pos = buffer:get_cur_line()
- local symbol, op, part = line:sub(1, pos - 1):match(
- '([%w_]-)([%.%->]*)([%w_]*)$')
+ local symbol, op, part = line:sub(1, pos - 1):match('([%w_]-)([%.%->]*)([%w_]*)$')
if symbol == '' and part == '' then return nil end -- nothing to complete
if op ~= '' and op ~= '.' and op ~= '->' then return nil end
-- Attempt to identify the symbol type.
@@ -40,14 +41,17 @@ textadept.editing.autocompleters.ansi_c = function()
local decl = '([%w_]+)[%s%*&]+' .. symbol:gsub('%p', '%%%0') .. '[^%w_]'
for i = buffer:line_from_position(buffer.current_pos) - 1, 1, -1 do
local class = buffer:get_line(i):match(decl)
- if class then symbol = class break end
+ if class then
+ symbol = class
+ break
+ end
end
end
-- Search through ctags for completions for that symbol.
local tags_files = {}
for i = 1, #M.tags do tags_files[#tags_files + 1] = M.tags[i] end
- tags_files[#tags_files + 1] =
- (io.get_project_root(buffer.filename) or lfs.currentdir()) .. '/tags'
+ tags_files[#tags_files + 1] = (io.get_project_root(buffer.filename) or lfs.currentdir()) ..
+ '/tags'
local name_patt = '^' .. part
local sep = string.char(buffer.auto_c_type_separator)
::rescan::
@@ -57,16 +61,15 @@ textadept.editing.autocompleters.ansi_c = function()
for tag_line in io.lines(filename) do
local name = tag_line:match('^%S+')
if (name:find(name_patt) and not name:find('^!') and not list[name]) or
- name == symbol and op == '' then
+ (name == symbol and op == '') then
local fields = tag_line:match(';"\t(.*)$')
- local type = fields:match('class:(%S+)') or
- fields:match('enum:(%S+)') or fields:match('struct:(%S+)') or ''
+ local type = fields:match('class:(%S+)') or fields:match('enum:(%S+)') or
+ fields:match('struct:(%S+)') or ''
if type == symbol then
list[#list + 1] = name .. sep .. xpms[fields:sub(1, 1)]
list[name] = true
elseif name == symbol and fields:match('typeref:') then
- -- For typeref, change the lookup symbol to the referenced name and
- -- rescan tags files.
+ -- For typeref, change the lookup symbol to the referenced name and rescan tags files.
symbol = fields:match('[^:]+$')
goto rescan
end
@@ -95,8 +98,7 @@ snip['if'] = 'if (%1) {\n\t%0\n}'
snip.eif = 'else if (%1) {\n\t%0\n}'
snip['else'] = 'else {\n\t%0\n}'
snip['for'] = 'for (%1; %2; %3) {\n\t%0\n}'
-snip['fori'] =
- 'for (%1(int) %2(i) = %3(0); %2 %4(<) %5(count); %2%6(++)) {\n\t%0\n}'
+snip['fori'] = 'for (%1(int) %2(i) = %3(0); %2 %4(<) %5(count); %2%6(++)) {\n\t%0\n}'
snip['while'] = 'while (%1) {\n\t%0\n}'
snip['do'] = 'do {\n\t%0\n} while (%1);'
snip.sw = 'switch (%1) {\n\tcase %2:\n\t\t%0\n\t\tbreak;\n}'
diff --git a/modules/ansi_c/lua_api b/modules/ansi_c/lua_api
index 9564a407..3b2bf2f9 100644
--- a/modules/ansi_c/lua_api
+++ b/modules/ansi_c/lua_api
@@ -1,203 +1,203 @@
-lua_absindex lua_absindex(lua_State *L, int idx) [int]\nConverts the acceptable index `idx` into an absolute index (that is, one that\ndoes not depend on the stack size).\n
-lua_Alloc (*lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize) [void*]\nThe type of the memory-allocation function used by Lua states. The allocator\nfunction must provide a functionality similar to `realloc`, but not exactly\nthe same. Its arguments are `ud`, an opaque pointer passed to `lua_newstate`;\n`ptr`, a pointer to the block being allocated/reallocated/freed; `osize`,\nthe original size of the block or some code about what is being allocated;\nand `nsize`, the new size of the block.\n\nWhen `ptr` is not `NULL`, `osize` is the size of the block pointed by `ptr`,\nthat is, the size given when it was allocated or reallocated.\n\nWhen `ptr` is `NULL`, `osize` encodes the kind of object that Lua is allocating.\n`osize` is any of `LUA_TSTRING`, `LUA_TTABLE`, `LUA_TFUNCTION`, `LUA_TUSERDATA`,\nor `LUA_TTHREAD` when (and only when) Lua is creating a new object of that type.\nWhen `osize` is some other value, Lua is allocating memory for something else.\n\nLua assumes the following behavior from the allocator function:\n\nWhen `nsize` is zero, the allocator must behave like `free` and then return\n`NULL`.\n\nWhen `nsize` is not zero, the allocator must behave like `realloc`. In\nparticular, the allocator returns `NULL` if and only if it cannot fulfill the\nrequest.\n\nHere is a simple implementation for the allocator function. It is used in\nthe auxiliary library by `luaL_newstate`.\n\n static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {\n (void)ud; (void)osize; /* not used */\n if (nsize == 0) {\n free(ptr);\n return NULL;\n }\n else\n return realloc(ptr, nsize);\n }\n\nNote that Standard C ensures that `free(NULL)` has no effect and that\n`realloc(NULL, size)` is equivalent to `malloc(size)`.\n
-lua_arith lua_arith(lua_State *L, int op) [void]\nPerforms an arithmetic or bitwise operation over the two values (or one, in the\ncase of negations) at the top of the stack, with the value on the top being the\nsecond operand, pops these values, and pushes the result of the operation. The\nfunction follows the semantics of the corresponding Lua operator (that is, it\nmay call metamethods).\n\nThe value of `op` must be one of the following constants:\n * LUA_OPADD: performs addition (`+`)\n * LUA_OPSUB: performs subtraction (`-`)\n * LUA_OPMUL: performs multiplication (`*`)\n * LUA_OPDIV: performs float division (`/`)\n * LUA_OPIDIV: performs floor division (`//`)\n * LUA_OPMOD: performs modulo (`%`)\n * LUA_OPPOW: performs exponentiation (`^`)\n * LUA_OPUNM: performs mathematical negation (unary `-`)\n * LUA_OPBNOT: performs bitwise NOT (`~`)\n * LUA_OPBAND: performs bitwise AND (`&`)\n * LUA_OPBOR: performs bitwise OR (`|`)\n * LUA_OPBXOR: performs bitwise exclusive OR (`~`)\n * LUA_OPBSHL: performs left shift (`<<`)\n * LUA_OPBSHR: performs right shift (`>>`)\n
+lua_absindex lua_absindex(lua_State *L, int idx) [int]\nConverts the acceptable index `idx` into an absolute index (that is, one that does not depend\non the stack size).\n
+lua_Alloc (*lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize) [void*]\nThe type of the memory-allocation function used by Lua states. The allocator function must provide\na functionality similar to `realloc`, but not exactly the same. Its arguments are `ud`, an opaque\npointer passed to `lua_newstate`; `ptr`, a pointer to the block being allocated/reallocated/freed;\n`osize`, the original size of the block or some code about what is being allocated; and `nsize`,\nthe new size of the block.\n\nWhen `ptr` is not `NULL`, `osize` is the size of the block pointed by `ptr`, that is, the size\ngiven when it was allocated or reallocated.\n\nWhen `ptr` is `NULL`, `osize` encodes the kind of object that Lua is allocating. `osize` is\nany of `LUA_TSTRING`, `LUA_TTABLE`, `LUA_TFUNCTION`, `LUA_TUSERDATA`, or `LUA_TTHREAD` when\n(and only when) Lua is creating a new object of that type. When `osize` is some other value,\nLua is allocating memory for something else.\n\nLua assumes the following behavior from the allocator function:\n\nWhen `nsize` is zero, the allocator must behave like `free` and then return `NULL`.\n\nWhen `nsize` is not zero, the allocator must behave like `realloc`. In particular, the allocator\nreturns `NULL` if and only if it cannot fulfill the request.\n\nHere is a simple implementation for the allocator function. It is used in the auxiliary library\nby `luaL_newstate`.\n\n static void *l_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {\n (void)ud; (void)osize; /* not used */\n if (nsize == 0) {\n free(ptr);\n return NULL;\n }\n else\n return realloc(ptr, nsize);\n }\n\nNote that Standard C ensures that `free(NULL)` has no effect and that `realloc(NULL, size)`\nis equivalent to `malloc(size)`.\n
+lua_arith lua_arith(lua_State *L, int op) [void]\nPerforms an arithmetic or bitwise operation over the two values (or one, in the case of negations)\nat the top of the stack, with the value on the top being the second operand, pops these values,\nand pushes the result of the operation. The function follows the semantics of the corresponding\nLua operator (that is, it may call metamethods).\n\nThe value of `op` must be one of the following constants:\n\n * LUA_OPADD: performs addition (`+`)\n * LUA_OPSUB: performs subtraction (`-`)\n * LUA_OPMUL: performs multiplication (`*`)\n * LUA_OPDIV: performs float division (`/`)\n * LUA_OPIDIV: performs floor division (`//`)\n * LUA_OPMOD: performs modulo (`%`)\n * LUA_OPPOW: performs exponentiation (`^`)\n * LUA_OPUNM: performs mathematical negation (unary `-`)\n * LUA_OPBNOT: performs bitwise NOT (`~`)\n * LUA_OPBAND: performs bitwise AND (`&`)\n * LUA_OPBOR: performs bitwise OR (`|`)\n * LUA_OPBXOR: performs bitwise exclusive OR (`~`)\n * LUA_OPBSHL: performs left shift (`<<`)\n * LUA_OPBSHR: performs right shift (`>>`)\n
lua_atpanic lua_atpanic(lua_State *L, lua_CFunction panicf) [lua_CFunction]\nSets a new panic function and returns the old one (see §4.4).\n
-lua_call lua_call(lua_State *L, int nargs, int nresults) [void]\nCalls a function.\nLike regular Lua calls, `lua_call` respects the `__call` metamethod. So, here\nthe word "function" means any callable value.\n\nTo do a call you must use the following protocol: first, the function to be\ncalled is pushed onto the stack; then, the arguments to the call are pushed in\ndirect order; that is, the first argument is pushed first. Finally you call\n`lua_call`; `nargs` is the number of arguments that you pushed onto the stack.\nWhen the function returns, all arguments and the function value are popped and\nthe call results are pushed onto the stack when the function returns. The\nnumber of results is adjusted to `nresults`, unless `nresults` is `LUA_MULTRET`.\nIn this case, all results from the function are pushed. Lua takes care that the\nreturned values fit into the stack space, but it does not ensure any extra space\non the stack. The function results are pushed onto the stack in direct order\n(the first result is pushed first), so that after the call the last result is on\nthe top of the stack.\n\nAny error while calling and running the function is propagated upwards (with a\n`longjmp`).\n\nThe following example shows how the host program can do the equivalent to\nthis Lua code:\n\n a = f("how", t.x, 14)\n\nHere it is in C:\n\n lua_getglobal(L, "f"); /* function to be called */\n lua_pushliteral(L, "how"); /* 1st argument */\n lua_getglobal(L, "t"); /* table to be indexed */\n lua_getfield(L, -1, "x"); /* push result of t.x (2nd arg) */\n lua_remove(L, -2); /* remove 't' from the stack */\n lua_pushinteger(L, 14); /* 3rd argument */\n lua_call(L, 3, 1); /* call 'f' with 3 arguments and 1 result */\n lua_setglobal(L, "a"); /* set global 'a' */\n\nNote that the code above is _balanced_: at its end, the stack is back to\nits original configuration. This is considered good programming practice.\n
-lua_callk lua_callk(lua_State *L, int nargs, int nresults, lua_KContext ctx, lua_KFunction k) [void]\nThis function behaves exactly like `lua_call`, but allows the called function to\nyield (see §4.5).\n
-lua_CFunction (*lua_CFunction)(lua_State *L) [int]\nType for C functions.\n\nIn order to communicate properly with Lua, a C function must use the\nfollowing protocol, which defines the way parameters and results are passed:\na C function receives its arguments from Lua in its stack in direct order\n(the first argument is pushed first). So, when the function starts,\n`lua_gettop(L)` returns the number of arguments received by the function.\nThe first argument (if any) is at index 1 and its last argument is at index\n`lua_gettop(L)`. To return values to Lua, a C function just pushes them onto\nthe stack, in direct order (the first result is pushed first), and returns in C\nthe number of results. Any other value in the stack below the results will\nbe properly discarded by Lua. Like a Lua function, a C function called by\nLua can also return many results.\n\nAs an example, the following function receives a variable number of numerical\narguments and returns their average and their sum:\n\n static int foo (lua_State *L) {\n int n = lua_gettop(L); /* number of arguments */\n lua_Number sum = 0.0;\n int i;\n for (i = 1; i <= n; i++) {\n if (!lua_isnumber(L, i)) {\n lua_pushliteral(L, "incorrect argument");\n lua_error(L);\n }\n sum += lua_tonumber(L, i);\n }\n lua_pushnumber(L, sum/n); /* first result */\n lua_pushnumber(L, sum); /* second result */\n return 2; /* number of results */\n }\n
-lua_checkstack lua_checkstack(lua_State *L, int n) [int]\nEnsures that the stack has space for at least `n` extra slots, that is, that you\ncan safely push up to `n` values onto it.\nIt returns false if it cannot fulfill the request, either because it would cause\nthe stack to be greater than a fixed maximum size (typically at least several\nthousand elements) or because it cannot allocate memory for the extra space.\nThis function never shrinks the stack; if the stack already has space for the\nextra slots, it is left unchanged.\n
-lua_close lua_close(lua_State *L) [void]\nClose all active to-be-closed variables in the main thread, release all objects\nin the given Lua state (calling the corresponding garbage-collection\nmetamethods, if any), and frees all dynamic memory used by this state.\n\nOn several platforms, you may not need to call this function, because all\nresources are naturally released when the host program ends. On the other hand,\nlong-running programs that create multiple states, such as daemons or web\nservers, will probably need to close states as soon as they are not needed.\n
-lua_compare lua_compare(lua_State *L, int index1, int index2, int op) [int]\nCompares two Lua values.\nReturns 1 if the value at index `index1` satisfies `op` when compared with\nthe value at index `index2`, following the semantics of the corresponding Lua\noperator (that is, it may call metamethods). Otherwise returns 0. Also\nreturns 0 if any of the indices is not valid.\n\nThe value of `op` must be one of the following constants:\n * LUA_OPEQ: compares for equality (`==`)\n * LUA_OPLT: compares for less than (`<`)\n * LUA_OPLE: compares for less or equal (`<=`)\n
-lua_concat lua_concat(lua_State *L, int n) [void]\nConcatenates the `n` values on the top of the stack, pops them, and leaves\nthe result at the top. If `n` is 1, the result is the single value on the\nstack (that is, the function does nothing); if `n` is 0, the result is the\nempty string. Concatenation is performed following the usual semantics of\nLua (see §3.4.6).\n
-lua_copy lua_copy(lua_State *L, int fromidx, int toidx) [void]\nCopies the element at index `fromidx` into the valid index `toidx`, replacing\nthe value at that position. Values at other positions are not affected.\n
-lua_createtable lua_createtable(lua_State *L, int narr, int nrec) [void]\nCreates a new empty table and pushes it onto the stack. Parameter `narr` is a\nhint for how many elements the table will have as a sequence; parameter `nrec`\nis a hint for how many other elements the table will have. Lua may use these\nhints to preallocate memory for the new table. This preallocation may help\nperformance when you know in advance how many elements the table will have.\nOtherwise you can use the function `lua_newtable`.\n
-lua_dump lua_dump(lua_State *L, lua_Writer writer, void *data, int strip) [int]\nDumps a function as a binary chunk. Receives a Lua function on the top of\nthe stack and produces a binary chunk that, if loaded again, results in a\nfunction equivalent to the one dumped. As it produces parts of the chunk,\n`lua_dump` calls function `writer` (see `lua_Writer`) with the given `data`\nto write them.\n\nIf `strip` is true, the binary representation is created without debug\ninformation about the function.\n\nThe value returned is the error code returned by the last call to the writer;\n0 means no errors.\n\nThis function does not pop the Lua function from the stack.\n
-lua_error lua_error(lua_State *L) [int]\nRaises a Lua error, using the value on the top of the stack as the error\nobject. This function does a long jump, and therefore never returns\n(see `luaL_error`).\n
-lua_gc lua_gc(lua_State *L, int what, ...) [int]\nControls the garbage collector.\n\nThis function performs several tasks, according to the value of the parameter\n`what`. For options that need extra arguments, they are listed after the\noption.\n\n * LUA_GCCOLLECT: Performs a full garbage-collection cycle.\n * LUA_GCSTOP: Stops the garbage collector.\n * LUA_GCRESTART: Restarts the garbage collector.\n * LUA_GCCOUNT: Returns the current amount of memory (in Kbytes) in use by Lua.\n * LUA_GCCOUNTB: Returns the remainder of dividing the current amount of bytes\n of memory in use by Lua by 1024.\n * LUA_GCSTEP `(int stepsize)`: Performs an incremental step of garbage\n collection\n * LUA_GCISRUNNING: Returns a boolean that tells whether the collector is\n running (i.e., not stopped).\n * LUA_GCINC (int pause, int stepmul, stepsize): Changes the collector to\n incremental mode with the given parameters (see §2.5.1). Returns the\n previous mode (`LUA_GCGEN` or `LUA_GCINC`).\n * LUA_GCGEN (int minomul, int majormul): Changes the collector to generational\n mode with the given parameters (see §2.5.2). Returns the previous mode \n (`LUA_GCGEN` or `LUA_GCINC`).\n\nFor more details about these options, see `collectgarbage`.\n
-lua_getallocf lua_getallocf(lua_State *L, void **ud) [lua_Alloc]\nReturns the memory-allocation function of a given state. If `ud` is not\n`NULL`, Lua stores in `*ud` the opaque pointer given when the memory-allocator\nfunction was set.\n
-lua_getextraspace lua_getextraspace(lua_State *L) [void*]\nReturns a pointer to a raw memory area associated with the given Lua state.\nThe application can use this area for any purpose; Lua does not use it for\nanything.\n\nEach new thread has this area initialized with a copy of the area of the main\nthread.\n\nBy default, this area has the size of a pointer to void, but you can recompile\nLua with a different size for this area. (See `LUA_EXTRASPACE` in `luaconf.h`.)\n
-lua_getfield lua_getfield(lua_State *L, int index, const char *k) [int]\nPushes onto the stack the value `t[k]`, where `t` is the value at the given\nindex. As in Lua, this function may trigger a metamethod for the "index"\nevent (see §2.4).\n\nReturns the type of the pushed value.\n
-lua_getglobal lua_getglobal(lua_State *L, const char *name) [int]\nPushes onto the stack the value of the global `name`.\nReturns the type of that value.\n
-lua_geti lua_geti(lua_State *L, int index, lua_Integer i) [int]\nPushes onto the stack the value `t[i]`, where `t` is the value at the given\nindex. As in Lua, this function may trigger a metamethod for the "index" event\n(see §2.4).\n\nReturns the type of the pushed value.\n
-lua_getmetatable lua_getmetatable(lua_State *L, int index) [int]\nIf the value at the given index has a metatable, the function pushes that\nmetatable onto the stack and returns 1. Otherwise, the function returns 0 and\npushes nothing on the stack.\n
-lua_gettable lua_gettable(lua_State *L, int index) [int]\nPushes onto the stack the value `t[k]`, where `t` is the value at the given\nindex and `k` is the value on the top of the stack.\n\nThis function pops the key from the stack, pushing the resulting value\nin its place. As in Lua, this function may trigger a metamethod for the\n"index" event (see §2.4).\n\nReturns the type of the pushed value.\n
-lua_gettop lua_gettop(lua_State *L) [int]\nReturns the index of the top element in the stack. Because indices start at 1,\nthis result is equal to the number of elements in the stack; in particular, 0\nmeans an empty stack.\n
-lua_getiuservalue lua_getiuservalue(lua_State *L, int index, int n) [int]\nPushes onto the stack the `n`-th user value associated with the full userdata at\nthe given index and returns the type of the pushed value.\n\nIf the userdata does not have that value, pushes `nil` and returns `LUA_TNONE`.\n
-lua_insert lua_insert(lua_State *L, int index) [void]\nMoves the top element into the given valid index, shifting up the elements\nabove this index to open space. This function cannot be called with a\npseudo-index, because a pseudo-index is not an actual stack position.\n
-lua_Integer lua_Integer [typedef ... lua_Integer]\nThe type of integers in Lua.\n\nBy default this type is `long long`, (usually a 64-bit two-complement integer),\nbut that can be changed to `long` or `int` (usually a 32-bit two-complement\ninteger). (See `LUA_INT` in `luaconf.h`.)\n\nLua also defines the constants `LUA_MININTEGER` and `LUA_MAXINTEGER`, with the\nminimum and the maximum values that fit in this type.\n
+lua_call lua_call(lua_State *L, int nargs, int nresults) [void]\nCalls a function. Like regular Lua calls, `lua_call` respects the `__call` metamethod. So,\nhere the word "function" means any callable value.\n\nTo do a call you must use the following protocol: first, the function to be called is pushed\nonto the stack; then, the arguments to the call are pushed in direct order; that is, the first\nargument is pushed first. Finally you call `lua_call`; `nargs` is the number of arguments that\nyou pushed onto the stack. When the function returns, all arguments and the function value are\npopped and the call results are pushed onto the stack when the function returns. The number\nof results is adjusted to `nresults`, unless `nresults` is `LUA_MULTRET`. In this case, all\nresults from the function are pushed. Lua takes care that the returned values fit into the\nstack space, but it does not ensure any extra space on the stack. The function results are\npushed onto the stack in direct order (the first result is pushed first), so that after the\ncall the last result is on the top of the stack.\n\nAny error while calling and running the function is propagated upwards (with a `longjmp`).\n\nThe following example shows how the host program can do the equivalent to this Lua code:\n\n a = f("how", t.x, 14)\n\nHere it is in C:\n\n lua_getglobal(L, "f"); /* function to be called */\n lua_pushliteral(L, "how"); /* 1st argument */\n lua_getglobal(L, "t"); /* table to be indexed */\n lua_getfield(L, -1, "x"); /* push result of t.x (2nd arg) */\n lua_remove(L, -2); /* remove 't' from the stack */\n lua_pushinteger(L, 14); /* 3rd argument */\n lua_call(L, 3, 1); /* call 'f' with 3 arguments and 1 result */\n lua_setglobal(L, "a"); /* set global 'a' */\n\nNote that the code above is _balanced_: at its end, the stack is back to its original\nconfiguration. This is considered good programming practice.\n
+lua_callk lua_callk(lua_State *L, int nargs, int nresults, lua_KContext ctx, lua_KFunction k) [void]\nThis function behaves exactly like `lua_call`, but allows the called function to yield (see §4.5).\n
+lua_CFunction (*lua_CFunction)(lua_State *L) [int]\nType for C functions.\n\nIn order to communicate properly with Lua, a C function must use the following protocol, which\ndefines the way parameters and results are passed: a C function receives its arguments from Lua\nin its stack in direct order (the first argument is pushed first). So, when the function starts,\n`lua_gettop(L)` returns the number of arguments received by the function. The first argument\n(if any) is at index 1 and its last argument is at index `lua_gettop(L)`. To return values to\nLua, a C function just pushes them onto the stack, in direct order (the first result is pushed\nfirst), and returns in C the number of results. Any other value in the stack below the results\nwill be properly discarded by Lua. Like a Lua function, a C function called by Lua can also\nreturn many results.\n\nAs an example, the following function receives a variable number of numerical arguments and\nreturns their average and their sum:\n\n static int foo (lua_State *L) {\n int n = lua_gettop(L); /* number of arguments */\n lua_Number sum = 0.0;\n int i;\n for (i = 1; i <= n; i++) {\n if (!lua_isnumber(L, i)) {\n lua_pushliteral(L, "incorrect argument");\n lua_error(L);\n }\n sum += lua_tonumber(L, i);\n }\n lua_pushnumber(L, sum/n); /* first result */\n lua_pushnumber(L, sum); /* second result */\n return 2; /* number of results */\n }\n
+lua_checkstack lua_checkstack(lua_State *L, int n) [int]\nEnsures that the stack has space for at least `n` extra slots, that is, that you can safely push\nup to `n` values onto it. It returns false if it cannot fulfill the request, either because\nit would cause the stack to be greater than a fixed maximum size (typically at least several\nthousand elements) or because it cannot allocate memory for the extra space. This function\nnever shrinks the stack; if the stack already has space for the extra slots, it is left unchanged.\n
+lua_close lua_close(lua_State *L) [void]\nClose all active to-be-closed variables in the main thread, release all objects in the given\nLua state (calling the corresponding garbage-collection metamethods, if any), and frees all\ndynamic memory used by this state.\n\nOn several platforms, you may not need to call this function, because all resources are\nnaturally released when the host program ends. On the other hand, long-running programs that\ncreate multiple states, such as daemons or web servers, will probably need to close states as\nsoon as they are not needed.\n\n
+lua_compare lua_compare(lua_State *L, int index1, int index2, int op) [int]\nCompares two Lua values. Returns 1 if the value at index `index1` satisfies `op` when compared\nwith the value at index `index2`, following the semantics of the corresponding Lua operator\n(that is, it may call metamethods). Otherwise returns 0. Also returns 0 if any of the indices\nis not valid.\n\nThe value of `op` must be one of the following constants:\n\n * LUA_OPEQ: compares for equality (`==`)\n * LUA_OPLT: compares for less than (`<`)\n * LUA_OPLE: compares for less or equal (`<=`)\n
+lua_concat lua_concat(lua_State *L, int n) [void]\nConcatenates the `n` values on the top of the stack, pops them, and leaves the result at the top.\nIf `n` is 1, the result is the single value on the stack (that is, the function does nothing);\nif `n` is 0, the result is the empty string. Concatenation is performed following the usual\nsemantics of Lua (see §3.4.6).\n
+lua_copy lua_copy(lua_State *L, int fromidx, int toidx) [void]\nCopies the element at index `fromidx` into the valid index `toidx`, replacing the value at\nthat position. Values at other positions are not affected.\n
+lua_createtable lua_createtable(lua_State *L, int narr, int nrec) [void]\nCreates a new empty table and pushes it onto the stack. Parameter `narr` is a hint for how\nmany elements the table will have as a sequence; parameter `nrec` is a hint for how many other\nelements the table will have. Lua may use these hints to preallocate memory for the new table.\nThis preallocation may help performance when you know in advance how many elements the table\nwill have. Otherwise you can use the function `lua_newtable`.\n
+lua_dump lua_dump(lua_State *L, lua_Writer writer, void *data, int strip) [int]\nDumps a function as a binary chunk. Receives a Lua function on the top of the stack and produces\na binary chunk that, if loaded again, results in a function equivalent to the one dumped.\nAs it produces parts of the chunk, `lua_dump` calls function `writer` (see `lua_Writer`) with\nthe given `data` to write them.\n\nIf `strip` is true, the binary representation is created without debug information about the\nfunction.\n\nThe value returned is the error code returned by the last call to the writer; 0 means no errors.\n\nThis function does not pop the Lua function from the stack.\n\n
+lua_error lua_error(lua_State *L) [int]\nRaises a Lua error, using the value on the top of the stack as the error object. This function\ndoes a long jump, and therefore never returns (see `luaL_error`).\n
+lua_gc lua_gc(lua_State *L, int what, ...) [int]\nControls the garbage collector.\n\nThis function performs several tasks, according to the value of the parameter `what`. For options\nthat need extra arguments, they are listed after the option.\n\n * LUA_GCCOLLECT: Performs a full garbage-collection cycle.\n * LUA_GCSTOP: Stops the garbage collector.\n * LUA_GCRESTART: Restarts the garbage collector.\n * LUA_GCCOUNT: Returns the current amount of memory (in Kbytes) in use by Lua.\n * LUA_GCCOUNTB: Returns the remainder of dividing the current amount of bytes of memory in\n use by Lua by 1024.\n * LUA_GCSTEP `(int stepsize)`: Performs an incremental step of garbage collection\n * LUA_GCISRUNNING: Returns a boolean that tells whether the collector is running (i.e.,\n not stopped).\n * LUA_GCINC (int pause, int stepmul, stepsize): Changes the collector to incremental mode with\n the given parameters (see §2.5.1). Returns the previous mode (`LUA_GCGEN` or `LUA_GCINC`).\n * LUA_GCGEN (int minomul, int majormul): Changes the collector to generational mode with the\n given parameters (see §2.5.2). Returns the previous mode (`LUA_GCGEN` or `LUA_GCINC`).\n\nFor more details about these options, see `collectgarbage`.\n
+lua_getallocf lua_getallocf(lua_State *L, void **ud) [lua_Alloc]\nReturns the memory-allocation function of a given state. If `ud` is not `NULL`, Lua stores in\n`*ud` the opaque pointer given when the memory-allocator function was set.\n
+lua_getextraspace lua_getextraspace(lua_State *L) [void*]\nReturns a pointer to a raw memory area associated with the given Lua state. The application\ncan use this area for any purpose; Lua does not use it for anything.\n\nEach new thread has this area initialized with a copy of the area of the main thread.\n\nBy default, this area has the size of a pointer to void, but you can recompile Lua with a\ndifferent size for this area. (See `LUA_EXTRASPACE` in `luaconf.h`.)\n\n
+lua_getfield lua_getfield(lua_State *L, int index, const char *k) [int]\nPushes onto the stack the value `t[k]`, where `t` is the value at the given index. As in Lua,\nthis function may trigger a metamethod for the "index" event (see §2.4).\n\nReturns the type of the pushed value.\n
+lua_getglobal lua_getglobal(lua_State *L, const char *name) [int]\nPushes onto the stack the value of the global `name`. Returns the type of that value.\n
+lua_geti lua_geti(lua_State *L, int index, lua_Integer i) [int]\nPushes onto the stack the value `t[i]`, where `t` is the value at the given index. As in Lua,\nthis function may trigger a metamethod for the "index" event (see §2.4).\n\nReturns the type of the pushed value.\n\n
+lua_getmetatable lua_getmetatable(lua_State *L, int index) [int]\nIf the value at the given index has a metatable, the function pushes that metatable onto the\nstack and returns 1. Otherwise, the function returns 0 and pushes nothing on the stack.\n
+lua_gettable lua_gettable(lua_State *L, int index) [int]\nPushes onto the stack the value `t[k]`, where `t` is the value at the given index and `k`\nis the value on the top of the stack.\n\nThis function pops the key from the stack, pushing the resulting value in its place. As in Lua,\nthis function may trigger a metamethod for the "index" event (see §2.4).\n\nReturns the type of the pushed value.\n\n
+lua_gettop lua_gettop(lua_State *L) [int]\nReturns the index of the top element in the stack. Because indices start at 1, this result is\nequal to the number of elements in the stack; in particular, 0 means an empty stack.\n\n
+lua_getiuservalue lua_getiuservalue(lua_State *L, int index, int n) [int]\nPushes onto the stack the `n`-th user value associated with the full userdata at the given\nindex and returns the type of the pushed value.\n\nIf the userdata does not have that value, pushes `nil` and returns `LUA_TNONE`.\n\n
+lua_insert lua_insert(lua_State *L, int index) [void]\nMoves the top element into the given valid index, shifting up the elements above this index to\nopen space. This function cannot be called with a pseudo-index, because a pseudo-index is not\nan actual stack position.\n
+lua_Integer lua_Integer [typedef ... lua_Integer]\nThe type of integers in Lua.\n\nBy default this type is `long long`, (usually a 64-bit two-complement integer), but that can\nbe changed to `long` or `int` (usually a 32-bit two-complement integer). (See `LUA_INT` in\n`luaconf.h`.)\n\nLua also defines the constants `LUA_MININTEGER` and `LUA_MAXINTEGER`, with the minimum and the\nmaximum values that fit in this type.\n\n
lua_isboolean lua_isboolean(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a boolean, and 0 otherwise.\n
lua_iscfunction lua_iscfunction(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a C function, and 0 otherwise.\n
-lua_isfunction lua_isfunction(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a function (either C or Lua),\nand 0 otherwise.\n
-lua_isinteger lua_isinteger(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is an integer (that is, the value is a\nnumber and is represented as an integer), and 0 otherwise.\n
+lua_isfunction lua_isfunction(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a function (either C or Lua), and 0 otherwise.\n
+lua_isinteger lua_isinteger(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is an integer (that is, the value is a number and is\nrepresented as an integer), and 0 otherwise.\n
lua_islightuserdata lua_islightuserdata(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a light userdata, and 0 otherwise.\n
lua_isnil lua_isnil(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is nil, and 0 otherwise.\n
lua_isnone lua_isnone(lua_State *L, int index) [int]\nReturns 1 if the given index is not valid, and 0 otherwise.\n
-lua_isnoneornil lua_isnoneornil(lua_State *L, int index) [int]\nReturns 1 if the given index is not valid or if the value at this index is\nnil, and 0 otherwise.\n
-lua_isnumber lua_isnumber(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a number or a string\nconvertible to a number, and 0 otherwise.\n
-lua_isstring lua_isstring (lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a string or a number (which is\nalways convertible to a string), and 0 otherwise.\n
+lua_isnoneornil lua_isnoneornil(lua_State *L, int index) [int]\nReturns 1 if the given index is not valid or if the value at this index is nil, and 0 otherwise.\n
+lua_isnumber lua_isnumber(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a number or a string convertible to a number,\nand 0 otherwise.\n
+lua_isstring lua_isstring (lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a string or a number (which is always convertible\nto a string), and 0 otherwise.\n
lua_istable lua_istable(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a table, and 0 otherwise.\n
lua_isthread lua_isthread(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a thread, and 0 otherwise.\n
-lua_isuserdata lua_isuserdata(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a userdata (either full or\nlight), and 0 otherwise.\n
+lua_isuserdata lua_isuserdata(lua_State *L, int index) [int]\nReturns 1 if the value at the given index is a userdata (either full or light), and 0 otherwise.\n
lua_isyieldable lua_isyieldable(lua_State *L) [int]\nReturns 1 if the given coroutine can yield, and 0 otherwise.\n
-lua_KContext lua_KContext [typedef ... lua_KContext]\nThe type for continuation-function contexts. It must be a numerical type. This\ntype is defined as `intptr_t` when `intptr_t` is available, so that it can store\npointers too. Otherwise, it is defined as `ptrdiff_t`.\n
+lua_KContext lua_KContext [typedef ... lua_KContext]\nThe type for continuation-function contexts. It must be a numerical type. This type is defined\nas `intptr_t` when `intptr_t` is available, so that it can store pointers too. Otherwise,\nit is defined as `ptrdiff_t`.\n
lua_KFunction lua_KFunction [int (*)(lua_State *L, int status, lua_KContext ctx)]\nType for continuation functions (see §4.5).\n
-lua_len lua_len(lua_State *L, int index) [void]\nReturns the length of the value at the given index. It is equivalent to the\n'`#`' operator in Lua (see §3.4.7) and may trigger a metamethod for the "length"\nevent (see §2.4). The result is pushed on the stack.\n
-lua_load lua_load(lua_State *L, lua_Reader reader, void *data, const char *chunkname, const char *mode) [int]\nLoads a Lua chunk without running it. If there are no errors, `lua_load`\npushes the compiled chunk as a Lua function on top of the stack. Otherwise, it\npushes an error message.\n\nThe `lua_load` function uses a user-supplied `reader` function to read the chunk\n(see `lua_Reader`). The `data` argument is an opaque value passed to the reader\nfunction.\n\nThe `chunkname` argument gives a name to the chunk, which is used for error\nmessages and in debug information (see §4.7).\n\n`lua_load` automatically detects whether the chunk is text or binary and loads\nit accordingly (see program `luac`). The string `mode` works as in function\n`load`, with the addition that a `NULL` value is equivalent to the string\n"`bt`".\n\n`lua_load` uses the stack internally, so the reader function must always\nleave the stack unmodified when returning.\n\n`lua_load` can return `LUA_OK`, `LUA_ERRSYNTAX`, or `LUA_ERRMEM`. The function \nmay also return other values corresponding to errors raised by the read function\n(see §4.4.1).\n\nIf the resulting function has upvalues, its first upvalue is set to the value of\nthe global environment stored at index `LUA_RIDX_GLOBALS` in the registry\n(see §4.3). When loading main chunks, this upvalue will be the `_ENV` variable\n(see §2.2). Other upvalues are initialized with `nil`.\n
-lua_newstate lua_newstate(lua_Alloc f, void *ud) [lua_State*]\nCreates a new independent state and returns its main thread. Returns `NULL` if \nit cannot create the thread or the state (due to lack of memory). The argument \n`f` is the allocator function; Lua will do all memory allocation for this state \nthrough this function. The second argument, `ud`, is an opaque pointer that Lua \npasses to the allocator in every call.\n
+lua_len lua_len(lua_State *L, int index) [void]\nReturns the length of the value at the given index. It is equivalent to the '`#`' operator in\nLua (see §3.4.7) and may trigger a metamethod for the "length" event (see §2.4). The result\nis pushed on the stack.\n\n
+lua_load lua_load(lua_State *L, lua_Reader reader, void *data, const char *chunkname, const char *mode) [int]\nLoads a Lua chunk without running it. If there are no errors, `lua_load` pushes the compiled\nchunk as a Lua function on top of the stack. Otherwise, it pushes an error message.\n\nThe `lua_load` function uses a user-supplied `reader` function to read the chunk (see\n`lua_Reader`). The `data` argument is an opaque value passed to the reader function.\n\nThe `chunkname` argument gives a name to the chunk, which is used for error messages and in\ndebug information (see §4.7).\n\n`lua_load` automatically detects whether the chunk is text or binary and loads it accordingly\n(see program `luac`). The string `mode` works as in function `load`, with the addition that a\n`NULL` value is equivalent to the string "`bt`".\n\n`lua_load` uses the stack internally, so the reader function must always leave the stack\nunmodified when returning.\n\n`lua_load` can return `LUA_OK`, `LUA_ERRSYNTAX`, or `LUA_ERRMEM`. The function may also return\nother values corresponding to errors raised by the read function (see §4.4.1).\n\nIf the resulting function has upvalues, its first upvalue is set to the value of the global\nenvironment stored at index `LUA_RIDX_GLOBALS` in the registry (see §4.3). When loading main\nchunks, this upvalue will be the `_ENV` variable (see §2.2). Other upvalues are initialized\nwith `nil`.\n\n
+lua_newstate lua_newstate(lua_Alloc f, void *ud) [lua_State*]\nCreates a new independent state and returns its main thread. Returns `NULL` if it cannot create\nthe thread or the state (due to lack of memory). The argument `f` is the allocator function;\nLua will do all memory allocation for this state through this function. The second argument,\n`ud`, is an opaque pointer that Lua passes to the allocator in every call.\n\n
lua_newtable lua_newtable(lua_State *L) [void]\nCreates a new empty table and pushes it onto the stack. It is equivalent to\n`lua_createtable(L, 0, 0)`.\n
-lua_newthread lua_newthread(lua_State *L) [lua_State*]\nCreates a new thread, pushes it on the stack, and returns a pointer to a\n`lua_State` that represents this new thread. The new thread returned by this\nfunction shares with the original thread its global environment, but has an\nindependent execution stack.\n\nThreads are subject to garbage collection, like any Lua object.\n
-lua_newuserdatauv lua_newuserdatauv(lua_State *L, size_t size, int nuvalue) [void*]\nThis function creates and pushes on the stack a new full userdata, with \n`nuvalue` associated Lua values, called *user values*, plus an associated block \nof raw memory with `size` bytes. (The user values can be set and read with the \nfunctions `lua_setiuservalue` and `lua_getiuservalue`.)\n\nThe function returns the address of the block of memory. Lua ensures that this \naddress is valid as long as the corresponding userdata is alive (see §2.5).\nMoreover, if the userdata is marked for finalization (see §2.5.3), its address \nis valid at least until the call to its finalizer.\n
-lua_next lua_next(lua_State *L, int index) [int]\n\nPops a key from the stack, and pushes a key-value pair from the table at\nthe given index, the "next" pair after the given key. If there are no more\nelements in the table, then `lua_next` returns 0 and pushes nothing.\n\nA typical table traversal looks like this:\n\n /* table is in the stack at index 't' */\n lua_pushnil(L); /* first key */\n while (lua_next(L, t) != 0) {\n /* uses 'key' (at index -2) and 'value' (at index -1) */\n printf("%s - %s\\n",\n lua_typename(L, lua_type(L, -2)),\n lua_typename(L, lua_type(L, -1)));\n /* removes 'value'; keeps 'key' for next iteration */\n lua_pop(L, 1);\n }\n\nWhile traversing a table, avoid calling `lua_tolstring` directly on a key, \nunless you know that the key is actually a string. Recall that `lua_tolstring` \nmay change the value at the given index; this confuses the next call to \n`lua_next`.\n\nThis function may raise an error if the given key is neither nil nor present in \nthe table. See function `next` for the caveats of modifying the table during \nits traversal.\n
-lua_Number lua_Number [double]\nThe type of floats in Lua. By default this type is double, but that can be\nchanged to a single float. (See `LUA_REAL` in `luaconf.h`.)\n
-lua_numbertointeger lua_numbertointeger(lua_Number n, lua_Integer *p) [int]\nTries to convert a Lua float to a Lua integer; the float `n` must have an\nintegral value. If that value is within the range of Lua integers, it is\nconverted to an integer and assigned to `*p`. The macro results in a boolean\nindicating whether the conversion was successful. (Note that this range test\ncan be tricky to do correctly without this macro, due to rounding.)\n\nThis macro may evaluate its arguments more than once.\n
-lua_pcall lua_pcall(lua_State *L, int nargs, int nresults, int msgh) [int]\nCalls a function (or a callable object) in protected mode.\n\nBoth `nargs` and `nresults` have the same meaning as in `lua_call`. If there\nare no errors during the call, `lua_pcall` behaves exactly like `lua_call`.\nHowever, if there is any error,\n\n`lua_pcall` catches it, pushes a single value on the stack (the error object),\nand returns an error code. Like `lua_call`, `lua_pcall` always removes the\nfunction and its arguments from the stack.\n\nIf `msgh` is 0, then the error object returned on the stack is exactly the\noriginal error object. Otherwise, `msgh` is the stack index of a _message\nhandler_. (In the current implementation, this index cannot be a pseudo-index.)\nIn case of runtime errors, this handler will be called with the error object\nand its return value will be the object returned on the stack by `lua_pcall`.\n\nTypically, the message handler is used to add more debug information to the\nerror object, such as a stack traceback. Such information cannot be gathered\nafter the return of `lua_pcall`, since by then the stack has unwound.\n\nThe `lua_pcall` function returns one of the following status codes: `LUA_OK`,\n`LUA_ERRRUN`, `LUA_ERRMEM`, or `LUA_ERRERR`.\n
-lua_pcallk lua_pcallk(lua_State *L, int nargs, int nresults, int msgh, lua_KContext ctx, lua_KFunction k) [int]\nThis function behaves exactly like `lua_pcall`, except that it allows the called \nfunction to yield (see §4.5).\n
-lua_pop lua_pop(lua_State *L, int n) [void]\nPops `n` elements from the stack.\n\nThis function can run arbitrary code when removing an index marked as \nto-be-closed from the stack.\n
+lua_newthread lua_newthread(lua_State *L) [lua_State*]\nCreates a new thread, pushes it on the stack, and returns a pointer to a `lua_State` that\nrepresents this new thread. The new thread returned by this function shares with the original\nthread its global environment, but has an independent execution stack.\n\nThreads are subject to garbage collection, like any Lua object.\n
+lua_newuserdatauv lua_newuserdatauv(lua_State *L, size_t size, int nuvalue) [void*]\nThis function creates and pushes on the stack a new full userdata, with `nuvalue` associated Lua\nvalues, called *user values*, plus an associated block of raw memory with `size` bytes. (The user\nvalues can be set and read with the functions `lua_setiuservalue` and `lua_getiuservalue`.)\n\nThe function returns the address of the block of memory. Lua ensures that this address is valid\nas long as the corresponding userdata is alive (see §2.5). Moreover, if the userdata is marked\nfor finalization (see §2.5.3), its address is valid at least until the call to its finalizer.\n
+lua_next lua_next(lua_State *L, int index) [int]\nPops a key from the stack, and pushes a key-value pair from the table at the given index, the\n"next" pair after the given key. If there are no more elements in the table, then `lua_next`\nreturns 0 and pushes nothing.\n\nA typical table traversal looks like this:\n\n /* table is in the stack at index 't' */\n lua_pushnil(L); /* first key */\n while (lua_next(L, t) != 0) {\n /* uses 'key' (at index -2) and 'value' (at index -1) */\n printf("%s - %s\n",\n lua_typename(L, lua_type(L, -2)),\n lua_typename(L, lua_type(L, -1)));\n /* removes 'value'; keeps 'key' for next iteration */\n lua_pop(L, 1);\n }\n\nWhile traversing a table, avoid calling `lua_tolstring` directly on a key, unless you know that\nthe key is actually a string. Recall that `lua_tolstring` may change the value at the given\nindex; this confuses the next call to `lua_next`.\n\nThis function may raise an error if the given key is neither nil nor present in the table.\nSee function `next` for the caveats of modifying the table during its traversal.\n
+lua_Number lua_Number [double]\nThe type of floats in Lua. By default this type is double, but that can be changed to a\nsingle float. (See `LUA_REAL` in `luaconf.h`.)\n
+lua_numbertointeger lua_numbertointeger(lua_Number n, lua_Integer *p) [int]\nTries to convert a Lua float to a Lua integer; the float `n` must have an integral value.\nIf that value is within the range of Lua integers, it is converted to an integer and assigned\nto `*p`. The macro results in a boolean indicating whether the conversion was successful.\n(Note that this range test can be tricky to do correctly without this macro, due to rounding.)\n\nThis macro may evaluate its arguments more than once.\n
+lua_pcall lua_pcall(lua_State *L, int nargs, int nresults, int msgh) [int]\nCalls a function (or a callable object) in protected mode.\n\nBoth `nargs` and `nresults` have the same meaning as in `lua_call`. If there are no errors\nduring the call, `lua_pcall` behaves exactly like `lua_call`. However, if there is any error,\n\n`lua_pcall` catches it, pushes a single value on the stack (the error object), and returns an\nerror code. Like `lua_call`, `lua_pcall` always removes the function and its arguments from\nthe stack.\n\nIf `msgh` is 0, then the error object returned on the stack is exactly the original error object.\nOtherwise, `msgh` is the stack index of a _message handler_. (In the current implementation,\nthis index cannot be a pseudo-index.) In case of runtime errors, this handler will be called\nwith the error object and its return value will be the object returned on the stack by `lua_pcall`.\n\nTypically, the message handler is used to add more debug information to the error object, such\nas a stack traceback. Such information cannot be gathered after the return of `lua_pcall`,\nsince by then the stack has unwound.\n\nThe `lua_pcall` function returns one of the following status codes: `LUA_OK`, `LUA_ERRRUN`,\n`LUA_ERRMEM`, or `LUA_ERRERR`.\n
+lua_pcallk lua_pcallk(lua_State *L, int nargs, int nresults, int msgh, lua_KContext ctx, lua_KFunction k) [int]\nThis function behaves exactly like `lua_pcall`, except that it allows the called function to\nyield (see §4.5).\n
+lua_pop lua_pop(lua_State *L, int n) [void]\nPops `n` elements from the stack.\n\nThis function can run arbitrary code when removing an index marked as to-be-closed from the stack.\n
lua_pushboolean lua_pushboolean(lua_State *L, int b) [void]\nPushes a boolean value with value `b` onto the stack.\n
-lua_pushcclosure lua_pushcclosure(lua_State *L, lua_CFunction fn, int n) [void]\nPushes a new C closure onto the stack.\n\nThis function receives a pointer to a C function and pushes onto the stack a Lua \nvalue of type `function` that, when called, invokes the corresponding \nC function. The parameter `n` tells how many upvalues this function will have\n(see §4.2).\n\nAny function to be callable by Lua must follow the correct protocol to receive \nits parameters and return its results (see `lua_CFunction`).\n\nWhen a C function is created, it is possible to associate some values with it,\nthe so called upvalues; these upvalues are then accessible to the function \nwhenever it is called. This association is called a C closure (see §4.2). To \ncreate a C closure, first the initial values for its upvalues must be pushed \nonto the stack. (When there are multiple values, the first value is pushed \nfirst.) Then `lua_pushcclosure` is called to create and push the C function \nonto the stack, with the argument `n` telling how many values will be associated \nwith the function. `lua_pushcclosure` also pops these values from the stack.\n\nThe maximum value for `n` is 255.\n\nWhen `n` is zero, this function creates a _light C function_, which is just a\npointer to the C function. In that case, it never raises a memory error.\n
-lua_pushcfunction lua_pushcfunction(lua_State *L, lua_CFunction f) [void]\nPushes a C function onto the stack. This function is equivalent to \n`lua_pushcclosure` with no upvalues.\n
-lua_pushfstring lua_pushfstring(lua_State *L, const char *fmt, ...) [const char*]\nPushes onto the stack a formatted string and returns a pointer to this string\n(see §4.1.3). It is similar to the ISO C function `sprintf`, but has two\nimportant differences. First, you do not have to allocate space for the result; \nthe result is a Lua string and Lua takes care of memory allocation (and \ndeallocation, through garbage collection). Second, the conversion specifiers \nare quite restricted. There are no flags, widths, or precisions. The \nconversion specifiers can only be '%%' (inserts the character '%' in the \nstring), '%s' (inserts a zero-terminated string, with no size restrictions), \n'%f' (inserts a `lua_Number`), '%L' (inserts a `lua_Integer`), '%p' (inserts a \npointer as a hexadecimal numeral), '%d' (inserts an `int`), '%c' (inserts an \n`int` as a one-byte character), and '%U' (inserts a `long int` as a UTF-8 byte \nsequence).\n \nThis function may raise errors due to memory overflow or an invalid conversion \nspecifier.\n
+lua_pushcclosure lua_pushcclosure(lua_State *L, lua_CFunction fn, int n) [void]\nPushes a new C closure onto the stack.\n\nThis function receives a pointer to a C function and pushes onto the stack a Lua value of type\n`function` that, when called, invokes the corresponding C function. The parameter `n` tells\nhow many upvalues this function will have (see §4.2).\n\nAny function to be callable by Lua must follow the correct protocol to receive its parameters\nand return its results (see `lua_CFunction`).\n\nWhen a C function is created, it is possible to associate some values with it, the so\ncalled upvalues; these upvalues are then accessible to the function whenever it is called.\nThis association is called a C closure (see §4.2). To create a C closure, first the initial\nvalues for its upvalues must be pushed onto the stack. (When there are multiple values, the first\nvalue is pushed first.) Then `lua_pushcclosure` is called to create and push the C function onto\nthe stack, with the argument `n` telling how many values will be associated with the function.\n`lua_pushcclosure` also pops these values from the stack.\n\nThe maximum value for `n` is 255.\n\nWhen `n` is zero, this function creates a _light C function_, which is just a pointer to the\nC function. In that case, it never raises a memory error.\n
+lua_pushcfunction lua_pushcfunction(lua_State *L, lua_CFunction f) [void]\nPushes a C function onto the stack. This function is equivalent to `lua_pushcclosure` with\nno upvalues.\n
+lua_pushfstring lua_pushfstring(lua_State *L, const char *fmt, ...) [const char*]\nPushes onto the stack a formatted string and returns a pointer to this string (see §4.1.3).\nIt is similar to the ISO C function `sprintf`, but has two important differences. First, you do\nnot have to allocate space for the result; the result is a Lua string and Lua takes care of memory\nallocation (and deallocation, through garbage collection). Second, the conversion specifiers\nare quite restricted. There are no flags, widths, or precisions. The conversion specifiers can\nonly be '%%' (inserts the character '%' in the string), '%s' (inserts a zero-terminated string,\nwith no size restrictions), '%f' (inserts a `lua_Number`), '%L' (inserts a `lua_Integer`), '%p'\n(inserts a pointer as a hexadecimal numeral), '%d' (inserts an `int`), '%c' (inserts an `int`\nas a one-byte character), and '%U' (inserts a `long int` as a UTF-8 byte sequence).\n\nThis function may raise errors due to memory overflow or an invalid conversion specifier.\n
lua_pushglobaltable lua_pushglobaltable(lua_State *L) [void]\nPushes the global environment onto the stack.\n
lua_pushinteger lua_pushinteger(lua_State *L, lua_Integer n) [void]\nPushes an integer with value `n` onto the stack.\n
-lua_pushlightuserdata lua_pushlightuserdata(lua_State *L, void *p) [void]\nPushes a light userdata onto the stack.\n\nUserdata represent C values in Lua. A _light userdata_ represents a pointer, a\n`void*`. It is a value (like a number): you do not create it, it has no\nindividual metatable, and it is not collected (as it was never created). A\nlight userdata is equal to "any" light userdata with the same C address.\n
-lua_pushliteral lua_pushliteral(lua_State *L, const char *s) [const char*]\nThis macro is equivalent to `lua_pushlstring`, but can be used only when `s` is\na literal string. (Lua may optimize this case.)\n
-lua_pushlstring lua_pushlstring(lua_State *L, const char *s, size_t len) [const char*]\nPushes the string pointed to by `s` with size `len` onto the stack. Lua will\nmake or reuse an internal copy of the given string, so the memory at `s` can\nbe freed or reused immediately after the function returns. The string can\ncontain any binary data, including embedded zeros.\n\nReturns a pointer to the internal copy of the string (see §4.1.3).\n
+lua_pushlightuserdata lua_pushlightuserdata(lua_State *L, void *p) [void]\nPushes a light userdata onto the stack.\n\nUserdata represent C values in Lua. A _light userdata_ represents a pointer, a `void*`. It is\na value (like a number): you do not create it, it has no individual metatable, and it is not\ncollected (as it was never created). A light userdata is equal to "any" light userdata with\nthe same C address.\n
+lua_pushliteral lua_pushliteral(lua_State *L, const char *s) [const char*]\nThis macro is equivalent to `lua_pushlstring`, but can be used only when `s` is a literal string.\n(Lua may optimize this case.)\n
+lua_pushlstring lua_pushlstring(lua_State *L, const char *s, size_t len) [const char*]\nPushes the string pointed to by `s` with size `len` onto the stack. Lua will make or reuse\nan internal copy of the given string, so the memory at `s` can be freed or reused immediately\nafter the function returns. The string can contain any binary data, including embedded zeros.\n\nReturns a pointer to the internal copy of the string (see §4.1.3).\n
lua_pushnil lua_pushnil(lua_State *L) [void]\nPushes a nil value onto the stack.\n
lua_pushnumber lua_pushnumber(lua_State *L, lua_Number n) [void]\nPushes a float with value `n` onto the stack.\n
-lua_pushstring lua_pushstring(lua_State *L, const char *s) [const char*]\nPushes the zero-terminated string pointed to by `s` onto the stack. Lua will\nmake or reuse an internal copy of the given string, so the memory at `s`\ncan be freed or reused immediately after the function returns. The string\ncannot contain embedded zeros; it is assumed to end at the first zero.\n\nReturns a pointer to the internal copy of the string (see §4.1.3).\n\nIf `s` is `NULL`, pushes nil and returns `NULL`.\n
-lua_pushthread lua_pushthread(lua_State *L) [int]\nPushes the thread represented by `L` onto the stack. Returns 1 if this\nthread is the main thread of its state.\n
+lua_pushstring lua_pushstring(lua_State *L, const char *s) [const char*]\nPushes the zero-terminated string pointed to by `s` onto the stack. Lua will make or reuse\nan internal copy of the given string, so the memory at `s` can be freed or reused immediately\nafter the function returns. The string cannot contain embedded zeros; it is assumed to end at\nthe first zero.\n\nReturns a pointer to the internal copy of the string (see §4.1.3).\n\nIf `s` is `NULL`, pushes nil and returns `NULL`.\n
+lua_pushthread lua_pushthread(lua_State *L) [int]\nPushes the thread represented by `L` onto the stack. Returns 1 if this thread is the main\nthread of its state.\n
lua_pushvalue lua_pushvalue(lua_State *L, int index) [void]\nPushes a copy of the element at the given index onto the stack.\n
-lua_pushvfstring lua_pushvfstring(lua_State *L, const char *fmt, va_list argp) [const char*]\nEquivalent to `lua_pushfstring`, except that it receives a `va_list` instead\nof a variable number of arguments.\n
-lua_rawequal lua_rawequal(lua_State *L, int index1, int index2) [int]\nReturns 1 if the two values in indices `index1` and `index2` are primitively\nequal (that is, equal without calling the `__eq` metamethod). Otherwise returns \n0. Also returns 0 if any of the indices are not valid.\n
+lua_pushvfstring lua_pushvfstring(lua_State *L, const char *fmt, va_list argp) [const char*]\nEquivalent to `lua_pushfstring`, except that it receives a `va_list` instead of a variable\nnumber of arguments.\n
+lua_rawequal lua_rawequal(lua_State *L, int index1, int index2) [int]\nReturns 1 if the two values in indices `index1` and `index2` are primitively equal (that is,\nequal without calling the `__eq` metamethod). Otherwise returns 0. Also returns 0 if any of\nthe indices are not valid.\n
lua_rawget lua_rawget(lua_State *L, int index) [int]\nSimilar to `lua_gettable`, but does a raw access (i.e., without metamethods).\n
-lua_rawgeti lua_rawgeti(lua_State *L, int index, lua_Integer n) [int]\nPushes onto the stack the value `t[n]`, where `t` is the table at the given\nindex. The access is raw, that is, it does not use the `__index` metavalue.\n\nReturns the type of the pushed value.\n
-lua_rawgetp lua_rawgetp(lua_State *L, int index, const void *p) [int]\nPushes onto the stack the value `t[k]`, where `t` is the table at the given\nindex and `k` is the pointer `p` represented as a light userdata. The access\nis raw, that is, it does not use the `__index` metavalue.\n\nReturns the type of the pushed value.\n
-lua_rawlen lua_rawlen(lua_State *L, int index) [lua_Unsigned]\nReturns the raw "length" of the value at the given index: for strings, this\nis the string length; for tables, this is the result of the length operator\n('`#`') with no metamethods; for userdata, this is the size of the block of\nmemory allocated for the userdata. For other values, this call returns 0.\n
-lua_rawset lua_rawset(lua_State *L, int index) [void]\nSimilar to `lua_settable`, but does a raw assignment (i.e., without\nmetamethods).\n
-lua_rawseti lua_rawseti(lua_State *L, int index, lua_Integer i) [void]\nDoes the equivalent of `t[i] = v`, where `t` is the table at the given index\nand `v` is the value on the top of the stack.\n\nThis function pops the value from the stack. The assignment is raw, that is, it\ndoes not use the `__newindex` metavalue.\n
-lua_rawsetp lua_rawsetp(lua_State *L, int index, const void *p) [void]\nDoes the equivalent of `t[k] = v`, where `t` is the table at the given index,\n`k` is the pointer `p` represented as a light userdata, and `v` is the value on\nthe top of the stack.\n\nThis function pops the value from the stack. The assignment is raw, that is, it\ndoes not use the `__newindex` metavalue.\n
-lua_Reader (*lua_Reader)(lua_State *L, void *data, size_t *size) [const char*]\nThe reader function used by `lua_load`. Every time `lua_load` needs another \npiece of the chunk, it calls the reader, passing along its `data` parameter.\nThe reader must return a pointer to a block of memory with a new piece of\nthe chunk and set `size` to the block size. The block must exist until the\nreader function is called again. To signal the end of the chunk, the reader\nmust return `NULL` or set `size` to zero. The reader function may return\npieces of any size greater than zero.\n
-lua_register lua_register(lua_State *L, const char *name, lua_CFunction f) [void]\nSets the C function `f` as the new value of global `name`. It is defined\nas a macro:\n\n #define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))\n
-lua_remove lua_remove(lua_State *L, int index) [void]\nRemoves the element at the given valid index, shifting down the elements\nabove this index to fill the gap. This function cannot be called with a\npseudo-index, because a pseudo-index is not an actual stack position.\n
-lua_replace lua_replace(lua_State *L, int index) [void]\nMoves the top element into the given valid index, without shifting any element\n(therefore replacing the value at the given index), and then pops the top\nelement.\n
-lua_resetthread lua_resetthread(lua_State *L) [void]\nResets a thread, cleaning its call stack and closing all pending to-be-closed \nvariables. Returns a status code: `LUA_OK` for no errors in closing methods, or \nan error status otherwise. In case of error, leaves the error object on the top \nof the stack.\n
-lua_resume lua_resume(lua_State *L, lua_State *from, int nargs, int *nresults) [int]\nStarts and resumes a coroutine in the given thread `L`.\n\nTo start a coroutine, you push the main function plus any arguments onto the\nempty stack of the thread. Then you call `lua_resume`, with `nargs` being the \nnumber of arguments. This call returns when the coroutine suspends or finishes \nits execution. When it returns, `*nresults` is updated and the top of the stack \ncontains the `*nresults` values passed to `lua_yield` or returned by the body \nfunction. `lua_resume` returns `LUA_YIELD` if the coroutine yields, `LUA_OK` if \nthe coroutine finishes its execution without errors, or an error code in case of \nerrors (see §4.4.1). In case of errors, the error object is on the top of the \nstack.\n\nTo resume a coroutine, you remove the `*nresults` yielded values from its stack,\npush the values to be passed as results from `yield`, and then call\n`lua_resume`.\n\nThe parameter `from` represents the coroutine that is resuming `L`. If there\nis no such coroutine, this parameter can be `NULL`.\n
-lua_rotate lua_rotate(lua_State *L, int index, int n) [void]\nRotates the stack elements from `index` to the top `n` positions in the\ndirection of the top, for a positive `n`, or `-n` positions in the direction of\nthe bottom, for a negative `n`. The absolute value of `n` must not be greater\nthan the size of the slice being rotated.\n
+lua_rawgeti lua_rawgeti(lua_State *L, int index, lua_Integer n) [int]\nPushes onto the stack the value `t[n]`, where `t` is the table at the given index. The access\nis raw, that is, it does not use the `__index` metavalue.\n\nReturns the type of the pushed value.\n
+lua_rawgetp lua_rawgetp(lua_State *L, int index, const void *p) [int]\nPushes onto the stack the value `t[k]`, where `t` is the table at the given index and `k` is the\npointer `p` represented as a light userdata. The access is raw, that is, it does not use the\n`__index` metavalue.\n\nReturns the type of the pushed value.\n
+lua_rawlen lua_rawlen(lua_State *L, int index) [lua_Unsigned]\nReturns the raw "length" of the value at the given index: for strings, this is the string length;\nfor tables, this is the result of the length operator ('`#`') with no metamethods; for userdata,\nthis is the size of the block of memory allocated for the userdata. For other values, this call\nreturns 0.\n
+lua_rawset lua_rawset(lua_State *L, int index) [void]\nSimilar to `lua_settable`, but does a raw assignment (i.e., without metamethods).\n
+lua_rawseti lua_rawseti(lua_State *L, int index, lua_Integer i) [void]\nDoes the equivalent of `t[i] = v`, where `t` is the table at the given index and `v` is the\nvalue on the top of the stack.\n\nThis function pops the value from the stack. The assignment is raw, that is, it does not use\nthe `__newindex` metavalue.\n
+lua_rawsetp lua_rawsetp(lua_State *L, int index, const void *p) [void]\nDoes the equivalent of `t[k] = v`, where `t` is the table at the given index, `k` is the pointer\n`p` represented as a light userdata, and `v` is the value on the top of the stack.\n\nThis function pops the value from the stack. The assignment is raw, that is, it does not use\nthe `__newindex` metavalue.\n
+lua_Reader (*lua_Reader)(lua_State *L, void *data, size_t *size) [const char*]\nThe reader function used by `lua_load`. Every time `lua_load` needs another piece of the chunk,\nit calls the reader, passing along its `data` parameter. The reader must return a pointer to a\nblock of memory with a new piece of the chunk and set `size` to the block size. The block must\nexist until the reader function is called again. To signal the end of the chunk, the reader\nmust return `NULL` or set `size` to zero. The reader function may return pieces of any size\ngreater than zero.\n
+lua_register lua_register(lua_State *L, const char *name, lua_CFunction f) [void]\nSets the C function `f` as the new value of global `name`. It is defined as a macro:\n\n #define lua_register(L,n,f) (lua_pushcfunction(L, f), lua_setglobal(L, n))\n
+lua_remove lua_remove(lua_State *L, int index) [void]\nRemoves the element at the given valid index, shifting down the elements above this index to\nfill the gap. This function cannot be called with a pseudo-index, because a pseudo-index is\nnot an actual stack position.\n
+lua_replace lua_replace(lua_State *L, int index) [void]\nMoves the top element into the given valid index, without shifting any element (therefore\nreplacing the value at the given index), and then pops the top element.\n
+lua_resetthread lua_resetthread(lua_State *L) [void]\nResets a thread, cleaning its call stack and closing all pending to-be-closed variables.\nReturns a status code: `LUA_OK` for no errors in closing methods, or an error status otherwise.\nIn case of error, leaves the error object on the top of the stack.\n
+lua_resume lua_resume(lua_State *L, lua_State *from, int nargs, int *nresults) [int]\nStarts and resumes a coroutine in the given thread `L`.\n\nTo start a coroutine, you push the main function plus any arguments onto the empty stack of\nthe thread. Then you call `lua_resume`, with `nargs` being the number of arguments. This call\nreturns when the coroutine suspends or finishes its execution. When it returns, `*nresults`\nis updated and the top of the stack contains the `*nresults` values passed to `lua_yield`\nor returned by the body function. `lua_resume` returns `LUA_YIELD` if the coroutine yields,\n`LUA_OK` if the coroutine finishes its execution without errors, or an error code in case of\nerrors (see §4.4.1). In case of errors, the error object is on the top of the stack.\n\nTo resume a coroutine, you remove the `*nresults` yielded values from its stack, push the values\nto be passed as results from `yield`, and then call `lua_resume`.\n\nThe parameter `from` represents the coroutine that is resuming `L`. If there is no such coroutine,\nthis parameter can be `NULL`.\n
+lua_rotate lua_rotate(lua_State *L, int index, int n) [void]\nRotates the stack elements from `index` to the top `n` positions in the direction of the top,\nfor a positive `n`, or `-n` positions in the direction of the bottom, for a negative `n`.\nThe absolute value of `n` must not be greater than the size of the slice being rotated.\n
lua_setallocf lua_setallocf(lua_State *L, lua_Alloc f, void *ud) [void]\nChanges the allocator function of a given state to `f` with user data `ud`.\n
-lua_setfield lua_setfield(lua_State *L, int index, const char *k) [void]\nDoes the equivalent to `t[k] = v`, where `t` is the value at the given index\nand `v` is the value on the top of the stack.\n\nThis function pops the value from the stack. As in Lua, this function may\ntrigger a metamethod for the "newindex" event (see §2.4).\n
+lua_setfield lua_setfield(lua_State *L, int index, const char *k) [void]\nDoes the equivalent to `t[k] = v`, where `t` is the value at the given index and `v` is the\nvalue on the top of the stack.\n\nThis function pops the value from the stack. As in Lua, this function may trigger a metamethod\nfor the "newindex" event (see §2.4).\n
lua_setglobal lua_setglobal(lua_State *L, const char *name) [void]\nPops a value from the stack and sets it as the new value of global `name`.\n
-lua_seti lua_seti(lua_State *L, int index, lua_Integer n) [void]\nDoes the equivalent to `t[n] = v`, where `t` is the value at the given index and\n`v` is the value on the top of the stack.\n\nThis function pops the value from the stack. As in Lua, this function may\ntrigger a metamethod for the "newindex" event (see §2.4).\n
-lua_setiuservalue lua_setiuservalue(lua_State *L, int index, int n) [int]\nPops a value from the stack and sets it as the new `n`-th user value associated \nto the full userdata at the given index. Returns 0 if the userdata does not \nhave that value.\n
-lua_setmetatable lua_setmetatable(lua_State *L, int index) [int]\nPops a table or nil from the stack and sets that value as the new metatable for \nthe value at the given index (nil means no metatable).\n\n(For historical reasons, this function returns an `int`, which now is always 1.)\n
-lua_settable lua_settable(lua_State *L, int index) [void]\nDoes the equivalent to `t[k] = v`, where `t` is the value at the given index,\n`v` is the value on the top of the stack, and `k` is the value just below the\ntop.\n\nThis function pops both the key and the value from the stack. As in Lua,\nthis function may trigger a metamethod for the "newindex" event (see §2.4).\n
-lua_settop lua_settop(lua_State *L, int index) [void]\nAccepts any index, or 0, and sets the stack top to this index. If the new\ntop is greater than the old one, then the new elements are filled with nil. \nIf `index` is 0, then all stack elements are removed.\n\nThis function can run arbitrary code when removing an index marked as \nto-be-closed from the stack.\n
-lua_setwarnf lua_setwarnf(lua_State *L, lua_WarnFunction f, void *ud) [void]\nSets the warning function to be used by Lua to emit warnings (see \n`lua_WarnFunction`). The `ud` parameter sets the value `ud` passed to the \nwarning function.\n
-lua_State lua_State [struct lua_State]\nAn opaque structure that points to a thread and indirectly (through the thread)\nto the whole state of a Lua interpreter. The Lua library is fully reentrant: it\nhas no global variables. All information about a state is accessible through\nthis structure.\n\nA pointer to this structure must be passed as the first argument to every\nfunction in the library, except to `lua_newstate`, which creates a Lua state\nfrom scratch.\n
-lua_status lua_status(lua_State *L) [int]\nReturns the status of the thread `L`.\n\nThe status can be `LUA_OK` for a normal thread, an error code if the thread\nfinished the execution of a `lua_resume` with an error, or `LUA_YIELD` if the\nthread is suspended.\n\nYou can call functions only in threads with status `LUA_OK`. You can resume\nthreads with status `LUA_OK` (to start a new coroutine) or `LUA_YIELD` (to\nresume a coroutine).\n
-lua_stringtonumber lua_stringtonumber(lua_State *L, const char *s) [size_t]\nConverts the zero-terminated string `s` to a number, pushes that number into the\nstack, and returns the total size of the string, that is, its length plus one.\nThe conversion can result in an integer or a float, according to the lexical\nconventions of Lua (see §3.1). The string may have leading and trailing \nwhitespaces and a sign. If the string is not a valid numeral, returns 0 and \npushes nothing. (Note that the result can be used as a boolean, true if the \nconversion succeeds.)\n
-lua_toboolean lua_toboolean(lua_State *L, int index) [int]\nConverts the Lua value at the given index to a C boolean value (0 or 1).\nLike all tests in Lua, `lua_toboolean` returns true for any Lua value different\nfrom false and nil; otherwise it returns false. (If you want to accept only\nactual boolean values, use `lua_isboolean` to test the value's type.)\n
-lua_toclose lua_toclose(lua_State *L, int index) [void]\nMarks the given index in the stack as a to-be-closed "variable" (see §3.3.8).\nLike a to-be-closed variable in Lua, the value at that index in the stack will \nbe closed when it goes out of scope. Here, in the context of a C function, to \ngo out of scope means that the running function returns to Lua, there is an \nerror, or the index is removed from the stack through `lua_settop` or `lua_pop`.\nAn index marked as to-be-closed should not be removed from the stack by any \nother function in the API except `lua_settop` or `lua_pop`.\n\nThis function should not be called for an index that is equal to or below an \nactive to-be-closed index.\n\nIn the case of an out-of-memory error, the value in the given index is \nimmediately closed, as if it was already marked.\n\nNote that, both in case of errors and of a regular return, by the time the \n`__close` metamethod runs, the C stack was already unwound, so that any \nautomatic C variable declared in the calling function will be out of scope.\n
-lua_tocfunction lua_tocfunction(lua_State *L, int index) [lua_CFunction]\nConverts a value at the given index to a C function. That value must be a\nC function; otherwise, returns `NULL`.\n
+lua_seti lua_seti(lua_State *L, int index, lua_Integer n) [void]\nDoes the equivalent to `t[n] = v`, where `t` is the value at the given index and `v` is the\nvalue on the top of the stack.\n\nThis function pops the value from the stack. As in Lua, this function may trigger a metamethod\nfor the "newindex" event (see §2.4).\n
+lua_setiuservalue lua_setiuservalue(lua_State *L, int index, int n) [int]\nPops a value from the stack and sets it as the new `n`-th user value associated to the full\nuserdata at the given index. Returns 0 if the userdata does not have that value.\n
+lua_setmetatable lua_setmetatable(lua_State *L, int index) [int]\nPops a table or nil from the stack and sets that value as the new metatable for the value at\nthe given index (nil means no metatable).\n\n(For historical reasons, this function returns an `int`, which now is always 1.)\n
+lua_settable lua_settable(lua_State *L, int index) [void]\nDoes the equivalent to `t[k] = v`, where `t` is the value at the given index, `v` is the value\non the top of the stack, and `k` is the value just below the top.\n\nThis function pops both the key and the value from the stack. As in Lua, this function may\ntrigger a metamethod for the "newindex" event (see §2.4).\n
+lua_settop lua_settop(lua_State *L, int index) [void]\nAccepts any index, or 0, and sets the stack top to this index. If the new top is greater than\nthe old one, then the new elements are filled with nil. If `index` is 0, then all stack elements\nare removed.\n\nThis function can run arbitrary code when removing an index marked as to-be-closed from the stack.\n
+lua_setwarnf lua_setwarnf(lua_State *L, lua_WarnFunction f, void *ud) [void]\nSets the warning function to be used by Lua to emit warnings (see `lua_WarnFunction`). The `ud`\nparameter sets the value `ud` passed to the warning function.\n
+lua_State lua_State [struct lua_State]\nAn opaque structure that points to a thread and indirectly (through the thread) to the whole\nstate of a Lua interpreter. The Lua library is fully reentrant: it has no global variables.\nAll information about a state is accessible through this structure.\n\nA pointer to this structure must be passed as the first argument to every function in the library,\nexcept to `lua_newstate`, which creates a Lua state from scratch.\n
+lua_status lua_status(lua_State *L) [int]\nReturns the status of the thread `L`.\n\nThe status can be `LUA_OK` for a normal thread, an error code if the thread finished the\nexecution of a `lua_resume` with an error, or `LUA_YIELD` if the thread is suspended.\n\nYou can call functions only in threads with status `LUA_OK`. You can resume threads with status\n`LUA_OK` (to start a new coroutine) or `LUA_YIELD` (to resume a coroutine).\n
+lua_stringtonumber lua_stringtonumber(lua_State *L, const char *s) [size_t]\nConverts the zero-terminated string `s` to a number, pushes that number into the stack, and\nreturns the total size of the string, that is, its length plus one. The conversion can result\nin an integer or a float, according to the lexical conventions of Lua (see §3.1). The string\nmay have leading and trailing whitespaces and a sign. If the string is not a valid numeral,\nreturns 0 and pushes nothing. (Note that the result can be used as a boolean, true if the\nconversion succeeds.)\n
+lua_toboolean lua_toboolean(lua_State *L, int index) [int]\nConverts the Lua value at the given index to a C boolean value (0 or 1). Like all tests in\nLua, `lua_toboolean` returns true for any Lua value different from false and nil; otherwise it\nreturns false. (If you want to accept only actual boolean values, use `lua_isboolean` to test\nthe value's type.)\n
+lua_toclose lua_toclose(lua_State *L, int index) [void]\nMarks the given index in the stack as a to-be-closed "variable" (see §3.3.8). Like a to-be-closed\nvariable in Lua, the value at that index in the stack will be closed when it goes out of scope.\nHere, in the context of a C function, to go out of scope means that the running function returns to\nLua, there is an error, or the index is removed from the stack through `lua_settop` or `lua_pop`.\nAn index marked as to-be-closed should not be removed from the stack by any other function in\nthe API except `lua_settop` or `lua_pop`.\n\nThis function should not be called for an index that is equal to or below an active to-be-closed\nindex.\n\nIn the case of an out-of-memory error, the value in the given index is immediately closed,\nas if it was already marked.\n\nNote that, both in case of errors and of a regular return, by the time the `__close` metamethod\nruns, the C stack was already unwound, so that any automatic C variable declared in the calling\nfunction will be out of scope.\n
+lua_tocfunction lua_tocfunction(lua_State *L, int index) [lua_CFunction]\nConverts a value at the given index to a C function. That value must be a C function; otherwise,\nreturns `NULL`.\n
lua_tointeger lua_tointeger(lua_State *L, int index) [lua_Integer]\nEquivalent to `lua_tointegerx` with `isnum` equal to `NULL`.\n
-lua_tointegerx lua_tointegerx(lua_State *L, int index, int *isnum) [lua_Integer]\nConverts the Lua value at the given index to the signed integral type\n`lua_Integer`. The Lua value must be an integer, or a number or a string\nconvertible to an integer (see §3.4.3); otherwise, `lua_tointegerx` returns 0.\n\nIf `isnum` is not `NULL`, its referent is assigned a boolean value that\nindicates whether the operation succeeded.\n
-lua_tolstring lua_tolstring(lua_State *L, int index, size_t *len) [const char*]\nConverts the Lua value at the given index to a C string. If `len` is not\n`NULL`, it sets `*len` with the string length. The Lua value must be a string\nor a number; otherwise, the function returns `NULL`. If the value is a number,\nthen `lua_tolstring` also _changes the actual value in the stack to a string_.\n(This change confuses `lua_next` when `lua_tolstring` is applied to keys during\na table traversal.)\n\n`lua_tolstring` returns a pointer to a string inside the Lua state (see §4.1.3). \nThis string always has a zero ('\0') after its last character (as in C), but can \ncontain other zeros in its body.\n
+lua_tointegerx lua_tointegerx(lua_State *L, int index, int *isnum) [lua_Integer]\nConverts the Lua value at the given index to the signed integral type `lua_Integer`. The Lua\nvalue must be an integer, or a number or a string convertible to an integer (see §3.4.3);\notherwise, `lua_tointegerx` returns 0.\n\nIf `isnum` is not `NULL`, its referent is assigned a boolean value that indicates whether the\noperation succeeded.\n
+lua_tolstring lua_tolstring(lua_State *L, int index, size_t *len) [const char*]\nConverts the Lua value at the given index to a C string. If `len` is not `NULL`, it sets `*len`\nwith the string length. The Lua value must be a string or a number; otherwise, the function\nreturns `NULL`. If the value is a number, then `lua_tolstring` also _changes the actual value\nin the stack to a string_. (This change confuses `lua_next` when `lua_tolstring` is applied\nto keys during a table traversal.)\n\n`lua_tolstring` returns a pointer to a string inside the Lua state (see §4.1.3). This string\nalways has a zero ('\0') after its last character (as in C), but can contain other zeros in\nits body.\n
lua_tonumber lua_tonumber(lua_State *L, int index) [lua_Number]\nEquivalent to `lua_tonumberx` with `isnum` equal to `NULL`.\n
-lua_tonumberx lua_tonumberx(lua_State *L, int index, int *isnum) [lua_Number]\nConverts the Lua value at the given index to the C type `lua_Number` (see\n`lua_Number`). The Lua value must be a number or a string convertible to a\nnumber (see §3.4.3); otherwise, `lua_tonumberx` returns 0.\n\nIf `isnum` is not `NULL`, its referent is assigned a boolean value that\nindicates whether the operation succeeded.\n
-lua_topointer lua_topointer(lua_State *L, int index) [const void*]\nConverts the value at the given index to a generic C pointer (`void*`).\nThe value can be a userdata, a table, a thread, a string, or a function; \notherwise, `lua_topointer` returns `NULL`. Different objects will give \ndifferent pointers. There is no way to convert the pointer back to its original \nvalue.\n\nTypically this function is used only for debug information.\n
+lua_tonumberx lua_tonumberx(lua_State *L, int index, int *isnum) [lua_Number]\nConverts the Lua value at the given index to the C type `lua_Number` (see `lua_Number`).\nThe Lua value must be a number or a string convertible to a number (see §3.4.3); otherwise,\n`lua_tonumberx` returns 0.\n\nIf `isnum` is not `NULL`, its referent is assigned a boolean value that indicates whether the\noperation succeeded.\n
+lua_topointer lua_topointer(lua_State *L, int index) [const void*]\nConverts the value at the given index to a generic C pointer (`void*`). The value can be a\nuserdata, a table, a thread, a string, or a function; otherwise, `lua_topointer` returns `NULL`.\nDifferent objects will give different pointers. There is no way to convert the pointer back\nto its original value.\n\nTypically this function is used only for debug information.\n
lua_tostring lua_tostring(lua_State *L, int index) [const char*]\nEquivalent to `lua_tolstring` with `len` equal to `NULL`.\n
-lua_tothread lua_tothread(lua_State *L, int index) [lua_State*]\nConverts the value at the given index to a Lua thread (represented as\n`lua_State*`). This value must be a thread; otherwise, the function\nreturns `NULL`.\n
-lua_touserdata lua_touserdata(lua_State *L, int index) [void*]\nIf the value at the given index is a full userdata, returns its memory-block \naddress. If the value is a light userdata, returns its value (a pointer). \nOtherwise, returns `NULL`.\n
-lua_type lua_type(lua_State *L, int index) [int]\nReturns the type of the value in the given index, or `LUA_TNONE` for a non-valid\nbut acceptable index.\n\nThe types returned by `lua_type` are coded by the following constants defined in\n`lua.h`: `LUA_TNIL`, `LUA_TNUMBER`, `LUA_TBOOLEAN`, `LUA_TSTRING`, `LUA_TTABLE`,\n`LUA_TFUNCTION`, `LUA_TUSERDATA`, `LUA_TTHREAD`, and `LUA_TLIGHTUSERDATA`.\n
-lua_typename lua_typename(lua_State *L, int tp) [const char*]\nReturns the name of the type encoded by the value `tp`, which must be one\nthe values returned by `lua_type`.\n
+lua_tothread lua_tothread(lua_State *L, int index) [lua_State*]\nConverts the value at the given index to a Lua thread (represented as `lua_State*`). This value\nmust be a thread; otherwise, the function returns `NULL`.\n
+lua_touserdata lua_touserdata(lua_State *L, int index) [void*]\nIf the value at the given index is a full userdata, returns its memory-block address. If the\nvalue is a light userdata, returns its value (a pointer). Otherwise, returns `NULL`.\n
+lua_type lua_type(lua_State *L, int index) [int]\nReturns the type of the value in the given index, or `LUA_TNONE` for a non-valid but acceptable\nindex.\n\nThe types returned by `lua_type` are coded by the following constants defined in `lua.h`:\n`LUA_TNIL`, `LUA_TNUMBER`, `LUA_TBOOLEAN`, `LUA_TSTRING`, `LUA_TTABLE`, `LUA_TFUNCTION`,\n`LUA_TUSERDATA`, `LUA_TTHREAD`, and `LUA_TLIGHTUSERDATA`.\n
+lua_typename lua_typename(lua_State *L, int tp) [const char*]\nReturns the name of the type encoded by the value `tp`, which must be one the values returned by\n`lua_type`.\n
lua_Unsigned lua_Unsigned [typedef ... lua_Unsigned]\nThe unsigned version of `lua_Integer`.\n
-lua_upvalueindex lua_upvalueindex(lua_State *L, int i) [int]\nReturns the pseudo-index that represents the `i`-th upvalue of the running\nfunction (see §4.2). `i` must be in the range *[1,256]*.\n
+lua_upvalueindex lua_upvalueindex(lua_State *L, int i) [int]\nReturns the pseudo-index that represents the `i`-th upvalue of the running function (see §4.2).\n`i` must be in the range *[1,256]*.\n
lua_version lua_version(lua_State *L) [lua_Number]\nReturns the version number of this core.\n
-lua_WarnFunction lua_WarnFunction [void (*)(void *ud, const char *msg, int tocont)]\nThe type of warning functions, called by Lua to emit warnings. The first \nparameter is an opaque pointer set by `lua_setwarnf`. The second parameter is \nthe warning message. The third parameter is a boolean that indicates whether \nthe message is to be continued by the message in the next call.\n\nSee `warn` for more details about warnings.\n
-lua_warning lua_warning(lua_State *L, const char *msg, int tocont) [void]\nEmits a warning with the given message. A message in a call with `tocont` true \nshould be continued in another call to this function.\n\nSee `warn` for more details about warnings.\n
-lua_Writer (*lua_Writer)(lua_State *L, const void* p, size_t sz, void* ud) [int]\nThe type of the writer function used by `lua_dump`. Every time `lua_dump`\nproduces another piece of chunk, it calls the writer, passing along the buffer\nto be written (`p`), its size (`sz`), and the `ud` parameter supplied to\n`lua_dump`.\n\nThe writer returns an error code: 0 means no errors; any other value means\nan error and stops `lua_dump` from calling the writer again.\n
-lua_xmove lua_xmove(lua_State *from, lua_State *to, int n) [void]\nExchange values between different threads of the same state.\n\nThis function pops `n` values from the stack `from`, and pushes them onto\nthe stack `to`.\n
-lua_yield lua_yield(lua_State *L, int nresults) [int]\nThis function is equivalent to `lua_yieldk`, but it has no continuation\n(see §4.5). Therefore, when the thread resumes, it continues the function that\ncalled the function calling `lua_yield`. To avoid surprises, this function \nshould be called only in a tail call.\n
-lua_yieldk lua_yieldk(lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k) [int]\nYields a coroutine (thread).\n\nWhen a C function calls `lua_yieldk`, the running coroutine suspends its\nexecution, and the call to `lua_resume` that started this coroutine returns.\nThe parameter `nresults` is the number of values from the stack that will be\npassed as results to `lua_resume`.\n\nWhen the coroutine is resumed again, Lua calls the given continuation function\n`k` to continue the execution of the C function that yielded (see §4.5). This\ncontinuation function receives the same stack from the previous function, with\nthe `n` results removed and replaced by the arguments passed to `lua_resume`.\nMoreover, the continuation function receives the value `ctx` that was passed to\n`lua_yield`.\n\nUsually, this function does not return; when the coroutine eventually resumes,\nit continues executing the continuation function. However, there is one special\ncase, which is when this function is called from inside a line or a count hook\n(see §4.7). In that case, `lua_yieldk` should be called with no continuation\n(probably in the form of `lua_yield` and no results), and the hook should return\nimmediately after the call. Lua will yield and, when the coroutine resumes\nagain, it will continue the normal execution of the (Lua) function that\ntriggered the hook.\n\nThis function can raise an error if it is called from a thread with a pending C\ncall with no continuation function (what is called a *C-call boundary*), or it \nis called from a thread that is not running inside a resume (typically the main \nthread).\n
-lua_Debug lua_Debug [struct]\ntypedef struct lua_Debug {\n int event;\n const char *name; /* (n) */\n const char *namewhat; /* (n) */\n const char *what; /* (S) */\n const char *source; /* (S) */\n size_t srclen; /* (S) */\n int currentline; /* (l) */\n int linedefined; /* (S) */\n int lastlinedefined; /* (S) */\n unsigned char nups; /* (u) number of upvalues */\n unsigned char nparams; /* (u) number of parameters */\n char isvararg; /* (u) */\n char istailcall; /* (t) */\n unsigned short ftransfer; /* (r) index of first value transferred */\n unsigned short ntransfer; /* (r) number of transferred values */\n char short_src[LUA_IDSIZE]; /* (S) */\n /* private part */\n _other fields_\n} lua_Debug;\n\nA structure used to carry different pieces of information about a function or an\nactivation record. `lua_getstack` fills only the private part of this\nstructure, for later use. To fill the other fields of `lua_Debug` with useful\ninformation, you must call `lua_getinfo`.\n\nThe fields of `lua_Debug` have the following meaning:\n * source: the source of the chunk that created the function. If `source`\n starts with a '`@`', it means that the function was defined in a file where\n the file name follows the '`@`'. If `source` starts with a '`=`', the\n remainder of its contents describes the source in a user-dependent manner.\n Otherwise, the function was defined in a string where `source` is that\n string.\n * srclen: The length of the string `source`.\n * short_src: a "printable" version of `source`, to be used in error messages.\n * linedefined: the line number where the definition of the function starts.\n * lastlinedefined: the line number where the definition of the function ends.\n * what: the string "Lua" if the function is a Lua function, "C" if it is a\n C function, "main" if it is the main part of a chunk.\n * currentline: the current line where the given function is executing.\n When no line information is available, `currentline` is set to -1.\n * name: a reasonable name for the given function. Because functions in Lua\n are first-class values, they do not have a fixed name: some functions\n can be the value of multiple global variables, while others can be\n stored only in a table field. The `lua_getinfo` function checks how the\n function was called to find a suitable name. If it cannot find a name,\n then `name` is set to `NULL`.\n * namewhat: explains the `name` field. The value of `namewhat` can be\n "global", "local", "method", "field", "upvalue", or "" (the empty string),\n according to how the function was called. (Lua uses the empty string\n when no other option seems to apply.)\n * istailcall: true if this function invocation was called by a tail call. In\n this case, the caller of this level is not in the stack.\n * nups: the number of upvalues of the function.\n * nparams: the number of parameters of the function (always 0 for C\n functions).\n * isvararg: true if the function is a vararg function (always true for C\n functions).\n * ftransfer: the index in the stack of the first value being "transferred",\n that is, parameters in a call or return values in a return. (The other \n values are in consecutive indices.) Using this index, you can access and \n modify these values through `lua_getlocal` and `lua_setlocal`. This field \n is only meaningful during a call hook, denoting the first parameter, or a \n return hook, denoting the first value being returned. (For call hooks, this \n value is always 1.)\n * ntransfer: The number of values being transferred (see previous item).\n (For calls of Lua functions, this value is always equal to `nparams`.)\n
+lua_WarnFunction lua_WarnFunction [void (*)(void *ud, const char *msg, int tocont)]\nThe type of warning functions, called by Lua to emit warnings. The first parameter is an opaque\npointer set by `lua_setwarnf`. The second parameter is the warning message. The third parameter\nis a boolean that indicates whether the message is to be continued by the message in the next call.\n\nSee `warn` for more details about warnings.\n
+lua_warning lua_warning(lua_State *L, const char *msg, int tocont) [void]\nEmits a warning with the given message. A message in a call with `tocont` true should be\ncontinued in another call to this function.\n\nSee `warn` for more details about warnings.\n
+lua_Writer (*lua_Writer)(lua_State *L, const void* p, size_t sz, void* ud) [int]\nThe type of the writer function used by `lua_dump`. Every time `lua_dump` produces another\npiece of chunk, it calls the writer, passing along the buffer to be written (`p`), its size\n(`sz`), and the `ud` parameter supplied to `lua_dump`.\n\nThe writer returns an error code: 0 means no errors; any other value means an error and stops\n`lua_dump` from calling the writer again.\n
+lua_xmove lua_xmove(lua_State *from, lua_State *to, int n) [void]\nExchange values between different threads of the same state.\n\nThis function pops `n` values from the stack `from`, and pushes them onto the stack `to`.\n
+lua_yield lua_yield(lua_State *L, int nresults) [int]\nThis function is equivalent to `lua_yieldk`, but it has no continuation (see §4.5). Therefore,\nwhen the thread resumes, it continues the function that called the function calling `lua_yield`.\nTo avoid surprises, this function should be called only in a tail call.\n
+lua_yieldk lua_yieldk(lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k) [int]\nYields a coroutine (thread).\n\nWhen a C function calls `lua_yieldk`, the running coroutine suspends its execution, and the\ncall to `lua_resume` that started this coroutine returns. The parameter `nresults` is the\nnumber of values from the stack that will be passed as results to `lua_resume`.\n\nWhen the coroutine is resumed again, Lua calls the given continuation function `k` to continue\nthe execution of the C function that yielded (see §4.5). This continuation function receives\nthe same stack from the previous function, with the `n` results removed and replaced by the\narguments passed to `lua_resume`. Moreover, the continuation function receives the value `ctx`\nthat was passed to `lua_yield`.\n\nUsually, this function does not return; when the coroutine eventually resumes, it continues\nexecuting the continuation function. However, there is one special case, which is when this\nfunction is called from inside a line or a count hook (see §4.7). In that case, `lua_yieldk`\nshould be called with no continuation (probably in the form of `lua_yield` and no results),\nand the hook should return immediately after the call. Lua will yield and, when the coroutine\nresumes again, it will continue the normal execution of the (Lua) function that triggered the hook.\n\nThis function can raise an error if it is called from a thread with a pending C call with no\ncontinuation function (what is called a *C-call boundary*), or it is called from a thread that\nis not running inside a resume (typically the main thread).\n
+lua_Debug lua_Debug [struct]\ntypedef struct lua_Debug {\n int event;\n const char *name; /* (n) */\n const char *namewhat; /* (n) */\n const char *what; /* (S) */\n const char *source; /* (S) */\n size_t srclen; /* (S) */\n int currentline; /* (l) */\n int linedefined; /* (S) */\n int lastlinedefined; /* (S) */\n unsigned char nups; /* (u) number of upvalues */\n unsigned char nparams; /* (u) number of parameters */\n char isvararg; /* (u) */\n char istailcall; /* (t) */\n unsigned short ftransfer; /* (r) index of first value transferred */\n unsigned short ntransfer; /* (r) number of transferred values */\n char short_src[LUA_IDSIZE]; /* (S) */\n /* private part */\n _other fields_\n} lua_Debug;\n\nA structure used to carry different pieces of information about a function or an activation record.\n`lua_getstack` fills only the private part of this structure, for later use. To fill the other\nfields of `lua_Debug` with useful information, you must call `lua_getinfo`.\n\nThe fields of `lua_Debug` have the following meaning:\n\n * source: the source of the chunk that created the function. If `source` starts with a '`@`',\n it means that the function was defined in a file where the file name follows the '`@`'.\n If `source` starts with a '`=`', the remainder of its contents describes the source in\n a user-dependent manner. Otherwise, the function was defined in a string where `source`\n is that string.\n * srclen: The length of the string `source`.\n * short_src: a "printable" version of `source`, to be used in error messages.\n * linedefined: the line number where the definition of the function starts.\n * lastlinedefined: the line number where the definition of the function ends.\n * what: the string "Lua" if the function is a Lua function, "C" if it is a C function, "main"\n if it is the main part of a chunk.\n * currentline: the current line where the given function is executing. When no line information\n is available, `currentline` is set to -1.\n * name: a reasonable name for the given function. Because functions in Lua are first-class\n values, they do not have a fixed name: some functions can be the value of multiple global\n variables, while others can be stored only in a table field. The `lua_getinfo` function\n checks how the function was called to find a suitable name. If it cannot find a name,\n then `name` is set to `NULL`.\n * namewhat: explains the `name` field. The value of `namewhat` can be "global", "local",\n "method", "field", "upvalue", or "" (the empty string), according to how the function\n was called. (Lua uses the empty string when no other option seems to apply.)\n * istailcall: true if this function invocation was called by a tail call. In this case,\n the caller of this level is not in the stack.\n * nups: the number of upvalues of the function.\n * nparams: the number of parameters of the function (always 0 for C functions).\n * isvararg: true if the function is a vararg function (always true for C functions).\n * ftransfer: the index in the stack of the first value being "transferred", that is, parameters\n in a call or return values in a return. (The other values are in consecutive indices.)\n Using this index, you can access and modify these values through `lua_getlocal` and\n `lua_setlocal`. This field is only meaningful during a call hook, denoting the first\n parameter, or a return hook, denoting the first value being returned. (For call hooks,\n this value is always 1.)\n * ntransfer: The number of values being transferred (see previous item). (For calls of Lua\n functions, this value is always equal to `nparams`.)\n
lua_gethook lua_gethook(lua_State *L) [lua_Hook]\nReturns the current hook function.\n
lua_gethookcount lua_gethookcount(lua_State *L) [int]\nReturns the current hook count.\n
lua_gethookmask lua_gethookmask(lua_State *L) [int]\nReturns the current hook mask.\n
-lua_getinfo lua_getinfo(lua_State *L, const char *what, lua_Debug *ar) [int]\nGets information about a specific function or function invocation.\n\nTo get information about a function invocation, the parameter `ar` must be a\nvalid activation record that was filled by a previous call to `lua_getstack`\nor given as argument to a hook (see `lua_Hook`).\n\nTo get information about a function you push it onto the stack and start the\n`what` string with the character '>'. (In that case, `lua_getinfo` pops the\nfunction from the top of the stack.) For instance, to know in which line a\nfunction `f` was defined, you can write the following code:\n\n lua_Debug ar;\n lua_getglobal(L, "f"); /* get global 'f' */\n lua_getinfo(L, ">S", &ar);\n printf("%d\\n", ar.linedefined);\n\nEach character in the string `what` selects some fields of the structure\n`ar` to be filled or a value to be pushed on the stack:\n * 'n': fills in the field `name` and `namewhat`;\n * 'S': fills in the fields `source`, `short_src`, `linedefined`,\n `lastlinedefined`, and `what`;\n * 'l': fills in the field `currentline`;\n * 't': fills in the field `istailcall`;\n * 'u': fills in the fields `nups`, `nparams`, and `isvararg`;\n * 'f': pushes onto the stack the function that is running at the given level;\n * 'L': pushes onto the stack a table whose indices are the numbers of the\n lines that are valid on the function. (A _valid line_ is a line with\n some associated code, that is, a line where you can put a break point.\n Non-valid lines include empty lines and comments.)\n \n If this option is given together with option 'f', its table is pushed after\n the function.\n \n This is the only option that can raise a memory error.\n\nThis function returns 0 to signal an invalid option in `what`; even then the\nvalid options are handled correctly.\n
-lua_getlocal lua_getlocal(lua_State *L, const lua_Debug *ar, int n) [const char*]\nGets information about a local variable or a temporary value of a given \nactivation record or a given function.\n\nIn the first case, the parameter `ar` must be a valid activation record that was\nfilled by a previous call to `lua_getstack` or given as argument to a hook (see\n`lua_Hook`). The index `n` selects which local variable to inspect; see\n`debug.getlocal` for details about variable indices and names.\n\n`lua_getlocal` pushes the variable's value onto the stack and returns its name.\n\nIn the second case, `ar` must be `NULL` and the function to be inspected must\nbe on the top of the stack. In this case, only parameters of Lua functions are\nvisible (as there is no information about what variables are active) and no\nvalues are pushed onto the stack.\n\nReturns `NULL` (and pushes nothing) when the index is greater than the number of\nactive local variables.\n
-lua_getstack lua_getstack(lua_State *L, int level, lua_Debug *ar) [int]\nGets information about the interpreter runtime stack.\n\nThis function fills parts of a `lua_Debug` structure with an identification of\nthe _activation record_ of the function executing at a given level. Level 0\nis the current running function, whereas level _n+1_ is the function that\nhas called level _n_ (except for tail calls, which do not count in the stack).\nWhen called with a level greater than the stack depth, `lua_getstack` returns 0; \notherwise it returns 1.\n
-lua_getupvalue lua_getupvalue(lua_State *L, int funcindex, int n) [const char*]\nGets information about the `n`-th upvalue of the closure at index `funcindex`.\nIt pushes the upvalue's value onto the stack and returns its name. Returns \n`NULL` (and pushes nothing) when the index `n` is greater than the number of \nupvalues.\n\nSee `debug.getupvalue` for more information about upvalues.\n
-lua_Hook (*lua_Hook)(lua_State *L, lua_Debug *ar) [void]\nType for debugging hook functions.\n\nWhenever a hook is called, its `ar` argument has its field `event` set to the\nspecific event that triggered the hook. Lua identifies these events with\nthe following constants: `LUA_HOOKCALL`, `LUA_HOOKRET`, `LUA_HOOKTAILCALL`,\n`LUA_HOOKLINE`, and `LUA_HOOKCOUNT`. Moreover, for line events, the\nfield `currentline` is also set. To get the value of any other field in\n`ar`, the hook must call `lua_getinfo`.\n\nFor call events, `event` can be `LUA_HOOKCALL`, the normal value, or\n`LUA_HOOKTAILCALL`, for a tail call; in this case, there will be no\ncorresponding return event.\n\nWhile Lua is running a hook, it disables other calls to hooks. Therefore,\nif a hook calls back Lua to execute a function or a chunk, this execution\noccurs without any calls to hooks.\n\nHook functions cannot have continuations, that is, they cannot call\n`lua_yieldk`, `lua_pcallk`, or `lua_callk` with a non-null `k`.\n\nHook functions can yield under the following conditions: Only count and line\nevents can yield and they cannot yield any value; to yield a hook function must\nfinish its execution calling `lua_yield` with `nresults` equal to zero.\n
-lua_sethook lua_sethook(lua_State *L, lua_Hook f, int mask, int count) [void]\nSets the debugging hook function.\n\nArgument `f` is the hook function.\n\n`mask` specifies on which events the hook will be called: it is formed by a\nbitwise OR of the constants `LUA_MASKCALL`, `LUA_MASKRET`, `LUA_MASKLINE`,\nand `LUA_MASKCOUNT`. The `count` argument is only meaningful when the mask\nincludes `LUA_MASKCOUNT`. For each event, the hook is called as explained\nbelow:\n * The call hook: is called when the interpreter calls a function. The hook is\n called just after Lua enters the new function.\n * The return hook: is called when the interpreter returns from a function.\n The hook is called just before Lua leaves the function.\n * The line hook: is called when the interpreter is about to start the\n execution of a new line of code, or when it jumps back in the code (even\n to the same line). This event only happens while Lua is executing a\n Lua function.\n * The count hook: is called after the interpreter executes every `count`\n instructions. This event only happens while Lua is executing a Lua\n function.\n\nHooks are disabled by setting `mask` to zero.\n
-lua_setlocal lua_setlocal(lua_State *L, const lua_Debug *ar, int n) [const char*]\nSets the value of a local variable of a given activation record. Parameters\n`ar` and `n` are as in `lua_getlocal` (see `lua_getlocal`). `lua_setlocal`\nassigns the value on the top of the stack to the variable and returns its name.\nIt also pops the value from the stack.\n\nReturns `NULL` (and pops nothing) when the index is greater than the number\nof active local variables.\n\nParameters `ar` and `n` are as in the function `lua_getlocal`.\n
-lua_setupvalue lua_setupvalue(lua_State *L, int funcindex, int n) [const char*]\nSets the value of a closure's upvalue. It assigns the value on the top of\nthe stack to the upvalue and returns its name. It also pops the value from\nthe stack. Parameters `funcindex` and `n` are as in the `lua_getupvalue`\n(see `lua_getupvalue`).\n\nReturns `NULL` (and pops nothing) when the index is greater than the number\nof upvalues.\n\nParameters `funcindex` and `n` are as in the function `lua_getupvalue`.\n
-lua_upvalueid lua_upvalueid(lua_State *L, int funcindex, int n) [void*]\nReturns a unique identifier for the upvalue numbered `n` from the closure at\nindex `funcindex`. Parameters `funcindex` and `n` are as in the\n`lua_getupvalue` (see `lua_getupvalue`) (but `n` cannot be greater than the\nnumber of upvalues).\n\nThese unique identifiers allow a program to check whether different closures\nshare upvalues. Lua closures that share an upvalue (that is, that access a same\nexternal local variable) will return identical ids for those upvalue indices.\n\nParameters `funcindex` and `n` are as in the function `lua_getupvalue`, but `n` \ncannot be greater than the number of upvalues.\n
-lua_upvaluejoin lua_upvaluejoin(lua_State *L, int funcindex1, int n1, int funcindex2, int n2) [void]\nMake the `n1`-th upvalue of the Lua closure at index `funcindex1` refer to the\n`n2`-th upvalue of the Lua closure at index `funcindex2`.\n
+lua_getinfo lua_getinfo(lua_State *L, const char *what, lua_Debug *ar) [int]\nGets information about a specific function or function invocation.\n\nTo get information about a function invocation, the parameter `ar` must be a valid activation\nrecord that was filled by a previous call to `lua_getstack` or given as argument to a hook (see\n`lua_Hook`).\n\nTo get information about a function you push it onto the stack and start the `what` string with\nthe character '>'. (In that case, `lua_getinfo` pops the function from the top of the stack.)\nFor instance, to know in which line a function `f` was defined, you can write the following code:\n\n lua_Debug ar;\n lua_getglobal(L, "f"); /* get global 'f' */\n lua_getinfo(L, ">S", &ar);\n printf("%d\n", ar.linedefined);\n\nEach character in the string `what` selects some fields of the structure `ar` to be filled or\na value to be pushed on the stack:\n\n * 'n': fills in the field `name` and `namewhat`;\n * 'S': fills in the fields `source`, `short_src`, `linedefined`, `lastlinedefined`, and `what`;\n * 'l': fills in the field `currentline`;\n * 't': fills in the field `istailcall`;\n * 'u': fills in the fields `nups`, `nparams`, and `isvararg`;\n * 'f': pushes onto the stack the function that is running at the given level;\n * 'L': pushes onto the stack a table whose indices are the numbers of the lines that are\n valid on the function. (A _valid line_ is a line with some associated code, that is,\n a line where you can put a break point. Non-valid lines include empty lines and comments.)\n\n If this option is given together with option 'f', its table is pushed after the function.\n\n This is the only option that can raise a memory error.\n\nThis function returns 0 to signal an invalid option in `what`; even then the valid options are\nhandled correctly.\n
+lua_getlocal lua_getlocal(lua_State *L, const lua_Debug *ar, int n) [const char*]\nGets information about a local variable or a temporary value of a given activation record or\na given function.\n\nIn the first case, the parameter `ar` must be a valid activation record that was filled by a\nprevious call to `lua_getstack` or given as argument to a hook (see `lua_Hook`). The index\n`n` selects which local variable to inspect; see `debug.getlocal` for details about variable\nindices and names.\n\n`lua_getlocal` pushes the variable's value onto the stack and returns its name.\n\nIn the second case, `ar` must be `NULL` and the function to be inspected must be on the top\nof the stack. In this case, only parameters of Lua functions are visible (as there is no\ninformation about what variables are active) and no values are pushed onto the stack.\n\nReturns `NULL` (and pushes nothing) when the index is greater than the number of active local\nvariables.\n
+lua_getstack lua_getstack(lua_State *L, int level, lua_Debug *ar) [int]\nGets information about the interpreter runtime stack.\n\nThis function fills parts of a `lua_Debug` structure with an identification of the _activation\nrecord_ of the function executing at a given level. Level 0 is the current running function,\nwhereas level _n+1_ is the function that has called level _n_ (except for tail calls, which do\nnot count in the stack). When called with a level greater than the stack depth, `lua_getstack`\nreturns 0; otherwise it returns 1.\n
+lua_getupvalue lua_getupvalue(lua_State *L, int funcindex, int n) [const char*]\nGets information about the `n`-th upvalue of the closure at index `funcindex`. It pushes\nthe upvalue's value onto the stack and returns its name. Returns `NULL` (and pushes nothing)\nwhen the index `n` is greater than the number of upvalues.\n\nSee `debug.getupvalue` for more information about upvalues.\n
+lua_Hook (*lua_Hook)(lua_State *L, lua_Debug *ar) [void]\nType for debugging hook functions.\n\nWhenever a hook is called, its `ar` argument has its field `event` set to the specific event that\ntriggered the hook. Lua identifies these events with the following constants: `LUA_HOOKCALL`,\n`LUA_HOOKRET`, `LUA_HOOKTAILCALL`, `LUA_HOOKLINE`, and `LUA_HOOKCOUNT`. Moreover, for line\nevents, the field `currentline` is also set. To get the value of any other field in `ar`,\nthe hook must call `lua_getinfo`.\n\nFor call events, `event` can be `LUA_HOOKCALL`, the normal value, or `LUA_HOOKTAILCALL`, for\na tail call; in this case, there will be no corresponding return event.\n\nWhile Lua is running a hook, it disables other calls to hooks. Therefore, if a hook calls back\nLua to execute a function or a chunk, this execution occurs without any calls to hooks.\n\nHook functions cannot have continuations, that is, they cannot call `lua_yieldk`, `lua_pcallk`,\nor `lua_callk` with a non-null `k`.\n\nHook functions can yield under the following conditions: Only count and line events can yield\nand they cannot yield any value; to yield a hook function must finish its execution calling\n`lua_yield` with `nresults` equal to zero.\n
+lua_sethook lua_sethook(lua_State *L, lua_Hook f, int mask, int count) [void]\nSets the debugging hook function.\n\nArgument `f` is the hook function.\n\n`mask` specifies on which events the hook will be called: it is formed by a bitwise OR of the\nconstants `LUA_MASKCALL`, `LUA_MASKRET`, `LUA_MASKLINE`, and `LUA_MASKCOUNT`. The `count`\nargument is only meaningful when the mask includes `LUA_MASKCOUNT`. For each event, the hook\nis called as explained below:\n\n * The call hook: is called when the interpreter calls a function. The hook is called just\n after Lua enters the new function.\n * The return hook: is called when the interpreter returns from a function. The hook is called\n just before Lua leaves the function.\n * The line hook: is called when the interpreter is about to start the execution of a new\n line of code, or when it jumps back in the code (even to the same line). This event only\n happens while Lua is executing a Lua function.\n * The count hook: is called after the interpreter executes every `count` instructions.\n This event only happens while Lua is executing a Lua function.\n\nHooks are disabled by setting `mask` to zero.\n
+lua_setlocal lua_setlocal(lua_State *L, const lua_Debug *ar, int n) [const char*]\nSets the value of a local variable of a given activation record. Parameters `ar` and `n` are\nas in `lua_getlocal` (see `lua_getlocal`). `lua_setlocal` assigns the value on the top of the\nstack to the variable and returns its name. It also pops the value from the stack.\n\nReturns `NULL` (and pops nothing) when the index is greater than the number of active local\nvariables.\n\nParameters `ar` and `n` are as in the function `lua_getlocal`.\n
+lua_setupvalue lua_setupvalue(lua_State *L, int funcindex, int n) [const char*]\nSets the value of a closure's upvalue. It assigns the value on the top of the stack to the\nupvalue and returns its name. It also pops the value from the stack. Parameters `funcindex`\nand `n` are as in the `lua_getupvalue` (see `lua_getupvalue`).\n\nReturns `NULL` (and pops nothing) when the index is greater than the number of upvalues.\n\nParameters `funcindex` and `n` are as in the function `lua_getupvalue`.\n
+lua_upvalueid lua_upvalueid(lua_State *L, int funcindex, int n) [void*]\nReturns a unique identifier for the upvalue numbered `n` from the closure at index `funcindex`.\nParameters `funcindex` and `n` are as in the `lua_getupvalue` (see `lua_getupvalue`) (but `n`\ncannot be greater than the number of upvalues).\n\nThese unique identifiers allow a program to check whether different closures share upvalues.\nLua closures that share an upvalue (that is, that access a same external local variable) will\nreturn identical ids for those upvalue indices.\n\nParameters `funcindex` and `n` are as in the function `lua_getupvalue`, but `n` cannot be\ngreater than the number of upvalues.\n
+lua_upvaluejoin lua_upvaluejoin(lua_State *L, int funcindex1, int n1, int funcindex2, int n2) [void]\nMake the `n1`-th upvalue of the Lua closure at index `funcindex1` refer to the `n2`-th upvalue\nof the Lua closure at index `funcindex2`.\n
luaL_addchar luaL_addchar(luaL_Buffer *B, char c) [void]\nAdds the byte `c` to the buffer `B` (see `luaL_Buffer`).\n
-luaL_addgsub luaL_addgsub(luaL_Buffer *B, const char *s, const char *p, const char *r) [const void]\nAdds a copy of the string `s` to the buffer `B` (see `luaL_Buffer`), replacing \nany occurrence of the string `p` with the string `r`.\n
-luaL_addlstring luaL_addlstring(luaL_Buffer *B, const char *s, size_t l) [void]\nAdds the string pointed to by `s` with length `l` to the buffer `B` (see\n`luaL_Buffer`). The string can contain embedded zeros.\n
-luaL_addsize luaL_addsize(luaL_Buffer *B, size_t n) [void]\nAdds to the buffer `B` a string of length `n` previously copied to the buffer \narea (see `luaL_prepbuffer`).\n
-luaL_addstring luaL_addstring(luaL_Buffer *B, const char *s) [void]\nAdds the zero-terminated string pointed to by `s` to the buffer `B` (see\n`luaL_Buffer`).\n
-luaL_addvalue luaL_addvalue(luaL_Buffer *B) [void]\nAdds the value on the top of the stack to the buffer `B` (see `luaL_Buffer`).\nPops the value.\n\nThis is the only function on string buffers that can (and must) be called with\nan extra element on the stack, which is the value to be added to the buffer.\n
-luaL_argcheck luaL_argcheck(lua_State *L, int cond, int arg, const char *extramsg) [void]\nChecks whether `cond` is true. If it is not, raises an error with a standard\nmessage (see `luaL_argerror`).\n
-luaL_argerror luaL_argerror(lua_State *L, int arg, const char *extramsg) [int]\nRaises an error reporting a problem with argument `arg` of the C function that\ncalled it, using a standard message that includes `extramsg` as a comment:\n\n bad argument #_arg_ to '_funcname_' (_extramsg_)\n\nThis function never returns.\n
-luaL_argexpected luaL_argexpected(lua_State *L, int cond, int arg, const char *tname) [void]\nChecks whether `cond` is true. If it is not, raises an error about the type of \nthe argument `arg` with a standard message (see `luaL_typeerror`).\n
-luaL_Buffer luaL_Buffer [struct]\nType for a _string buffer_.\n\nA string buffer allows C code to build Lua strings piecemeal. Its pattern\nof use is as follows:\n * First declare a variable `b` of type `luaL_Buffer`.\n * Then initialize it with a call `luaL_buffinit(L, &b)`.\n * Then add string pieces to the buffer calling any of the `luaL_add*`\n functions.\n * Finish by calling `luaL_pushresult(&b)`. This call leaves the final string\n on the top of the stack.\n\nIf you know beforehand the maximum size of the resulting string, you can use the\nbuffer like this:\n * First declare a variable `b` of type `luaL_Buffer`.\n * Then initialize it and preallocate a space of size `sz` with a call\n `luaL_buffinitsize(L, &b, sz)`.\n * Then produce the string into that space.\n * Finish by calling `luaL_pushresultsize(&b, sz)`, where `sz` is the total\n size of the resulting string copied into that space (which may be less than\n or equal to the preallocated size).\n\nDuring its normal operation, a string buffer uses a variable number of\nstack slots. So, while using a buffer, you cannot assume that you know\nwhere the top of the stack is. You can use the stack between successive\ncalls to buffer operations as long as that use is balanced; that is, when you\ncall a buffer operation, the stack is at the same level it was immediately\nafter the previous buffer operation. (The only exception to this rule is\n`luaL_addvalue`.) After calling `luaL_pushresult`, the stack is back to its\nlevel when the buffer was initialized, plus the final string on its top.\n
-luaL_buffaddr luaL_buffaddr(luaL_Buffer *B) [char*]\nReturns the address of the current content of buffer `B` (see `luaL_Buffer`).\nNote that any addition to the buffer may invalidate this address.\n
-luaL_buffinit luaL_buffinit(lua_State *L, luaL_Buffer *B) [void]\nInitializes a buffer `B` (see `luaL_Buffer`). This function does not allocate \nany space; the buffer must be declared as a variable.\n
+luaL_addgsub luaL_addgsub(luaL_Buffer *B, const char *s, const char *p, const char *r) [const void]\nAdds a copy of the string `s` to the buffer `B` (see `luaL_Buffer`), replacing any occurrence\nof the string `p` with the string `r`.\n
+luaL_addlstring luaL_addlstring(luaL_Buffer *B, const char *s, size_t l) [void]\nAdds the string pointed to by `s` with length `l` to the buffer `B` (see `luaL_Buffer`).\nThe string can contain embedded zeros.\n
+luaL_addsize luaL_addsize(luaL_Buffer *B, size_t n) [void]\nAdds to the buffer `B` a string of length `n` previously copied to the buffer area (see\n`luaL_prepbuffer`).\n
+luaL_addstring luaL_addstring(luaL_Buffer *B, const char *s) [void]\nAdds the zero-terminated string pointed to by `s` to the buffer `B` (see `luaL_Buffer`).\n
+luaL_addvalue luaL_addvalue(luaL_Buffer *B) [void]\nAdds the value on the top of the stack to the buffer `B` (see `luaL_Buffer`). Pops the value.\n\nThis is the only function on string buffers that can (and must) be called with an extra element\non the stack, which is the value to be added to the buffer.\n
+luaL_argcheck luaL_argcheck(lua_State *L, int cond, int arg, const char *extramsg) [void]\nChecks whether `cond` is true. If it is not, raises an error with a standard message (see\n`luaL_argerror`).\n
+luaL_argerror luaL_argerror(lua_State *L, int arg, const char *extramsg) [int]\nRaises an error reporting a problem with argument `arg` of the C function that called it,\nusing a standard message that includes `extramsg` as a comment:\n\n bad argument #_arg_ to '_funcname_' (_extramsg_)\n\nThis function never returns.\n
+luaL_argexpected luaL_argexpected(lua_State *L, int cond, int arg, const char *tname) [void]\nChecks whether `cond` is true. If it is not, raises an error about the type of the argument\n`arg` with a standard message (see `luaL_typeerror`).\n
+luaL_Buffer luaL_Buffer [struct]\nType for a _string buffer_.\n\nA string buffer allows C code to build Lua strings piecemeal. Its pattern of use is as follows:\n\n * First declare a variable `b` of type `luaL_Buffer`.\n * Then initialize it with a call `luaL_buffinit(L, &b)`.\n * Then add string pieces to the buffer calling any of the `luaL_add*` functions.\n * Finish by calling `luaL_pushresult(&b)`. This call leaves the final string on the top of\n the stack.\n\nIf you know beforehand the maximum size of the resulting string, you can use the buffer like this:\n\n * First declare a variable `b` of type `luaL_Buffer`.\n * Then initialize it and preallocate a space of size `sz` with a call\n `luaL_buffinitsize(L, &b, sz)`.\n * Then produce the string into that space.\n * Finish by calling `luaL_pushresultsize(&b, sz)`, where `sz` is the total size of the resulting\n string copied into that space (which may be less than or equal to the preallocated size).\n\nDuring its normal operation, a string buffer uses a variable number of stack slots. So,\nwhile using a buffer, you cannot assume that you know where the top of the stack is. You can\nuse the stack between successive calls to buffer operations as long as that use is balanced;\nthat is, when you call a buffer operation, the stack is at the same level it was immediately\nafter the previous buffer operation. (The only exception to this rule is `luaL_addvalue`.)\nAfter calling `luaL_pushresult`, the stack is back to its level when the buffer was initialized,\nplus the final string on its top.\n
+luaL_buffaddr luaL_buffaddr(luaL_Buffer *B) [char*]\nReturns the address of the current content of buffer `B` (see `luaL_Buffer`). Note that any\naddition to the buffer may invalidate this address.\n
+luaL_buffinit luaL_buffinit(lua_State *L, luaL_Buffer *B) [void]\nInitializes a buffer `B` (see `luaL_Buffer`). This function does not allocate any space;\nthe buffer must be declared as a variable.\n
luaL_bufflen luaL_bufflen(luaL_Buffer *B) [size_t]\nReturns the length of the current content of buffer `B` (see `luaL_Buffer`).\n
luaL_buffinitsize luaL_buffinitsize(lua_State *L, luaL_Buffer *B, size_t sz) [char*]\nEquivalent to the sequence `luaL_buffinit`, `luaL_prepbuffsize`.\n
-luaL_buffsub luaL_buffsub(luaL_Buffer *B, int n) [void]\nRemoves `n` bytes from the the buffer `B` (see `luaL_Buffer`). The buffer must \nhave at least that many bytes.\n
-luaL_callmeta luaL_callmeta(lua_State *L, int obj, const char *e) [int]\nCalls a metamethod.\n\nIf the object at index `obj` has a metatable and this metatable has a field\n`e`, this function calls this field passing the object as its only argument.\nIn this case this function returns true and pushes onto the stack the value\nreturned by the call. If there is no metatable or no metamethod, this function\nreturns false without pushing any value on the stack.\n
-luaL_checkany luaL_checkany(lua_State *L, int arg) [void]\nChecks whether the function has an argument of any type (including nil)\nat position `arg`.\n
-luaL_checkinteger luaL_checkinteger(lua_State *L, int arg) [lua_Integer]\nChecks whether the function argument `arg` is an integer (or can be converted to\nan integer) and returns this integer.\n
-luaL_checklstring luaL_checklstring(lua_State *L, int arg, size_t *l) [const char*]\nChecks whether the function argument `arg` is a string and returns this string;\nif `l` is not `NULL` fills its referent with the string's length.\n\nThis function uses `lua_tolstring` to get its result, so all conversions\nand caveats of that function apply here.\n
-luaL_checknumber luaL_checknumber(lua_State *L, int arg) [lua_Number]\nChecks whether the function argument `arg` is a number and returns this number\nconverted to a `lua_Number`.\n
-luaL_checkoption luaL_checkoption(lua_State *L, int arg, const char *def, const char *const lst[]) [int]\nChecks whether the function argument `arg` is a string and searches for this\nstring in the array `lst` (which must be NULL-terminated). Returns the index\nin the array where the string was found. Raises an error if the argument\nis not a string or if the string cannot be found.\n\nIf `def` is not `NULL`, the function uses `def` as a default value when\nthere is no argument `arg` or when this argument is nil.\n\nThis is a useful function for mapping strings to C enums. (The usual\nconvention in Lua libraries is to use strings instead of numbers to select\noptions.)\n
-luaL_checkstack luaL_checkstack(lua_State *L, int sz, const char *msg) [void]\nGrows the stack size to `top + sz` elements, raising an error if the stack\ncannot grow to that size. `msg` is an additional text to go into the error\nmessage (or `NULL` for no additional text).\n
-luaL_checkstring luaL_checkstring(lua_State *L, int arg) [const char*]\nChecks whether the function argument `arg` is a string and returns this string.\n\nThis function uses `lua_tolstring` to get its result, so all conversions\nand caveats of that function apply here.\n
-luaL_checktype luaL_checktype(lua_State *L, int arg, int t) [void]\nChecks whether the function argument `arg` has type `t`. See `lua_type` for\nthe encoding of types for `t`.\n
-luaL_checkudata luaL_checkudata(lua_State *L, int arg, const char *tname) [void*]\nChecks whether the function argument `arg` is a userdata of the type `tname`\n(see `luaL_newmetatable`) and returns the userdata's memory-block address (see\n`lua_touserdata`).\n
-luaL_checkversion luaL_checkversion(lua_State *L) [void]\nChecks whether the code making the call and the Lua library being called are \nusing the same version of Lua and the same numeric types.\n
-luaL_dofile luaL_dofile(lua_State *L, const char *filename) [int]\nLoads and runs the given file. It is defined as the following macro:\n\n (luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))\n\nIt returns `LUA_OK` if there are no errors, or an error code in case of errors\n(see §4.4.1).\n
-luaL_dostring luaL_dostring(lua_State *L, const char *str) [int]\nLoads and runs the given string. It is defined as the following macro:\n\n (luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0))\n\nIt returns `LUA_OK` if there are no errors, or an error code in case of errors\n(see §4.4.1).\n
-luaL_error luaL_error(lua_State *L, const char *fmt, ...) [int]\nRaises an error. The error message format is given by `fmt` plus any extra\narguments, following the same rules of `lua_pushfstring`. It also adds at\nthe beginning of the message the file name and the line number where the\nerror occurred, if this information is available.\n\nThis function never returns, but it is an idiom to use it in C functions as\n`return luaL_error(args)`.\n
-luaL_execresult luaL_execresult(lua_State *L, int stat) [int]\nThis function produces the return values for process-related functions in the\nstandard library (`os.execute` and `io.close`).\n
-luaL_fileresult luaL_fileresult(lua_State *L, int stat, const char *fname) [int]\nThis function produces the return values for file-related functions in the\nstandard library (`io.open`, `os.rename`, `file:seek`, etc.).\n
-luaL_getmetafield luaL_getmetafield(lua_State *L, int obj, const char *e) [int]\nPushes onto the stack the field `e` from the metatable of the object at index\n`obj` and returns the type of pushed value. If the object does not have a metatable, or if the metatable does\nnot have this field, pushes nothing and returns `LUA_TNIL`.\n
-luaL_getmetatable luaL_getmetatable(lua_State *L, const char *tname) [int]\nPushes onto the stack the metatable associated with the name `tname` in the\nregistry (see `luaL_newmetatable`), or nil if there is no metatable associated \nwith that name. Returns the type of that pushed value.\n
-luaL_getsubtable luaL_getsubtable(lua_State *L, int idx, const char *fname) [int]\nEnsures that the value `t[fname]`, where `t` is the value at index `idx`, is\na table, and pushes that table onto the stack. Returns true if it finds a\nprevious table there and false if it creates a new table.\n
-luaL_gsub luaL_gsub(lua_State *L, const char *s, const char *p, const char *r) [const char*]\nCreates a copy of string `s`, replacing any occurrence of the string `p` with \nthe string `r`. Pushes the resulting string on the stack and returns it.\n
-luaL_len luaL_len(lua_State *L, int index) [lua_Integer]\nReturns the "length" of the value at the given index as a number; it is\nequivalent to the '`#`' operator in Lua (see §3.4.7). Raises an error if the\nresult of the operation is not an integer. (This case can only happen through\nmetamethods.)\n
+luaL_buffsub luaL_buffsub(luaL_Buffer *B, int n) [void]\nRemoves `n` bytes from the the buffer `B` (see `luaL_Buffer`). The buffer must have at least\nthat many bytes.\n
+luaL_callmeta luaL_callmeta(lua_State *L, int obj, const char *e) [int]\nCalls a metamethod.\n\nIf the object at index `obj` has a metatable and this metatable has a field `e`, this function\ncalls this field passing the object as its only argument. In this case this function returns\ntrue and pushes onto the stack the value returned by the call. If there is no metatable or no\nmetamethod, this function returns false without pushing any value on the stack.\n
+luaL_checkany luaL_checkany(lua_State *L, int arg) [void]\nChecks whether the function has an argument of any type (including nil) at position `arg`.\n
+luaL_checkinteger luaL_checkinteger(lua_State *L, int arg) [lua_Integer]\nChecks whether the function argument `arg` is an integer (or can be converted to an integer)\nand returns this integer.\n
+luaL_checklstring luaL_checklstring(lua_State *L, int arg, size_t *l) [const char*]\nChecks whether the function argument `arg` is a string and returns this string; if `l` is not\n`NULL` fills its referent with the string's length.\n\nThis function uses `lua_tolstring` to get its result, so all conversions and caveats of that\nfunction apply here.\n
+luaL_checknumber luaL_checknumber(lua_State *L, int arg) [lua_Number]\nChecks whether the function argument `arg` is a number and returns this number converted to a\n`lua_Number`.\n
+luaL_checkoption luaL_checkoption(lua_State *L, int arg, const char *def, const char *const lst[]) [int]\nChecks whether the function argument `arg` is a string and searches for this string in the array\n`lst` (which must be NULL-terminated). Returns the index in the array where the string was found.\nRaises an error if the argument is not a string or if the string cannot be found.\n\nIf `def` is not `NULL`, the function uses `def` as a default value when there is no argument\n`arg` or when this argument is nil.\n\nThis is a useful function for mapping strings to C enums. (The usual convention in Lua libraries\nis to use strings instead of numbers to select options.)\n
+luaL_checkstack luaL_checkstack(lua_State *L, int sz, const char *msg) [void]\nGrows the stack size to `top + sz` elements, raising an error if the stack cannot grow to that\nsize. `msg` is an additional text to go into the error message (or `NULL` for no additional text).\n
+luaL_checkstring luaL_checkstring(lua_State *L, int arg) [const char*]\nChecks whether the function argument `arg` is a string and returns this string.\n\nThis function uses `lua_tolstring` to get its result, so all conversions and caveats of that\nfunction apply here.\n
+luaL_checktype luaL_checktype(lua_State *L, int arg, int t) [void]\nChecks whether the function argument `arg` has type `t`. See `lua_type` for the encoding of\ntypes for `t`.\n
+luaL_checkudata luaL_checkudata(lua_State *L, int arg, const char *tname) [void*]\nChecks whether the function argument `arg` is a userdata of the type `tname` (see\n`luaL_newmetatable`) and returns the userdata's memory-block address (see `lua_touserdata`).\n
+luaL_checkversion luaL_checkversion(lua_State *L) [void]\nChecks whether the code making the call and the Lua library being called are using the same\nversion of Lua and the same numeric types.\n
+luaL_dofile luaL_dofile(lua_State *L, const char *filename) [int]\nLoads and runs the given file. It is defined as the following macro:\n\n (luaL_loadfile(L, filename) || lua_pcall(L, 0, LUA_MULTRET, 0))\n\nIt returns `LUA_OK` if there are no errors, or an error code in case of errors (see §4.4.1).\n
+luaL_dostring luaL_dostring(lua_State *L, const char *str) [int]\nLoads and runs the given string. It is defined as the following macro:\n\n (luaL_loadstring(L, str) || lua_pcall(L, 0, LUA_MULTRET, 0))\n\nIt returns `LUA_OK` if there are no errors, or an error code in case of errors (see §4.4.1).\n
+luaL_error luaL_error(lua_State *L, const char *fmt, ...) [int]\nRaises an error. The error message format is given by `fmt` plus any extra arguments, following\nthe same rules of `lua_pushfstring`. It also adds at the beginning of the message the file\nname and the line number where the error occurred, if this information is available.\n\nThis function never returns, but it is an idiom to use it in C functions as `return\nluaL_error(args)`.\n
+luaL_execresult luaL_execresult(lua_State *L, int stat) [int]\nThis function produces the return values for process-related functions in the standard library\n(`os.execute` and `io.close`).\n
+luaL_fileresult luaL_fileresult(lua_State *L, int stat, const char *fname) [int]\nThis function produces the return values for file-related functions in the standard library\n(`io.open`, `os.rename`, `file:seek`, etc.).\n
+luaL_getmetafield luaL_getmetafield(lua_State *L, int obj, const char *e) [int]\nPushes onto the stack the field `e` from the metatable of the object at index `obj` and returns\nthe type of pushed value. If the object does not have a metatable, or if the metatable does\nnot have this field, pushes nothing and returns `LUA_TNIL`.\n
+luaL_getmetatable luaL_getmetatable(lua_State *L, const char *tname) [int]\nPushes onto the stack the metatable associated with the name `tname` in the registry (see\n`luaL_newmetatable`), or nil if there is no metatable associated with that name. Returns the\ntype of that pushed value.\n
+luaL_getsubtable luaL_getsubtable(lua_State *L, int idx, const char *fname) [int]\nEnsures that the value `t[fname]`, where `t` is the value at index `idx`, is a table, and\npushes that table onto the stack. Returns true if it finds a previous table there and false\nif it creates a new table.\n
+luaL_gsub luaL_gsub(lua_State *L, const char *s, const char *p, const char *r) [const char*]\nCreates a copy of string `s`, replacing any occurrence of the string `p` with the string `r`.\nPushes the resulting string on the stack and returns it.\n
+luaL_len luaL_len(lua_State *L, int index) [lua_Integer]\nReturns the "length" of the value at the given index as a number; it is equivalent to the '`#`'\noperator in Lua (see §3.4.7). Raises an error if the result of the operation is not an integer.\n(This case can only happen through metamethods.)\n
luaL_loadbuffer luaL_loadbuffer(lua_State *L, const char *buff, size_t sz, const char *name) [int]\nEquivalent to `luaL_loadbufferx` with `mode` equal to `NULL`.\n
-luaL_loadbufferx luaL_loadbufferx(lua_State *L, const char *buff, size_t sz, const char *name, const char *mode) [int]\nLoads a buffer as a Lua chunk. This function uses `lua_load` to load the\nchunk in the buffer pointed to by `buff` with size `sz`.\n\nThis function returns the same results as `lua_load`. `name` is the chunk\nname, used for debug information and error messages. The string `mode` works as\nin the function `lua_load`.\n
+luaL_loadbufferx luaL_loadbufferx(lua_State *L, const char *buff, size_t sz, const char *name, const char *mode) [int]\nLoads a buffer as a Lua chunk. This function uses `lua_load` to load the chunk in the buffer\npointed to by `buff` with size `sz`.\n\nThis function returns the same results as `lua_load`. `name` is the chunk name, used for debug\ninformation and error messages. The string `mode` works as in the function `lua_load`.\n
luaL_loadfile luaL_loadfile(lua_State *L, const char *filename) [int]\nEquivalent to `luaL_loadfilex` with `mode` equal to `NULL`.\n
-luaL_loadfilex luaL_loadfilex(lua_State *L, const char *filename, const char *mode) [int]\nLoads a file as a Lua chunk. This function uses `lua_load` to load the chunk\nin the file named `filename`. If `filename` is `NULL`, then it loads from the\nstandard input. The first line in the file is ignored if it starts with a `#`.\n\nThe string `mode` works as in the function `lua_load`.\n\nThis function returns the same results as `lua_load` or `LUA_ERRFILE` for \nfile-related errors.\n\nAs `lua_load`, this function only loads the chunk; it does not run it.\n
-luaL_loadstring luaL_loadstring(lua_State *L, const char *s) [int]\nLoads a string as a Lua chunk. This function uses `lua_load` to load the\nchunk in the zero-terminated string `s`.\n\nThis function returns the same results as `lua_load`.\n\nAlso as `lua_load`, this function only loads the chunk; it does not run it.\n
-luaL_newlib luaL_newlib(lua_State *L, const luaL_Reg l[]) [void]\nCreates a new table and registers there the functions in the list `l`.\n\nIt is implemented as the following macro:\n\n (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))\n \nThe array `l` must be the actual array, not a pointer to it.\n
-luaL_newlibtable luaL_newlibtable(lua_State *L, const luaL_Reg l[]) [void]\nCreates a new table with a size optimized to store all entries in the array `l`\n(but does not actually store them). It is intended to be used in conjunction\nwith `luaL_setfuncs` (see `luaL_newlib`).\n\nIt is implemented as a macro. The array `l` must be the actual array, not a\npointer to it.\n
-luaL_newmetatable luaL_newmetatable(lua_State *L, const char *tname) [int]\nIf the registry already has the key `tname`, returns 0. Otherwise, creates a\nnew table to be used as a metatable for userdata, adds to this new table the\npair `__name = tname`, adds to the registry the pair `[tname] = new table`, and\nreturns 1.\n\nIn both cases, the function pushes onto the stack the final value associated \nwith `tname` in the registry.\n
-luaL_newstate luaL_newstate(void) [lua_State*]\nCreates a new Lua state. It calls `lua_newstate` with an allocator based\non the standard C allocation functions and then sets a warning function and a \npanic function (see §4.4) that print messages to the standard error output.\n\nReturns the new state, or `NULL` if there is a memory allocation error.\n
+luaL_loadfilex luaL_loadfilex(lua_State *L, const char *filename, const char *mode) [int]\nLoads a file as a Lua chunk. This function uses `lua_load` to load the chunk in the file named\n`filename`. If `filename` is `NULL`, then it loads from the standard input. The first line\nin the file is ignored if it starts with a `#`.\n\nThe string `mode` works as in the function `lua_load`.\n\nThis function returns the same results as `lua_load` or `LUA_ERRFILE` for file-related errors.\n\nAs `lua_load`, this function only loads the chunk; it does not run it.\n
+luaL_loadstring luaL_loadstring(lua_State *L, const char *s) [int]\nLoads a string as a Lua chunk. This function uses `lua_load` to load the chunk in the\nzero-terminated string `s`.\n\nThis function returns the same results as `lua_load`.\n\nAlso as `lua_load`, this function only loads the chunk; it does not run it.\n
+luaL_newlib luaL_newlib(lua_State *L, const luaL_Reg l[]) [void]\nCreates a new table and registers there the functions in the list `l`.\n\nIt is implemented as the following macro:\n\n (luaL_newlibtable(L,l), luaL_setfuncs(L,l,0))\n\nThe array `l` must be the actual array, not a pointer to it.\n
+luaL_newlibtable luaL_newlibtable(lua_State *L, const luaL_Reg l[]) [void]\nCreates a new table with a size optimized to store all entries in the array `l` (but does\nnot actually store them). It is intended to be used in conjunction with `luaL_setfuncs` (see\n`luaL_newlib`).\n\nIt is implemented as a macro. The array `l` must be the actual array, not a pointer to it.\n
+luaL_newmetatable luaL_newmetatable(lua_State *L, const char *tname) [int]\nIf the registry already has the key `tname`, returns 0. Otherwise, creates a new table to be\nused as a metatable for userdata, adds to this new table the pair `__name = tname`, adds to\nthe registry the pair `[tname] = new table`, and returns 1.\n\nIn both cases, the function pushes onto the stack the final value associated with `tname`\nin the registry.\n
+luaL_newstate luaL_newstate(void) [lua_State*]\nCreates a new Lua state. It calls `lua_newstate` with an allocator based on the standard C\nallocation functions and then sets a warning function and a panic function (see §4.4) that\nprint messages to the standard error output.\n\nReturns the new state, or `NULL` if there is a memory allocation error.\n
luaL_openlibs luaL_openlibs(lua_State *L) [void]\nOpens all standard Lua libraries into the given state.\n
-luaL_opt luaL_opt(L, func, arg, dflt);\nThis macro is defined as follows:\n (lua_isnoneornil(L,(arg)) ? (dflt) : func(L,(arg)))\nIn words, if the argument `arg` is nil or absent, the macro results in the\ndefault `dflt`. Otherwise, it results in the result of calling `func` with the\nstate `L` and the argument index `arg` as parameters. Note that it evaluates \nthe expression `dflt` only if needed.\n
-luaL_optinteger luaL_optinteger(lua_State *L, int arg, lua_Integer d) [lua_Integer]\nIf the function argument `arg` is an integer (or it is convertable to an \ninteger), returns this integer. If this argument is absent or is nil, returns \n`d`. Otherwise, raises an error.\n
-luaL_optlstring luaL_optlstring(lua_State *L, int arg, const char *d, size_t *l) [const char*]\nIf the function argument `arg` is a string, returns this string. If this\nargument is absent or is nil, returns `d`. Otherwise, raises an error.\n\nIf `l` is not `NULL`, fills its referent with the result's length. If the\nresult is `NULL` (only possible when returning `d` and `d == NULL`), its length\nis considered zero.\n
-luaL_optnumber luaL_optnumber(lua_State *L, int arg, lua_Number d) [lua_Number]\nIf the function argument `arg` is a number, returns this number as a \n`lua_Number`. If this argument is absent or is nil, returns `d`. Otherwise, \nraises an error.\n
-luaL_optstring luaL_optstring(lua_State *L, int arg, const char *d) [const char*]\nIf the function argument `arg` is a string, returns this string. If this\nargument is absent or is nil, returns `d`. Otherwise, raises an error.\n
+luaL_opt luaL_opt(L, func, arg, dflt);\nThis macro is defined as follows:\n\n (lua_isnoneornil(L,(arg)) ? (dflt) : func(L,(arg)))\n\nIn words, if the argument `arg` is nil or absent, the macro results in the default `dflt`.\nOtherwise, it results in the result of calling `func` with the state `L` and the argument index\n`arg` as parameters. Note that it evaluates the expression `dflt` only if needed.\n
+luaL_optinteger luaL_optinteger(lua_State *L, int arg, lua_Integer d) [lua_Integer]\nIf the function argument `arg` is an integer (or it is convertable to an integer), returns\nthis integer. If this argument is absent or is nil, returns `d`. Otherwise, raises an error.\n
+luaL_optlstring luaL_optlstring(lua_State *L, int arg, const char *d, size_t *l) [const char*]\nIf the function argument `arg` is a string, returns this string. If this argument is absent\nor is nil, returns `d`. Otherwise, raises an error.\n\nIf `l` is not `NULL`, fills its referent with the result's length. If the result is `NULL`\n(only possible when returning `d` and `d == NULL`), its length is considered zero.\n
+luaL_optnumber luaL_optnumber(lua_State *L, int arg, lua_Number d) [lua_Number]\nIf the function argument `arg` is a number, returns this number as a `lua_Number`. If this\nargument is absent or is nil, returns `d`. Otherwise, raises an error.\n
+luaL_optstring luaL_optstring(lua_State *L, int arg, const char *d) [const char*]\nIf the function argument `arg` is a string, returns this string. If this argument is absent\nor is nil, returns `d`. Otherwise, raises an error.\n
luaL_prepbuffer luaL_prepbuffer(luaL_Buffer *B) [char*]\nEquivalent to `luaL_prepbuffsize` with the predefined size `LUAL_BUFFERSIZE`.\n
-luaL_prepbuffsize luaL_prepbuffsize(luaL_Buffer *B, size_t sz) [char*]\nReturns an address to a space of size `LUAL_BUFFERSIZE` where you can copy\na string to be added to buffer `B` (see `luaL_Buffer`). After copying the\nstring into this space you must call `luaL_addsize` with the size of the\nstring to actually add it to the buffer.\n
+luaL_prepbuffsize luaL_prepbuffsize(luaL_Buffer *B, size_t sz) [char*]\nReturns an address to a space of size `LUAL_BUFFERSIZE` where you can copy a string to be added\nto buffer `B` (see `luaL_Buffer`). After copying the string into this space you must call\n`luaL_addsize` with the size of the string to actually add it to the buffer.\n
luaL_pushfail luaL_pushfail(lua_State *L) [void]\nPushes the fail value onto the stack (see §6).\n
-luaL_pushresult luaL_pushresult(luaL_Buffer *B) [void]\nFinishes the use of buffer `B` leaving the final string on the top of\nthe stack.\n
+luaL_pushresult luaL_pushresult(luaL_Buffer *B) [void]\nFinishes the use of buffer `B` leaving the final string on the top of the stack.\n
luaL_pushresultsize luaL_pushresultsize(luaL_Buffer *B, size_t sz) [void]\nEquivalent to the sequence `luaL_addsize`, `luaL_pushresult`.\n
-luaL_ref luaL_ref(lua_State *L, int t) [int]\nCreates and returns a _reference_, in the table at index `t`, for the object\non the top of the stack (and pops the object).\n\nA reference is a unique integer key. As long as you do not manually add\ninteger keys into the table `t`, `luaL_ref` ensures the uniqueness of the key\nit returns. You can retrieve an object referred by the reference `r` by calling\n`lua_rawgeti(L, t, r)`. The function `luaL_unref` frees a reference.\n\nIf the object on the top of the stack is nil, `luaL_ref` returns the constant\n`LUA_REFNIL`. The constant `LUA_NOREF` is guaranteed to be different from\nany reference returned by `luaL_ref`.\n
-luaL_Reg luaL_Reg [struct]\ntypedef struct luaL_Reg {\n const char *name;\n lua_CFunction func;\n} luaL_Reg;\n\nType for arrays of functions to be registered by `luaL_setfuncs\nis the function name and `func` is a pointer to the function. Any array of\n`luaL_Reg` must end with a sentinel entry in which both `name` and `func`\nare `NULL`.\n
-luaL_requiref luaL_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb) [void]\nIf `package.loaded[modname]` is not true, calls the function `openf` with the\nstring `modname` as an argument and sets the call result to\n`package.loaded[modname]`, as if that function has been called through\n`require`.\n\nIf `glb` is true, also stores the module into the global `modname`.\n\nLeaves a copy of the module on the stack.\n
-luaL_setfuncs luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) [void]\nRegisters all functions in the array `l` (see `luaL_Reg`) into the table on the\ntop of the stack (below optional upvalues, see next).\n\nWhen `nup` is not zero, all functions are created with `nup` upvalues, \ninitialized with copies of the `nup` values previously pushed on the stack on \ntop of the library table. These values are popped from the stack after the \nregistration.\n
-luaL_setmetatable luaL_setmetatable(lua_State *L, const char *tname) [void]\nSets the metatable of the object on the top of the stack as the metatable\nassociated with name `tname` in the registry (see `luaL_newmetatable`).\n
-luaL_Stream luaL_Stream [typedef struct luaL_Stream {FILE *f; lua_CFunction closef;}]\nThe standard representation for file handles used by the standard I/O library.\n\nA file handle is implemented as a full userdata, with a metatable called\n`LUA_FILEHANDLE` (where `LUA_FILEHANDLE` is a macro with the actual metatable's\nname). The metatable is created by the I/O library (see `luaL_newmetatable`).\n\nThis userdata must start with the structure `luaL_Stream`; it can contain other\ndata after this initial structure. The field `f` points to the corresponding C\nstream (or it can be `NULL` to indicate an incompletely created handle). The\nfield `closef` points to a Lua function that will be called to close the stream \nwhen the handle is closed or collected; this function receives the file handle \nas its sole argument and must return either a true value, in case of success, or \na false value plus an error message, in case of error. Once Lua calls this \nfield, it changes the field value to `NULL` to signal that the handle is closed.\n
-luaL_testudata luaL_testudata(lua_State *L, int arg, const char *tname) [void]\nThis function works like `luaL_checkudata`, except that, when the test fails,\nit returns `NULL` instead of raising an error.\n
-luaL_tolstring luaL_tolstring(lua_State *L, int idx, size_t *len) [const char*]\nConverts any Lua value at the given index to a C string in a reasonable format.\nThe resulting string is pushed onto the stack and also returned by the function\n(see §4.1.3). If `len` is not `NULL`, the function also sets `*len` with the \nstring length.\n\nIf the value has a metatable with a `__tostring` field, then `luaL_tolstring`\ncalls the corresponding metamethod with the value as argument, and uses the\nresult of the call as its result.\n
-luaL_traceback luaL_traceback(lua_State *L, lua_State *L1, const char *msg, int level) [void]\nCreates and pushes a traceback of the stack `L1`. If `msg` is not `NULL`, it is\nappended at the beginning of the traceback. The `level` parameter tells at\nwhich level to start the traceback.\n
-luaL_typeerror luaL_typeerror(lua_State *L, int arg, const char *tname) [const char*]\nRaises a type error for the argument `arg` of the C function that called it,\nusing a standard message; `tname` is a "name" for the expected type. This \nfunction never returns.\n
+luaL_ref luaL_ref(lua_State *L, int t) [int]\nCreates and returns a _reference_, in the table at index `t`, for the object on the top of the\nstack (and pops the object).\n\nA reference is a unique integer key. As long as you do not manually add integer keys into the\ntable `t`, `luaL_ref` ensures the uniqueness of the key it returns. You can retrieve an object\nreferred by the reference `r` by calling `lua_rawgeti(L, t, r)`. The function `luaL_unref`\nfrees a reference.\n\nIf the object on the top of the stack is nil, `luaL_ref` returns the constant `LUA_REFNIL`.\nThe constant `LUA_NOREF` is guaranteed to be different from any reference returned by `luaL_ref`.\n
+luaL_Reg luaL_Reg [struct]\ntypedef struct luaL_Reg {\n const char *name;\n lua_CFunction func;\n} luaL_Reg;\n\nType for arrays of functions to be registered by `luaL_setfuncs is the function name and `func`\nis a pointer to the function. Any array of `luaL_Reg` must end with a sentinel entry in which\nboth `name` and `func` are `NULL`.\n
+luaL_requiref luaL_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb) [void]\nIf `package.loaded[modname]` is not true, calls the function `openf` with the string `modname`\nas an argument and sets the call result to `package.loaded[modname]`, as if that function has\nbeen called through `require`.\n\nIf `glb` is true, also stores the module into the global `modname`.\n\nLeaves a copy of the module on the stack.\n
+luaL_setfuncs luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) [void]\nRegisters all functions in the array `l` (see `luaL_Reg`) into the table on the top of the stack\n(below optional upvalues, see next).\n\nWhen `nup` is not zero, all functions are created with `nup` upvalues, initialized with copies\nof the `nup` values previously pushed on the stack on top of the library table. These values\nare popped from the stack after the registration.\n
+luaL_setmetatable luaL_setmetatable(lua_State *L, const char *tname) [void]\nSets the metatable of the object on the top of the stack as the metatable associated with name\n`tname` in the registry (see `luaL_newmetatable`).\n
+luaL_Stream luaL_Stream [typedef struct luaL_Stream {FILE *f; lua_CFunction closef;}]\nThe standard representation for file handles used by the standard I/O library.\n\nA file handle is implemented as a full userdata, with a metatable called `LUA_FILEHANDLE`\n(where `LUA_FILEHANDLE` is a macro with the actual metatable's name). The metatable is created\nby the I/O library (see `luaL_newmetatable`).\n\nThis userdata must start with the structure `luaL_Stream`; it can contain other data after this\ninitial structure. The field `f` points to the corresponding C stream (or it can be `NULL`\nto indicate an incompletely created handle). The field `closef` points to a Lua function\nthat will be called to close the stream when the handle is closed or collected; this function\nreceives the file handle as its sole argument and must return either a true value, in case of\nsuccess, or a false value plus an error message, in case of error. Once Lua calls this field,\nit changes the field value to `NULL` to signal that the handle is closed.\n
+luaL_testudata luaL_testudata(lua_State *L, int arg, const char *tname) [void]\nThis function works like `luaL_checkudata`, except that, when the test fails, it returns `NULL`\ninstead of raising an error.\n
+luaL_tolstring luaL_tolstring(lua_State *L, int idx, size_t *len) [const char*]\nConverts any Lua value at the given index to a C string in a reasonable format. The resulting\nstring is pushed onto the stack and also returned by the function (see §4.1.3). If `len`\nis not `NULL`, the function also sets `*len` with the string length.\n\nIf the value has a metatable with a `__tostring` field, then `luaL_tolstring` calls the\ncorresponding metamethod with the value as argument, and uses the result of the call as its result.\n
+luaL_traceback luaL_traceback(lua_State *L, lua_State *L1, const char *msg, int level) [void]\nCreates and pushes a traceback of the stack `L1`. If `msg` is not `NULL`, it is appended at\nthe beginning of the traceback. The `level` parameter tells at which level to start the traceback.\n
+luaL_typeerror luaL_typeerror(lua_State *L, int arg, const char *tname) [const char*]\nRaises a type error for the argument `arg` of the C function that called it, using a standard\nmessage; `tname` is a "name" for the expected type. This function never returns.\n
luaL_typename luaL_typename(lua_State *L, int index) [const char*]\nReturns the name of the type of the value at the given index.\n
-luaL_unref luaL_unref(lua_State *L, int t, int ref) [void]\nReleases the reference `ref` from the table at index `t` (see `luaL_ref`).\nThe entry is removed from the table, so that the referred object can be\ncollected. The reference `ref` is also freed to be used again.\n\nIf `ref` is `LUA_NOREF` or `LUA_REFNIL`, `luaL_unref` does nothing.\n
-luaL_where luaL_where(lua_State *L, int lvl) [void]\nPushes onto the stack a string identifying the current position of the\ncontrol at level `lvl` in the call stack. Typically this string has the\nfollowing format:\n\n _chunkname_:_currentline_:\n\nLevel 0 is the running function, level 1 is the function that called the\nrunning function, etc.\n\nThis function is used to build a prefix for error messages.\n
+luaL_unref luaL_unref(lua_State *L, int t, int ref) [void]\nReleases the reference `ref` from the table at index `t` (see `luaL_ref`). The entry is\nremoved from the table, so that the referred object can be collected. The reference `ref`\nis also freed to be used again.\n\nIf `ref` is `LUA_NOREF` or `LUA_REFNIL`, `luaL_unref` does nothing.\n
+luaL_where luaL_where(lua_State *L, int lvl) [void]\nPushes onto the stack a string identifying the current position of the control at level `lvl`\nin the call stack. Typically this string has the following format:\n\n _chunkname_:_currentline_:\n\nLevel 0 is the running function, level 1 is the function that called the running function, etc.\n\nThis function is used to build a prefix for error messages.\n