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]

Re: [PATCH v2] Fix typos.


Thanks.  I've committed this change with the exception of the
"behaviour" change, which is correct in many locales.

AG





On Thu, Aug 8, 2013 at 3:02 AM, OndÅej BÃlka <neleai@seznam.cz> wrote:
>
> On Mon, Jul 22, 2013 at 04:48:07PM +0200, OndÅej BÃlka wrote:
>> 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.
>>
> Ping, I improved my tool to check more file types which allowed me to
> find additional typos.
>
> -     right), to make sure that lefts and rights of descendents
> -     correspond properly to bit masks.  We use the rightmost descendent
> +     right), to make sure that lefts and rights of descendants
> +     correspond properly to bit masks.  We use the rightmost descendant
> halls the call context into ffi value \n-desriptors, invokes the wrapped functio
> halls the call context into ffi value \n+descriptors, invokes the wrapped functi
>                                             ^
> bler wrapper will reload call context \n-regsiters. \n
> bler wrapper will reload call context \n+registers. \n
>                                             ^^
>         /* \n-* Work around strange ABI behaviour. \n * (see info in ffi_prep_ar
>         /* \n+* Work around strange ABI behavior. \n * (see info in ffi_prep_arg
>                                               ^^
> we take advantage of case's first-match behaviour. \n ///*)
> we take advantage of case's first-match behavior. \n ///*)
>                                               ^^
> oing register values, \n-and STACK_ARGS containts STACK_ARG_BYTES of additional
> oing register values, \n+and STACK_ARGS contains STACK_ARG_BYTES of additional v
>                                               ^^
> -* multi-word objects (e.g. structs) in contigious memory. Callers are not \n *
> +* multi-word objects (e.g. structs) in contiguous memory. Callers are not \n *
>                                               ^
>                 \n-/* mstate bit set if continguous morecore disabled or failed
>                 \n+/* mstate bit set if contiguous morecore disabled or failed *
>                                             ^^
>    \n-/* Loop until we can allocate two contigious pages */ \n while (table == N
>    \n+/* Loop until we can allocate two contiguous pages */ \n while (table == N
>                                               ^
>      truct ffi_trampoline_table { \n-/* contigious writable and executable pages
>      truct ffi_trampoline_table { \n+/* contiguous writable and executable pages
>                                               ^
>                                   \n-/* Didnt match anything */ \n bri ffi_call_
>                                   \n+/* Didn't match anything */ \n bri ffi_call
>                                             ^
>                                   \n-/* Didnt match anything */ \n bri ffi_closu
>                                   \n+/* Didn't match anything */ \n bri ffi_clos
>                                             ^
>              \n-/* If the structure has essentialy an unique element, return its
>              \n+/* If the structure has essentially an unique element, return it
>                                                 ^^
> ry zero-sized file in a \n-writable and exexutable filesystem.  */ \n static int
> ry zero-sized file in a \n+writable and executable filesystem.  */ \n static int
>                                            ^
>  bfin toolchain that it puts a _ before funcion names \n that's why the function
>  bfin toolchain that it puts a _ before function names \n that's why the functio
>                                             ^
> e.  This tests the special cases \n-for homogenous floating-point aggregates in
> e.  This tests the special cases \n+for homogeneous floating-point aggregates in
>                                                ^
> machdep().  However, intarg_count \n-is incremeneted whenever we place an FP arg
> machdep().  However, intarg_count \n+is incremented whenever we place an FP arg
>                                                ^^
> d to fake up a copy \n-of the structure layed out in memory \n correctly. The fa
> d to fake up a copy \n+of the structure laid out in memory \n correctly. The fak
>                                           ^
> d to fake up a copy \n-of the structure layed out in memory \n correctly. The fa
> d to fake up a copy \n+of the structure laid out in memory \n correctly. The fak
>                                           ^
>                              else \n-/* Natrual alignment for the first item...
>                              else \n+/* Natural alignment for the first item...
>                                            ^^
>                           \n-/* This is neccessary to ensure that basic types ar
>                           \n+/* This is necessary to ensure that basic types are
>                                          ^ ^
> ealloc via move into top \n-* Fix error occuring when initial sbrk_base not word
> ealloc via move into top \n+* Fix error occurring when initial sbrk_base not wor
>                                             ^^
> g but necessary to avoid errors on some plaftorms */ \n #define SIZE_T_ZERO
> g but necessary to avoid errors on some platforms */ \n #define SIZE_T_ZERO
>                                            ^^
> ine code size without also updating the relevent libffi code \n trampoline () {
> ine code size without also updating the relevant libffi code \n trampoline () {
>                                              ^
>  \n-both retrieve the user data, and to restire the correct gp pointer.  */ \n
>  \n+both retrieve the user data, and to restore the correct gp pointer.  */ \n
>                                             ^
>  */ \n-addik r1, r1, -8 /* allocate for reutrn type/size values */ \n addik r9,
>  */ \n+addik r1, r1, -8 /* allocate for return type/size values */ \n addik r9,
>                                           ^^
>  \n-/* The helper will have intercepted struture returns and inserted \n the cal
>  \n+/* The helper will have intercepted structure returns and inserted \n the ca
>                                             ^
> -* Use ordered bins instead of best-fit threshhold \n * Eliminate block-local de
> +* Use ordered bins instead of best-fit threshold \n * Eliminate block-local dec
>                                             ^ ^
>               fparg_count++; \n-/* Fall thru */ \n #endif
>               fparg_count++; \n+/* Fall through */ \n #endif
>                                            ^  ^
>   x6, x7, [x21, #48] \n-/* Note nothing usefull is returned in x8.  */ \n
>   x6, x7, [x21, #48] \n+/* Note nothing useful is returned in x8.  */ \n
>                                             ^ ^
> diff --git a/ltmain.sh b/ltmain.sh
> index 63ae69d..8270ef9 100644
> --- a/ltmain.sh
> +++ b/ltmain.sh
> @@ -251,7 +251,7 @@ func_normal_abspath ()
>      ;;
>      # The next three entries are used to spot a run of precisely
>      # two leading slashes without using negated character classes;
> -    # we take advantage of case's first-match behaviour.
> +    # we take advantage of case's first-match behavior.
>      ///*)
>        # Unusual form of absolute path, do nothing.
>      ;;
> diff --git a/src/aarch64/ffi.c b/src/aarch64/ffi.c
> index 1405665..f1a063d 100644
> --- a/src/aarch64/ffi.c
> +++ b/src/aarch64/ffi.c
> @@ -447,7 +447,7 @@ allocate_to_stack (struct arg_state *state, void *stack, unsigned alignment,
>  static void
>  copy_basic_type (void *dest, void *source, unsigned short type)
>  {
> -  /* This is neccessary to ensure that basic types are copied
> +  /* This is necessary to ensure that basic types are copied
>       sign extended to 64-bits as libffi expects.  */
>    switch (type)
>      {
> @@ -857,10 +857,10 @@ ffi_prep_closure_loc (ffi_closure* closure,
>     the stack at the point ffi_closure_SYSV() was invoked.
>
>     On the return path the assembler wrapper will reload call context
> -   regsiters.
> +   registers.
>
>     ffi_closure_SYSV_inner() marshalls the call context into ffi value
> -   desriptors, invokes the wrapped function, then marshalls the return
> +   descriptors, invokes the wrapped function, then marshalls the return
>     value back into the call context.  */
>
>  void
> @@ -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/aarch64/sysv.S b/src/aarch64/sysv.S
> index b8cd421..1022454 100644
> --- a/src/aarch64/sysv.S
> +++ b/src/aarch64/sysv.S
> @@ -287,7 +287,7 @@ ffi_closure_SYSV:
>          ldp     x2, x3, [x21, #16]
>          ldp     x4, x5, [x21, #32]
>          ldp     x6, x7, [x21, #48]
> -        /* Note nothing usefull is returned in x8.  */
> +        /* Note nothing useful is returned in x8.  */
>
>          /* We are done, unwind our frame.  */
>          ldp     x21, x22, [x29,  #-16]
> 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/arm/gentramp.sh b/src/arm/gentramp.sh
> index 74f0b86..05c43a3 100755
> --- a/src/arm/gentramp.sh
> +++ b/src/arm/gentramp.sh
> @@ -84,7 +84,7 @@ EOF
>  }
>
>
> -# WARNING - Don't modify the trampoline code size without also updating the relevent libffi code
> +# WARNING - Don't modify the trampoline code size without also updating the relevant libffi code
>  trampoline () {
>      cat << END
>
> diff --git a/src/bfin/sysv.S b/src/bfin/sysv.S
> index ae7a152..f1f8762 100644
> --- a/src/bfin/sysv.S
> +++ b/src/bfin/sysv.S
> @@ -32,7 +32,7 @@
>  .align 4
>
>         /*
> -        There is a "feature" in the bfin toolchain that it puts a _ before funcion names
> +        There is a "feature" in the bfin toolchain that it puts a _ before function names
>          that's why the function here it's called _ffi_call_SYSV and not ffi_call_SYSV
>          */
>         .global _ffi_call_SYSV;
> 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..3e2ea6f 100644
> --- a/src/dlmalloc.c
> +++ b/src/dlmalloc.c
> @@ -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)
> @@ -1409,7 +1409,7 @@ static int win32munmap(void* ptr, size_t size) {
>  #define CALL_MORECORE(S)     MFAIL
>  #endif /* HAVE_MORECORE */
>
> -/* mstate bit set if continguous morecore disabled or failed */
> +/* mstate bit set if contiguous morecore disabled or failed */
>  #define USE_NONCONTIGUOUS_BIT (4U)
>
>  /* segment bit set in create_mspace_with_base */
> @@ -3090,8 +3090,8 @@ 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
> -     correspond properly to bit masks.  We use the rightmost descendent
> +     right), to make sure that lefts and rights of descendants
> +     correspond properly to bit masks.  We use the rightmost descendant
>       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
>       paths shorter than minimally guaranteed.  This doesn't loop much
> @@ -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
> diff --git a/src/ia64/ffi.c b/src/ia64/ffi.c
> index 9533ef6..b77a836 100644
> --- a/src/ia64/ffi.c
> +++ b/src/ia64/ffi.c
> @@ -401,7 +401,7 @@ ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue)
>     the closure (in the "trampoline" area), but we replace the gp
>     pointer with a pointer to the closure itself.  We also add the real
>     gp pointer to the closure.  This allows the function entry code to
> -   both retrieve the user data, and to restire the correct gp pointer.  */
> +   both retrieve the user data, and to restore the correct gp pointer.  */
>
>  extern void ffi_closure_unix ();
>
> 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/microblaze/sysv.S b/src/microblaze/sysv.S
> index 7a195a6..ea43e9d 100644
> --- a/src/microblaze/sysv.S
> +++ b/src/microblaze/sysv.S
> @@ -134,7 +134,7 @@ ffi_call_SYSV:
>         rsubi r11, r23, 8
>         beqi r11, ffi_call_SYSV_store64
>
> -       /* Didnt match anything */
> +       /* Didn't match anything */
>         bri ffi_call_SYSV_end
>
>  ffi_call_SYSV_store64:
> @@ -210,7 +210,7 @@ ffi_closure_SYSV:
>         addik r7, r12, 0 /* closure object */
>         addik r1, r1, -8 /* allocate return value */
>         addik r8, r1, 0 /* void* rvalue */
> -       addik r1, r1, -8 /* allocate for reutrn type/size values */
> +       addik r1, r1, -8 /* allocate for return type/size values */
>         addik r9, r1, 0 /* void* rtype */
>         addik r10, r1, 4 /* void* rsize */
>
> @@ -247,7 +247,7 @@ ffi_closure_SYSV_prepare_return:
>         rsubi r11, r10, 8
>         beqi r11, ffi_closure_SYSV_store64
>
> -       /* Didnt match anything */
> +       /* Didn't match anything */
>         bri ffi_closure_SYSV_end
>
>  ffi_closure_SYSV_store64:
> diff --git a/src/powerpc/darwin_closure.S b/src/powerpc/darwin_closure.S
> index 3f6790f..86d8d6d 100644
> --- a/src/powerpc/darwin_closure.S
> +++ b/src/powerpc/darwin_closure.S
> @@ -192,7 +192,7 @@ LCFI1:
>         lg      r0,0(r3)                ; size => r0
>         lhz     r3,FFI_TYPE_TYPE(r3)    ; type => r3
>
> -       /* The helper will have intercepted struture returns and inserted
> +       /* The helper will have intercepted structure returns and inserted
>            the caller`s destination address for structs returned by ref.  */
>
>         /* r3 contains the return type  so use it to look up in a table
> diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c
> index 54f2731..44649a3 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)
> @@ -773,7 +773,7 @@ ffi_prep_cif_machdep (ffi_cif *cif)
>  #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
>           case FFI_TYPE_LONGDOUBLE:
>             fparg_count++;
> -           /* Fall thru */
> +           /* Fall through */
>  #endif
>           case FFI_TYPE_DOUBLE:
>             fparg_count++;
> diff --git a/src/powerpc/ffi_darwin.c b/src/powerpc/ffi_darwin.c
> index 1d1d48c..cf6fb6d 100644
> --- a/src/powerpc/ffi_darwin.c
> +++ b/src/powerpc/ffi_darwin.c
> @@ -593,7 +593,7 @@ darwin_adjust_aggregate_sizes (ffi_type *s)
>        /* Natural alignment for all items.  */
>        align = p->alignment;
>  #else
> -      /* Natrual alignment for the first item... */
> +      /* Natural alignment for the first item... */
>        if (i == 0)
>         align = p->alignment;
>        else if (p->alignment == 16 || p->alignment < 4)
> 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/tile/tile.S b/src/tile/tile.S
> index a186e1f..d1f82cb 100644
> --- a/src/tile/tile.S
> +++ b/src/tile/tile.S
> @@ -60,7 +60,7 @@
>                         void (*fnaddr)(void));
>
>          On entry, REG_ARGS contain the outgoing register values,
> -        and STACK_ARGS containts STACK_ARG_BYTES of additional values
> +        and STACK_ARGS contains STACK_ARG_BYTES of additional values
>          to be passed on the stack. If STACK_ARG_BYTES is zero, then
>          STACK_ARGS is ignored.
>
> diff --git a/testsuite/libffi.call/nested_struct11.c b/testsuite/libffi.call/nested_struct11.c
> index fce6948..3510493 100644
> --- a/testsuite/libffi.call/nested_struct11.c
> +++ b/testsuite/libffi.call/nested_struct11.c
> @@ -1,7 +1,7 @@
>  /* Area:       ffi_call, closure_call
>     Purpose:    Check parameter passing with nested structs
>                 of a single type.  This tests the special cases
> -               for homogenous floating-point aggregates in the
> +               for homogeneous floating-point aggregates in the
>                 AArch64 PCS.
>     Limitations:        none.
>     PR:         none.


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