Details

Typos in comments and details in the manual.
diff --git a/ldebug.c b/ldebug.c
index 7a61a78..28b1caa 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -659,7 +659,7 @@
 ** Check whether pointer 'o' points to some value in the stack frame of
 ** the current function and, if so, returns its index.  Because 'o' may
 ** not point to a value in this stack, we cannot compare it with the
-** region boundaries (undefined behaviour in ISO C).
+** region boundaries (undefined behavior in ISO C).
 */
 static int instack (CallInfo *ci, const TValue *o) {
   int pos;
@@ -848,7 +848,7 @@
   if (p->lineinfo == NULL)  /* no debug information? */
     return 0;
   if (newpc - oldpc < MAXIWTHABS / 2) {  /* not too far apart? */
-    int delta = 0;  /* line diference */
+    int delta = 0;  /* line difference */
     int pc = oldpc;
     for (;;) {
       int lineinfo = p->lineinfo[++pc];
diff --git a/llex.c b/llex.c
index b0dc0ac..5fc39a5 100644
--- a/llex.c
+++ b/llex.c
@@ -128,7 +128,7 @@
 ** ensuring there is only one copy of each unique string.  The table
 ** here is used as a set: the string enters as the key, while its value
 ** is irrelevant. We use the string itself as the value only because it
-** is a TValue readly available. Later, the code generation can change
+** is a TValue readily available. Later, the code generation can change
 ** this value.
 */
 TString *luaX_newstring (LexState *ls, const char *str, size_t l) {
diff --git a/llimits.h b/llimits.h
index 251a270..1c826f7 100644
--- a/llimits.h
+++ b/llimits.h
@@ -82,7 +82,7 @@
 #if defined(UINTPTR_MAX)  /* even in C99 this type is optional */
 #define L_P2I	uintptr_t
 #else  /* no 'intptr'? */
-#define L_P2I	uintmax_t  /* use the largerst available integer */
+#define L_P2I	uintmax_t  /* use the largest available integer */
 #endif
 #else  /* C89 option */
 #define L_P2I	size_t
diff --git a/lparser.c b/lparser.c
index 24668c2..b745f23 100644
--- a/lparser.c
+++ b/lparser.c
@@ -521,12 +521,12 @@
 
 /*
 ** Solves the goto at index 'g' to given 'label' and removes it
-** from the list of pending goto's.
+** from the list of pending gotos.
 ** If it jumps into the scope of some variable, raises an error.
 */
 static void solvegoto (LexState *ls, int g, Labeldesc *label) {
   int i;
-  Labellist *gl = &ls->dyd->gt;  /* list of goto's */
+  Labellist *gl = &ls->dyd->gt;  /* list of gotos */
   Labeldesc *gt = &gl->arr[g];  /* goto to be resolved */
   lua_assert(eqstr(gt->name, label->name));
   if (l_unlikely(gt->nactvar < label->nactvar))  /* enter some scope? */
@@ -580,7 +580,7 @@
 /*
 ** Solves forward jumps. Check whether new label 'lb' matches any
 ** pending gotos in current block and solves them. Return true
-** if any of the goto's need to close upvalues.
+** if any of the gotos need to close upvalues.
 */
 static int solvegotos (LexState *ls, Labeldesc *lb) {
   Labellist *gl = &ls->dyd->gt;
@@ -601,7 +601,7 @@
 /*
 ** Create a new label with the given 'name' at the given 'line'.
 ** 'last' tells whether label is the last non-op statement in its
-** block. Solves all pending goto's to this new label and adds
+** block. Solves all pending gotos to this new label and adds
 ** a close instruction if necessary.
 ** Returns true iff it added a close instruction.
 */
diff --git a/lstrlib.c b/lstrlib.c
index 0b4fdbb..0316716 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -570,7 +570,7 @@
 static const char *match (MatchState *ms, const char *s, const char *p) {
   if (l_unlikely(ms->matchdepth-- == 0))
     luaL_error(ms->L, "pattern too complex");
-  init: /* using goto's to optimize tail recursion */
+  init: /* using goto to optimize tail recursion */
   if (p != ms->p_end) {  /* end of pattern? */
     switch (*p) {
       case '(': {  /* start capture */
diff --git a/lua.c b/lua.c
index 715430a..0ff8845 100644
--- a/lua.c
+++ b/lua.c
@@ -666,7 +666,7 @@
     l_message(argv[0], "cannot create state: not enough memory");
     return EXIT_FAILURE;
   }
-  lua_gc(L, LUA_GCSTOP);  /* stop GC while buidling state */
+  lua_gc(L, LUA_GCSTOP);  /* stop GC while building state */
   lua_pushcfunction(L, &pmain);  /* to call 'pmain' in protected mode */
   lua_pushinteger(L, argc);  /* 1st argument */
   lua_pushlightuserdata(L, argv); /* 2nd argument */
diff --git a/manual/manual.of b/manual/manual.of
index 6d19e25..ac1d7e6 100644
--- a/manual/manual.of
+++ b/manual/manual.of
@@ -20,7 +20,7 @@
 and rapid prototyping.
 
 Lua is implemented as a library, written in @emphx{clean C},
-the common subset of @N{Standard C} and C++.
+the common subset of @N{standard C} and C++.
 The Lua distribution includes a host program called @id{lua},
 which uses the Lua library to offer a complete,
 standalone Lua interpreter,
@@ -2963,7 +2963,7 @@
     return realloc(ptr, nsize);
 }
 }
-Note that @N{Standard C} ensures
+Note that @N{ISO C} ensures
 that @T{free(NULL)} has no effect and that
 @T{realloc(NULL,size)} is equivalent to @T{malloc(size)}.
 
@@ -5780,7 +5780,7 @@
 
 Creates a new Lua state.
 It calls @Lid{lua_newstate} with an
-allocator based on the @N{standard C} allocation functions
+allocator based on the @N{ISO C} allocation functions
 and then sets a warning function and a panic function @see{C-error}
 that print messages to the standard error output.
 
@@ -6898,7 +6898,7 @@
 @id{funcname} must be the exact name exported by the @N{C library}
 (which may depend on the @N{C compiler} and linker used).
 
-This function is not supported by @N{Standard C}.
+This functionality is not supported by @N{ISO C}.
 As such, it is only available on some platforms
 (Windows, Linux, Mac OS X, Solaris, BSD,
 plus other Unix systems that support the @id{dlfcn} standard).