From 641a0c6bbcff9b573d2f2ebadc13443be522cf35 Mon Sep 17 00:00:00 2001
From: Tuncer Ayaz
Date: Fri, 21 May 2010 07:17:04 +0000
Subject: Correct typos in EEP-0031 implementation
Signed-off-by: Tuncer Ayaz
---
erts/doc/src/erlang.xml | 2 +-
erts/emulator/beam/erl_bif_binary.c | 24 ++++++++++++------------
lib/stdlib/doc/src/binary.xml | 4 ++--
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index e90160dfd7..e683f161f1 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -367,7 +367,7 @@ iolist() = [char() | binary() | iolist()]
position Stop in Binary. Positions in the
binary are numbered starting from 1.
- This functions indexing style of using one-based indices for
+ This function's indexing style of using one-based indices for
binaries is deprecated. New code should use the functions in
the STDLIB module binary instead. They consequently
use the same (zero-based) style of indexing.
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c
index 8071d94d07..82f1e06e8e 100644
--- a/erts/emulator/beam/erl_bif_binary.c
+++ b/erts/emulator/beam/erl_bif_binary.c
@@ -40,7 +40,7 @@
/*
* The native implementation functions for the module binary.
- * Searching is implemented using aither Boyer-More or Aho-Corasick
+ * Searching is implemented using either Boyer-Moore or Aho-Corasick
* depending on number of searchstrings (BM if one, AC if more than one).
* Native implementation is mostly for efficiency, nothing
* (except binary:referenced_byte_size) really *needs* to be implemented
@@ -149,7 +149,7 @@ static Uint get_reds(Process *p, int loop_factor)
/*
* A micro allocator used when building search structures, just a convenience
- * for building structures inside a pre alocated magic binary using
+ * for building structures inside a pre-allocated magic binary using
* conventional malloc-like interface.
*/
@@ -303,7 +303,7 @@ static ACTrie *create_acdata(MyAllocator *my, Uint len,
}
/*
- * The same initialization of allocator and basic data for Boyer-More.
+ * The same initialization of allocator and basic data for Boyer-Moore.
*/
static BMData *create_bmdata(MyAllocator *my, byte *x, Uint len,
Binary **the_bin /* out */)
@@ -340,7 +340,7 @@ static BMData *create_bmdata(MyAllocator *my, byte *x, Uint len,
static void ac_add_one_pattern(MyAllocator *my, ACTrie *act, byte *x, Uint len)
{
ACNode *acn = act->root;
- Uint32 n = ++act->counter; /* Always increase conter, even if it's a
+ Uint32 n = ++act->counter; /* Always increase counter, even if it's a
duplicate as this may identify the pattern
in the final set (not in current interface
though) */
@@ -399,9 +399,9 @@ static void ac_compute_failure_functions(ACTrie *act, ACNode **qbuff)
if ((child = parent->g[i]) != NULL) {
/* Visit this node to */
qbuff[qt++] = child;
- /* Search for correct failure function, follow the parents
+ /* Search for correct failure function, follow the parent's
failure function until you find a similar transition
- funtion to this childs */
+ funtion to this child's */
r = parent->h;
while (r != NULL && r->g[i] == NULL) {
r = r->h;
@@ -678,8 +678,8 @@ static int ac_find_all_non_overlapping(ACFindAllState *state, byte *haystack,
}
/*
- * Boyer More - most obviously implemented more or less exactly as
- * Christian Charras and Thierry Lecroq describes it in "Handbook of
+ * Boyer Moore - most obviously implemented more or less exactly as
+ * Christian Charras and Thierry Lecroq describe it in "Handbook of
* Exact String-Matching Algorithms"
* http://www-igm.univ-mlv.fr/~lecroq/string/
*/
@@ -1869,7 +1869,7 @@ static BIF_RETTYPE do_longest_common(Process *p, Eterm list, int direction)
}
/* OK, now create a buffer of the right size, we can do a magic binary right away,
- thats not to costly. */
+ that's not too costly. */
mb = erts_create_magic_binary((n+1)*sizeof(CommonData),cleanup_common_data);
cd = (CommonData *) ERTS_MAGIC_BIN_DATA(mb);
l = list;
@@ -2294,8 +2294,8 @@ BIF_RETTYPE binary_bin_to_list_1(BIF_ALIST_1)
* Ok, erlang:list_to_binary does not interrupt, and we really don't want
* an alternative implementation for the exact same thing, why we
* have descided to use the old non-restarting implementation for now.
- * In reality, there is seldom many iterations involved in doing this, so the
- * problem of long-running-bif's is not really that big in this case.
+ * In reality, there are seldom many iterations involved in doing this, so the
+ * problem of long-running bifs is not really that big in this case.
* So, for now we use the old implementation also in the module binary.
*/
@@ -2870,7 +2870,7 @@ BIF_RETTYPE binary_decode_unsigned_2(BIF_ALIST_2)
static void dump_bm_data(BMData *bm)
{
int i,j;
- erts_printf("Dumping Boyer-More structure.\n");
+ erts_printf("Dumping Boyer-Moore structure.\n");
erts_printf("=============================\n");
erts_printf("Searchstring [%ld]:\n", bm->len);
erts_printf("<<");
diff --git a/lib/stdlib/doc/src/binary.xml b/lib/stdlib/doc/src/binary.xml
index 05ec4406c6..c5eb81a86a 100644
--- a/lib/stdlib/doc/src/binary.xml
+++ b/lib/stdlib/doc/src/binary.xml
@@ -387,7 +387,7 @@
Even though <<"cd">> ends before
<<"bcde">>, <<"bcde">>
begins first and is therefore the first match. If two
- overlapping matches begins at the same position, the longest is
+ overlapping matches begin at the same position, the longest is
returned.
Summary of the options:
@@ -634,7 +634,7 @@ store(Binary, GBSet) ->
If any position given in InsPos is greater than the size of the replacement binary, a badarg exception is raised.
- The options global and {scope, part()} works as for split/3. The return type is always a binary().
+ The options global and {scope, part()} work as for split/3. The return type is always a binary().
For a description of Pattern, see compile_pattern/1.
--
cgit v1.2.3