Home | History | Annotate | Download | only in toolutil

Lines Matching defs:file

26 /* ICU package data file format (.dat files) ------------------------------- ***
28 Description of the data format after the usual ICU data file header
33 A .dat package file contains a simple Table of Contents of item names,
57 the .dat file length, and the length of all previous items is the difference
85 } File;
88 static File *files = NULL;
124 FileStream *in, *file;
154 fprintf(stderr, "gencmn: unable to open input file %s\n", dataFile);
161 printf("generating %s_%s.c (table of contents source file)\n", name, type);
163 printf("generating %s.%s (common data file with table of contents)\n", name, type);
194 /* add the file */
218 qsort(files, fileCount, sizeof(File), compareFiles);
233 /* create the output file */
260 /* pad to 16-align the next file */
270 /* copy the next file */
271 file=T_FileStream_open(files[i].pathname, "rb");
272 if(file==NULL) {
273 fprintf(stderr, "gencmn: unable to open listed file %s\n", files[i].pathname);
277 length=T_FileStream_read(file, buffer, sizeof(buffer));
284 T_FileStream_close(file);
293 /* pad to 16-align the last file (cleaner, avoids growing .dat files in icuswap) */
306 /* write a .c source file with the table of contents */
326 /* open the output file */
332 fprintf(stderr, "gencmn: unable to open .c output file %s\n", filename);
336 /* write the source file */
419 FileStream *file;
442 /* try to open the file */
443 file=T_FileStream_open(fullPath, "rb");
444 if(file==NULL) {
445 fprintf(stderr, "gencmn: unable to open listed file %s\n", fullPath);
449 /* get the file length */
450 length=T_FileStream_size(file);
451 if(T_FileStream_error(file) || length<=20) {
452 fprintf(stderr, "gencmn: unable to get length of listed file %s\n", fullPath);
456 T_FileStream_close(file);
530 /* replace tree separator (such as '/') with file sep char (such as ':' or '\\') */
539 /* replace tree separator (such as '/') with file sep char (such as ':' or '\\') */
552 return uprv_strcmp(((File *)file1)->basename, ((File *)file2)->basename);