Lines Matching defs:File
28 /* ICU package data file format (.dat files) ------------------------------- ***
30 Description of the data format after the usual ICU data file header
35 A .dat package file contains a simple Table of Contents of item names,
59 the .dat file length, and the length of all previous items is the difference
87 } File;
90 static File *files = NULL;
128 FileStream *in, *file;
158 fprintf(stderr, "gencmn: unable to open input file %s\n", dataFile);
165 printf("generating %s_%s.c (table of contents source file)\n", name, type);
167 printf("generating %s.%s (common data file with table of contents)\n", name, type);
198 /* add the file */
222 qsort(files, fileCount, sizeof(File), compareFiles);
237 /* create the output file */
264 /* pad to 16-align the next file */
274 /* copy the next file */
275 file=T_FileStream_open(files[i].pathname, "rb");
276 if(file==NULL) {
277 fprintf(stderr, "gencmn: unable to open listed file %s\n", files[i].pathname);
281 length=T_FileStream_read(file, buffer, sizeof(buffer));
288 T_FileStream_close(file);
297 /* pad to 16-align the last file (cleaner, avoids growing .dat files in icuswap) */
310 /* write a .c source file with the table of contents */
330 /* open the output file */
336 fprintf(stderr, "gencmn: unable to open .c output file %s\n", filename);
340 /* write the source file */
415 files = (File *)uprv_realloc(files, fileMax*sizeof(files[0])); /* note: never freed. */
423 FileStream *file;
446 /* try to open the file */
447 file=T_FileStream_open(fullPath, "rb");
448 if(file==NULL) {
449 fprintf(stderr, "gencmn: unable to open listed file %s\n", fullPath);
453 /* get the file length */
454 length=T_FileStream_size(file);
455 if(T_FileStream_error(file) || length<=20) {
456 fprintf(stderr, "gencmn: unable to get length of listed file %s\n", fullPath);
460 T_FileStream_close(file);
534 /* replace tree separator (such as '/') with file sep char (such as ':' or '\\') */
543 /* replace tree separator (such as '/') with file sep char (such as ':' or '\\') */
557 return uprv_strcmp(((File *)file1)->basename, ((File *)file2)->basename);