| 96 | } |
| 97 | |
| 98 | void addLine(const char *txt, bool NewLine = false) |
| 99 | { |
| 100 | long ofs; |
| 101 | |
| 102 | if (fp == NULL) |
| 103 | return; |
| 104 | |
| 105 | ::fseek(fp, 0L, SEEK_END); |
| 106 | |
| 107 | ofs = ::ftell(fp); |
| 108 | |
| 109 | if (NewLine) |
| 110 | { |
| 111 | ::fprintf(fp, "%s\n", txt); |
| 112 | } |
| 113 | else |
| 114 | { |
| 115 | ::fprintf(fp, "%s", txt); |
| 116 | } |
| 117 | |
| 118 | fpOfsList[head] = ofs; |
| 119 | |
| 120 | head = (head + 1) % MSG_LOG_MAX_LINES; |
| 121 | |
| 122 | if (head == tail) |
| 123 | { |
| 124 | tail = (tail + 1) % MSG_LOG_MAX_LINES; |
| 125 | } |
| 126 | |
| 127 | totalLines++; |
| 128 | } |
| 129 | |
| 130 | size_t getTotalLineCount(void) |
| 131 | { |
no outgoing calls
no test coverage detected