This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix typos.


Hi, this is upstream version of patch that I send to gcc. I generated
this patch with tool that I am writing:
https://github.com/neleai/stylepp

To siplify review I added another utility
stylepp_strip_diff

As in review most of time was spend in hunting what changed I it does
following:

It accepts a patch file as input and divides it to nonregular and
nonregular part. A regular part are one line changes. It marks regions
that changed.

Output of stylepp_strip_patch and patch are below.

                            -#else   /* linux */
                            +#else   /* Linux */
                                        ^^
                            -#endif  /* linux */
                            +#endif  /* Linux */
                                        ^^
   * Added macros etc., allowing use in linux libc from
   * Added macros etc., allowing use in Linux libc from
                                        ^^
                           -      * Add linux mremap support code from HJ Liu
                           +      * Add Linux mremap support code from HJ Liu
                                        ^^
HAVE_MREMAP               default: 1 on linux, else 0
HAVE_MREMAP               default: 1 on Linux, else 0
                                        ^^
                              -      /* sparc call frames require that space is allocated for 6 args,
                              +      /* SPARC call frames require that space is allocated for 6 args,
                                        ^   ^
                              -      /* sparc call frames require that space is allocated for 6 args,
                              +      /* SPARC call frames require that space is allocated for 6 args,
                                        ^   ^
                     -      * tested on sparc, hp-700, dec-mips, rs6000
                     +      * tested on SPARC, hp-700, dec-mips, rs6000
                                        ^   ^
   - * Based on the similar routine for sparc.
   + * Based on the similar routine for SPARC.
                                        ^   ^
        -     * Work around strange ABI behaviour.
        +     * Work around strange ABI behavior.
                                        ^     ^
 * multi-word objects (e.g. structs) in contigious memory. Callers are not
 * multi-word objects (e.g. structs) in contiguous memory. Callers are not
                                        ^     ^
   -  /* Loop until we can allocate two contigious pages */
   +  /* Loop until we can allocate two contiguous pages */
                                        ^     ^
                                  -  /* contigious writable and executable pages */
                                  +  /* contiguous writable and executable pages */
                                        ^     ^
, to make sure that lefts and rights of descendents
, to make sure that lefts and rights of descendants
                                        ^      ^
               -/* If the structure has essentialy an unique element, return its type.  */
               +/* If the structure has essentially an unique element, return its type.  */
                                        ^       ^
                       -   writable and exexutable filesystem.  */
                       +   writable and executable filesystem.  */
                                        ^  ^
                               -     is incremeneted whenever we place an FP arg on the stack, so account for
                               +     is incremented whenever we place an FP arg on the stack, so account for
                                        ^      ^
                -      of the structure layed out in memory
                +      of the structure laid out in memory
                                        ^ ^
                -      of the structure layed out in memory
                +      of the structure laid out in memory
                                        ^ ^
                     -      * Fix error occuring when initial sbrk_base not word-aligned.
                     +      * Fix error occurring when initial sbrk_base not word-aligned.
                                        ^   ^
g but necessary to avoid errors on some plaftorms */
g but necessary to avoid errors on some platforms */
                                        ^   ^
 * Use ordered bins instead of best-fit threshhold
 * Use ordered bins instead of best-fit threshold
                                        ^   ^


---
 src/aarch64/ffi.c    |  4 ++--
 src/arm/ffi.c        |  4 ++--
 src/closures.c       |  2 +-
 src/dlmalloc.c       | 20 ++++++++++----------
 src/microblaze/ffi.c |  4 ++--
 src/mips/ffi.c       |  2 +-
 src/powerpc/ffi.c    |  2 +-
 src/sh/ffi.c         |  2 +-
 src/sparc/ffi.c      |  4 ++--
 9 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
index 1405665..97451cf 100644
--- a/src/aarch64/ffi.c
+++ b/src/aarch64/ffi.c
@@ -924,7 +924,7 @@ ffi_closure_SYSV_inner (ffi_closure *closure, struct call_context *context,
 			   therefore the structure is not represented as
 			   a contiguous sequence of bytes in our saved
 			   register context. We need to fake up a copy
-			   of the structure layed out in memory
+			   of the structure laid out in memory
 			   correctly. The fake can be tossed once the
 			   closure function has returned hence alloca()
 			   is sufficient. */
@@ -945,7 +945,7 @@ ffi_closure_SYSV_inner (ffi_closure *closure, struct call_context *context,
 			   therefore the structure is not represented as
 			   a contiguous sequence of bytes in our saved
 			   register context. We need to fake up a copy
-			   of the structure layed out in memory
+			   of the structure laid out in memory
 			   correctly. The fake can be tossed once the
 			   closure function has returned hence alloca()
 			   is sufficient. */
diff --git a/src/arm/ffi.c b/src/arm/ffi.c
index 4c3b146..14e9d55 100644
--- a/src/arm/ffi.c
+++ b/src/arm/ffi.c
@@ -537,7 +537,7 @@ typedef struct ffi_trampoline_table ffi_trampoline_table;
 typedef struct ffi_trampoline_table_entry ffi_trampoline_table_entry;
 
 struct ffi_trampoline_table {
-  /* contigious writable and executable pages */
+  /* contiguous writable and executable pages */
   vm_address_t config_page;
   vm_address_t trampoline_page;
 
@@ -577,7 +577,7 @@ ffi_trampoline_table_alloc ()
 {
   ffi_trampoline_table *table = NULL;
 
-  /* Loop until we can allocate two contigious pages */
+  /* Loop until we can allocate two contiguous pages */
   while (table == NULL) {
     vm_address_t config_page = 0x0;
     kern_return_t kt;
diff --git a/src/closures.c b/src/closures.c
index 6298d6f..4d0a0b6 100644
--- a/src/closures.c
+++ b/src/closures.c
@@ -382,7 +382,7 @@ open_temp_exec_file_opts_next (void)
 }
 
 /* Return a file descriptor of a temporary zero-sized file in a
-   writable and exexutable filesystem.  */
+   writable and executable filesystem.  */
 static int
 open_temp_exec_file (void)
 {
diff --git a/src/dlmalloc.c b/src/dlmalloc.c
index 5c9f9c2..39063a7 100644
--- a/src/dlmalloc.c
+++ b/src/dlmalloc.c
@@ -325,7 +325,7 @@ HAVE_MMAP                 default: 1 (true)
   able to unmap memory that may have be allocated using multiple calls
   to MMAP, so long as they are adjacent.
 
-HAVE_MREMAP               default: 1 on linux, else 0
+HAVE_MREMAP               default: 1 on Linux, else 0
   If true realloc() uses mremap() to re-allocate large blocks and
   extend or shrink allocation spaces.
 
@@ -522,9 +522,9 @@ DEFAULT_MMAP_THRESHOLD       default: 256K
 #ifndef HAVE_MREMAP
 #ifdef linux
 #define HAVE_MREMAP 1
-#else   /* linux */
+#else   /* Linux */
 #define HAVE_MREMAP 0
-#endif  /* linux */
+#endif  /* Linux */
 #endif  /* HAVE_MREMAP */
 #ifndef MALLOC_FAILURE_ACTION
 #define MALLOC_FAILURE_ACTION  errno = ENOMEM;
@@ -1255,7 +1255,7 @@ extern void*     sbrk(ptrdiff_t);
 #define SIZE_T_BITSIZE      (sizeof(size_t) << 3)
 
 /* Some constants coerced to size_t */
-/* Annoying but necessary to avoid errors on some plaftorms */
+/* Annoying but necessary to avoid errors on some platforms */
 #define SIZE_T_ZERO         ((size_t)0)
 #define SIZE_T_ONE          ((size_t)1)
 #define SIZE_T_TWO          ((size_t)2)
@@ -3090,7 +3090,7 @@ static void internal_malloc_stats(mstate m) {
      and choose its bk node as its replacement.
   2. If x was the last node of its size, but not a leaf node, it must
      be replaced with a leaf node (not merely one with an open left or
-     right), to make sure that lefts and rights of descendents
+     right), to make sure that lefts and rights of descendants
      correspond properly to bit masks.  We use the rightmost descendent
      of x.  We could use any other leaf, but this is easy to locate and
      tends to counteract removal of leftmosts elsewhere, and so keeps
@@ -5083,7 +5083,7 @@ History:
       * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen
       * malloc_extend_top: fix mask error that caused wastage after
         foreign sbrks
-      * Add linux mremap support code from HJ Liu
+      * Add Linux mremap support code from HJ Liu
 
     V2.6.2 Tue Dec  5 06:52:55 1995  Doug Lea  (dl at gee)
       * Integrated most documentation with the code.
@@ -5091,10 +5091,10 @@ History:
         Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
       * Use last_remainder in more cases.
       * Pack bins using idea from  colin@nyx10.cs.du.edu
-      * Use ordered bins instead of best-fit threshhold
+      * Use ordered bins instead of best-fit threshold
       * Eliminate block-local decls to simplify tracing and debugging.
       * Support another case of realloc via move into top
-      * Fix error occuring when initial sbrk_base not word-aligned.
+      * Fix error occurring when initial sbrk_base not word-aligned.
       * Rely on page size for units instead of SBRK_UNIT to
         avoid surprises about sbrk alignment conventions.
       * Add mallinfo, mallopt. Thanks to Raymond Nijssen
@@ -5102,7 +5102,7 @@ History:
       * Add `pad' argument to malloc_trim and top_pad mallopt parameter.
       * More precautions for cases where other routines call sbrk,
         courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
-      * Added macros etc., allowing use in linux libc from
+      * Added macros etc., allowing use in Linux libc from
         H.J. Lu (hjl@gnu.ai.mit.edu)
       * Inverted this history list
 
@@ -5150,7 +5150,7 @@ History:
       * removed dependency on getpagesize.h
       * misc cosmetics and a bit more internal documentation
       * anticosmetics: mangled names in macros to evade debugger strangeness
-      * tested on sparc, hp-700, dec-mips, rs6000
+      * tested on SPARC, hp-700, dec-mips, rs6000
           with gcc & native cc (hp, dec only) allowing
           Detlefs & Zorn comparison study (in SIGPLAN Notices.)
 
diff --git a/src/microblaze/ffi.c b/src/microblaze/ffi.c
index 5c155c5..130f726 100644
--- a/src/microblaze/ffi.c
+++ b/src/microblaze/ffi.c
@@ -183,7 +183,7 @@ void ffi_closure_call_SYSV(void* register_args, void* stack_args,
 	ffi_type** arg_types = cif->arg_types;
 
 	/* re-allocate data for the args. This needs to be done in order to keep
-	 * multi-word objects (e.g. structs) in contigious memory. Callers are not
+	 * multi-word objects (e.g. structs) in contiguous memory. Callers are not
 	 * required to store the value of args in the lower 6 words in the stack
 	 * (although they are allocated in the stack).
 	 */
@@ -236,7 +236,7 @@ void ffi_closure_call_SYSV(void* register_args, void* stack_args,
 			case FFI_TYPE_STRUCT:
 #if __BIG_ENDIAN__
 				/*
-				 * Work around strange ABI behaviour.
+				 * Work around strange ABI behavior.
 				 * (see info in ffi_prep_args)
 				 */
 				if (arg_types[i]->size < WORD_SIZE)
diff --git a/src/mips/ffi.c b/src/mips/ffi.c
index 03121e3..cd74e99 100644
--- a/src/mips/ffi.c
+++ b/src/mips/ffi.c
@@ -752,7 +752,7 @@ ffi_prep_closure_loc (ffi_closure *closure,
  *
  * Returns the function return type.
  *
- * Based on the similar routine for sparc.
+ * Based on the similar routine for SPARC.
  */
 int
 ffi_closure_mips_inner_O32 (ffi_closure *closure,
diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c
index 54f2731..3bfbeca 100644
--- a/src/powerpc/ffi.c
+++ b/src/powerpc/ffi.c
@@ -374,7 +374,7 @@ ffi_prep_args_SYSV (extended_cif *ecif, unsigned *const stack)
   FFI_ASSERT (gpr_base.u <= stacktop.u - ASM_NEEDS_REGISTERS);
   /* The assert below is testing that the number of integer arguments agrees
      with the number found in ffi_prep_cif_machdep().  However, intarg_count
-     is incremeneted whenever we place an FP arg on the stack, so account for
+     is incremented whenever we place an FP arg on the stack, so account for
      that before our assert test.  */
 #ifndef __NO_FPRS__
   if (fparg_count > NUM_FPR_ARG_REGISTERS)
diff --git a/src/sh/ffi.c b/src/sh/ffi.c
index 3515b91..9ec86bf 100644
--- a/src/sh/ffi.c
+++ b/src/sh/ffi.c
@@ -41,7 +41,7 @@
 #define STRUCT_VALUE_ADDRESS_WITH_ARG 0
 #endif
 
-/* If the structure has essentialy an unique element, return its type.  */
+/* If the structure has essentially an unique element, return its type.  */
 static int
 simple_type (ffi_type *arg)
 {
diff --git a/src/sparc/ffi.c b/src/sparc/ffi.c
index 9f0fded..80faf27 100644
--- a/src/sparc/ffi.c
+++ b/src/sparc/ffi.c
@@ -263,7 +263,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
       if (cif->rtype->type != FFI_TYPE_STRUCT)
 	cif->bytes += wordsize;
 
-      /* sparc call frames require that space is allocated for 6 args,
+      /* SPARC call frames require that space is allocated for 6 args,
 	 even if they aren't used. Make that space if necessary. */
   
       if (cif->bytes < 4*6+4)
@@ -273,7 +273,7 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
     {
       wordsize = 8;
 
-      /* sparc call frames require that space is allocated for 6 args,
+      /* SPARC call frames require that space is allocated for 6 args,
 	 even if they aren't used. Make that space if necessary. */
   
       if (cif->bytes < 8*6)
-- 
1.8.3.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]