Spelling and grammar fixes

Fixes bug 743172, bug 743489, bug 769632, bug 782400 and a few other
misspellings.
diff --git a/buf.c b/buf.c
index 3b76018..21cb9d8 100644
--- a/buf.c
+++ b/buf.c
@@ -49,7 +49,7 @@
     size_t use;		        /* The buffer size used */
     size_t size;		/* The buffer size */
     xmlBufferPtr buffer;        /* wrapper for an old buffer */
-    int error;                  /* an error code if a failure occured */
+    int error;                  /* an error code if a failure occurred */
 };
 
 #ifdef WITH_BUFFER_COMPAT
@@ -701,7 +701,7 @@
  * used in the buffer. It does not account for the terminating zero
  * usually needed
  *
- * Returns the amount or 0 if none or an error occured
+ * Returns the amount or 0 if none or an error occurred
  */
 
 size_t