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:
@@ -486,7 +486,7 @@ ecma_date_daylight_saving_ta (ecma_number_t time) /**< time value */
|
|||||||
* ECMA-262 v5, 15.9.1.9
|
* ECMA-262 v5, 15.9.1.9
|
||||||
*
|
*
|
||||||
* Used by:
|
* Used by:
|
||||||
* - All Date.prototype.getUTC* routines. (Generated.)
|
* - All Date.prototype.getUTC routines. (Generated.)
|
||||||
* - The Date.prototype.getTimezoneOffset routine.
|
* - The Date.prototype.getTimezoneOffset routine.
|
||||||
* - The Date.prototype.setMilliseconds routine.
|
* - The Date.prototype.setMilliseconds routine.
|
||||||
* - The Date.prototype.setSeconds routine.
|
* - The Date.prototype.setSeconds routine.
|
||||||
|
|||||||
@@ -381,8 +381,8 @@ mem_heap_finalize (void)
|
|||||||
* @return pointer to allocated memory block - if allocation is successful,
|
* @return pointer to allocated memory block - if allocation is successful,
|
||||||
* NULL - if there is not enough memory.
|
* NULL - if there is not enough memory.
|
||||||
*/
|
*/
|
||||||
static
|
static void *
|
||||||
void* mem_heap_alloc_block_internal (size_t size_in_bytes, /**< size of region to allocate in bytes */
|
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
|
mem_block_length_type_t length_type, /**< length type of the block
|
||||||
* (one-chunked or general) */
|
* (one-chunked or general) */
|
||||||
mem_heap_alloc_term_t alloc_term) /**< expected allocation term */
|
mem_heap_alloc_term_t alloc_term) /**< expected allocation term */
|
||||||
|
|||||||
@@ -19,7 +19,9 @@
|
|||||||
/**
|
/**
|
||||||
* Provide log message to filestream implementation for the engine.
|
* 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;
|
va_list args;
|
||||||
int count;
|
int count;
|
||||||
@@ -32,7 +34,8 @@ int jerry_port_logmsg (FILE* stream, const char* format, ...)
|
|||||||
/**
|
/**
|
||||||
* Provide error message to console implementation for the engine.
|
* 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;
|
va_list args;
|
||||||
int count;
|
int count;
|
||||||
@@ -46,7 +49,7 @@ int jerry_port_errormsg (const char* format, ...)
|
|||||||
/**
|
/**
|
||||||
* Provide output character to console implementation for the engine.
|
* 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);
|
return putchar (c);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,9 @@ do \
|
|||||||
/**
|
/**
|
||||||
* Provide log message to filestream implementation for the engine.
|
* 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;
|
va_list args;
|
||||||
int count;
|
int count;
|
||||||
@@ -78,7 +80,8 @@ int jerry_port_logmsg (FILE* stream, const char* format, ...)
|
|||||||
/**
|
/**
|
||||||
* Provide error message to console implementation for the engine.
|
* 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;
|
va_list args;
|
||||||
int count;
|
int count;
|
||||||
@@ -91,7 +94,7 @@ int jerry_port_errormsg (const char* format, ...)
|
|||||||
/**
|
/**
|
||||||
* Provide output character to console implementation for the engine.
|
* 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);
|
return putchar (c);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ set rules {
|
|||||||
jerry_always_curly
|
jerry_always_curly
|
||||||
jerry_braces_on_separate_line
|
jerry_braces_on_separate_line
|
||||||
jerry_braces_same_line_or_column
|
jerry_braces_same_line_or_column
|
||||||
|
jerry_dereference_operator_always_on_right
|
||||||
jerry_funcname_space_parentheses
|
jerry_funcname_space_parentheses
|
||||||
jerry_identifier_no_space_bracket
|
jerry_identifier_no_space_bracket
|
||||||
jerry_indentation
|
jerry_indentation
|
||||||
|
|||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user