Skip to content
Permalink
Browse files

Correct spelling mistakes.

  • Loading branch information...
EdwardBetts committed Dec 13, 2017
1 parent a8871e3 commit a96f6ecaec6e31383ee311bc80cb569a51da6cff
Showing with 23 additions and 23 deletions.
  1. +2 −2 doc/lua_api.md
  2. +9 −9 include/ucl.h
  3. +3 −3 lua/lua_ucl.c
  4. +4 −4 src/mum.h
  5. +2 −2 src/ucl_util.c
  6. +1 −1 tests/test_generate.c
  7. +2 −2 utils/objdump.c
@@ -69,8 +69,8 @@ converts `obj` to lua representation using the following conversions:
- *scalar* values are directly presented by lua objects
- *userdata* values are converted to lua function objects using `LUA_REGISTRYINDEX`,
this can be used to pass functions from lua to c and vice-versa
- *arrays* are converted to lua tables with numeric indicies suitable for `ipairs` iterations
- *objects* are converted to lua tables with string indicies
- *arrays* are converted to lua tables with numeric indices suitable for `ipairs` iterations
- *objects* are converted to lua tables with string indices

**Parameters:**

@@ -108,13 +108,13 @@ typedef enum ucl_error {
UCL_EMACRO, /**< Error processing a macro */
UCL_EINTERNAL, /**< Internal unclassified error */
UCL_ESSL, /**< SSL error */
UCL_EMERGE /**< A merge error occured */
UCL_EMERGE /**< A merge error occurred */
} ucl_error_t;

