Browse Source

missplelling in comments/function names (endianess -> endianness)

Roberto Ierusalimschy 11 years ago
parent
commit
420cc62fac
3 changed files with 13 additions and 13 deletions
  1. 2 2
      ldump.c
  2. 8 8
      lstrlib.c
  3. 3 3
      lundump.c

+ 2 - 2
ldump.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: ldump.c,v 2.26 2014/03/11 18:05:46 roberto Exp roberto $
+** $Id: ldump.c,v 2.27 2014/03/11 18:56:27 roberto Exp roberto $
 ** save precompiled Lua chunks
 ** save precompiled Lua chunks
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -27,7 +27,7 @@ typedef struct {
 
 
 /*
 /*
 ** All high-level dumps go through DumpVector; you can change it to
 ** All high-level dumps go through DumpVector; you can change it to
-** change the endianess of the result
+** change the endianness of the result
 */
 */
 #define DumpVector(v,n,D)	DumpBlock(v,(n)*sizeof((v)[0]),D)
 #define DumpVector(v,n,D)	DumpBlock(v,(n)*sizeof((v)[0]),D)
 
 

+ 8 - 8
lstrlib.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lstrlib.c,v 1.188 2014/03/21 13:52:33 roberto Exp roberto $
+** $Id: lstrlib.c,v 1.189 2014/03/21 14:26:44 roberto Exp roberto $
 ** Standard library for string operations and pattern-matching
 ** Standard library for string operations and pattern-matching
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -975,7 +975,7 @@ static int getendian (lua_State *L, int arg) {
   if (*endian == 'n')  /* native? */
   if (*endian == 'n')  /* native? */
     return nativeendian.little;
     return nativeendian.little;
   luaL_argcheck(L, *endian == 'l' || *endian == 'b', arg,
   luaL_argcheck(L, *endian == 'l' || *endian == 'b', arg,
-                   "endianess must be 'l'/'b'/'n'");
+                   "endianness must be 'l'/'b'/'n'");
   return (*endian == 'l');
   return (*endian == 'l');
 }
 }
 
 
@@ -1075,9 +1075,9 @@ static int unpackint_l (lua_State *L) {
 }
 }
 
 
 
 
-static void correctendianess (lua_State *L, char *b, int size, int endianarg) {
+static void correctendianness (lua_State *L, char *b, int size, int endianarg) {
   int endian = getendian(L, endianarg);
   int endian = getendian(L, endianarg);
-  if (endian != nativeendian.little) {  /* not native endianess? */
+  if (endian != nativeendian.little) {  /* not native endianness? */
     int i = 0;
     int i = 0;
     while (i < --size) {
     while (i < --size) {
       char temp = b[i];
       char temp = b[i];
@@ -1113,7 +1113,7 @@ static int packfloat_l (lua_State *L) {
     d = (double)n;
     d = (double)n;
     pn = (char*)&d;
     pn = (char*)&d;
   }
   }
-  correctendianess(L, pn, size, 3);
+  correctendianness(L, pn, size, 3);
   lua_pushlstring(L, pn, size);
   lua_pushlstring(L, pn, size);
   return 1;
   return 1;
 }
 }
@@ -1129,19 +1129,19 @@ static int unpackfloat_l (lua_State *L) {
                    "string too short");
                    "string too short");
   if (size == sizeof(lua_Number)) {
   if (size == sizeof(lua_Number)) {
     memcpy(&res, s + pos - 1, size); 
     memcpy(&res, s + pos - 1, size); 
-    correctendianess(L, (char*)&res, size, 4);
+    correctendianness(L, (char*)&res, size, 4);
   }
   }
   else if (size == sizeof(float)) {
   else if (size == sizeof(float)) {
     float f;
     float f;
     memcpy(&f, s + pos - 1, size); 
     memcpy(&f, s + pos - 1, size); 
-    correctendianess(L, (char*)&f, size, 4);
+    correctendianness(L, (char*)&f, size, 4);
     res = (lua_Number)f;
     res = (lua_Number)f;
   }  
   }  
   else {  /* native lua_Number may be neither float nor double */
   else {  /* native lua_Number may be neither float nor double */
     double d;
     double d;
     lua_assert(size == sizeof(double));
     lua_assert(size == sizeof(double));
     memcpy(&d, s + pos - 1, size); 
     memcpy(&d, s + pos - 1, size); 
-    correctendianess(L, (char*)&d, size, 4);
+    correctendianness(L, (char*)&d, size, 4);
     res = (lua_Number)d;
     res = (lua_Number)d;
   }
   }
   lua_pushnumber(L, res);
   lua_pushnumber(L, res);

+ 3 - 3
lundump.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lundump.c,v 2.33 2014/03/11 18:05:46 roberto Exp roberto $
+** $Id: lundump.c,v 2.34 2014/03/11 18:56:27 roberto Exp roberto $
 ** load precompiled Lua chunks
 ** load precompiled Lua chunks
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -42,7 +42,7 @@ static l_noret error(LoadState *S, const char *why) {
 
 
 /*
 /*
 ** All high-level loads go through LoadVector; you can change it to
 ** All high-level loads go through LoadVector; you can change it to
-** adapt to the endianess of the input
+** adapt to the endianness of the input
 */
 */
 #define LoadVector(S,b,n)	LoadBlock(S,b,(n)*sizeof((b)[0]))
 #define LoadVector(S,b,n)	LoadBlock(S,b,(n)*sizeof((b)[0]))
 
 
@@ -231,7 +231,7 @@ static void checkHeader (LoadState *S) {
   checksize(S, lua_Integer);
   checksize(S, lua_Integer);
   checksize(S, lua_Number);
   checksize(S, lua_Number);
   if (LoadInteger(S) != LUAC_INT)
   if (LoadInteger(S) != LUAC_INT)
-    error(S, "endianess mismatch in");
+    error(S, "endianness mismatch in");
   if (LoadNumber(S) != LUAC_NUM)
   if (LoadNumber(S) != LUAC_NUM)
     error(S, "float format mismatch in");
     error(S, "float format mismatch in");
 }
 }