MCPcopy Create free account
hub / github.com/NetHack/NetHack / BufferGetchar

Function BufferGetchar

sys/amiga/amiwind.c:151–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151static int
152BufferGetchar(void)
153{
154 int c;
155
156 if (KbdBuffered > 0) {
157 c = KbdBuffer[0];
158 KbdBuffered--;
159 /* Move the remaining characters */
160 if (KbdBuffered < sizeof(KbdBuffer))
161 memcpy(KbdBuffer, KbdBuffer + 1, KbdBuffered);
162 return c;
163 }
164
165 return NO_CHAR;
166}
167
168/*
169 * This should remind you remotely of DeadKeyConvert, but we are cheating

Callers 2

WindowGetcharFunction · 0.85
WindowGeteventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected