Style fix: align pointer dereference operator to right

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó 2016-01-28 10:34:04 +01:00
parent efc994b112
commit b1acf1a562
37 changed files with 154 additions and 121 deletions

View File

@ -110,7 +110,7 @@ ecma_get_external_pointer_value (ecma_object_t *obj_p, /**< object to get proper
|| id == ECMA_INTERNAL_PROPERTY_NATIVE_HANDLE
|| id == ECMA_INTERNAL_PROPERTY_FREE_CALLBACK);
ecma_property_t* prop_p = ecma_find_internal_property (obj_p, id);
ecma_property_t *prop_p = ecma_find_internal_property (obj_p, id);
if (prop_p == NULL)
{

View File

@ -69,11 +69,11 @@ ecma_new_chars_collection (const lit_utf8_byte_t chars_buffer[], /**< utf-8 char
JERRY_ASSERT (chars_buffer != NULL);
JERRY_ASSERT (chars_size > 0);
ecma_collection_header_t* collection_p = ecma_alloc_collection_header ();
ecma_collection_header_t *collection_p = ecma_alloc_collection_header ();
collection_p->unit_number = chars_size;
mem_cpointer_t* next_chunk_cp_p = &collection_p->first_chunk_cp;
mem_cpointer_t *next_chunk_cp_p = &collection_p->first_chunk_cp;
lit_utf8_byte_t *cur_char_buf_iter_p = NULL;
lit_utf8_byte_t *cur_char_buf_end_p = NULL;
@ -166,8 +166,8 @@ ecma_get_chars_collection_length (const ecma_collection_header_t *header_p) /**<
* false - otherwise.
*/
static bool
ecma_compare_chars_collection (const ecma_collection_header_t* header1_p, /**< first collection's header */
const ecma_collection_header_t* header2_p) /**< second collection's header */
ecma_compare_chars_collection (const ecma_collection_header_t *header1_p, /**< first collection's header */
const ecma_collection_header_t *header2_p) /**< second collection's header */
{
JERRY_ASSERT (header1_p != NULL && header2_p != NULL);
@ -224,14 +224,14 @@ ecma_compare_chars_collection (const ecma_collection_header_t* header1_p, /**< f
* @return pointer to collection copy
*/
static ecma_collection_header_t*
ecma_copy_chars_collection (const ecma_collection_header_t* collection_p) /**< collection's header */
ecma_copy_chars_collection (const ecma_collection_header_t *collection_p) /**< collection's header */
{
JERRY_ASSERT (collection_p != NULL);
ecma_collection_header_t *new_header_p = ecma_alloc_collection_header ();
*new_header_p = *collection_p;
mem_cpointer_t* next_chunk_cp_p = &new_header_p->first_chunk_cp;
mem_cpointer_t *next_chunk_cp_p = &new_header_p->first_chunk_cp;
ecma_collection_chunk_t *chunk_p = ECMA_GET_POINTER (ecma_collection_chunk_t,
collection_p->first_chunk_cp);
@ -297,7 +297,7 @@ ecma_copy_chars_collection_to_buffer (const ecma_collection_header_t *collection
* Free the collection of ecma-chars.
*/
static void
ecma_free_chars_collection (ecma_collection_header_t* collection_p) /**< collection's header */
ecma_free_chars_collection (ecma_collection_header_t *collection_p) /**< collection's header */
{
JERRY_ASSERT (collection_p != NULL);
@ -434,7 +434,7 @@ ecma_new_ecma_string_from_utf8 (const lit_utf8_byte_t *string_p, /**< utf-8 stri
JERRY_ASSERT (string_size > 0);
ecma_string_t* string_desc_p = ecma_alloc_string ();
ecma_string_t *string_desc_p = ecma_alloc_string ();
string_desc_p->refs = 1;
string_desc_p->is_stack_var = false;
string_desc_p->container = ECMA_STRING_CONTAINER_HEAP_CHUNKS;
@ -516,7 +516,7 @@ ecma_new_ecma_string_from_number (ecma_number_t num) /**< ecma-number */
return ecma_get_magic_string_ex (magic_string_ex_id);
}
ecma_string_t* string_desc_p = ecma_alloc_string ();
ecma_string_t *string_desc_p = ecma_alloc_string ();
string_desc_p->refs = 1;
string_desc_p->is_stack_var = false;
string_desc_p->container = ECMA_STRING_CONTAINER_HEAP_NUMBER;
@ -550,7 +550,7 @@ ecma_new_ecma_string_on_stack_from_lit_cp (ecma_string_t *string_p, /**< pointer
ecma_string_t*
ecma_new_ecma_string_from_lit_cp (lit_cpointer_t lit_cp) /**< index in the literal table */
{
ecma_string_t* string_desc_p = ecma_alloc_string ();
ecma_string_t *string_desc_p = ecma_alloc_string ();
ecma_init_ecma_string_from_lit_cp (string_desc_p, lit_cp, false);
@ -578,7 +578,7 @@ ecma_new_ecma_string_from_magic_string_id (lit_magic_string_id_t id) /**< identi
{
JERRY_ASSERT (id < LIT_MAGIC_STRING__COUNT);
ecma_string_t* string_desc_p = ecma_alloc_string ();
ecma_string_t *string_desc_p = ecma_alloc_string ();
ecma_init_ecma_string_from_magic_string_id (string_desc_p, id, false);
return string_desc_p;
@ -594,7 +594,7 @@ ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**<
{
JERRY_ASSERT (id < lit_get_magic_string_ex_count ());
ecma_string_t* string_desc_p = ecma_alloc_string ();
ecma_string_t *string_desc_p = ecma_alloc_string ();
ecma_init_ecma_string_from_magic_string_ex_id (string_desc_p, id, false);
return string_desc_p;

View File

@ -237,7 +237,7 @@ ecma_make_simple_value (const ecma_simple_value_t value) /**< simple value */
* Number value constructor
*/
ecma_value_t __attr_const___
ecma_make_number_value (const ecma_number_t* num_p) /**< number to reference in value */
ecma_make_number_value (const ecma_number_t *num_p) /**< number to reference in value */
{
JERRY_ASSERT (num_p != NULL);
@ -256,7 +256,7 @@ ecma_make_number_value (const ecma_number_t* num_p) /**< number to reference in
* String value constructor
*/
ecma_value_t __attr_const___
ecma_make_string_value (const ecma_string_t* ecma_string_p) /**< string to reference in value */
ecma_make_string_value (const ecma_string_t *ecma_string_p) /**< string to reference in value */
{
JERRY_ASSERT (ecma_string_p != NULL);
@ -275,7 +275,7 @@ ecma_make_string_value (const ecma_string_t* ecma_string_p) /**< string to refer
* object value constructor
*/
ecma_value_t __attr_const___
ecma_make_object_value (const ecma_object_t* object_p) /**< object to reference in value */
ecma_make_object_value (const ecma_object_t *object_p) /**< object to reference in value */
{
JERRY_ASSERT (object_p != NULL);
@ -295,7 +295,7 @@ ecma_make_object_value (const ecma_object_t* object_p) /**< object to reference
*
* @return the pointer
*/
ecma_number_t* __attr_pure___
ecma_number_t *__attr_pure___
ecma_get_number_from_value (ecma_value_t value) /**< ecma-value */
{
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_NUMBER);
@ -309,7 +309,7 @@ ecma_get_number_from_value (ecma_value_t value) /**< ecma-value */
*
* @return the pointer
*/
ecma_string_t* __attr_pure___
ecma_string_t *__attr_pure___
ecma_get_string_from_value (ecma_value_t value) /**< ecma-value */
{
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_STRING);
@ -323,7 +323,7 @@ ecma_get_string_from_value (ecma_value_t value) /**< ecma-value */
*
* @return the pointer
*/
ecma_object_t* __attr_pure___
ecma_object_t *__attr_pure___
ecma_get_object_from_value (ecma_value_t value) /**< ecma-value */
{
JERRY_ASSERT (ecma_get_value_type_field (value) == ECMA_TYPE_OBJECT);
@ -648,7 +648,7 @@ ecma_get_completion_value_value (ecma_completion_value_t completion_value) /**<
*
* @return pointer
*/
ecma_number_t* __attr_const___
ecma_number_t *__attr_const___
ecma_get_number_from_completion_value (ecma_completion_value_t completion_value) /**< completion value */
{
return ecma_get_number_from_value (ecma_get_completion_value_value (completion_value));
@ -659,7 +659,7 @@ ecma_get_number_from_completion_value (ecma_completion_value_t completion_value)
*
* @return pointer
*/
ecma_string_t* __attr_const___
ecma_string_t *__attr_const___
ecma_get_string_from_completion_value (ecma_completion_value_t completion_value) /**< completion value */
{
return ecma_get_string_from_value (ecma_get_completion_value_value (completion_value));
@ -670,7 +670,7 @@ ecma_get_string_from_completion_value (ecma_completion_value_t completion_value)
*
* @return pointer
*/
ecma_object_t* __attr_const___
ecma_object_t *__attr_const___
ecma_get_object_from_completion_value (ecma_completion_value_t completion_value) /**< completion value */
{
return ecma_get_object_from_value (ecma_get_completion_value_value (completion_value));

View File

@ -258,7 +258,7 @@ ecma_set_object_type (ecma_object_t *object_p, /**< object */
/**
* Get object's prototype.
*/
ecma_object_t* __attr_pure___
ecma_object_t *__attr_pure___
ecma_get_object_prototype (const ecma_object_t *object_p) /**< object */
{
JERRY_ASSERT (object_p != NULL);
@ -331,7 +331,7 @@ ecma_get_lex_env_type (const ecma_object_t *object_p) /**< lexical environment *
/**
* Get outer reference of lexical environment.
*/
ecma_object_t* __attr_pure___
ecma_object_t *__attr_pure___
ecma_get_lex_env_outer_reference (const ecma_object_t *object_p) /**< lexical environment */
{
JERRY_ASSERT (object_p != NULL);
@ -351,7 +351,7 @@ ecma_get_lex_env_outer_reference (const ecma_object_t *object_p) /**< lexical en
* See also:
* ecma_op_object_get_property_names
*/
ecma_property_t* __attr_pure___
ecma_property_t *__attr_pure___
ecma_get_property_list (const ecma_object_t *object_p) /**< object or lexical environment */
{
JERRY_ASSERT (object_p != NULL);
@ -410,7 +410,7 @@ ecma_get_lex_env_provide_this (const ecma_object_t *object_p) /**< object-bound
/**
* Get lexical environment's bound object.
*/
ecma_object_t* __attr_pure___
ecma_object_t *__attr_pure___
ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-bound lexical environment */
{
JERRY_ASSERT (object_p != NULL);
@ -1042,7 +1042,7 @@ ecma_get_named_accessor_property_setter (const ecma_property_t *prop_p) /**< nam
* Set getter of named accessor property
*/
void
ecma_set_named_accessor_property_getter (ecma_object_t* object_p, /**< the property's container */
ecma_set_named_accessor_property_getter (ecma_object_t *object_p, /**< the property's container */
ecma_property_t *prop_p, /**< named accessor property */
ecma_object_t *getter_p) /**< getter object */
{
@ -1060,7 +1060,7 @@ ecma_set_named_accessor_property_getter (ecma_object_t* object_p, /**< the prope
* Set setter of named accessor property
*/
void
ecma_set_named_accessor_property_setter (ecma_object_t* object_p, /**< the property's container */
ecma_set_named_accessor_property_setter (ecma_object_t *object_p, /**< the property's container */
ecma_property_t *prop_p, /**< named accessor property */
ecma_object_t *setter_p) /**< setter object */
{
@ -1081,7 +1081,7 @@ ecma_set_named_accessor_property_setter (ecma_object_t* object_p, /**< the prope
* false - otherwise.
*/
bool
ecma_is_property_writable (ecma_property_t* prop_p) /**< property */
ecma_is_property_writable (ecma_property_t *prop_p) /**< property */
{
JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDDATA);
@ -1092,7 +1092,7 @@ ecma_is_property_writable (ecma_property_t* prop_p) /**< property */
* Set property's 'Writable' attribute value
*/
void
ecma_set_property_writable_attr (ecma_property_t* prop_p, /**< property */
ecma_set_property_writable_attr (ecma_property_t *prop_p, /**< property */
bool is_writable) /**< should the property
* be writable? */
{
@ -1108,7 +1108,7 @@ ecma_set_property_writable_attr (ecma_property_t* prop_p, /**< property */
* false - otherwise.
*/
bool
ecma_is_property_enumerable (ecma_property_t* prop_p) /**< property */
ecma_is_property_enumerable (ecma_property_t *prop_p) /**< property */
{
if (prop_p->type == ECMA_PROPERTY_NAMEDDATA)
{
@ -1126,7 +1126,7 @@ ecma_is_property_enumerable (ecma_property_t* prop_p) /**< property */
* Set property's 'Enumerable' attribute value
*/
void
ecma_set_property_enumerable_attr (ecma_property_t* prop_p, /**< property */
ecma_set_property_enumerable_attr (ecma_property_t *prop_p, /**< property */
bool is_enumerable) /**< should the property
* be enumerable? */
{
@ -1151,7 +1151,7 @@ ecma_set_property_enumerable_attr (ecma_property_t* prop_p, /**< property */
* false - otherwise.
*/
bool
ecma_is_property_configurable (ecma_property_t* prop_p) /**< property */
ecma_is_property_configurable (ecma_property_t *prop_p) /**< property */
{
if (prop_p->type == ECMA_PROPERTY_NAMEDDATA)
{
@ -1169,7 +1169,7 @@ ecma_is_property_configurable (ecma_property_t* prop_p) /**< property */
* Set property's 'Configurable' attribute value
*/
void
ecma_set_property_configurable_attr (ecma_property_t* prop_p, /**< property */
ecma_set_property_configurable_attr (ecma_property_t *prop_p, /**< property */
bool is_configurable) /**< should the property
* be configurable? */
{

View File

@ -180,7 +180,7 @@ ecma_lcache_insert (ecma_object_t *object_p, /**< object */
&& ecma_lcache_hash_table[hash_key][entry_index].prop_cp == prop_cp)
{
#ifndef JERRY_NDEBUG
ecma_object_t* obj_in_entry_p;
ecma_object_t *obj_in_entry_p;
obj_in_entry_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t,
ecma_lcache_hash_table[hash_key][entry_index].object_cp);
JERRY_ASSERT (obj_in_entry_p == object_p);

View File

@ -174,7 +174,7 @@ ecma_builtin_function_prototype_object_apply (ecma_value_t this_arg, /**< this a
*/
static ecma_completion_value_t
ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this argument */
const ecma_value_t* arguments_list_p, /**< list of arguments */
const ecma_value_t *arguments_list_p, /**< list of arguments */
ecma_length_t arguments_number) /**< number of arguments */
{
if (!ecma_op_is_callable (this_arg))
@ -212,7 +212,7 @@ ecma_builtin_function_prototype_object_call (ecma_value_t this_arg, /**< this ar
*/
static ecma_completion_value_t
ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this argument */
const ecma_value_t* arguments_list_p, /**< list of arguments */
const ecma_value_t *arguments_list_p, /**< list of arguments */
ecma_length_t arguments_number) /**< number of arguments */
{
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
@ -368,7 +368,7 @@ ecma_builtin_function_prototype_object_bind (ecma_value_t this_arg, /**< this ar
* @return completion-value
*/
ecma_completion_value_t
ecma_builtin_function_prototype_dispatch_call (const ecma_value_t* arguments_list_p, /**< arguments list */
ecma_builtin_function_prototype_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);

View File

@ -486,7 +486,7 @@ ecma_date_daylight_saving_ta (ecma_number_t time) /**< time value */
* ECMA-262 v5, 15.9.1.9
*
* Used by:
* - All Date.prototype.getUTC* routines. (Generated.)
* - All Date.prototype.getUTC routines. (Generated.)
* - The Date.prototype.getTimezoneOffset routine.
* - The Date.prototype.setMilliseconds routine.
* - The Date.prototype.setSeconds routine.
@ -873,7 +873,7 @@ ecma_date_timezone_offset (ecma_number_t time) /**< time value */
* Helper function to set Date internal property.
*
* Used by:
* - All Date.prototype.set* routine except Date.prototype.setTime.
* - All Date.prototype.set *routine except Date.prototype.setTime.
*
* @return completion value containing the new internal time value
* Returned value must be freed with ecma_free_completion_value.

View File

@ -86,7 +86,7 @@ ecma_builtin_number_prototype_helper_round (uint64_t digits, /**< actual number
*/
static ecma_completion_value_t
ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this argument */
const ecma_value_t* arguments_list_p, /**< arguments list */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
{
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();
@ -307,7 +307,7 @@ ecma_builtin_number_prototype_object_to_string (ecma_value_t this_arg, /**< this
}
JERRY_ASSERT (buff_index <= buff_size);
ecma_string_t* str_p = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) buff_index);
ecma_string_t *str_p = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) buff_index);
ret_value = ecma_make_normal_completion_value (ecma_make_string_value (str_p));
MEM_FINALIZE_LOCAL_ARRAY (buff);
}
@ -559,7 +559,7 @@ ecma_builtin_number_prototype_object_to_fixed (ecma_value_t this_arg, /**< this
JERRY_ASSERT (p - buff < buffer_size);
/* String terminator. */
*p = 0;
ecma_string_t* str = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) (p - buff));
ecma_string_t *str = ecma_new_ecma_string_from_utf8 (buff, (lit_utf8_size_t) (p - buff));
ret_value = ecma_make_normal_completion_value (ecma_make_string_value (str));
MEM_FINALIZE_LOCAL_ARRAY (buff);

View File

@ -604,7 +604,7 @@ ecma_builtin_object_object_get_own_property_descriptor (ecma_value_t this_arg __
ecma_property_descriptor_t prop_desc = ecma_get_property_descriptor_from_property (prop_p);
// 4.
ecma_object_t* desc_obj_p = ecma_op_from_property_descriptor (&prop_desc);
ecma_object_t *desc_obj_p = ecma_op_from_property_descriptor (&prop_desc);
ecma_free_property_descriptor (&prop_desc);

View File

@ -241,7 +241,7 @@ ecma_builtin_string_prototype_object_char_code_at (ecma_value_t this_arg, /**< t
*/
static ecma_completion_value_t
ecma_builtin_string_prototype_object_concat (ecma_value_t this_arg, /**< this argument */
const ecma_value_t* argument_list_p, /**< arguments list */
const ecma_value_t *argument_list_p, /**< arguments list */
ecma_length_t arguments_number) /**< number of arguments */
{
ecma_completion_value_t ret_value = ecma_make_empty_completion_value ();

View File

@ -42,7 +42,7 @@ static void ecma_instantiate_builtin (ecma_builtin_id_t id);
/**
* Pointer to instances of built-in objects
*/
static ecma_object_t* ecma_builtin_objects[ECMA_BUILTIN_ID__COUNT];
static ecma_object_t *ecma_builtin_objects[ECMA_BUILTIN_ID__COUNT];
/**
* Check if passed object is the instance of specified built-in.
@ -96,7 +96,7 @@ ecma_builtin_get (ecma_builtin_id_t builtin_id) /**< id of built-in to check on
*/
static ecma_object_t*
ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
ecma_object_t* prototype_obj_p, /**< prototype object */
ecma_object_t *prototype_obj_p, /**< prototype object */
ecma_object_type_t obj_type, /**< object's type */
bool is_extensible) /**< value of object's [[Extensible]] property */
{
@ -294,7 +294,7 @@ ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object *
if (type == ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION)
{
ecma_string_t* magic_string_length_p = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
ecma_string_t *magic_string_length_p = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
bool is_length_property = ecma_compare_ecma_strings (string_p, magic_string_length_p);
@ -508,7 +508,7 @@ ecma_builtin_make_function_object_for_routine (ecma_builtin_id_t builtin_id, /**
ecma_completion_value_t
ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
ecma_value_t this_arg_value, /**< 'this' argument value */
ecma_collection_header_t* arg_collection_p) /**< arguments collection */
ecma_collection_header_t *arg_collection_p) /**< arguments collection */
{
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
@ -612,7 +612,7 @@ ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
*/
ecma_completion_value_t
ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
ecma_collection_header_t* arg_collection_p) /**< arguments collection */
ecma_collection_header_t *arg_collection_p) /**< arguments collection */
{
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));

View File

@ -118,7 +118,7 @@ ecma_op_create_array_object (const ecma_value_t *arguments_list_p, /**< list of
continue;
}
ecma_string_t* item_name_string_p = ecma_new_ecma_string_from_uint32 (index);
ecma_string_t *item_name_string_p = ecma_new_ecma_string_from_uint32 (index);
ecma_builtin_helper_def_prop (obj_p,
item_name_string_p,
@ -147,14 +147,14 @@ ecma_op_create_array_object (const ecma_value_t *arguments_list_p, /**< list of
ecma_completion_value_t
ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array object */
ecma_string_t *property_name_p, /**< property name */
const ecma_property_descriptor_t* property_desc_p, /**< property descriptor */
const ecma_property_descriptor_t *property_desc_p, /**< property descriptor */
bool is_throw) /**< flag that controls failure handling */
{
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_ARRAY);
// 1.
ecma_string_t* magic_string_length_p = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
ecma_string_t *magic_string_length_p = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
ecma_property_t *len_prop_p = ecma_op_object_get_own_property (obj_p, magic_string_length_p);
JERRY_ASSERT (len_prop_p != NULL && len_prop_p->type == ECMA_PROPERTY_NAMEDDATA);

View File

@ -105,8 +105,8 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
}
else if (is_x_string)
{ // d.
ecma_string_t* x_str_p = ecma_get_string_from_value (x);
ecma_string_t* y_str_p = ecma_get_string_from_value (y);
ecma_string_t *x_str_p = ecma_get_string_from_value (x);
ecma_string_t *y_str_p = ecma_get_string_from_value (y);
bool is_equal = ecma_compare_ecma_strings (x_str_p, y_str_p);
@ -302,8 +302,8 @@ ecma_op_strict_equality_compare (ecma_value_t x, /**< first operand */
// (same length and same characters in corresponding positions); otherwise, return false.
if (is_x_string)
{
ecma_string_t* x_str_p = ecma_get_string_from_value (x);
ecma_string_t* y_str_p = ecma_get_string_from_value (y);
ecma_string_t *x_str_p = ecma_get_string_from_value (x);
ecma_string_t *y_str_p = ecma_get_string_from_value (y);
return ecma_compare_ecma_strings (x_str_p, y_str_p);
}

View File

@ -138,8 +138,8 @@ ecma_op_same_value (ecma_value_t x, /**< ecma-value */
}
else if (is_x_string)
{
ecma_string_t* x_str_p = ecma_get_string_from_value (x);
ecma_string_t* y_str_p = ecma_get_string_from_value (y);
ecma_string_t *x_str_p = ecma_get_string_from_value (x);
ecma_string_t *y_str_p = ecma_get_string_from_value (y);
return ecma_compare_ecma_strings (x_str_p, y_str_p);
}
@ -436,7 +436,7 @@ ecma_op_to_object (ecma_value_t value) /**< ecma-value */
* @return constructed object
*/
ecma_object_t*
ecma_op_from_property_descriptor (const ecma_property_descriptor_t* src_prop_desc_p) /**< property descriptor */
ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_desc_p) /**< property descriptor */
{
// 2.
ecma_object_t *obj_p = ecma_op_create_object_object_noarg ();

View File

@ -114,7 +114,7 @@ ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error typ
*/
ecma_object_t*
ecma_new_standard_error_with_message (ecma_standard_error_t error_type, /**< native error type */
ecma_string_t* message_string_p) /**< message string */
ecma_string_t *message_string_p) /**< message string */
{
ecma_object_t *new_error_obj_p = ecma_new_standard_error (error_type);

View File

@ -104,7 +104,7 @@ ecma_is_constructor (ecma_value_t value) /**< ecma-value */
*/
static ecma_collection_header_t *
ecma_function_bind_merge_arg_lists (ecma_object_t *func_obj_p, /**< Function object */
ecma_collection_header_t* passed_arg_collection_p) /**< passed arguments list */
ecma_collection_header_t *passed_arg_collection_p) /**< passed arguments list */
{
ecma_length_t passed_args_number = passed_arg_collection_p != NULL ? passed_arg_collection_p->unit_number : 0;
@ -496,7 +496,7 @@ ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object *
return ecma_make_simple_completion_value (ECMA_SIMPLE_VALUE_FALSE);
}
ecma_object_t* v_obj_p = ecma_get_object_from_value (value);
ecma_object_t *v_obj_p = ecma_get_object_from_value (value);
ecma_string_t *prototype_magic_string_p = ecma_get_magic_string (LIT_MAGIC_STRING_PROTOTYPE);
@ -697,7 +697,7 @@ ecma_op_function_call_array_args (ecma_object_t *func_obj_p, /**< Function objec
ecma_completion_value_t
ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
ecma_value_t this_arg_value, /**< 'this' argument's value */
ecma_collection_header_t* arg_collection_p) /**< arguments list */
ecma_collection_header_t *arg_collection_p) /**< arguments list */
{
JERRY_ASSERT (func_obj_p != NULL
&& !ecma_is_lexical_environment (func_obj_p));
@ -858,7 +858,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
*/
static ecma_completion_value_t
ecma_op_function_construct_simple_or_external (ecma_object_t *func_obj_p, /**< Function object */
ecma_collection_header_t* arg_collection_p) /**< arguments
ecma_collection_header_t *arg_collection_p) /**< arguments
* collection */
{
JERRY_ASSERT (ecma_get_object_type (func_obj_p) == ECMA_OBJECT_TYPE_FUNCTION

View File

@ -42,7 +42,7 @@
*
* See also: ECMA-262 v5, 10.2.3
*/
ecma_object_t* ecma_global_lex_env_p = NULL;
ecma_object_t *ecma_global_lex_env_p = NULL;
/**
* Initialize Global environment

View File

@ -474,7 +474,7 @@ ecma_op_arguments_object_get_own_property (ecma_object_t *obj_p, /**< the object
ecma_completion_value_t
ecma_op_arguments_object_define_own_property (ecma_object_t *obj_p, /**< the object */
ecma_string_t *property_name_p, /**< property name */
const ecma_property_descriptor_t* property_desc_p, /**< property
const ecma_property_descriptor_t *property_desc_p, /**< property
* descriptor */
bool is_throw) /**< flag that controls failure handling */
{

View File

@ -147,7 +147,7 @@ ecma_op_general_object_get (ecma_object_t *obj_p, /**< the object */
JERRY_ASSERT (property_name_p != NULL);
// 1.
const ecma_property_t* prop_p = ecma_op_object_get_property (obj_p, property_name_p);
const ecma_property_t *prop_p = ecma_op_object_get_property (obj_p, property_name_p);
// 2.
if (prop_p == NULL)
@ -589,7 +589,7 @@ ecma_op_general_object_default_value (ecma_object_t *obj_p, /**< the object */
ecma_completion_value_t
ecma_op_general_object_define_own_property (ecma_object_t *obj_p, /**< the object */
ecma_string_t *property_name_p, /**< property name */
const ecma_property_descriptor_t* property_desc_p, /**< property
const ecma_property_descriptor_t *property_desc_p, /**< property
* descriptor */
bool is_throw) /**< flag that controls failure handling */
{

View File

@ -405,7 +405,7 @@ ecma_op_object_default_value (ecma_object_t *obj_p, /**< the object */
ecma_completion_value_t
ecma_op_object_define_own_property (ecma_object_t *obj_p, /**< the object */
ecma_string_t *property_name_p, /**< property name */
const ecma_property_descriptor_t* property_desc_p, /**< property
const ecma_property_descriptor_t *property_desc_p, /**< property
* descriptor */
bool is_throw) /**< flag that controls failure handling */
{

View File

@ -46,7 +46,7 @@ ecma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of
JERRY_ASSERT (arguments_list_len == 0
|| arguments_list_p != NULL);
ecma_string_t* prim_prop_str_value_p;
ecma_string_t *prim_prop_str_value_p;
ecma_number_t length_value;
@ -166,7 +166,7 @@ ecma_op_string_object_get_own_property (ecma_object_t *obj_p, /**< a String obje
}
// 4.
ecma_property_t* prim_value_prop_p = ecma_get_internal_property (obj_p,
ecma_property_t *prim_value_prop_p = ecma_get_internal_property (obj_p,
ECMA_INTERNAL_PROPERTY_PRIMITIVE_STRING_VALUE);
ecma_string_t *prim_value_str_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t,
prim_value_prop_p->u.internal_property.value);
@ -233,7 +233,7 @@ ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p, /**< a String obj
ecma_collection_header_t *for_non_enumerable_p = separate_enumerable ? main_collection_p : non_enum_collection_p;
(void) for_non_enumerable_p;
ecma_property_t* prim_value_prop_p = ecma_get_internal_property (obj_p,
ecma_property_t *prim_value_prop_p = ecma_get_internal_property (obj_p,
ECMA_INTERNAL_PROPERTY_PRIMITIVE_STRING_VALUE);
ecma_string_t *prim_value_str_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t,
prim_value_prop_p->u.internal_property.value);

View File

@ -278,14 +278,14 @@ jerry_api_create_number_value (double value);
/**
* Creates a JERRY_API_DATA_TYPE_OBJECT type jerry_api_value_t from the
* given jerry_api_object_t* parameter and returns with it.
* given jerry_api_object_t *parameter and returns with it.
*/
extern EXTERN_C jerry_api_value_t
jerry_api_create_object_value (jerry_api_object_t *value);
/**
* Creates a JERRY_API_DATA_TYPE_STRING type jerry_api_value_t from the
* given jerry_api_string_t* parameter and returns with it.
* given jerry_api_string_t *parameter and returns with it.
*/
extern EXTERN_C jerry_api_value_t
jerry_api_create_string_value (jerry_api_string_t *value);

View File

@ -32,10 +32,10 @@
* Target port functions for console output
*/
extern EXTERN_C
int jerry_port_logmsg (FILE* stream, const char* format, ...);
int jerry_port_logmsg (FILE *stream, const char *format, ...);
extern EXTERN_C
int jerry_port_errormsg (const char* format, ...);
int jerry_port_errormsg (const char *format, ...);
extern EXTERN_C
int jerry_port_putchar (int c);

View File

@ -338,7 +338,7 @@ jerry_api_create_number_value (double value) /**< double value from which a jerr
/**
* Creates a JERRY_API_DATA_TYPE_OBJECT type jerry_api_value_t from the
* given jerry_api_object_t* parameter and returns with it.
* given jerry_api_object_t *parameter and returns with it.
*/
jerry_api_value_t
jerry_api_create_object_value (jerry_api_object_t *value) /**< jerry_api_object_t from which a value will be created */
@ -351,7 +351,7 @@ jerry_api_create_object_value (jerry_api_object_t *value) /**< jerry_api_object_
/**
* Creates a JERRY_API_DATA_TYPE_STRING type jerry_api_value_t from the
* given jerry_api_string_t* parameter and returns with it.
* given jerry_api_string_t *parameter and returns with it.
*/
jerry_api_value_t
jerry_api_create_string_value (jerry_api_string_t *value) /**< jerry_api_string_t from which a value will be created */
@ -435,7 +435,7 @@ jerry_api_convert_ecma_value_to_api_value (jerry_api_value_t *out_value_p, /**<
*/
static void
jerry_api_convert_api_value_to_ecma_value (ecma_value_t *out_value_p, /**< out: ecma-value */
const jerry_api_value_t* api_value_p) /**< value in Jerry API format */
const jerry_api_value_t *api_value_p) /**< value in Jerry API format */
{
switch (api_value_p->type)
{
@ -876,10 +876,10 @@ jerry_api_create_error_sz (jerry_api_error_t error_type, /**< type of error */
}
else
{
ecma_string_t* message_string_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) message_p,
ecma_string_t *message_string_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) message_p,
(lit_utf8_size_t) message_size);
ecma_object_t* error_object_p = ecma_new_standard_error_with_message (standard_error_type, message_string_p);
ecma_object_t *error_object_p = ecma_new_standard_error_with_message (standard_error_type, message_string_p);
ecma_deref_ecma_string (message_string_p);
@ -1002,7 +1002,7 @@ jerry_dispatch_object_free_callback (ecma_external_pointer_t freecb_p, /**< poin
* false - otherwise.
*/
bool
jerry_api_is_function (const jerry_api_object_t* object_p) /**< an object */
jerry_api_is_function (const jerry_api_object_t *object_p) /**< an object */
{
jerry_assert_api_available ();
@ -1020,7 +1020,7 @@ jerry_api_is_function (const jerry_api_object_t* object_p) /**< an object */
* false - otherwise.
*/
bool
jerry_api_is_constructor (const jerry_api_object_t* object_p) /**< an object */
jerry_api_is_constructor (const jerry_api_object_t *object_p) /**< an object */
{
jerry_assert_api_available ();
@ -1052,7 +1052,7 @@ jerry_api_add_object_field (jerry_api_object_t *object_p, /**< object to add fie
if (ecma_get_object_extensible (object_p))
{
ecma_string_t* field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
ecma_string_t *field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
(lit_utf8_size_t) field_name_size);
ecma_property_t *prop_p = ecma_op_object_get_own_property (object_p, field_name_str_p);
@ -1096,7 +1096,7 @@ jerry_api_delete_object_field (jerry_api_object_t *object_p, /**< object to dele
bool is_successful = true;
ecma_string_t* field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
ecma_string_t *field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
(lit_utf8_size_t) field_name_size);
ecma_completion_value_t delete_completion = ecma_op_object_delete (object_p,
@ -1217,7 +1217,7 @@ jerry_api_get_object_field_value_sz (jerry_api_object_t *object_p, /**< object *
bool is_successful = true;
ecma_string_t* field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
ecma_string_t *field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
(lit_utf8_size_t) field_name_size);
ecma_completion_value_t get_completion = ecma_op_object_get (object_p,
@ -1278,7 +1278,7 @@ jerry_api_set_object_field_value_sz (jerry_api_object_t *object_p, /**< object *
bool is_successful = true;
ecma_string_t* field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
ecma_string_t *field_name_str_p = ecma_new_ecma_string_from_utf8 ((lit_utf8_byte_t *) field_name_p,
(lit_utf8_size_t) field_name_size);
ecma_value_t value_to_put;
@ -1312,7 +1312,7 @@ jerry_api_set_object_field_value_sz (jerry_api_object_t *object_p, /**< object *
*/
bool
jerry_api_get_object_native_handle (jerry_api_object_t *object_p, /**< object to get handle from */
uintptr_t* out_handle_p) /**< out: handle value */
uintptr_t *out_handle_p) /**< out: handle value */
{
jerry_assert_api_available ();
@ -1721,7 +1721,7 @@ jerry_reg_err_callback (jerry_error_callback_t callback) /**< pointer to callbac
* false - otherwise (SyntaxError was raised).
*/
bool
jerry_parse (const jerry_api_char_t* source_p, /**< script source */
jerry_parse (const jerry_api_char_t *source_p, /**< script source */
size_t source_size) /**< script source size */
{
jerry_assert_api_available ();
@ -1821,7 +1821,7 @@ jerry_new_ctx (void)
* Cleanup resources associated with specified run context
*/
void
jerry_cleanup_ctx (jerry_ctx_t* ctx_p) /**< run context */
jerry_cleanup_ctx (jerry_ctx_t *ctx_p) /**< run context */
{
jerry_assert_api_available ();
@ -1859,10 +1859,10 @@ jerry_pop_ctx (void)
* Register external magic string array
*/
void
jerry_register_external_magic_strings (const jerry_api_char_ptr_t* ex_str_items, /**< character arrays, representing
jerry_register_external_magic_strings (const jerry_api_char_ptr_t *ex_str_items, /**< character arrays, representing
* external magic strings' contents */
uint32_t count, /**< number of the strings */
const jerry_api_length_t* str_lengths) /**< lengths of the strings */
const jerry_api_length_t *str_lengths) /**< lengths of the strings */
{
lit_magic_strings_ex_set ((const lit_utf8_byte_t **) ex_str_items, count, (const lit_utf8_size_t *) str_lengths);
} /* jerry_register_external_magic_strings */
@ -2082,7 +2082,7 @@ jerry_snapshot_set_offsets (uint8_t *buffer_p, /**< buffer */
* 0 - otherwise.
*/
size_t
jerry_parse_and_save_snapshot (const jerry_api_char_t* source_p, /**< script source */
jerry_parse_and_save_snapshot (const jerry_api_char_t *source_p, /**< script source */
size_t source_size, /**< script source size */
bool is_for_global, /**< snapshot would be executed as global (true)
* or eval (false) */
@ -2150,7 +2150,7 @@ jerry_parse_and_save_snapshot (const jerry_api_char_t* source_p, /**< script sou
size_t compiled_code_size = snapshot_buffer_write_offset - compiled_code_start;
lit_mem_to_snapshot_id_map_entry_t* lit_map_p = NULL;
lit_mem_to_snapshot_id_map_entry_t *lit_map_p = NULL;
uint32_t literals_num;
if (!lit_dump_literals_for_snapshot (buffer_p,

View File

@ -381,11 +381,11 @@ mem_heap_finalize (void)
* @return pointer to allocated memory block - if allocation is successful,
* NULL - if there is not enough memory.
*/
static
void* mem_heap_alloc_block_internal (size_t size_in_bytes, /**< size of region to allocate in bytes */
mem_block_length_type_t length_type, /**< length type of the block
* (one-chunked or general) */
mem_heap_alloc_term_t alloc_term) /**< expected allocation term */
static void *
mem_heap_alloc_block_internal (size_t size_in_bytes, /**< size of region to allocate in bytes */
mem_block_length_type_t length_type, /**< length type of the block
* (one-chunked or general) */
mem_heap_alloc_term_t alloc_term) /**< expected allocation term */
{
JERRY_ASSERT (size_in_bytes != 0);
JERRY_ASSERT (length_type != MEM_BLOCK_LENGTH_TYPE_ONE_CHUNKED

View File

@ -612,7 +612,7 @@ mem_pools_alloc_longpath (void)
* @return pointer to allocated chunk, if allocation was successful,
* or NULL - if not enough memory.
*/
uint8_t* __attr_always_inline___
uint8_t *__attr_always_inline___
mem_pools_alloc (void)
{
#ifdef MEM_GC_BEFORE_EACH_ALLOC

View File

@ -218,7 +218,7 @@ re_get_value (uint8_t **bc_p) /**< pointer to bytecode start */
* Callback function of character class generation
*/
static void
re_append_char_class (void* re_ctx_p, /**< RegExp compiler context */
re_append_char_class (void *re_ctx_p, /**< RegExp compiler context */
uint32_t start, /**< character class range from */
uint32_t end) /**< character class range to */
{

View File

@ -306,7 +306,7 @@ re_parse_char_class (re_parser_ctx_t *parser_ctx_p, /**< number of classes */
re_char_class_callback append_char_class, /**< callback function,
* which adds the char-ranges
* to the bytecode */
void* re_ctx_p, /**< regexp compiler context */
void *re_ctx_p, /**< regexp compiler context */
re_token_t *out_token_p) /**< out: output token */
{
re_token_type_t token_type = ((re_compiler_ctx_t *) re_ctx_p)->current_token.type;

View File

@ -304,7 +304,7 @@ rcs_chunked_list_remove (rcs_chunked_list_t *cl_p, /**< the chunked_list */
*/
rcs_chunked_list_node_t*
rcs_chunked_list_get_node_from_pointer (rcs_chunked_list_t *cl_p, /**< the chunked_list */
void* ptr) /**< the pointer value */
void *ptr) /**< the pointer value */
{
rcs_chunked_list_node_t *node_p = (rcs_chunked_list_node_t*) mem_heap_get_chunked_block_start (ptr);

View File

@ -48,7 +48,7 @@ do_number_bitwise_logic (number_bitwise_logic_op op, /**< number bitwise logic o
ECMA_OP_TO_NUMBER_TRY_CATCH (num_left, left_value, ret_value);
ECMA_OP_TO_NUMBER_TRY_CATCH (num_right, right_value, ret_value);
ecma_number_t* res_p = ecma_alloc_number ();
ecma_number_t *res_p = ecma_alloc_number ();
int32_t left_int32 = ecma_number_to_int32 (num_left);

View File

@ -192,7 +192,7 @@ libc_printf_uint_to_string (uintmax_t value, /**< integer value */
*/
static void
libc_printf_write_d_i (FILE *stream, /**< stream pointer */
va_list* args_list_p, /**< args' list */
va_list *args_list_p, /**< args' list */
libc_printf_arg_flags_mask_t flags, /**< field's flags */
libc_printf_arg_length_type_t length, /**< field's length type */
uint32_t width) /**< minimum field width to output */
@ -314,7 +314,7 @@ libc_printf_write_d_i (FILE *stream, /**< stream pointer */
static void
libc_printf_write_u_o_x_X (FILE *stream, /**< stream pointer */
char specifier, /**< specifier (u, o, x, X) */
va_list* args_list_p, /**< args' list */
va_list *args_list_p, /**< args' list */
libc_printf_arg_flags_mask_t flags, /**< field's flags */
libc_printf_arg_length_type_t length, /**< field's length type */
uint32_t width) /**< minimum field width to output */

View File

@ -56,7 +56,7 @@ CALL_PRAGMA (GCC optimize ("-fno-tree-loop-distribute-patterns"))
*
* @return @s
*/
void* __attr_used___ // FIXME
void * __attr_used___ // FIXME
memset (void *s, /**< area to set values in */
int c, /**< value to set */
size_t n) /**< area size */

9
main.h
View File

@ -19,7 +19,9 @@
/**
* Provide log message to filestream implementation for the engine.
*/
int jerry_port_logmsg (FILE* stream, const char* format, ...)
int jerry_port_logmsg (FILE *stream, /**< stream pointer */
const char *format, /**< format string */
...) /**< parameters */
{
va_list args;
int count;
@ -32,7 +34,8 @@ int jerry_port_logmsg (FILE* stream, const char* format, ...)
/**
* Provide error message to console implementation for the engine.
*/
int jerry_port_errormsg (const char* format, ...)
int jerry_port_errormsg (const char *format, /**< format string */
...) /**< parameters */
{
va_list args;
int count;
@ -46,7 +49,7 @@ int jerry_port_errormsg (const char* format, ...)
/**
* Provide output character to console implementation for the engine.
*/
int jerry_port_putchar (int c)
int jerry_port_putchar (int c) /**< character to put */
{
return putchar (c);
}

View File

@ -89,7 +89,7 @@ test_api_init_api_value_float64 (jerry_api_value_t *out_value_p, /**< out: API v
*/
static void
test_api_init_api_value_string (jerry_api_value_t *out_value_p, /**< out: API value */
const char* v) /**< string value to initialize with */
const char *v) /**< string value to initialize with */
{
out_value_p->type = JERRY_API_DATA_TYPE_STRING;
out_value_p->v_string = jerry_api_create_string ((jerry_api_char_t *) v);
@ -100,7 +100,7 @@ test_api_init_api_value_string (jerry_api_value_t *out_value_p, /**< out: API va
*/
static void
test_api_init_api_value_object (jerry_api_value_t *out_value_p, /**< out: API value */
jerry_api_object_t* v) /**< object value to initialize with */
jerry_api_object_t *v) /**< object value to initialize with */
{
jerry_api_acquire_object (v);
@ -146,7 +146,7 @@ handler_throw_test (const jerry_api_object_t *function_obj_p,
{
printf ("ok %p %p %p %d %p\n", function_obj_p, this_p, args_p, args_cnt, ret_val_p);
jerry_api_object_t* error_p = jerry_api_create_error (JERRY_API_ERROR_TYPE,
jerry_api_object_t *error_p = jerry_api_create_error (JERRY_API_ERROR_TYPE,
(jerry_api_char_t *) "error");
test_api_init_api_value_object (ret_val_p, error_p);
@ -321,13 +321,13 @@ main (void)
ssize_t sz;
jerry_api_value_t val_t, val_foo, val_bar, val_A, val_A_prototype, val_a, val_a_foo, val_value_field, val_p, val_np;
jerry_api_value_t val_external, val_external_construct, val_call_external;
jerry_api_object_t* global_obj_p, *obj_p;
jerry_api_object_t* external_func_p, *external_construct_p;
jerry_api_object_t* throw_test_handler_p;
jerry_api_object_t *global_obj_p, *obj_p;
jerry_api_object_t *external_func_p, *external_construct_p;
jerry_api_object_t *throw_test_handler_p;
jerry_api_value_t res, args[2];
char buffer[32];
is_ok = jerry_parse ((jerry_api_char_t *)test_source, strlen (test_source));
is_ok = jerry_parse ((jerry_api_char_t *) test_source, strlen (test_source));
JERRY_ASSERT (is_ok);
is_ok = (jerry_run () == JERRY_COMPLETION_CODE_OK);

View File

@ -65,7 +65,9 @@ do \
/**
* Provide log message to filestream implementation for the engine.
*/
int jerry_port_logmsg (FILE* stream, const char* format, ...)
int jerry_port_logmsg (FILE *stream, /**< stream pointer */
const char *format, /**< format string */
...) /**< parameters */
{
va_list args;
int count;
@ -78,7 +80,8 @@ int jerry_port_logmsg (FILE* stream, const char* format, ...)
/**
* Provide error message to console implementation for the engine.
*/
int jerry_port_errormsg (const char* format, ...)
int jerry_port_errormsg (const char *format, /**< format string */
...) /**< parameters */
{
va_list args;
int count;
@ -91,7 +94,7 @@ int jerry_port_errormsg (const char* format, ...)
/**
* Provide output character to console implementation for the engine.
*/
int jerry_port_putchar (int c)
int jerry_port_putchar (int c) /**< character to put */
{
return putchar (c);
}

View File

@ -2,6 +2,7 @@ set rules {
jerry_always_curly
jerry_braces_on_separate_line
jerry_braces_same_line_or_column
jerry_dereference_operator_always_on_right
jerry_funcname_space_parentheses
jerry_identifier_no_space_bracket
jerry_indentation

View File

@ -0,0 +1,26 @@
#!/usr/bin/tclsh
# Copyright 2016 Samsung Electronics Co., Ltd.
# Copyright 2016 University of Szeged.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
foreach f [getSourceFileNames] {
set lineNumber 1
foreach line [getAllLines $f] {
if {[regexp {\w\*\s\w+} $line]} {
report $f $lineNumber "pointer dereference operator always should be aligned to right."
}
incr lineNumber
}
}