Lines Matching refs:fp
190 static void OutputIntForBin(unsigned int val, unsigned int byte, FILE *fp) in OutputIntForBin() argument
197 fwrite(&tmp, 1, 1 ,fp); in OutputIntForBin()
212 FILE *fp; in CreateChJumpFile() local
215 fp = fopen("chjump.bin", "wb"); in CreateChJumpFile()
217 fputs("ChJp", fp); // Magic in CreateChJumpFile()
218 OutputIntForBin(dataSize, 4, fp); // TotalSize in CreateChJumpFile()
219 OutputIntForBin(dataBlockNum, 4, fp); // NumBlocks in CreateChJumpFile()
220 OutputIntForBin(0, 4, fp); // Options in CreateChJumpFile()
223 OutputIntForBin(1, 2, fp); // (Publisher Code) (16 bit) in CreateChJumpFile()
224 OutputIntForBin((unsigned int)atoi(chCode), 2, fp); // (Channel Code) (16 bit) in CreateChJumpFile()
228 fputc('\0', fp); in CreateChJumpFile()
230 fputc(gameCode[i], fp); in CreateChJumpFile()
233 OutputIntForBin(addrDataBlock0, 4, fp); // Offset 0 in CreateChJumpFile()
234 OutputIntForBin(dataSize - CHJUMP_HEADER_SIZE, 4, fp); // Size 0 in CreateChJumpFile()
237 fputs(attachData, fp); in CreateChJumpFile()
239 fputc('\0', fp); fputc('\0', fp); // Add '\0' twice to the end. in CreateChJumpFile()
241 (void)fclose(fp); in CreateChJumpFile()