Lines Matching refs:gcov_var_

31   if (gcov_var_.file) return false;  in Open()
33 memset(&gcov_var_, 0, sizeof(gcov_var_)); in Open()
34 gcov_var_.overread = -1u; in Open()
36 gcov_var_.file = fopen(filename_.c_str(), "rb"); in Open()
37 if (!gcov_var_.file) return false; in Open()
38 gcov_var_.mode = 0; in Open()
39 setbuf(gcov_var_.file, (char*)0); in Open()
44 if (gcov_var_.file) { in Close()
45 fclose(gcov_var_.file); in Close()
46 gcov_var_.file = 0; in Close()
47 gcov_var_.length = 0; in Close()
49 free(gcov_var_.buffer); in Close()
50 gcov_var_.alloc = 0; in Close()
51 gcov_var_.buffer = 0; in Close()
52 gcov_var_.mode = 0; in Close()
53 return gcov_var_.error; in Close()
57 if (!gcov_var_.file) return; in Sync()
60 if (base - gcov_var_.start <= gcov_var_.length) { in Sync()
61 gcov_var_.offset = base - gcov_var_.start; in Sync()
63 gcov_var_.offset = gcov_var_.length = 0; in Sync()
64 fseek(gcov_var_.file, base << 2, SEEK_SET); in Sync()
65 gcov_var_.start = ftell(gcov_var_.file) >> 2; in Sync()
92 size_t new_size = gcov_var_.alloc; in Allocate()
97 gcov_var_.alloc = new_size; in Allocate()
98 gcov_var_.buffer = (unsigned*)realloc(gcov_var_.buffer, new_size << 2); in Allocate()
103 unsigned excess = gcov_var_.length - gcov_var_.offset; in ReadWords()
105 if (!gcov_var_.file) return 0; in ReadWords()
108 gcov_var_.start += gcov_var_.offset; in ReadWords()
109 memmove(gcov_var_.buffer, gcov_var_.buffer + gcov_var_.offset, excess * 4); in ReadWords()
110 gcov_var_.offset = 0; in ReadWords()
111 gcov_var_.length = excess; in ReadWords()
112 if (gcov_var_.length + words > gcov_var_.alloc) { in ReadWords()
113 Allocate(gcov_var_.length + words); in ReadWords()
115 excess = gcov_var_.alloc - gcov_var_.length; in ReadWords()
116 excess = fread(gcov_var_.buffer + gcov_var_.length, 1, excess << 2, in ReadWords()
117 gcov_var_.file) >> 2; in ReadWords()
118 gcov_var_.length += excess; in ReadWords()
119 if (gcov_var_.length < words) { in ReadWords()
120 gcov_var_.overread += words - gcov_var_.length; in ReadWords()
121 gcov_var_.length = 0; in ReadWords()
125 result = &gcov_var_.buffer[gcov_var_.offset]; in ReadWords()
126 gcov_var_.offset += words; in ReadWords()
135 gcov_var_.endian = 1; in Magic()
149 gcov_var_.error = -1; in ReadCounter()
155 int num_words = fwrite(gcov_var_.buffer, size << 2, 1, gcov_var_.file); in WriteBlock()
157 gcov_var_.error = 1; in WriteBlock()
159 gcov_var_.start += size; in WriteBlock()
160 gcov_var_.offset -= size; in WriteBlock()