Skip to content

Commit

Permalink
Correct spelling mistakes.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardBetts committed Dec 13, 2017
1 parent a8871e3 commit a96f6ec
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions doc/lua_api.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ converts `obj` to lua representation using the following conversions:
- *scalar* values are directly presented by lua objects - *scalar* values are directly presented by lua objects
- *userdata* values are converted to lua function objects using `LUA_REGISTRYINDEX`, - *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 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 - *arrays* are converted to lua tables with numeric indices suitable for `ipairs` iterations
- *objects* are converted to lua tables with string indicies - *objects* are converted to lua tables with string indices


**Parameters:** **Parameters:**


Expand Down
18 changes: 9 additions & 9 deletions include/ucl.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ typedef enum ucl_error {
UCL_EMACRO, /**< Error processing a macro */ UCL_EMACRO, /**< Error processing a macro */
UCL_EINTERNAL, /**< Internal unclassified error */ UCL_EINTERNAL, /**< Internal unclassified error */
UCL_ESSL, /**< SSL error */ UCL_ESSL, /**< SSL error */
UCL_EMERGE /**< A merge error occured */ UCL_EMERGE /**< A merge error occurred */
} ucl_error_t; } ucl_error_t;


/** /**
* #ucl_object_t may have one of specified types, some types are compatible with each other and some are not. * #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 * 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 { typedef enum ucl_type {
Expand Down Expand Up @@ -830,7 +830,7 @@ UCL_EXTERN ucl_object_iter_t ucl_object_iterate_reset (ucl_object_iter_t it,
const ucl_object_t *obj); 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 * and implicit arrays
* @param iter safe iterator * @param iter safe iterator
* @param expand_values expand explicit arrays and objects * @param expand_values expand explicit arrays and objects
Expand All @@ -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 * and implicit arrays if needed
* @param iter safe iterator * @param iter safe iterator
* @param * @param
Expand Down Expand Up @@ -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 * Move comment from `from` object to `to` object
* @param comments comments object * @param comments comments object
* @param what source 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` * @return `true` if `from` has comment and it has been moved to `to`
*/ */
UCL_EXTERN bool ucl_comments_move (ucl_object_t *comments, UCL_EXTERN bool ucl_comments_move (ucl_object_t *comments,
Expand Down Expand Up @@ -1420,15 +1420,15 @@ enum ucl_schema_error_code {
struct ucl_schema_error { struct ucl_schema_error {
enum ucl_schema_error_code code; /**< error code */ enum ucl_schema_error_code code; /**< error code */
char msg[128]; /**< error message */ 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`. * Validate object `obj` using schema object `schema`.
* @param schema schema object * @param schema schema object
* @param obj object to validate * @param obj object to validate
* @param err error pointer, if this parameter is not NULL and error has been * @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` * @return true if `obj` is valid using `schema`
*/ */
UCL_EXTERN bool ucl_object_validate (const ucl_object_t *schema, UCL_EXTERN bool ucl_object_validate (const ucl_object_t *schema,
Expand All @@ -1440,7 +1440,7 @@ UCL_EXTERN bool ucl_object_validate (const ucl_object_t *schema,
* @param obj object to validate * @param obj object to validate
* @param root root schema object * @param root root schema object
* @param err error pointer, if this parameter is not NULL and error has been * @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` * @return true if `obj` is valid using `schema`
*/ */
UCL_EXTERN bool ucl_object_validate_root (const ucl_object_t *schema, UCL_EXTERN bool ucl_object_validate_root (const ucl_object_t *schema,
Expand All @@ -1456,7 +1456,7 @@ UCL_EXTERN bool ucl_object_validate_root (const ucl_object_t *schema,
* @param root root schema object * @param root root schema object
* @param ext_refs external references (might be modified during validation) * @param ext_refs external references (might be modified during validation)
* @param err error pointer, if this parameter is not NULL and error has been * @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` * @return true if `obj` is valid using `schema`
*/ */
UCL_EXTERN bool ucl_object_validate_root_ext (const ucl_object_t *schema, UCL_EXTERN bool ucl_object_validate_root_ext (const ucl_object_t *schema,
Expand Down
6 changes: 3 additions & 3 deletions lua/lua_ucl.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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 * - *scalar* values are directly presented by lua objects
* - *userdata* values are converted to lua function objects using `LUA_REGISTRYINDEX`, * - *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 * 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 * - *arrays* are converted to lua tables with numeric indices suitable for `ipairs` iterations
* - *objects* are converted to lua tables with string indicies * - *objects* are converted to lua tables with string indices
* @param {lua_State} L lua state pointer * @param {lua_State} L lua state pointer
* @param {ucl_object_t} obj object to push * @param {ucl_object_t} obj object to push
* @param {bool} allow_array expand implicit arrays (should be true for all but partial arrays) * @param {bool} allow_array expand implicit arrays (should be true for all but partial arrays)
Expand Down Expand Up @@ -304,7 +304,7 @@ ucl_object_lua_fromtable (lua_State *L, int idx, ucl_string_flags_t flags)
int max = INT_MIN; int max = INT_MIN;


if (idx < 0) { 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; idx = lua_gettop (L) + idx + 1;
} }


Expand Down
8 changes: 4 additions & 4 deletions src/mum.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Random and Pseudorandom Number Generators for Cryptographic Random and Pseudorandom Number Generators for Cryptographic
Applications (version 2.2.1) with 1000 bitstreams each containing Applications (version 2.2.1) with 1000 bitstreams each containing
1M bits. MUM hashing is also faster Spooky64 and City64 on small 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 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 Power7. On Haswell the bulk speed is bigger than Spooky one and
close to City speed. */ close to City speed. */
Expand Down Expand Up @@ -172,7 +172,7 @@ _mum_le (uint64_t v) {
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
return _mum_bswap64 (v); return _mum_bswap64 (v);
#else #else
#error "Unknown endianess" #error "Unknown endianness"
#endif #endif
} }


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


Expand Down Expand Up @@ -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 /* 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 static inline uint64_t
mum_hash (const void *key, size_t len, uint64_t seed) { mum_hash (const void *key, size_t len, uint64_t seed) {
#if defined(__x86_64__) && defined(_MUM_FRESH_GCC) #if defined(__x86_64__) && defined(_MUM_FRESH_GCC)
Expand Down
4 changes: 2 additions & 2 deletions src/ucl_util.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3104,7 +3104,7 @@ ucl_object_todouble_safe (const ucl_object_t *obj, double *target)
} }
switch (obj->type) { switch (obj->type) {
case UCL_INT: case UCL_INT:
*target = obj->value.iv; /* Probaly could cause overflow */ *target = obj->value.iv; /* Probably could cause overflow */
break; break;
case UCL_FLOAT: case UCL_FLOAT:
case UCL_TIME: case UCL_TIME:
Expand Down Expand Up @@ -3138,7 +3138,7 @@ ucl_object_toint_safe (const ucl_object_t *obj, int64_t *target)
break; break;
case UCL_FLOAT: case UCL_FLOAT:
case UCL_TIME: case UCL_TIME:
*target = obj->value.dv; /* Loosing of decimal points */ *target = obj->value.dv; /* Losing of decimal points */
break; break;
default: default:
return false; return false;
Expand Down
2 changes: 1 addition & 1 deletion tests/test_generate.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ main (int argc, char **argv)
cur = ucl_object_fromstring ("Ебв"); /* UTF8 */ cur = ucl_object_fromstring ("Ебв"); /* UTF8 */
ucl_array_prepend (ar1, cur); 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 ("ёбв"); cur = ucl_object_fromstring ("ёбв");
ucl_array_prepend (ar1, cur); ucl_array_prepend (ar1, cur);
cur = ucl_object_fromstring ("Ёбв"); // hello to @bapt cur = ucl_object_fromstring ("Ёбв"); // hello to @bapt
Expand Down
4 changes: 2 additions & 2 deletions utils/objdump.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ main(int argc, char **argv)
ucl_parser_add_chunk (parser, inbuf, r); ucl_parser_add_chunk (parser, inbuf, r);
fclose (in); fclose (in);
if (ucl_parser_get_error(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; ret = 1;
goto end; goto end;
} }


obj = ucl_parser_get_object (parser); obj = ucl_parser_get_object (parser);
if (ucl_parser_get_error (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; ret = 1;
goto end; goto end;
} }
Expand Down

0 comments on commit a96f6ec

Please sign in to comment.