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

Function set_fgetline_context

util/makedefs.c:1693–1714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1691}
1692
1693static void
1694set_fgetline_context(
1695 const char *current_filename,
1696 boolean do_filtering,
1697 boolean tabs_are_ok) /* moot for !do_filtering */
1698{
1699 static const char dummyname[] = "[makedefs input]";
1700
1701#ifndef MAKEDEFS_FILTER_NONASCII
1702 do_filtering = FALSE;
1703#endif
1704 if (!current_filename)
1705 current_filename = dummyname;
1706 /* change from relative-to-dat to be relative-to-top, iff that's easy */
1707 if (!strncmp(current_filename, "../", 3))
1708 current_filename += 3;
1709
1710 ascii_ctx.filename = current_filename;
1711 ascii_ctx.linenum = ascii_ctx.warncnt = 0;
1712 ascii_ctx.tabok = tabs_are_ok;
1713 ascii_ctx.dofilter = do_filtering;
1714}
1715
1716#if defined(OLD_MAKEDEFS_OPTIONS)
1717void

Callers 7

read_rumors_fileFunction · 0.85
do_rnd_access_fileFunction · 0.85
do_rumorsFunction · 0.85
do_dataFunction · 0.85
do_oraclesFunction · 0.85
get_gitinfoFunction · 0.85
do_dungeonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected