MCPcopy Create free account
hub / github.com/F-Stack/f-stack / readhexaesc

Function readhexaesc

freebsd/contrib/openzfs/module/lua/llex.c:312–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310
311
312static int readhexaesc (LexState *ls) {
313 int c[3], i; /* keep input for error message */
314 int r = 0; /* result accumulator */
315 c[0] = 'x'; /* for error message */
316 for (i = 1; i < 3; i++) { /* read two hexadecimal digits */
317 c[i] = next(ls);
318 if (!lisxdigit(c[i]))
319 escerror(ls, c, i + 1, "hexadecimal digit expected");
320 r = (r << 4) + luaO_hexavalue(c[i]);
321 }
322 return r;
323}
324
325
326static int readdecesc (LexState *ls) {

Callers 1

read_stringFunction · 0.85

Calls 3

nextFunction · 0.85
escerrorFunction · 0.85
luaO_hexavalueFunction · 0.85

Tested by

no test coverage detected