/**
* #ucl_object_t may have one of specified types, some types are compatible with each other and some are not.
* For example, you can always convert #UCL_TIME to #UCL_FLOAT. Also you can convert #UCL_FLOAT to #UCL_INTEGER
* by loosing floating point. Every object may be converted to a string by #ucl_object_tostring_forced() function.
* by losing floating point. Every object may be converted to a string by #ucl_object_tostring_forced() function.
*
*/
typedef enum ucl_type {
@@ -830,7 +830,7 @@ UCL_EXTERN ucl_object_iter_t ucl_object_iterate_reset (ucl_object_iter_t it,
const ucl_object_t *obj);

/**
* Get the next object from the `obj`. This fucntion iterates over arrays, objects
* Get the next object from the `obj`. This function iterates over arrays, objects
* and implicit arrays
* @param iter safe iterator
* @param expand_values expand explicit arrays and objects
@@ -848,7 +848,7 @@ enum ucl_iterate_type {
};

/**
* Get the next object from the `obj`. This fucntion iterates over arrays, objects
* Get the next object from the `obj`. This function iterates over arrays, objects
* and implicit arrays if needed
* @param iter safe iterator
* @param
@@ -1185,7 +1185,7 @@ UCL_EXTERN const ucl_object_t * ucl_comments_find (const ucl_object_t *comments,
* Move comment from `from` object to `to` object
* @param comments comments object
* @param what source object
* @param whith destination object
* @param with destination object
* @return `true` if `from` has comment and it has been moved to `to`
*/
UCL_EXTERN bool ucl_comments_move (ucl_object_t *comments,
@@ -1420,15 +1420,15 @@ enum ucl_schema_error_code {
struct ucl_schema_error {
enum ucl_schema_error_code code; /**< error code */
char msg[128]; /**< error message */
const ucl_object_t *obj; /**< object where error occured */
const ucl_object_t *obj; /**< object where error occurred */
};

/**
* Validate object `obj` using schema object `schema`.
* @param schema schema object
* @param obj object to validate
* @param err error pointer, if this parameter is not NULL and error has been
* occured, then `err` is filled with the exact error definition.
* occurred, then `err` is filled with the exact error definition.
* @return true if `obj` is valid using `schema`
*/
UCL_EXTERN bool ucl_object_validate (const ucl_object_t *schema,
@@ -1440,7 +1440,7 @@ UCL_EXTERN bool ucl_object_validate (const ucl_object_t *schema,
* @param obj object to validate
* @param root root schema object
* @param err error pointer, if this parameter is not NULL and error has been
* occured, then `err` is filled with the exact error definition.
* occurred, then `err` is filled with the exact error definition.
* @return true if `obj` is valid using `schema`
*/
UCL_EXTERN bool ucl_object_validate_root (const ucl_object_t *schema,
@@ -1456,7 +1456,7 @@ UCL_EXTERN bool ucl_object_validate_root (const ucl_object_t *schema,
* @param root root schema object
* @param ext_refs external references (might be modified during validation)
* @param err error pointer, if this parameter is not NULL and error has been
* occured, then `err` is filled with the exact error definition.
* occurred, then `err` is filled with the exact error definition.
* @return true if `obj` is valid using `schema`
*/
UCL_EXTERN bool ucl_object_validate_root_ext (const ucl_object_t *schema,
@@ -268,8 +268,8 @@ ucl_object_lua_push_scalar (lua_State *L, const ucl_object_t *obj,
* - *scalar* values are directly presented by lua objects
* - *userdata* values are converted to lua function objects using `LUA_REGISTRYINDEX`,
* this can be used to pass functions from lua to c and vice-versa
* - *arrays* are converted to lua tables with numeric indicies suitable for `ipairs` iterations
* - *objects* are converted to lua tables with string indicies
* - *arrays* are converted to lua tables with numeric indices suitable for `ipairs` iterations
* - *objects* are converted to lua tables with string indices
* @param {lua_State} L lua state pointer
* @param {ucl_object_t} obj object to push
* @param {bool} allow_array expand implicit arrays (should be true for all but partial arrays)
@@ -304,7 +304,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags)
int max = INT_MIN;

if (idx < 0) {
/* For negative indicies we want to invert them */
/* For negative indices we want to invert them */
idx = lua_gettop (L) + idx + 1;
}

@@ -35,7 +35,7 @@
Random and Pseudorandom Number Generators for Cryptographic
Applications (version 2.2.1) with 1000 bitstreams each containing
1M bits. MUM hashing is also faster Spooky64 and City64 on small
strings (at least upto 512-bit) on Haswell and Power7. The MUM bulk
strings (at least up to 512-bit) on Haswell and Power7. The MUM bulk
speed (speed on very long data) is bigger than Spooky and City on
Power7. On Haswell the bulk speed is bigger than Spooky one and
close to City speed. */
@@ -172,7 +172,7 @@ _mum_le (uint64_t v) {
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
return _mum_bswap64 (v);
#else
#error "Unknown endianess"
#error "Unknown endianness"
#endif
}

@@ -183,7 +183,7 @@ _mum_le32 (uint32_t v) {
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
return _mum_bswap32 (v);
#else
#error "Unknown endianess"
#error "Unknown endianness"
#endif
}

@@ -396,7 +396,7 @@ mum_hash64 (uint64_t key, uint64_t seed) {
}

/* Hash data KEY of length LEN and SEED. The hash depends on the
target endianess and the unroll factor. */
target endianness and the unroll factor. */
static inline uint64_t
mum_hash (const void *key, size_t len, uint64_t seed) {
#if defined(__x86_64__) && defined(_MUM_FRESH_GCC)
@@ -3104,7 +3104,7 @@ ucl_object_todouble_safe (const ucl_object_t *obj, double *target)
}
switch (obj->type) {
case UCL_INT:
*target = obj->value.iv; /* Probaly could cause overflow */
*target = obj->value.iv; /* Probably could cause overflow */
break;
case UCL_FLOAT:
case UCL_TIME:
@@ -3138,7 +3138,7 @@ ucl_object_toint_safe (const ucl_object_t *obj, int64_t *target)
break;
case UCL_FLOAT:
case UCL_TIME:
*target = obj->value.dv; /* Loosing of decimal points */
*target = obj->value.dv; /* Losing of decimal points */
break;
default:
return false;
@@ -106,7 +106,7 @@ main (int argc, char **argv)
cur = ucl_object_fromstring ("Ебв"); /* UTF8 */
ucl_array_prepend (ar1, cur);
/*
* This is ususally broken or fragile as utf collate is far from perfect
* This is usually broken or fragile as utf collate is far from perfect
cur = ucl_object_fromstring ("ёбв");
ucl_array_prepend (ar1, cur);
cur = ucl_object_fromstring ("Ёбв"); // hello to @bapt
@@ -146,14 +146,14 @@ main(int argc, char **argv)
ucl_parser_add_chunk (parser, inbuf, r);
fclose (in);
if (ucl_parser_get_error(parser)) {
printf ("Error occured: %s\n", ucl_parser_get_error(parser));
printf ("Error occurred: %s\n", ucl_parser_get_error(parser));
ret = 1;
goto end;
}

obj = ucl_parser_get_object (parser);
if (ucl_parser_get_error (parser)) {
printf ("Error occured: %s\n", ucl_parser_get_error(parser));
printf ("Error occurred: %s\n", ucl_parser_get_error(parser));
ret = 1;
goto end;
}

0 comments on commit a96f6ec

Please sign in to comment.
You can’t perform that action at this time.