@@ -41,13 +41,8 @@ jerry_port_get_file_size (FILE *file_p) /**< opened file */
41
41
return (jerry_size_t ) size ;
42
42
} /* jerry_port_get_file_size */
43
43
44
- /**
45
- * Opens file with the given path and reads its source.
46
- * @return the source of the file
47
- */
48
44
jerry_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 )
51
46
{
52
47
/* TODO(dbatyai): Temporary workaround for nuttx target
53
48
* 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 */
92
87
return buffer_p ;
93
88
} /* jerry_port_source_read */
94
89
95
- /**
96
- * Release the previously opened file's content.
97
- */
98
90
void JERRY_ATTR_WEAK
99
- jerry_port_source_free (uint8_t * buffer_p ) /**< buffer to free */
91
+ jerry_port_source_free (uint8_t * buffer_p )
100
92
{
101
93
free (buffer_p );
102
94
} /* jerry_port_source_free */
@@ -107,15 +99,8 @@ jerry_port_source_free (uint8_t *buffer_p) /**< buffer to free */
107
99
*/
108
100
#if defined(JERRY_WEAK_SYMBOL_SUPPORT ) && !(defined(__unix__ ) || defined(__APPLE__ ) || defined(_WIN32 ))
109
101
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
- */
116
102
jerry_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 )
119
104
{
120
105
jerry_char_t * buffer_p = (jerry_char_t * ) malloc (path_size + 1 );
121
106
@@ -130,24 +115,14 @@ jerry_port_path_normalize (const jerry_char_t *path_p, /**< input path */
130
115
return buffer_p ;
131
116
} /* jerry_port_path_normalize */
132
117
133
- /**
134
- * Free a path buffer returned by jerry_port_path_normalize.
135
- *
136
- * @param path_p: the path to free
137
- */
138
118
void JERRY_ATTR_WEAK
139
119
jerry_port_path_free (jerry_char_t * path_p )
140
120
{
141
121
free (path_p );
142
122
} /* jerry_port_path_free */
143
123
144
- /**
145
- * Computes the end of the directory part of a path.
146
- *
147
- * @return end of the directory part of a path.
148
- */
149
124
jerry_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 )
151
126
{
152
127
const jerry_char_t * basename_p = (jerry_char_t * ) strrchr ((char * ) path_p , '/' ) + 1 ;
153
128
@@ -157,6 +132,6 @@ jerry_port_path_base (const jerry_char_t *path_p) /**< path */
157
132
}
158
133
159
134
return (jerry_size_t ) (basename_p - path_p );
160
- } /* jerry_port_get_directory_end */
135
+ } /* jerry_port_path_base */
161
136
162
137
#endif /* defined(JERRY_WEAK_SYMBOL_SUPPORT) && !(defined(__unix__) || defined(__APPLE__) || defined(_WIN32)) */
0 commit comments