MCPcopy Create free account
hub / github.com/crawl/crawl / buf2keyseq

Function buf2keyseq

crawl-ref/source/macro.cc:237–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237static void buf2keyseq(const char *buff, keyseq &k)
238{
239 // Sanity check
240 if (!buff)
241 return;
242
243 // convert c_str to keyseq
244
245 // Check for user functions
246 if (*buff == '=' && buff[1] == '=' && buff[2] == '=' && buff[3])
247 {
248 int index = userfunc_getindex(buff + 3);
249 if (index != -1)
250 k.push_back(USERFUNCBASE - index);
251 }
252 else
253 {
254 const int len = strlen(buff);
255 for (int i = 0; i < len; i++)
256 k.push_back(buff[i]);
257 }
258}
259
260static int _name_to_keycode(string s)
261{

Callers 2

parse_keyseqFunction · 0.85
vtostrFunction · 0.85

Calls 2

userfunc_getindexFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected