Lines Matching refs:file
4 * you may not use this file except in compliance with the License.
132 * Loading a single file into the memory.
134 * @return size of file - if loading is successful
139 const char *file_name) /**< file name */
141 FILE *file = fopen (file_name, "rb");
143 if (file == NULL)
145 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: failed to open file: %s\n", file_name);
151 size_t bytes_read = fread (input_pos_p, 1u, max_size, file);
152 fclose (file);
156 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: failed to read file: %s\n", file_name);
162 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: file too large: %s\n", file_name);
166 printf ("Input file '%s' (%"PRI_SIZET" bytes) loaded.\n", file_name, (SIZE_T_TYPE)bytes_read);
237 .help = "specify output file name (default: js.snapshot)"),
239 .help = "input source file")
307 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: Exactly one input file must be specified\n");
319 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Input file is empty\n");
340 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: Exactly one input file must be specified\n");
434 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: Unable to write snapshot file: '%s'\n", output_file_name_p);
442 printf ("Created snapshot file: '%s' (%zu bytes)\n", output_file_name_p, snapshot_size);
469 .help = "specify output file name (default: literals.[h|list])"),
563 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: at least one input file must be specified.\n");
584 /* The input contains more than one input snapshot file, so we must merge them first. */
626 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: cannot open file: '%s'\n", literals_file_name_p);
657 .help = "specify output file name (default: js.snapshot)"),
760 jerry_port_log (JERRY_LOG_LEVEL_ERROR, "Error: cannot open file: '%s'\n", output_file_name_p);