Lines Matching refs:source
246 void luaO_chunkid (char *out, const char *source, size_t bufflen) { in luaO_chunkid() argument
247 size_t l = strlen(source); in luaO_chunkid()
248 if (*source == '=') { /* 'literal' source */ in luaO_chunkid()
250 memcpy(out, source + 1, l * sizeof(char)); in luaO_chunkid()
252 addstr(out, source + 1, bufflen - 1); in luaO_chunkid()
256 else if (*source == '@') { /* file name */ in luaO_chunkid()
258 memcpy(out, source + 1, l * sizeof(char)); in luaO_chunkid()
262 memcpy(out, source + 1 + l - bufflen, bufflen * sizeof(char)); in luaO_chunkid()
266 const char *nl = strchr(source, '\n'); /* find first new line (if any) */ in luaO_chunkid()
270 addstr(out, source, l); /* keep it */ in luaO_chunkid()
273 if (nl != NULL) l = nl - source; /* stop at first newline */ in luaO_chunkid()
275 addstr(out, source, l); in luaO_chunkid()