Lines Matching refs:fp
44 FILE *fp = fopen(file, "wb"); in data_write() local
45 if (fp == NULL) { in data_write()
50 fprintf(fp, "/*\n"); in data_write()
51 fprintf(fp, " * Copyright(c) 1999 - 2000, Sun Microsystems, Inc.\n"); in data_write()
52 fprintf(fp, " * All Rights Reserved.\n"); in data_write()
53 fprintf(fp, " */\n\n"); in data_write()
54 fprintf(fp, "/* !!!The file is generated automatically. DONOT edit the file manually!!! */\n\n"); in data_write()
55 fprintf(fp, "#include <sal/types.h>\n"); in data_write()
56 fprintf(fp, "\nextern \"C\" {\n"); in data_write()
59 fprintf(fp, "\nstatic const sal_uInt8 %s[] = {", name); in data_write()
65 fprintf(fp, "\n\t"); in data_write()
67 fprintf(fp, "0x%04x, ", data[i]); in data_write()
69 fprintf(fp, "\n};\n\n"); in data_write()
71 fprintf(fp, "const sal_uInt8* get_%s() { return %s; }\n\n", name, name); in data_write()
72 fprintf (fp, "}\n"); in data_write()
74 fclose(fp); in data_write()
80 FILE *fp; in SAL_IMPLEMENT_MAIN_WITH_ARGS() local
84 fp = fopen(argv[1], "rb"); // open the source file for read; in SAL_IMPLEMENT_MAIN_WITH_ARGS()
85 if (fp == NULL) in SAL_IMPLEMENT_MAIN_WITH_ARGS()
91 while (fgets(str, 1024, fp)) { in SAL_IMPLEMENT_MAIN_WITH_ARGS()
107 fclose(fp); in SAL_IMPLEMENT_MAIN_WITH_ARGS()