Rework usages/naming of configuration macros [part 3] (#2927)
Reworked the JERRY_DEBUGGER macro to be a 0/1 switch. JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
@@ -23,7 +23,7 @@ void
|
||||
jerryx_debugger_after_connect (bool success) /**< tells whether the connection
|
||||
* has been successfully established */
|
||||
{
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
if (success)
|
||||
{
|
||||
jerry_debugger_transport_start ();
|
||||
@@ -32,7 +32,7 @@ jerryx_debugger_after_connect (bool success) /**< tells whether the connection
|
||||
{
|
||||
jerry_debugger_transport_close ();
|
||||
}
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */
|
||||
JERRYX_UNUSED (success);
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
} /* jerryx_debugger_after_connect */
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "jerryscript-ext/debugger.h"
|
||||
#include "jext-common.h"
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
|
||||
/* A simplified transmission layer. */
|
||||
|
||||
@@ -162,7 +162,7 @@ jerryx_debugger_rp_create (void)
|
||||
return true;
|
||||
} /* jerryx_debugger_rp_create */
|
||||
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */
|
||||
|
||||
/**
|
||||
* Dummy function when debugger is disabled.
|
||||
@@ -175,4 +175,4 @@ jerryx_debugger_rp_create (void)
|
||||
return false;
|
||||
} /* jerryx_debugger_rp_create */
|
||||
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "jerryscript-ext/debugger.h"
|
||||
#include "jext-common.h"
|
||||
|
||||
#if defined JERRY_DEBUGGER && !defined WIN32
|
||||
#if (defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) && !defined WIN32
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -393,7 +393,7 @@ jerryx_debugger_serial_create (const char *config) /**< specify the configuratio
|
||||
return true;
|
||||
} /* jerryx_debugger_serial_create */
|
||||
|
||||
#else /* !JERRY_DEBUGGER || WIN32 */
|
||||
#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) || WIN32 */
|
||||
/**
|
||||
* Dummy function when debugger is disabled.
|
||||
*
|
||||
@@ -406,4 +406,4 @@ jerryx_debugger_serial_create (const char *config)
|
||||
return false;
|
||||
} /* jerryx_debugger_serial_create */
|
||||
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* (defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) && !defined WIN32 */
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "debugger-sha1.h"
|
||||
#include "jext-common.h"
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
|
||||
/**
|
||||
* SHA-1 context structure.
|
||||
@@ -366,4 +366,4 @@ jerryx_debugger_compute_sha1 (const uint8_t *source1_p, /**< first part of the i
|
||||
jerryx_sha1_finish (&sha1_context, destination_p);
|
||||
} /* jerryx_debugger_compute_sha1 */
|
||||
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "jerryscript-debugger-transport.h"
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
|
||||
/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */
|
||||
|
||||
@@ -26,6 +26,6 @@ void jerryx_debugger_compute_sha1 (const uint8_t *input1, size_t input1_len,
|
||||
const uint8_t *input2, size_t input2_len,
|
||||
uint8_t output[20]);
|
||||
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
|
||||
#endif /* !DEBUGGER_SHA1_H */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "jerryscript-ext/debugger.h"
|
||||
#include "jext-common.h"
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
@@ -371,7 +371,7 @@ jerryx_debugger_tcp_create (uint16_t port) /**< listening port */
|
||||
return true;
|
||||
} /* jerryx_debugger_tcp_create */
|
||||
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */
|
||||
|
||||
/**
|
||||
* Dummy function when debugger is disabled.
|
||||
@@ -385,4 +385,4 @@ jerryx_debugger_tcp_create (uint16_t port)
|
||||
return false;
|
||||
} /* jerryx_debugger_tcp_create */
|
||||
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "jerryscript-ext/debugger.h"
|
||||
#include "jext-common.h"
|
||||
|
||||
#ifdef JERRY_DEBUGGER
|
||||
#if defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)
|
||||
|
||||
/* JerryScript debugger protocol is a simplified version of RFC-6455 (WebSockets). */
|
||||
|
||||
@@ -450,7 +450,7 @@ jerryx_debugger_ws_create (void)
|
||||
return true;
|
||||
} /* jerryx_debugger_ws_create */
|
||||
|
||||
#else /* !JERRY_DEBUGGER */
|
||||
#else /* !(defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1)) */
|
||||
|
||||
/**
|
||||
* Dummy function when debugger is disabled.
|
||||
@@ -463,4 +463,4 @@ jerryx_debugger_ws_create (void)
|
||||
return false;
|
||||
} /* jerryx_debugger_ws_create */
|
||||
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
#endif /* defined (JERRY_DEBUGGER) && (JERRY_DEBUGGER == 1) */
|
||||
|
||||
Reference in New Issue
Block a user