Lines Matching defs:file
2 * This file and its contents are supplied under the terms of the
4 * You may only use this file in accordance with the terms of version
212 " * This file was automatically generated by cpcgen from the data file\n"
215 " * Do not modify this file. Your changes will be lost!\n"
261 ".\\\" This file was automatically generated by cpcgen from the data file\n"
264 ".\\\" Do not modify this file. Your changes will be lost!\n"
299 " * This file and its contents are supplied under the terms of the\n"
301 " * You may only use this file in accordance with the terms of version\n"
314 " * This file was automatically generated by cpcgen.\n"
318 " * Do not modify this file. Your changes will be lost!\n"
323 ".\\\" This file was automatically generated by cpcgen from the data file\n"
326 ".\\\" Do not modify this file. Your changes will be lost!\n"
358 " * This file was automatically generated by cpcgen from the data file\n"
361 " * Do not modify this file. Your changes will be lost!\n"
522 cpcgen_read_datafile(const char *datadir, const char *file)
531 if (asprintf(&path, "%s/%s", datadir, file) == -1) {
532 err(EXIT_FAILURE, "failed to construct path to data file %s",
533 file);
537 err(EXIT_FAILURE, "failed to open data file %s", path);
551 errx(EXIT_FAILURE, "failed to parse file %s at pos %ld: %s",
560 err(EXIT_FAILURE, "failed to close data file %s", path);
677 errx(EXIT_FAILURE, "unexpected AMD JSON file name: %s",
688 "file");
767 errx(EXIT_FAILURE, "unknown file type \"%s\" on line "
781 "for cpc file");
986 warn("failed to assemble file name for %s", map->cmap_path);
997 warn("failed to write header to temporary file for %s",
1003 warn("failed to write header to temporary file for %s",
1015 warn("failed to write footer to temporary file for %s",
1039 "required properties for C file translation",
1183 * Generate a header file that declares all of these arrays and provide a map
1196 err(EXIT_FAILURE, "failed to construct temporary file name");
1200 err(EXIT_FAILURE, "failed to create temporary file %s",
1206 err(EXIT_FAILURE, "failed to fdopen temporary file");
1211 errx(EXIT_FAILURE, "failed to write header to temporary file "
1227 "temporary file for %s", fname);
1235 "temporary file for %s", fname);
1247 "temporary file for %s", fname);
1252 err(EXIT_FAILURE, "failed to flush and close temporary file");
1256 err(EXIT_FAILURE, "failed to rename temporary file %s",
1262 /* Now again for the .c file. */
1265 err(EXIT_FAILURE, "failed to construct temporary file name");
1269 err(EXIT_FAILURE, "failed to create temporary file %s",
1275 err(EXIT_FAILURE, "failed to fdopen temporary file");
1280 errx(EXIT_FAILURE, "failed to write header to temporary file "
1293 "temporary file for %s", fname);
1300 "file for %s", fname);
1310 "temporary file for %s", fname);
1315 err(EXIT_FAILURE, "failed to flush and close temporary file");
1319 err(EXIT_FAILURE, "failed to rename temporary file %s",
1401 warn("failed to assemble file name for %s", map->cmap_path);
1514 "property for events %s (index %u) in file %s",
1527 "%u) in file %s", i, name, ent, path);
1533 "entry %u of event %s (index %u) from file %s",
1567 warn("failed to assemble file name for %s", map->cmap_path);
1575 * Generate a header file that can be used to synthesize the data events we care
1588 err(EXIT_FAILURE, "failed to construct temporary file name");
1592 err(EXIT_FAILURE, "failed to create temporary file %s",
1598 err(EXIT_FAILURE, "failed to fdopen temporary file");
1604 "temporary file for %s", fname);
1616 "temporary file for %s", fname);
1624 "temporary file for %s", fname);
1636 "temporary file for %s", fname);
1643 err(EXIT_FAILURE, "failed to flush and close temporary file");
1647 err(EXIT_FAILURE, "failed to rename temporary file %s",
1658 warn("failed to write header to temporary file for %s",
1664 warn("failed to write header to temporary file for %s",
1677 warn("failed to write footer to temporary file for %s",
1724 "property for events %s (index %u) in file %s",
1738 "%u) in file %s", i, name, ent, path);
1746 "entry %u of event %s (index %u) from file %s",
1753 warnx("event %s (index %u) from file %s has invalid "
1773 * For each processor family, generate a data file that contains all of the
1797 err(EXIT_FAILURE, "failed to construct temporary file "
1802 err(EXIT_FAILURE, "failed to create temporary file %s",
1808 err(EXIT_FAILURE, "failed to fdopen temporary file");
1859 "temporary file");
1863 err(EXIT_FAILURE, "failed to rename temporary file %s",
1888 "\t-c generate C file for CPC\n"
1890 "\t-H generate header file and common files\n"