MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / PrintString

Function PrintString

third-party/lua-5.2.4/src/luac.c:223–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

221#define VOID(p) ((const void*)(p))
222
223static void PrintString(const TString* ts)
224{
225 const char* s=getstr(ts);
226 size_t i,n=ts->tsv.len;
227 printf("%c",'"');
228 for (i=0; i<n; i++)
229 {
230 int c=(int)(unsigned char)s[i];
231 switch (c)
232 {
233 case '"': printf("\\\""); break;
234 case '\\': printf("\\\\"); break;
235 case '\a': printf("\\a"); break;
236 case '\b': printf("\\b"); break;
237 case '\f': printf("\\f"); break;
238 case '\n': printf("\\n"); break;
239 case '\r': printf("\\r"); break;
240 case '\t': printf("\\t"); break;
241 case '\v': printf("\\v"); break;
242 default: if (isprint(c))
243 printf("%c",c);
244 else
245 printf("\\%03d",c);
246 }
247 }
248 printf("%c",'"');
249}
250
251static void PrintConstant(const Proto* f, int i)
252{

Callers 1

PrintConstantFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected