Rework ES2015 module system and add missing features. (#2792)
Co-authored-by: Dániel Bátyai <dbatyai@inf.u-szeged.hu> JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Daniel Vince vinced@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
938e9c7530
commit
37b7645e6a
@@ -15,6 +15,7 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "jerryscript-port.h"
|
||||
#include "jerryscript-port-default.h"
|
||||
@@ -194,3 +195,24 @@ jerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */
|
||||
{
|
||||
free (buffer_p);
|
||||
} /* jerry_port_release_source */
|
||||
|
||||
/**
|
||||
* Normalize a file path
|
||||
*
|
||||
* @return length of the path written to the output buffer
|
||||
*/
|
||||
size_t
|
||||
jerry_port_normalize_path (const char *in_path_p, /**< input file path */
|
||||
char *out_buf_p, /**< output buffer */
|
||||
size_t out_buf_size) /**< size of output buffer */
|
||||
{
|
||||
/* TODO: implement path normalization */
|
||||
size_t len = strlen (in_path_p);
|
||||
if (len + 1 > out_buf_size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy (out_buf_p, in_path_p);
|
||||
return len;
|
||||
} /* jerry_port_normalize_path */
|
||||
|
||||
Reference in New Issue
Block a user