MCPcopy Create free account
hub / github.com/TASEmulators/fceux / addLine

Method addLine

src/drivers/Qt/MsgLogViewer.cpp:98–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 2

FCEUD_MessageFunction · 0.45
FCEUD_PrintErrorFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected