@@ -41,13 +41,8 @@ jerry_port_get_file_size (FILE *file_p) /**< opened file */
4141 return (jerry_size_t ) size ;
4242} /* jerry_port_get_file_size */
4343
44- /**
45- * Opens file with the given path and reads its source.
46- * @return the source of the file
47- */
4844jerry_char_t * JERRY_ATTR_WEAK
49- jerry_port_source_read (const char * file_name_p , /**< file name */
50- jerry_size_t * out_size_p ) /**< [out] read bytes */
45+ jerry_port_source_read (const char * file_name_p , jerry_size_t * out_size_p )
5146{
5247 /* TODO(dbatyai): Temporary workaround for nuttx target
5348 * The nuttx target builds and copies the jerryscript libraries as a separate build step, which causes linking issues
@@ -92,11 +87,8 @@ jerry_port_source_read (const char *file_name_p, /**< file name */
9287 return buffer_p ;
9388} /* jerry_port_source_read */
9489
95- /**
96- * Release the previously opened file's content.
97- */
9890void JERRY_ATTR_WEAK
99- jerry_port_source_free (uint8_t * buffer_p ) /**< buffer to free */
91+ jerry_port_source_free (uint8_t * buffer_p )
10092{
10193 free (buffer_p );
10294} /* jerry_port_source_free */
@@ -107,15 +99,8 @@ jerry_port_source_free (uint8_t *buffer_p) /**< buffer to free */
10799 */
108100#if defined(JERRY_WEAK_SYMBOL_SUPPORT ) && !(defined(__unix__ ) || defined(__APPLE__ ) || defined(_WIN32 ))
109101
110- /**
111- * Normalize a file path.
112- *
113- * @return a newly allocated buffer with the normalized path if the operation is successful,
114- * NULL otherwise
115- */
116102jerry_char_t * JERRY_ATTR_WEAK
117- jerry_port_path_normalize (const jerry_char_t * path_p , /**< input path */
118- jerry_size_t path_size ) /**< size of the path */
103+ jerry_port_path_normalize (const jerry_char_t * path_p , jerry_size_t path_size )
119104{
120105 jerry_char_t * buffer_p = (jerry_char_t * ) malloc (path_size + 1 );
121106
@@ -130,24 +115,14 @@ jerry_port_path_normalize (const jerry_char_t *path_p, /**< input path */
130115 return buffer_p ;
131116} /* jerry_port_path_normalize */
132117
133- /**
134- * Free a path buffer returned by jerry_port_path_normalize.
135- *
136- * @param path_p: the path to free
137- */
138118void JERRY_ATTR_WEAK
139119jerry_port_path_free (jerry_char_t * path_p )
140120{
141121 free (path_p );
142122} /* jerry_port_path_free */
143123
144- /**
145- * Computes the end of the directory part of a path.
146- *
147- * @return end of the directory part of a path.
148- */
149124jerry_size_t JERRY_ATTR_WEAK
150- jerry_port_path_base (const jerry_char_t * path_p ) /**< path */
125+ jerry_port_path_base (const jerry_char_t * path_p )
151126{
152127 const jerry_char_t * basename_p = (jerry_char_t * ) strrchr ((char * ) path_p , '/' ) + 1 ;
153128
@@ -157,6 +132,6 @@ jerry_port_path_base (const jerry_char_t *path_p) /**< path */
157132 }
158133
159134 return (jerry_size_t ) (basename_p - path_p );
160- } /* jerry_port_get_directory_end */
135+ } /* jerry_port_path_base */
161136
162137#endif /* defined(JERRY_WEAK_SYMBOL_SUPPORT) && !(defined(__unix__) || defined(__APPLE__) || defined(_WIN32)) */
0 commit comments