Update the webpage (#2835)
JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
@@ -82,6 +82,44 @@ typedef enum
|
||||
void jerry_port_log (jerry_log_level_t level, const char *fmt, ...);
|
||||
```
|
||||
|
||||
The `jerry_port_print_char` is currenlty not used by the jerry-core directly.
|
||||
However, it provides a port specifc way for `jerry-ext` components to print
|
||||
information.
|
||||
|
||||
```c
|
||||
/**
|
||||
* Print a character to stdout.
|
||||
*/
|
||||
void jerry_port_print_char (char c);
|
||||
```
|
||||
|
||||
### ES2015 Module system helper functions
|
||||
|
||||
The import statement requires two specific functions for opening and closing files (the modules) port specific.
|
||||
|
||||
```c
|
||||
/**
|
||||
* Opens file with the given path and reads its source.
|
||||
* @return the source of the file
|
||||
*/
|
||||
uint8_t *
|
||||
jerry_port_read_source (const char *file_name_p, /**< file name */
|
||||
size_t *out_size_p) /**< [out] read bytes */
|
||||
{
|
||||
// open file from given path
|
||||
// return its source
|
||||
} /* jerry_port_read_source */
|
||||
|
||||
/**
|
||||
* Release the previously opened file's content.
|
||||
*/
|
||||
void
|
||||
jerry_port_release_source (uint8_t *buffer_p) /**< buffer to free */
|
||||
{
|
||||
free (buffer_p);
|
||||
} /* jerry_port_release_source */
|
||||
```
|
||||
|
||||
## Date
|
||||
|
||||
```c
|
||||
@@ -211,6 +249,17 @@ jerry_port_log (jerry_log_level_t level, /**< log level */
|
||||
} /* jerry_port_log */
|
||||
```
|
||||
|
||||
```c
|
||||
/**
|
||||
* Print a character to stdout with putchar.
|
||||
*/
|
||||
void
|
||||
jerry_port_print_char (char c)
|
||||
{
|
||||
putchar (c);
|
||||
} /* jerr_port_print_char */
|
||||
```
|
||||
|
||||
## Date
|
||||
|
||||
```c
|
||||
|
||||
Reference in New Issue
Block a user