Searched defs:fp (Results 1 - 13 of 13) sorted by relevance

/build/kati/
H A Dio.h26 void DumpInt(FILE* fp, int v);
27 void DumpString(FILE* fp, StringPiece s);
29 int LoadInt(FILE* fp);
30 bool LoadString(FILE* fp, string* s);
34 explicit ScopedFile(FILE* fp) argument
35 : fp_(fp) {
H A Dio.cc21 void DumpInt(FILE* fp, int v) { argument
22 size_t r = fwrite(&v, sizeof(v), 1, fp);
26 void DumpString(FILE* fp, StringPiece s) { argument
27 DumpInt(fp, s.size());
28 size_t r = fwrite(s.data(), 1, s.size(), fp);
32 int LoadInt(FILE* fp) { argument
34 size_t r = fread(&v, sizeof(v), 1, fp);
40 bool LoadString(FILE* fp, string* s) { argument
41 int len = LoadInt(fp);
45 size_t r = fread(&(*s)[0], 1, s->size(), fp);
[all...]
H A Dregen_dump.cc36 FILE *fp = fopen(argv[1], "rb"); local
37 if(!fp)
40 ScopedFile sfp(fp);
42 size_t r = fread(&gen_time, sizeof(gen_time), 1, fp);
46 int num_files = LoadInt(fp);
51 if (!LoadString(fp, &s))
H A Dregen.cc93 FILE* fp = fopen(GetNinjaStampFilename().c_str(), "rb+"); local
94 if (!fp)
96 ScopedFile sfp(fp);
97 if (fseek(fp, 0, SEEK_SET) < 0)
99 size_t r = fwrite(&start_time, sizeof(start_time), 1, fp);
121 #define LOAD_INT(fp) ({ \
122 int v = LoadInt(fp); \
130 #define LOAD_STRING(fp, s) ({ \
131 if (!LoadString(fp, s)) { \
138 FILE* fp local
[all...]
H A Dninja.cc653 FILE* fp = fopen(GetEnvScriptFilename().c_str(), "wb"); local
654 if (fp == NULL)
657 fprintf(fp, "#!/bin/sh\n");
658 fprintf(fp, "# Generated by kati %s\n", kGitVersion);
659 fprintf(fp, "\n");
664 fprintf(fp, "export '%s'='%s'\n", p.first.c_str(), val.c_str());
666 fprintf(fp, "unset '%s'\n", p.first.c_str());
670 fclose(fp);
672 fp = fopen(GetNinjaShellScriptFilename().c_str(), "wb");
673 if (fp
697 FILE* fp = fopen(GetStampTempFilename().c_str(), "wb"); local
[all...]
/build/make/tools/fs_config/
H A Dfs_config_generate.c58 FILE *fp = stdout; local
80 if (fp != stdout) {
85 fp = fopen(optarg, "wb");
86 if (fp == NULL) {
120 if (fwrite(buffer, 1, len, fp) != (size_t)len) {
125 fclose(fp);
/build/make/tools/ziptime/
H A DZipEntry.cpp44 status_t ZipEntry::initAndRewriteFromCDE(FILE* fp) argument
50 result = mCDE.rewrite(fp);
57 posn = ftell(fp);
58 if (fseek(fp, mCDE.mLocalHeaderRelOffset, SEEK_SET) != 0) {
64 result = mLFH.rewrite(fp);
70 if (fseek(fp, posn, SEEK_SET) != 0)
85 * On entry, "fp" points to the signature at the start of the header.
87 status_t ZipEntry::LocalFileHeader::rewrite(FILE* fp) argument
92 if (fread(buf, 1, kLFHLen, fp) != kLFHLen)
103 if (fseek(fp,
125 rewrite(FILE* fp) argument
[all...]
/build/tools/fs_config/
H A Dfs_config_generate.c58 FILE *fp = stdout; local
80 if (fp != stdout) {
85 fp = fopen(optarg, "wb");
86 if (fp == NULL) {
120 if (fwrite(buffer, 1, len, fp) != (size_t)len) {
125 fclose(fp);
/build/tools/ziptime/
H A DZipEntry.cpp44 status_t ZipEntry::initAndRewriteFromCDE(FILE* fp) argument
50 result = mCDE.rewrite(fp);
57 posn = ftell(fp);
58 if (fseek(fp, mCDE.mLocalHeaderRelOffset, SEEK_SET) != 0) {
64 result = mLFH.rewrite(fp);
70 if (fseek(fp, posn, SEEK_SET) != 0)
85 * On entry, "fp" points to the signature at the start of the header.
87 status_t ZipEntry::LocalFileHeader::rewrite(FILE* fp) argument
92 if (fread(buf, 1, kLFHLen, fp) != kLFHLen)
103 if (fseek(fp,
125 rewrite(FILE* fp) argument
[all...]
/build/make/tools/zipalign/
H A DZipEntry.cpp41 status_t ZipEntry::initFromCDE(FILE* fp) argument
50 result = mCDE.read(fp);
59 posn = ftell(fp);
60 if (fseek(fp, mCDE.mLocalHeaderRelOffset, SEEK_SET) != 0) {
66 result = mLFH.read(fp);
72 if (fseek(fp, posn, SEEK_SET) != 0)
401 * On entry, "fp" points to the signature at the start of the header.
402 * On exit, "fp" points to the start of data.
404 status_t ZipEntry::LocalFileHeader::read(FILE* fp) argument
412 if (fread(buf, 1, kLFHLen, fp) !
471 write(FILE* fp) argument
538 read(FILE* fp) argument
629 write(FILE* fp) argument
[all...]
H A DZipFile.cpp1100 status_t ZipFile::filemove(FILE* fp, off_t dst, off_t src, size_t n) argument
1114 if (fseek(fp, (long) src, SEEK_SET) != 0) {
1119 if (fread(readBuf, 1, getSize, fp) != getSize) {
1125 if (fseek(fp, (long) dst, SEEK_SET) != 0) {
1130 if (fwrite(readBuf, 1, getSize, fp) != getSize) {
1313 status_t ZipFile::EndOfCentralDir::write(FILE* fp) argument
1326 if (fwrite(buf, 1, kEOCDLen, fp) != kEOCDLen)
1330 if (fwrite(mComment, mCommentLen, 1, fp) != mCommentLen)
/build/tools/zipalign/
H A DZipEntry.cpp41 status_t ZipEntry::initFromCDE(FILE* fp) argument
50 result = mCDE.read(fp);
59 posn = ftell(fp);
60 if (fseek(fp, mCDE.mLocalHeaderRelOffset, SEEK_SET) != 0) {
66 result = mLFH.read(fp);
72 if (fseek(fp, posn, SEEK_SET) != 0)
401 * On entry, "fp" points to the signature at the start of the header.
402 * On exit, "fp" points to the start of data.
404 status_t ZipEntry::LocalFileHeader::read(FILE* fp) argument
412 if (fread(buf, 1, kLFHLen, fp) !
471 write(FILE* fp) argument
538 read(FILE* fp) argument
629 write(FILE* fp) argument
[all...]
H A DZipFile.cpp1100 status_t ZipFile::filemove(FILE* fp, off_t dst, off_t src, size_t n) argument
1114 if (fseek(fp, (long) src, SEEK_SET) != 0) {
1119 if (fread(readBuf, 1, getSize, fp) != getSize) {
1125 if (fseek(fp, (long) dst, SEEK_SET) != 0) {
1130 if (fwrite(readBuf, 1, getSize, fp) != getSize) {
1313 status_t ZipFile::EndOfCentralDir::write(FILE* fp) argument
1326 if (fwrite(buf, 1, kEOCDLen, fp) != kEOCDLen)
1330 if (fwrite(mComment, mCommentLen, 1, fp) != mCommentLen)

Completed in 134 milliseconds