浏览代码

Details (comments)

Roberto Ierusalimschy 3 周之前
父节点
当前提交
03d672a95c
共有 5 个文件被更改,包括 8 次插入8 次删除
  1. 1 1
      lapi.c
  2. 1 1
      lctype.c
  3. 1 1
      lobject.c
  4. 3 3
      luaconf.h
  5. 2 2
      lutf8lib.c

+ 1 - 1
lapi.c

@@ -679,7 +679,7 @@ static int auxgetstr (lua_State *L, const TValue *t, const char *k) {
 
 /*
 ** The following function assumes that the registry cannot be a weak
-** table, so that en mergency collection while using the global table
+** table; so, an emergency collection while using the global table
 ** cannot collect it.
 */
 static void getGlobalTable (lua_State *L, TValue *gt) {

+ 1 - 1
lctype.c

@@ -18,7 +18,7 @@
 
 
 #if defined (LUA_UCID)		/* accept UniCode IDentifiers? */
-/* consider all non-ascii codepoints to be alphabetic */
+/* consider all non-ASCII codepoints to be alphabetic */
 #define NONA		0x01
 #else
 #define NONA		0x00	/* default */

+ 1 - 1
lobject.c

@@ -385,7 +385,7 @@ size_t luaO_str2num (const char *s, TValue *o) {
 int luaO_utf8esc (char *buff, l_uint32 x) {
   int n = 1;  /* number of bytes put in buffer (backwards) */
   lua_assert(x <= 0x7FFFFFFFu);
-  if (x < 0x80)  /* ascii? */
+  if (x < 0x80)  /* ASCII? */
     buff[UTF8BUFFSZ - 1] = cast_char(x);
   else {  /* need continuation bytes */
     unsigned int mfb = 0x3f;  /* maximum that fits in first byte */

+ 3 - 3
luaconf.h

@@ -59,7 +59,7 @@
 
 
 /*
-** When Posix DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone
+** When POSIX DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone
 ** application will try to dynamically link a 'readline' facility
 ** for its REPL.  In that case, LUA_READLINELIB is the name of the
 ** library it will look for those facilities.  If lua.c cannot open
@@ -76,7 +76,7 @@
 
 #if defined(LUA_USE_MACOSX)
 #define LUA_USE_POSIX
-#define LUA_USE_DLOPEN		/* MacOS does not need -ldl */
+#define LUA_USE_DLOPEN		/* macOS does not need -ldl */
 #define LUA_READLINELIB		"libedit.dylib"
 #endif
 
@@ -88,7 +88,7 @@
 
 
 #if defined(LUA_USE_C89) && defined(LUA_USE_POSIX)
-#error "Posix is not compatible with C89"
+#error "POSIX is not compatible with C89"
 #endif
 
 

+ 2 - 2
lutf8lib.c

@@ -47,7 +47,7 @@ static lua_Integer u_posrelat (lua_Integer pos, size_t len) {
 ** Decode one UTF-8 sequence, returning NULL if byte sequence is
 ** invalid.  The array 'limits' stores the minimum value for each
 ** sequence length, to check for overlong representations. Its first
-** entry forces an error for non-ascii bytes with no continuation
+** entry forces an error for non-ASCII bytes with no continuation
 ** bytes (count == 0).
 */
 static const char *utf8_decode (const char *s, l_uint32 *val, int strict) {
@@ -55,7 +55,7 @@ static const char *utf8_decode (const char *s, l_uint32 *val, int strict) {
         {~(l_uint32)0, 0x80, 0x800, 0x10000u, 0x200000u, 0x4000000u};
   unsigned int c = (unsigned char)s[0];
   l_uint32 res = 0;  /* final result */
-  if (c < 0x80)  /* ascii? */
+  if (c < 0x80)  /* ASCII? */
     res = c;
   else {
     int count = 0;  /* to count number of continuation bytes */