id int64 0 79.7k | docstring_tokens listlengths 4 145 | code_tokens listlengths 5 27.3k | fun_name stringlengths 1 108 | repo stringclasses 778
values | partition stringclasses 3
values | opt_level stringclasses 15
values |
|---|---|---|---|---|---|---|
245 | [
"Allocates",
"one",
"element",
"from",
"the",
"pool",
"specified"
] | [
"'void",
"*",
"pool_alloc",
"(",
"alloc_pool",
"pool",
")",
"{",
"alloc_pool_list",
"header",
";",
"#",
"ifdef",
"ENABLE_VALGRIND_CHECKING",
"int",
"size",
";",
"#",
"endif",
"if",
"(",
"GATHER_STATISTICS",
")",
"{",
"struct",
"alloc_pool_descriptor",
"*",
"desc... | pool_alloc | SuperHouse/esp-open-rtos | train | Oa |
246 | [
"Free",
"all",
"memory",
"allocated",
"for",
"the",
"given",
"memory",
"pool"
] | [
"'void",
"empty_alloc_pool",
"(",
"alloc_pool",
"pool",
")",
"{",
"alloc_pool_list",
"block",
",",
"<type",
"ref=\"prev\"/>",
"next_block",
";",
"gcc_checking_assert",
"(",
"pool",
")",
";",
"/*",
"Free",
"each",
"block",
"allocated",
"to",
"the",
"pool.",
"*/",... | empty_alloc_pool | SuperHouse/esp-open-rtos | train | Oa |
247 | [
"Output",
"peralloc_pool",
"memory",
"usage",
"statistics"
] | [
"'void",
"dump_alloc_pool_statistics",
"(",
"void",
")",
"{",
"struct",
"output_info",
"info",
";",
"if",
"(",
"!",
"GATHER_STATISTICS",
")",
"return",
";",
"if",
"(",
"!",
"alloc_pool_hash",
".",
"is_created",
"()",
")",
"return",
";",
"fprintf",
"(",
"stde... | dump_alloc_pool_statistics | SuperHouse/esp-open-rtos | train | Oa |
248 | [
"mangle",
"the",
"instruction",
"that",
"reference",
"memory",
"via",
"segment",
"register"
] | [
"'void",
"mangle_seg_ref",
"(",
"dcontext_t",
"*",
"dcontext",
",",
"instrlist_t",
"*",
"ilist",
",",
"instr_t",
"*",
"instr",
",",
"instr_t",
"*",
"next_instr",
")",
"{",
"int",
"si",
"=",
"-",
"1",
",",
"<type",
"ref=\"prev\"/>",
"di",
"=",
"-",
"1",
... | mangle_seg_ref | DynamoRIO/drmemory | train | Os |
249 | [
"Used",
"for",
"fault",
"translation"
] | [
"'bool",
"instr_check_xsp_mangling",
"(",
"dcontext_t",
"*",
"dcontext",
",",
"instr_t",
"*",
"inst",
",",
"int",
"*",
"xsp_adjust",
")",
"{",
"ASSERT",
"(",
"xsp_adjust",
"!=",
"NULL",
")",
";",
"if",
"(",
"instr_get_opcode",
"(",
"inst",
")",
"==",
"OP_p... | instr_check_xsp_mangling | DynamoRIO/drmemory | train | Os |
250 | [
"repeatme",
"should",
"be",
"reexecuted",
"5",
"times",
"with",
"arg",
"15"
] | [
"'EXPORT",
"void",
"repeatme",
"(",
"int",
"i",
")",
"{",
"printf",
"(",
"\"hello",
"%d\\\"",
",",
"i",
")",
";",
"}'"
] | repeatme | DynamoRIO/drmemory | train | Os |
252 | [
"internal",
"utility",
"function",
"that",
"calls",
"the",
"appropriate",
"routine",
"for",
"the",
"wildcard",
"passed",
"in"
] | [
"\"int",
"dotconf_handle_wild_card",
"(",
"command_t",
"*",
"cmd",
",",
"char",
"wild_card",
",",
"char",
"*",
"path",
",",
"char",
"*",
"pre",
",",
"char",
"*",
"ext",
")",
"{",
"int",
"retval",
"=",
"0",
";",
"switch",
"(",
"wild_card",
")",
"{",
"... | dotconf_handle_wild_card | ganglia/monitor-core | train | O2 |
253 | [
"internal",
"utility",
"function",
"that",
"determins",
"if",
"a",
"string",
"matches",
"the",
"''",
"criteria"
] | [
"'int",
"dotconf_star_match",
"(",
"char",
"*",
"dir_name",
",",
"char",
"*",
"pre",
",",
"char",
"*",
"ext",
")",
"{",
"int",
"retval",
"=",
"-",
"1",
";",
"int",
"dir_name_len",
"=",
"strlen",
"(",
"dir_name",
")",
";",
"int",
"pre_len",
"=",
"strl... | dotconf_star_match | ganglia/monitor-core | train | O2 |
254 | [
"internal",
"utility",
"function",
"that",
"determins",
"if",
"a",
"string",
"matches",
"the",
"'?'",
"criteria"
] | [
"'int",
"dotconf_question_mark_match",
"(",
"char",
"*",
"dir_name",
",",
"char",
"*",
"pre",
",",
"char",
"*",
"ext",
")",
"{",
"int",
"retval",
"=",
"-",
"1",
";",
"int",
"dir_name_len",
"=",
"strlen",
"(",
"dir_name",
")",
";",
"int",
"pre_len",
"="... | dotconf_question_mark_match | ganglia/monitor-core | train | O2 |
255 | [
"internal",
"utility",
"function",
"that",
"compares",
"two",
"stings",
"from",
"back",
"to",
"front"
] | [
"'int",
"dotconf_strcmp_from_back",
"(",
"const",
"char",
"*",
"s1",
",",
"const",
"char",
"*",
"s2",
")",
"{",
"int",
"retval",
"=",
"0",
";",
"int",
"i",
",",
"<type",
"ref=\"prev\"/>",
"j",
";",
"int",
"len_1",
"=",
"strlen",
"(",
"s1",
")",
";",
... | dotconf_strcmp_from_back | ganglia/monitor-core | train | O2 |
256 | [
"internal",
"utility",
"function",
"that",
"verifies",
"if",
"a",
"character",
"is",
"in",
"the",
"WILDCARDS",
"list"
] | [
"'int",
"dotconf_is_wild_card",
"(",
"char",
"value",
")",
"{",
"int",
"retval",
"=",
"0",
";",
"int",
"i",
";",
"int",
"wildcards_len",
"=",
"strlen",
"(",
"WILDCARDS",
")",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"wildcards_len",
";",
"i",
... | dotconf_is_wild_card | ganglia/monitor-core | train | O2 |
276 | [
"Configures",
"the",
"Timers",
"clocks",
"prescalers",
"selection"
] | [
"'void",
"RCC_TIMCLKPresConfig",
"(",
"uint32_t",
"RCC_TIMCLKPrescaler",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_RCC_TIMCLK_PRESCALER",
"(",
"RCC_TIMCLKPrescaler",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"DCKCFGR... | RCC_TIMCLKPresConfig | librepilot/LibrePilot | train | Os |
277 | [
"Enables",
"or",
"disables",
"the",
"main",
"PLL"
] | [
"'void",
"RCC_PLLCmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CR_PLLON_BB",
"=",
"(",
"uint3... | RCC_PLLCmd | librepilot/LibrePilot | train | Os |
278 | [
"Clears",
"the",
"RCC's",
"interrupt",
"pending",
"bits"
] | [
"'void",
"RCC_ClearITPendingBit",
"(",
"uint8_t",
"RCC_IT",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_RCC_CLEAR_IT",
"(",
"RCC_IT",
")",
")",
";",
"/*",
"Perform",
"Byte",
"access",
"to",
"RCC_CIR[23:16]",
"bits",
"to",
"clea... | RCC_ClearITPendingBit | librepilot/LibrePilot | train | Os |
279 | [
"Enables",
"or",
"disables",
"the",
"Internal",
"High",
"Speed",
"oscillator",
"(HSI)"
] | [
"'void",
"RCC_HSICmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CR_HSION_BB",
"=",
"(",
"uint3... | RCC_HSICmd | librepilot/LibrePilot | train | Os |
280 | [
"Configures",
"the",
"I2S",
"clock",
"source",
"(I2SCLK)"
] | [
"'void",
"RCC_I2SCLKConfig",
"(",
"uint32_t",
"RCC_I2SCLKSource",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_RCC_I2SCLK_SOURCE",
"(",
"RCC_I2SCLKSource",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CFGR_I2SSRC_BB",
"... | RCC_I2SCLKConfig | librepilot/LibrePilot | train | Os |
281 | [
"Internal",
"and",
"external",
"clocks,",
"PLL,",
"CSS",
"and",
"MCO",
"configuration",
"functions"
] | [
"'void",
"RCC_DeInit",
"(",
"void",
")",
"{",
"/*",
"Set",
"HSION",
"bit",
"*/",
"RCC",
"->",
"CR",
"|=",
"(",
"uint32_t",
")",
"0x00000001",
";",
"/*",
"Reset",
"CFGR",
"register",
"*/",
"RCC",
"->",
"CFGR",
"=",
"0x00000000",
";",
"/*",
"Reset",
"H... | RCC_DeInit | librepilot/LibrePilot | train | Os |
282 | [
"Forces",
"or",
"releases",
"the",
"Backup",
"domain",
"reset"
] | [
"'void",
"RCC_BackupResetCmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"BDCR_BDRST_BB",
"=",
"("... | RCC_BackupResetCmd | librepilot/LibrePilot | train | Os |
283 | [
"Enables",
"or",
"disables",
"the",
"RTC",
"clock"
] | [
"'void",
"RCC_RTCCLKCmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"BDCR_RTCEN_BB",
"=",
"(",
"... | RCC_RTCCLKCmd | librepilot/LibrePilot | train | Os |
284 | [
"Enables",
"or",
"disables",
"the",
"Internal",
"Low",
"Speed",
"oscillator",
"(LSI)"
] | [
"'void",
"RCC_LSICmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CSR_LSION_BB",
"=",
"(",
"uint... | RCC_LSICmd | librepilot/LibrePilot | train | Os |
285 | [
"Enables",
"or",
"disables",
"the",
"PLLSAI"
] | [
"'void",
"RCC_PLLSAICmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CR_PLLSAION_BB",
"=",
"(",
... | RCC_PLLSAICmd | librepilot/LibrePilot | train | Os |
286 | [
"Enables",
"or",
"disables",
"the",
"PLLI2S"
] | [
"'void",
"RCC_PLLI2SCmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CR_PLLI2SON_BB",
"=",
"(",
... | RCC_PLLI2SCmd | librepilot/LibrePilot | train | Os |
287 | [
"Enables",
"or",
"disables",
"the",
"Clock",
"Security",
"System"
] | [
"'void",
"RCC_ClockSecuritySystemCmd",
"(",
"FunctionalState",
"NewState",
")",
"{",
"/*",
"Check",
"the",
"parameters",
"*/",
"assert_param",
"(",
"IS_FUNCTIONAL_STATE",
"(",
"NewState",
")",
")",
";",
"*",
"(",
"__IO",
"uint32_t",
"*",
")",
"CR_CSSON_BB",
"=",... | RCC_ClockSecuritySystemCmd | librepilot/LibrePilot | train | Os |
288 | [
"Forget",
"any",
"invalid",
"pages",
"in",
"a",
"whole",
"database"
] | [
"'static",
"void",
"forget_invalid_pages_db",
"(",
"Oid",
"dbid",
")",
"{",
"HASH_SEQ_STATUS",
"status",
";",
"xl_invalid_page",
"*",
"hentry",
";",
"if",
"(",
"invalid_page_tab",
"==",
"NULL",
")",
"return",
";",
"/*",
"nothing",
"to",
"do",
"*/",
"hash_seq_i... | forget_invalid_pages_db | petergeoghegan/pg_hexedit | train | Og |
289 | [
"Report",
"a",
"reference",
"to",
"an",
"invalid",
"page"
] | [
"'static",
"void",
"report_invalid_page",
"(",
"int",
"elevel",
",",
"RelFileNode",
"node",
",",
"ForkNumber",
"forkno",
",",
"BlockNumber",
"blkno",
",",
"bool",
"present",
")",
"{",
"char",
"*",
"path",
"=",
"relpathperm",
"(",
"node",
",",
"forkno",
")",
... | report_invalid_page | petergeoghegan/pg_hexedit | train | Og |
290 | [
"Log",
"a",
"reference",
"to",
"an",
"invalid",
"page"
] | [
"'static",
"void",
"log_invalid_page",
"(",
"RelFileNode",
"node",
",",
"ForkNumber",
"forkno",
",",
"BlockNumber",
"blkno",
",",
"bool",
"present",
")",
"{",
"xl_invalid_page_key",
"key",
";",
"xl_invalid_page",
"*",
"hentry",
";",
"bool",
"found",
";",
"/*",
... | log_invalid_page | petergeoghegan/pg_hexedit | train | Og |
291 | [
"XLogReaderRoutine>segment_open",
"callback",
"for",
"local",
"pg_wal",
"files"
] | [
"'void",
"wal_segment_open",
"(",
"XLogReaderState",
"*",
"state",
",",
"XLogSegNo",
"nextSegNo",
",",
"TimeLineID",
"*",
"tli_p",
")",
"{",
"TimeLineID",
"tli",
"=",
"*",
"tli_p",
";",
"char",
"path",
"[",
"MAXPGPATH",
"]",
";",
"XLogFilePath",
"(",
"path",... | wal_segment_open | petergeoghegan/pg_hexedit | train | Og |
292 | [
"MPI",
"function",
"that",
"returns",
"the",
"ref",
"of",
"whatever",
"arg0",
"is",
"linked",
"to",
"For",
"multilinked",
"exits,",
"this",
"may",
"be",
"a",
"\\r",
"delimited",
"list"
] | [
"'const",
"char",
"*",
"mfn_links",
"(",
"MFUNARGS",
")",
"{",
"char",
"buf2",
"[",
"BUFFER_LEN",
"]",
";",
"dbref",
"obj",
";",
"int",
"cnt",
";",
"obj",
"=",
"mesg_dbref",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[",
... | mfn_links | fuzzball-muck/fuzzball | train | O1 |
293 | [
"MPI",
"function",
"that",
"counts",
"number",
"of",
"items",
"in",
"list",
"arg0",
"arg0",
"is",
"a",
"string",
"containing",
"a",
"delimited",
"list"
] | [
"'const",
"char",
"*",
"mfn_count",
"(",
"MFUNARGS",
")",
"{",
"strcpyn",
"(",
"buf",
",",
"buflen",
",",
"\"\\\\r\"",
")",
";",
"if",
"(",
"argc",
">",
"1",
")",
"{",
"if",
"(",
"!",
"*",
"argv",
"[",
"1",
"]",
")",
"ABORT_MPI",
"(",
"\"COUNT\""... | mfn_count | fuzzball-muck/fuzzball | train | O1 |
294 | [
"MPI",
"function",
"that",
"returns",
"a",
"random",
"item",
"from",
"list",
"arg0",
"arg0",
"is",
"a",
"string",
"containing",
"a",
"delimited",
"list"
] | [
"'const",
"char",
"*",
"mfn_lrand",
"(",
"MFUNARGS",
")",
"{",
"/*",
"{lrand:list,sep}",
"*/",
"char",
"sepbuf",
"[",
"BUFFER_LEN",
"]",
";",
"int",
"count",
"=",
"1",
";",
"int",
"which",
"=",
"0",
";",
"strcpyn",
"(",
"sepbuf",
",",
"sizeof",
"(",
... | mfn_lrand | fuzzball-muck/fuzzball | train | O1 |
295 | [
"MPI",
"function",
"that",
"tests",
"the",
"lock",
"of",
"arg1",
"against",
"arg0",
"Returns",
"1",
"if",
"locked,",
"0",
"if",
"not",
"locked"
] | [
"'const",
"char",
"*",
"mfn_locked",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"who",
"=",
"mesg_dbref_local",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[",
"0",
"]",
",",
"mesgtyp",
")",
";",
"dbref",
"obj",
"=",
"mesg_dbref_loca... | mfn_locked | fuzzball-muck/fuzzball | train | O1 |
296 | [
"MPI",
"function",
"that",
"tests",
"a",
"lock",
"property",
"At",
"a",
"minimum",
"needs",
"arg0",
"to",
"be",
"an",
"object,",
"and",
"arg1",
"to",
"be",
"a",
"lock",
"property",
"to",
"check"
] | [
"'const",
"char",
"*",
"mfn_testlock",
"(",
"MFUNARGS",
")",
"{",
"struct",
"boolexp",
"*",
"lok",
";",
"dbref",
"who",
"=",
"player",
";",
"dbref",
"obj",
"=",
"mesg_dbref_local",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[... | mfn_testlock | fuzzball-muck/fuzzball | train | O1 |
297 | [
"MPI",
"function",
"that",
"finds",
"a",
"substring",
"arg0",
"is",
"the",
"string",
"to",
"search",
"and",
"arg1",
"is",
"the",
"string",
"to",
"search",
"for"
] | [
"'const",
"char",
"*",
"mfn_instr",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
";",
"if",
"(",
"!",
"*",
"argv",
"[",
"1",
"]",
")",
"ABORT_MPI",
"(",
"\"INSTR\"",
",",
"\"Can\\'t",
"search",
"for",
"a",
"null",
"string.\"",
")",
";",
"for",
"(... | mfn_instr | fuzzball-muck/fuzzball | train | O1 |
298 | [
"MPI",
"function",
"that",
"turns",
"a",
"list",
"into",
"a",
"comma",
"delimited",
"string",
"arg0",
"is",
"a",
"list"
] | [
"'const",
"char",
"*",
"mfn_commas",
"(",
"MFUNARGS",
")",
"{",
"int",
"v",
",",
"<type",
"ref=\"prev\"/>",
"count",
",",
"<type",
"ref=\"prev\"/>",
"itemlen",
";",
"char",
"*",
"ptr",
";",
"char",
"*",
"out",
";",
"char",
"listbuf",
"[",
"BUFFER_LEN",
"... | mfn_commas | fuzzball-muck/fuzzball | train | O1 |
299 | [
"MPI",
"function",
"that",
"returns",
"the",
"name",
"of",
"arg0",
"Exit",
"names",
"are",
"truncated",
"at",
"the",
"first",
"sign",
"of",
"a",
"';'",
"so",
"that",
"it",
"looks",
"pretty"
] | [
"'const",
"char",
"*",
"mfn_name",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
";",
"dbref",
"obj",
"=",
"mesg_dbref_raw",
"(",
"descr",
",",
"player",
",",
"what",
",",
"argv",
"[",
"0",
"]",
")",
";",
"if",
"(",
"obj",
"==",
"UNKNOWN",
")",
... | mfn_name | fuzzball-muck/fuzzball | train | O1 |
300 | [
"MPI",
"function",
"that",
"forces",
"an",
"object",
"arg0",
"is",
"the",
"object",
"to",
"force,",
"and",
"arg1",
"is",
"the",
"command",
"to",
"run"
] | [
"'const",
"char",
"*",
"mfn_force",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"nxt",
",",
"<type",
"ref=\"prev\">",
"*",
"ptr",
";",
"dbref",
"obj",
"=",
"mesg_dbref_raw",
"(",
"descr",
",",
"player",
",",
"what",
",",
"argv",
"[",
"0",
"]",
")",
";",
... | mfn_force | fuzzball-muck/fuzzball | train | O1 |
301 | [
"Check",
"to",
"see",
"if",
"a",
"list",
"'list'",
"contains",
"word",
"'word'",
"'word'",
"must",
"exactly",
"match",
"the",
"entire",
"contents",
"of",
"the",
"list",
"item",
"it",
"is",
"an",
"exact",
"match,",
"not",
"a",
"partial",
"match,",
"of",
"... | [
"'static",
"int",
"list_contains",
"(",
"char",
"*",
"word",
",",
"size_t",
"len",
",",
"char",
"*",
"list",
")",
"{",
"char",
"*",
"w",
",",
"<type",
"ref=\"prev\">",
"*",
"w2",
";",
"w",
"=",
"w2",
"=",
"list",
";",
"do",
"{",
"for",
"(",
";",
... | list_contains | fuzzball-muck/fuzzball | train | O1 |
302 | [
"MPI",
"function",
"that",
"returns",
"the",
"reference",
"of",
"arg0",
"as",
"a",
"#dbref",
"This",
"will",
"always",
"be",
"a",
"#dbref",
"and",
"doesn't",
"return",
"Playername",
"like",
"some",
"calls",
"(such",
"as",
"contents)"
] | [
"'const",
"char",
"*",
"mfn_ref",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"obj",
";",
"const",
"char",
"*",
"p",
"=",
"argv",
"[",
"0",
"]",
";",
"skip_whitespace",
"(",
"&",
"p",
")",
";",
"if",
"(",
"*",
"p",
"==",
"NUMBER_TOKEN",
"&&",
"number",
"... | mfn_ref | fuzzball-muck/fuzzball | train | O1 |
303 | [
"MPI",
"function",
"that",
"filters",
"one",
"list",
"by",
"another",
"list",
"The",
"list",
"in",
"arg0",
"has",
"any",
"rows",
"that",
"match",
"a",
"row",
"in",
"arg1",
"removed",
"and",
"the",
"result",
"is",
"returned"
] | [
"'const",
"char",
"*",
"mfn_lremove",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"*",
"ptr",
",",
"<type",
"ref=\"prev\">",
"*",
"ptr2",
",",
"<type",
"ref=\"prev\">",
"*",
"endbuf",
";",
"size_t",
"len",
";",
"i... | mfn_lremove | fuzzball-muck/fuzzball | train | O1 |
304 | [
"MPI",
"function",
"that",
"escapes",
"a",
"string",
"in",
"backtick",
"quotes",
"This",
"surrounds",
"arg0",
"in",
"backticks",
"(`)",
"and",
"escapes",
"any",
"backticks",
"that",
"are",
"in",
"the",
"string",
"using",
"backslash"
] | [
"\"const",
"char",
"*",
"mfn_escape",
"(",
"MFUNARGS",
")",
"{",
"/*",
"*",
"TODO:",
"this",
"MPI",
"call",
"is",
"not",
"documented",
"in",
"mpi",
"escape",
"*",
"*",
"Also,",
"to",
"be",
"honest,",
"I'm",
"really",
"not",
"sure",
"what",
"the",
"purp... | mfn_escape | fuzzball-muck/fuzzball | train | O1 |
305 | [
"MPI",
"function",
"that",
"does",
"returns",
"connection",
"count",
"for",
"the",
"given",
"player",
"If",
"arg0",
"isn't",
"a",
"player,",
"this",
"returns",
"0,",
"which",
"is",
"the",
"same",
"as",
"if",
"the",
"a",
"player",
"is",
"not",
"connected"
] | [
"'const",
"char",
"*",
"mfn_awake",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"obj",
"=",
"mesg_dbref_local",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[",
"0",
"]",
",",
"mesgtyp",
")",
";",
"if",
"(",
"obj",
"==",
"PERMDENIED"... | mfn_awake | fuzzball-muck/fuzzball | train | O1 |
306 | [
"MPI",
"function",
"that",
"adds",
"ANSI",
"attributes",
"to",
"a",
"string",
"This",
"takes",
"a",
"variable",
"number",
"of",
"arguments,",
"with",
"a",
"minimum",
"of",
"two"
] | [
"'const",
"char",
"*",
"mfn_attr",
"(",
"MFUNARGS",
")",
"{",
"int",
"exlen",
";",
"/*",
"*",
"TODO:",
"A",
"very",
"similar",
"statement",
"is",
"in",
"p_strings.c.",
"*",
"*",
"We",
"should",
"centralize",
"this",
"logic",
"and",
"have",
"a",
"function... | mfn_attr | fuzzball-muck/fuzzball | train | O1 |
307 | [
"MPI",
"function",
"that",
"returns",
"true",
"if",
"arg0",
"is",
"of",
"type",
"arg1",
"arg1",
"can",
"be",
"\"Room\",",
"\"Player\",",
"\"Exit\",",
"\"Thing\",",
"\"Program\",",
"or",
"\"Bad\"",
"arg0",
"should",
"be",
"something",
"that",
"resolves",
"into",
... | [
"'const",
"char",
"*",
"mfn_istype",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"obj",
";",
"obj",
"=",
"mesg_dbref_local",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[",
"0",
"]",
",",
"mesgtyp",
")",
";",
"if",
"(",
"obj",
"==... | mfn_istype | fuzzball-muck/fuzzball | train | O1 |
308 | [
"MPI",
"function",
"that",
"takes",
"a",
"list,",
"and",
"evaluates",
"a",
"an",
"expression",
"with",
"variables",
"Arguments",
"arg0",
"and",
"arg1",
"are",
"variable",
"names;",
"they",
"will",
"be",
"populated",
"with",
"the",
"first",
"two",
"items",
"o... | [
"'const",
"char",
"*",
"mfn_fold",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"varname",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"sepinbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"listbuf",
"[",
"BUFFER_LEN",
"]",
";... | mfn_fold | fuzzball-muck/fuzzball | train | O1 |
309 | [
"MPI",
"function",
"that",
"returns",
"a",
"list",
"of",
"exits",
"associatd",
"with",
"arg0",
"Returns",
"the",
"exits",
"as",
"a",
"\\r",
"delimited",
"list",
"of",
"refs"
] | [
"'const",
"char",
"*",
"mfn_exits",
"(",
"MFUNARGS",
")",
"{",
"size_t",
"outlen",
",",
"<type",
"ref=\"prev\"/>",
"nextlen",
";",
"char",
"buf2",
"[",
"50",
"]",
";",
"int",
"list_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"dbref",
"obj",
"=",
"mesg_dbref",
"... | mfn_exits | fuzzball-muck/fuzzball | train | O1 |
310 | [
"MPI",
"function",
"that",
"times",
"(and",
"displays",
"timing",
"of)",
"some",
"MPI",
"code",
"When",
"arg0",
"completes,",
"a",
"timing",
"message",
"is",
"displayed"
] | [
"'const",
"char",
"*",
"mfn_timing",
"(",
"MFUNARGS",
")",
"{",
"/*",
"*",
"TODO:",
"This",
"function",
"is",
"not",
"documented",
"in",
"\\'mpi",
"timing\\'",
"*/",
"char",
"*",
"ptr",
";",
"struct",
"timeval",
"start_time",
",",
"<type",
"ref=\"prev\"/>",
... | mfn_timing | fuzzball-muck/fuzzball | train | O1 |
311 | [
"MPI",
"function",
"that",
"runs",
"an",
"expression",
"against",
"every",
"item",
"in",
"a",
"list",
"This",
"operates",
"in",
"a",
"variable",
"context",
"similar",
"to",
"{with}",
"@see",
"mfn_with",
"@see",
"mfn_foreach",
"This",
"is",
"similar",
"to",
"... | [
"'const",
"char",
"*",
"mfn_parse",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"listbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"sepinbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"sepoutbuf",
"[",
"BUFFER_LEN",
"]",
... | mfn_parse | fuzzball-muck/fuzzball | train | O1 |
312 | [
"MPI",
"function",
"that",
"returns",
"an",
"optionally",
"filtered",
"contents",
"list",
"Returns",
"the",
"contents",
"as",
"a",
"\\r",
"delimited",
"list",
"of",
"refs"
] | [
"'const",
"char",
"*",
"mfn_contents",
"(",
"MFUNARGS",
")",
"{",
"char",
"buf2",
"[",
"50",
"]",
";",
"int",
"list_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"dbref",
"obj",
"=",
"mesg_dbref_local",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",... | mfn_contents | fuzzball-muck/fuzzball | train | O1 |
313 | [
"MPI",
"function",
"that",
"returns",
"a",
"version",
"of",
"arg0",
"with",
"all",
"duplicate",
"rows",
"removed",
"This",
"will",
"iterate",
"up",
"to",
"MAX_MFUN_LIST_LEN",
"times"
] | [
"'const",
"char",
"*",
"mfn_lunique",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"*",
"ptr",
",",
"<type",
"ref=\"prev\">",
"*",
"ptr2",
",",
"<type",
"ref=\"prev\">",
"*",
"p",
";",
"int",
"len",
";",
"size_t",
... | mfn_lunique | fuzzball-muck/fuzzball | train | O1 |
314 | [
"MPI",
"function",
"that",
"returns",
"a",
"list",
"that",
"is",
"arg0",
"and",
"arg1",
"combined"
] | [
"'const",
"char",
"*",
"mfn_lunion",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"*",
"ptr",
",",
"<type",
"ref=\"prev\">",
"*",
"ptr2",
",",
"<type",
"ref=\"prev\">",
"*",
"p",
";",
"int",
"len",
";",
"size_t",
... | mfn_lunion | fuzzball-muck/fuzzball | train | O1 |
315 | [
"MPI",
"function",
"that",
"returns",
"1",
"if",
"player",
"controls",
"arg0,",
"0",
"otherwise",
"You",
"can",
"also",
"provide",
"arg1",
"as",
"an",
"alternate",
"player",
"to",
"check",
"control",
"permissions",
"for,",
"though",
"the",
"default",
"is",
"... | [
"'const",
"char",
"*",
"mfn_controls",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"obj",
";",
"dbref",
"obj2",
";",
"obj",
"=",
"mesg_dbref_raw",
"(",
"descr",
",",
"player",
",",
"what",
",",
"argv",
"[",
"0",
"]",
")",
";",
"/*",
"*",
"TODO:",
"I\\'m",
... | mfn_controls | fuzzball-muck/fuzzball | train | O1 |
316 | [
"MPI",
"function",
"that",
"does",
"a",
"string",
"substitution",
"Substitutes",
"all",
"instances",
"of",
"arg1",
"with",
"arg2",
"in",
"arg0",
"@see",
"string_substitute"
] | [
"'const",
"char",
"*",
"mfn_subst",
"(",
"MFUNARGS",
")",
"{",
"return",
"string_substitute",
"(",
"argv",
"[",
"0",
"]",
",",
"argv",
"[",
"1",
"]",
",",
"argv",
"[",
"2",
"]",
",",
"buf",
",",
"BUFFER_LEN",
")",
";",
"}'"
] | mfn_subst | fuzzball-muck/fuzzball | train | O1 |
317 | [
"MPI",
"function",
"that",
"returns",
"the",
"ref",
"of",
"the",
"player",
"that",
"owns",
"arg0"
] | [
"'const",
"char",
"*",
"mfn_owner",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"obj",
";",
"obj",
"=",
"mesg_dbref_raw",
"(",
"descr",
",",
"player",
",",
"what",
",",
"argv",
"[",
"0",
"]",
")",
";",
"if",
"(",
"obj",
"==",
"AMBIGUOUS",
"||",
"obj",
"=="... | mfn_owner | fuzzball-muck/fuzzball | train | O1 |
318 | [
"MPI",
"function",
"that",
"does",
"a",
"regex",
"match",
"of",
"pattern",
"arg1",
"against",
"string",
"arg0",
"Just",
"a",
"thin",
"wrapper",
"around",
"equalstr",
"@see",
"equalstr"
] | [
"'const",
"char",
"*",
"mfn_smatch",
"(",
"MFUNARGS",
")",
"{",
"if",
"(",
"equalstr",
"(",
"argv",
"[",
"1",
"]",
",",
"argv",
"[",
"0",
"]",
")",
")",
"{",
"return",
"\"1\"",
";",
"}",
"else",
"{",
"return",
"\"0\"",
";",
"}",
"}'"
] | mfn_smatch | fuzzball-muck/fuzzball | train | O1 |
319 | [
"MPI",
"function",
"that",
"returns",
"the",
"name",
"of",
"arg0",
"The",
"name",
"is",
"left",
"intact",
"in",
"case",
"of",
"exits"
] | [
"'const",
"char",
"*",
"mfn_fullname",
"(",
"MFUNARGS",
")",
"{",
"/*",
"*",
"TODO:",
"This",
"is",
"a",
"copy/paste",
"of",
"mfn_name",
"with",
"the",
"exit",
"truncation",
"code",
"*",
"taken",
"out.",
"Much",
"as",
"I",
"dislike",
"thin",
"wrappers,",
... | mfn_fullname | fuzzball-muck/fuzzball | train | O1 |
320 | [
"MPI",
"function",
"that",
"finds",
"an",
"item",
"in",
"a",
"list",
"arg0",
"is",
"the",
"list",
"to",
"search,",
"arg1",
"is",
"the",
"item",
"to",
"find"
] | [
"'const",
"char",
"*",
"mfn_lmember",
"(",
"MFUNARGS",
")",
"{",
"/*",
"{lmember:list,item,delim}",
"*/",
"int",
"i",
"=",
"1",
";",
"char",
"*",
"ptr",
"=",
"argv",
"[",
"0",
"]",
";",
"char",
"*",
"delim",
"=",
"NULL",
";",
"int",
"len",
";",
"in... | mfn_lmember | fuzzball-muck/fuzzball | train | O1 |
321 | [
"MPI",
"function",
"that",
"uppercases",
"arg0"
] | [
"'const",
"char",
"*",
"mfn_toupper",
"(",
"MFUNARGS",
")",
"{",
"strcpyn",
"(",
"buf",
",",
"buflen",
",",
"argv",
"[",
"0",
"]",
")",
";",
"toupper_string",
"(",
"&",
"buf",
")",
";",
"return",
"buf",
";",
"}'"
] | mfn_toupper | fuzzball-muck/fuzzball | train | O1 |
322 | [
"MPI",
"function",
"that",
"defines",
"a",
"variable",
"context",
"MPI",
"is",
"kind",
"of",
"weird",
"and",
"variables",
"run",
"within",
"a",
"context",
"in",
"the",
"format",
"of:",
"{with:var_name,",
"var_value,",
"code",
"to",
"run"
] | [
"'const",
"char",
"*",
"mfn_with",
"(",
"MFUNARGS",
")",
"{",
"char",
"namebuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"cmdbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"vbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"*",
"ptr",
",",
"<type",
"ref=\"prev\">",
... | mfn_with | fuzzball-muck/fuzzball | train | O1 |
323 | [
"MPI",
"function",
"that",
"runs",
"code",
"in",
"debug",
"mode",
"if",
"the",
"conditional",
"returns",
"true",
"arg0",
"is",
"the",
"conditional",
"expression"
] | [
"'const",
"char",
"*",
"mfn_debugif",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
"=",
"MesgParse",
"(",
"argv",
"[",
"0",
"]",
",",
"buf",
",",
"buflen",
")",
";",
"CHECKRETURN",
"(",
"ptr",
",",
"\"DEBUGIF\"",
",",
"\"arg",
"1\"",
")",
";",
"i... | mfn_debugif | fuzzball-muck/fuzzball | train | O1 |
324 | [
"MPI",
"function",
"that",
"returns",
"a",
"substring",
"Takes",
"a",
"string",
"in",
"arg0"
] | [
"'const",
"char",
"*",
"mfn_midstr",
"(",
"MFUNARGS",
")",
"{",
"int",
"len",
"=",
"strlen",
"(",
"argv",
"[",
"0",
"]",
")",
";",
"int",
"pos1",
"=",
"atoi",
"(",
"argv",
"[",
"1",
"]",
")",
";",
"int",
"pos2",
"=",
"pos1",
";",
"char",
"*",
... | mfn_midstr | fuzzball-muck/fuzzball | train | O1 |
325 | [
"MPI",
"function",
"that",
"runs",
"an",
"expression",
"against",
"every",
"item",
"in",
"a",
"list",
"and",
"filters",
"This",
"operates",
"in",
"a",
"variable",
"context",
"similar",
"to",
"{with}",
"@see",
"mfn_with",
"@see",
"mfn_foreach",
"This",
"is",
... | [
"'const",
"char",
"*",
"mfn_filter",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"scratch",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"listbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"sepinbuf",
"[",
"BUFFER_LEN",
"]",
... | mfn_filter | fuzzball-muck/fuzzball | train | O1 |
326 | [
"MPI",
"function",
"that",
"returns",
"the",
"contents",
"of",
"a",
"variable",
"arg0"
] | [
"'const",
"char",
"*",
"mfn_v",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
"=",
"get_mvar",
"(",
"argv",
"[",
"0",
"]",
")",
";",
"if",
"(",
"!",
"ptr",
")",
"ABORT_MPI",
"(",
"\"V\"",
",",
"\"No",
"such",
"variable",
"defined.\"",
")",
";",
... | mfn_v | fuzzball-muck/fuzzball | train | O1 |
327 | [
"MPI",
"function",
"that",
"set",
"the",
"contents",
"of",
"a",
"variable",
"arg0",
"to",
"arg1",
"Variable",
"must",
"be",
"defined",
"first",
"in",
"the",
"current",
"context,",
"which",
"is",
"done",
"with",
"{with}",
"or",
"with",
"certain",
"functions",... | [
"'const",
"char",
"*",
"mfn_set",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
"=",
"get_mvar",
"(",
"argv",
"[",
"0",
"]",
")",
";",
"if",
"(",
"!",
"ptr",
")",
"ABORT_MPI",
"(",
"\"SET\"",
",",
"\"No",
"such",
"variable",
"currently",
"defined.\"... | mfn_set | fuzzball-muck/fuzzball | train | O1 |
328 | [
"MPI",
"function",
"that",
"does",
"a",
"foreach",
"loop",
"This",
"operates",
"in",
"a",
"variable",
"context",
"similar",
"to",
"{with}",
"@see",
"mfn_with",
"@see",
"mfn_for",
"This",
"iterates",
"over",
"every",
"item",
"in",
"a",
"list,",
"storing",
"th... | [
"'const",
"char",
"*",
"mfn_foreach",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"scratch",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"listbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"tmp",
"[",
"BUFFER_LEN",
"]",
";",... | mfn_foreach | fuzzball-muck/fuzzball | train | O1 |
329 | [
"MPI",
"function",
"that",
"returns",
"a",
"sorted",
"version",
"of",
"arg0",
"The",
"list",
"is",
"provided",
"in",
"arg0"
] | [
"'const",
"char",
"*",
"mfn_lsort",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"litem",
"[",
"MAX_MFUN_LIST_LEN",
"]",
";",
"char",
"listbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"scratch",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"vbuf",
"[",
"BUFFER_LEN",
"]... | mfn_lsort | fuzzball-muck/fuzzball | train | O1 |
330 | [
"MPI",
"function",
"that",
"puts",
"some",
"MPI",
"on",
"the",
"timequeue",
"to",
"run",
"after",
"a",
"bit",
"arg0",
"is",
"the",
"number",
"of",
"seconds",
"to",
"wait",
"before",
"execution"
] | [
"'const",
"char",
"*",
"mfn_delay",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"argchr",
",",
"<type",
"ref=\"prev\">",
"*",
"cmdchr",
";",
"int",
"i",
"=",
"atoi",
"(",
"argv",
"[",
"0",
"]",
")",
";",
"if",
"(",
"i",
"<",
"1",
")",
"i",
"=",
"1"... | mfn_delay | fuzzball-muck/fuzzball | train | O1 |
331 | [
"MPI",
"function",
"that",
"does",
"a",
"for",
"loop",
"This",
"operates",
"in",
"a",
"variable",
"context",
"similar",
"to",
"{with}",
"@see",
"mfn_with",
"arg0",
"is",
"the",
"variable",
"name",
"to",
"use"
] | [
"'const",
"char",
"*",
"mfn_for",
"(",
"MFUNARGS",
")",
"{",
"int",
"iter_limit",
"=",
"MAX_MFUN_LIST_LEN",
";",
"char",
"scratch",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"tmp",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"*",
"ptr",
",",
"<type",
"ref=\"prev\">",
... | mfn_for | fuzzball-muck/fuzzball | train | O1 |
332 | [
"MPI",
"function",
"that",
"does",
"returns",
"a",
"text",
"description",
"of",
"the",
"object",
"arg0",
"Returns",
"\"Room\",",
"\"Player\",",
"\"Exit\",",
"\"Thing\",",
"\"Program\",",
"or",
"\"Bad\"",
"based",
"on",
"the",
"object",
"type"
] | [
"'const",
"char",
"*",
"mfn_type",
"(",
"MFUNARGS",
")",
"{",
"dbref",
"obj",
"=",
"mesg_dbref_local",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[",
"0",
"]",
",",
"mesgtyp",
")",
";",
"/*",
"*",
"TODO:",
"This",
"seems",
... | mfn_type | fuzzball-muck/fuzzball | train | O1 |
333 | [
"Get",
"an",
"item",
"from",
"an",
"MPI",
"stringbased",
"list",
"The",
"resulting",
"item",
"is",
"put",
"in",
"'buf'",
"which",
"will",
"be",
"an",
"empty",
"string",
"if",
"nothing",
"is",
"found"
] | [
"'static",
"char",
"*",
"getlitem",
"(",
"char",
"*",
"buf",
",",
"size_t",
"buflen",
",",
"char",
"*",
"list",
",",
"char",
"*",
"sep",
",",
"int",
"line",
")",
"{",
"char",
"*",
"ptr",
",",
"<type",
"ref=\"prev\">",
"*",
"ptr2",
";",
"char",
"tmp... | getlitem | fuzzball-muck/fuzzball | train | O1 |
334 | [
"MPI",
"function",
"that",
"returns",
"a",
"subset",
"of",
"list",
"arg0",
"arg0",
"is",
"a",
"string",
"containing",
"a",
"delimited",
"list"
] | [
"'const",
"char",
"*",
"mfn_sublist",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
";",
"char",
"sepbuf",
"[",
"BUFFER_LEN",
"]",
";",
"char",
"buf2",
"[",
"BUFFER_LEN",
"]",
";",
"int",
"count",
"=",
"1",
";",
"int",
"which",
";",
"int",
"end",
... | mfn_sublist | fuzzball-muck/fuzzball | train | O1 |
335 | [
"MPI",
"function",
"that",
"kills",
"a",
"process",
"on",
"the",
"timequeue",
"arg0",
"is",
"either",
"0",
"to",
"kill",
"all",
"processes",
"done",
"by",
"the",
"trigger,",
"or",
"a",
"PID",
"of",
"a",
"specific",
"process"
] | [
"'const",
"char",
"*",
"mfn_kill",
"(",
"MFUNARGS",
")",
"{",
"int",
"i",
"=",
"atoi",
"(",
"argv",
"[",
"0",
"]",
")",
";",
"if",
"(",
"i",
">",
"0",
")",
"{",
"if",
"(",
"in_timequeue",
"(",
"i",
")",
")",
"{",
"if",
"(",
"!",
"control_proc... | mfn_kill | fuzzball-muck/fuzzball | train | O1 |
336 | [
"MPI",
"function",
"that",
"returns",
"the",
"length",
"of",
"string",
"arg0",
"Just",
"a",
"thin",
"wrapper",
"around",
"strlen"
] | [
"'const",
"char",
"*",
"mfn_strlen",
"(",
"MFUNARGS",
")",
"{",
"snprintf",
"(",
"buf",
",",
"BUFFER_LEN",
",",
"\"%d\"",
",",
"(",
"int",
")",
"strlen",
"(",
"argv",
"[",
"0",
"]",
")",
")",
";",
"return",
"buf",
";",
"}'"
] | mfn_strlen | fuzzball-muck/fuzzball | train | O1 |
337 | [
"Count",
"the",
"number",
"of",
"items",
"in",
"an",
"MPI",
"\"list\"",
"(string",
"of",
"delimited",
"items)",
"@private"
] | [
"'static",
"int",
"countlitems",
"(",
"char",
"*",
"list",
",",
"char",
"*",
"sep",
")",
"{",
"char",
"*",
"ptr",
";",
"size_t",
"seplen",
";",
"int",
"count",
"=",
"1",
";",
"if",
"(",
"!",
"list",
"||",
"!",
"*",
"list",
")",
"return",
"0",
"... | countlitems | fuzzball-muck/fuzzball | train | O1 |
338 | [
"MPI",
"function",
"that",
"runs",
"code",
"with",
"no",
"blessing",
"set",
"arg0",
"will",
"be",
"run",
"\"unblessed\"",
"even",
"if",
"the",
"MPI",
"is",
"currently",
"blessed"
] | [
"'const",
"char",
"*",
"mfn_revoke",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
"=",
"mesg_parse",
"(",
"descr",
",",
"player",
",",
"what",
",",
"perms",
",",
"argv",
"[",
"0",
"]",
",",
"buf",
",",
"BUFFER_LEN",
",",
"(",
"mesgtyp",
"&",
"~",... | mfn_revoke | fuzzball-muck/fuzzball | train | O1 |
339 | [
"MPI",
"function",
"that",
"runs",
"a",
"MUF",
"arg0",
"is",
"the",
"MUF",
"to",
"run,",
"arg1",
"is",
"what",
"will",
"be",
"put",
"on",
"the",
"stack"
] | [
"'const",
"char",
"*",
"mfn_muf",
"(",
"MFUNARGS",
")",
"{",
"char",
"*",
"ptr",
";",
"struct",
"inst",
"*",
"rv",
"=",
"NULL",
";",
"struct",
"frame",
"*",
"tmpfr",
";",
"dbref",
"obj",
"=",
"mesg_dbref_raw",
"(",
"descr",
",",
"player",
",",
"what"... | mfn_muf | fuzzball-muck/fuzzball | train | O1 |
340 | [
"Combine",
"cockatrice",
"checks",
"into",
"single",
"functions",
"to",
"avoid",
"repeating",
"code"
] | [
"'int",
"instapetrify",
"(",
"const",
"char",
"*",
"str",
")",
"{",
"if",
"(",
"resists_ston",
"(",
"&",
"youmonst",
")",
")",
"return",
"0",
";",
"if",
"(",
"poly_when_stoned",
"(",
"youmonst",
".",
"data",
")",
"&&",
"polymon",
"(",
"PM_STONE_GOLEM",
... | instapetrify | FredrIQ/fiqhack | train | O2 |
341 | [
"Instapetrify",
"function",
"that",
"works",
"for",
"players",
"and",
"monsters"
] | [
"'int",
"uminstapetrify",
"(",
"struct",
"monst",
"*",
"magr",
",",
"struct",
"monst",
"*",
"mdef",
",",
"const",
"char",
"*",
"str",
")",
"{",
"if",
"(",
"mdef",
"==",
"&",
"youmonst",
")",
"return",
"instapetrify",
"(",
"str",
")",
";",
"return",
"... | uminstapetrify | FredrIQ/fiqhack | train | O2 |
342 | [
"removes",
"traps",
"that",
"shoot",
"arrows,",
"darts,",
"etc"
] | [
"'static",
"int",
"disarm_shooting_trap",
"(",
"struct",
"trap",
"*",
"ttmp",
",",
"int",
"otyp",
",",
"schar",
"dx",
",",
"schar",
"dy",
")",
"{",
"int",
"fails",
"=",
"try_disarm",
"(",
"ttmp",
",",
"FALSE",
",",
"dx",
",",
"dy",
")",
";",
"if",
... | disarm_shooting_trap | FredrIQ/fiqhack | train | O2 |
343 | [
"only",
"called",
"when",
"the",
"player",
"is",
"doing",
"something",
"to",
"the",
"chest",
"directly"
] | [
"'boolean",
"chest_trap",
"(",
"struct",
"monst",
"*",
"mon",
",",
"struct",
"obj",
"*",
"obj",
",",
"int",
"bodypart",
",",
"boolean",
"disarm",
")",
"{",
"boolean",
"you",
"=",
"(",
"mon",
"==",
"&",
"youmonst",
")",
";",
"boolean",
"vis",
"=",
"ca... | chest_trap | FredrIQ/fiqhack | train | O2 |
344 | [
"used",
"for",
"doors",
"(also",
"tins)"
] | [
"'void",
"b_trapped",
"(",
"const",
"char",
"*",
"item",
",",
"int",
"bodypart",
")",
"{",
"int",
"lvl",
"=",
"level_difficulty",
"(",
"&",
"u",
".",
"uz",
")",
";",
"int",
"dmg",
"=",
"rnd",
"(",
"5",
"+",
"(",
"lvl",
"<",
"5",
"?",
"lvl",
":"... | b_trapped | FredrIQ/fiqhack | train | O2 |
345 | [
"magr",
"is",
"the",
"monster",
"youmonst",
"that",
"made",
"this",
"happen,",
"NULL",
"for",
"a",
"trap"
] | [
"'int",
"minstapetrify",
"(",
"struct",
"monst",
"*",
"magr",
",",
"struct",
"monst",
"*",
"mdef",
")",
"{",
"if",
"(",
"resists_ston",
"(",
"mdef",
")",
")",
"return",
"0",
";",
"if",
"(",
"poly_when_stoned",
"(",
"mdef",
"->",
"data",
")",
")",
"{"... | minstapetrify | FredrIQ/fiqhack | train | O2 |
346 | [
"Probability",
"of",
"disabling",
"a",
"trap"
] | [
"'static",
"int",
"untrap_prob",
"(",
"struct",
"trap",
"*",
"ttmp",
")",
"{",
"int",
"chance",
"=",
"3",
";",
"/*",
"Only",
"spiders",
"know",
"how",
"to",
"deal",
"with",
"webs",
"reliably",
"*/",
"if",
"(",
"ttmp",
"->",
"ttyp",
"==",
"WEB",
"&&",... | untrap_prob | FredrIQ/fiqhack | train | O2 |
347 | [
"Replace",
"trap",
"with",
"object(s)"
] | [
"'void",
"cnv_trap_obj",
"(",
"struct",
"level",
"*",
"lev",
",",
"int",
"otyp",
",",
"int",
"cnt",
",",
"struct",
"trap",
"*",
"ttmp",
")",
"{",
"struct",
"obj",
"*",
"otmp",
"=",
"mksobj",
"(",
"lev",
",",
"otyp",
",",
"TRUE",
",",
"FALSE",
",",
... | cnv_trap_obj | FredrIQ/fiqhack | train | O2 |
348 | [
"some",
"actions",
"common",
"to",
"both",
"player",
"and",
"monsters",
"for",
"triggered",
"landmine"
] | [
"\"void",
"blow_up_landmine",
"(",
"struct",
"trap",
"*",
"trap",
")",
"{",
"int",
"x",
"=",
"trap",
"->",
"tx",
";",
"int",
"y",
"=",
"trap",
"->",
"ty",
";",
"scatter",
"(",
"x",
",",
"y",
",",
"4",
",",
"MAY_DESTROY",
"|",
"MAY_HIT",
"|",
"MAY... | blow_up_landmine | FredrIQ/fiqhack | train | O2 |
349 | [
"culprit",
"is",
"the",
"monster",
"youmonst",
"that",
"made",
"this",
"happen,",
"NULL",
"for",
"a",
"trap"
] | [
"'void",
"mselftouch",
"(",
"struct",
"monst",
"*",
"mon",
",",
"const",
"char",
"*",
"arg",
",",
"struct",
"monst",
"*",
"culprit",
")",
"{",
"struct",
"obj",
"*",
"mwep",
"=",
"MON_WEP",
"(",
"mon",
")",
";",
"if",
"(",
"mwep",
"&&",
"mwep",
"->"... | mselftouch | FredrIQ/fiqhack | train | O2 |
350 | [
"box:",
"null",
"for",
"floor",
"trap"
] | [
"'static",
"void",
"dofiretrap",
"(",
"struct",
"monst",
"*",
"mon",
",",
"struct",
"obj",
"*",
"box",
")",
"{",
"boolean",
"you",
"=",
"(",
"mon",
"==",
"&",
"youmonst",
")",
";",
"boolean",
"vis",
"=",
"canseemon",
"(",
"mon",
")",
";",
"struct",
... | dofiretrap | FredrIQ/fiqhack | train | O2 |
351 | [
"think",
"about",
"chronological",
"solver",
"!"
] | [
"'void",
"cloverdetratio_derivative_orig",
"(",
"const",
"int",
"no",
",",
"hamiltonian_field_t",
"*",
"const",
"hf",
")",
"{",
"monomial",
"*",
"mnl",
"=",
"&",
"monomial_list",
"[",
"no",
"]",
";",
"double",
"atime",
",",
"<type",
"ref=\"prev\"/>",
"etime",
... | cloverdetratio_derivative_orig | etmc/tmLQCD | train | O2 |
352 | [
"Copies",
"a",
"vds",
"file",
"prefix",
"property",
"when",
"it's",
"set",
"for",
"a",
"property",
"list"
] | [
"'static",
"herr_t",
"H5P__dapl_vds_file_pref_set",
"(",
"hid_t",
"H5_ATTR_UNUSED",
"prop_id",
",",
"const",
"char",
"H5_ATTR_UNUSED",
"*",
"name",
",",
"size_t",
"H5_ATTR_UNUSED",
"size",
",",
"void",
"*",
"value",
")",
"{",
"FUNC_ENTER_STATIC_NOERR",
"/*",
"Sanity... | H5P__dapl_vds_file_pref_set | tbeu/matio | train | O3 |
353 | [
"Gets",
"the",
"prefix",
"to",
"be",
"used",
"for",
"any",
"external",
"files"
] | [
"'ssize_t",
"H5Pget_efile_prefix",
"(",
"hid_t",
"plist_id",
",",
"char",
"*",
"prefix",
",",
"size_t",
"size",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"char",
"*",
"my_prefix",
";",
"/*",
"Library\\'s",
"cop... | H5Pget_efile_prefix | tbeu/matio | train | O3 |
354 | [
"Gets",
"the",
"prefix",
"to",
"be",
"applied",
"to",
"any",
"vds",
"file",
"traversals",
"made",
"using",
"this",
"property",
"list"
] | [
"'ssize_t",
"H5Pget_virtual_prefix",
"(",
"hid_t",
"plist_id",
",",
"char",
"*",
"prefix",
",",
"size_t",
"size",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"char",
"*",
"my_prefix",
";",
"/*",
"Library\\'s",
"c... | H5Pget_virtual_prefix | tbeu/matio | train | O3 |
355 | [
"Creates",
"a",
"copy",
"of",
"the",
"external",
"file",
"prefix",
"string"
] | [
"'static",
"herr_t",
"H5P__dapl_efile_pref_copy",
"(",
"const",
"char",
"H5_ATTR_UNUSED",
"*",
"name",
",",
"size_t",
"H5_ATTR_UNUSED",
"size",
",",
"void",
"*",
"value",
")",
"{",
"FUNC_ENTER_NOAPI_NOINIT_NOERR",
"HDassert",
"(",
"value",
")",
";",
"*",
"(",
"c... | H5P__dapl_efile_pref_copy | tbeu/matio | train | O3 |
356 | [
"Set",
"a",
"prefix",
"to",
"be",
"applied",
"to",
"the",
"path",
"of",
"any",
"vds",
"files",
"traversed"
] | [
"'herr_t",
"H5Pset_virtual_prefix",
"(",
"hid_t",
"plist_id",
",",
"const",
"char",
"*",
"prefix",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"herr_t",
"ret_value",
"=",
"SUCCEED",
";",
"/*",
"Return",
"value",
... | H5Pset_virtual_prefix | tbeu/matio | train | O3 |
357 | [
"Frees",
"memory",
"used",
"to",
"store",
"the",
"external",
"file",
"prefix",
"string"
] | [
"'static",
"herr_t",
"H5P__dapl_efile_pref_close",
"(",
"const",
"char",
"H5_ATTR_UNUSED",
"*",
"name",
",",
"size_t",
"H5_ATTR_UNUSED",
"size",
",",
"void",
"*",
"value",
")",
"{",
"FUNC_ENTER_NOAPI_NOINIT_NOERR",
"HDassert",
"(",
"value",
")",
";",
"H5MM_xfree",
... | H5P__dapl_efile_pref_close | tbeu/matio | train | O3 |
358 | [
"Takes",
"the",
"access",
"property",
"list",
"for",
"the",
"virtual",
"dataset,",
"dapl_id,",
"and",
"gets",
"the",
"flag,",
"view,",
"set",
"by",
"the",
"H5Pset_virtual_view",
"call"
] | [
"'herr_t",
"H5Pget_virtual_view",
"(",
"hid_t",
"plist_id",
",",
"H5D_vds_view_t",
"*",
"view",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"herr_t",
"ret_value",
"=",
"SUCCEED",
";",
"/*",
"Return",
"value",
"*/",... | H5Pget_virtual_view | tbeu/matio | train | O3 |
359 | [
"Set",
"the",
"number",
"of",
"objects",
"in",
"the",
"meta",
"data",
"cache",
"and",
"the",
"maximum",
"number",
"of",
"chunks",
"and",
"bytes",
"in",
"the",
"raw",
"data",
"chunk",
"cache"
] | [
"'herr_t",
"H5Pset_chunk_cache",
"(",
"hid_t",
"dapl_id",
",",
"size_t",
"rdcc_nslots",
",",
"size_t",
"rdcc_nbytes",
",",
"double",
"rdcc_w0",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"herr_t",
"ret_value",
"=",
... | H5Pset_chunk_cache | tbeu/matio | train | O3 |
360 | [
"Retrieves",
"the",
"maximum",
"possible",
"number",
"of",
"elements",
"in",
"the",
"meta",
"data",
"cache",
"and",
"the",
"maximum",
"possible",
"number",
"of",
"elements",
"and",
"bytes",
"and",
"the",
"RDCC_W0",
"value",
"in",
"the",
"raw",
"data",
"chunk... | [
"'herr_t",
"H5Pget_chunk_cache",
"(",
"hid_t",
"dapl_id",
",",
"size_t",
"*",
"rdcc_nslots",
",",
"size_t",
"*",
"rdcc_nbytes",
",",
"double",
"*",
"rdcc_w0",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"H5P_genpli... | H5Pget_chunk_cache | tbeu/matio | train | O3 |
361 | [
"Set",
"a",
"prefix",
"to",
"be",
"used",
"for",
"any",
"external",
"files"
] | [
"'herr_t",
"H5Pset_efile_prefix",
"(",
"hid_t",
"plist_id",
",",
"const",
"char",
"*",
"prefix",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"herr_t",
"ret_value",
"=",
"SUCCEED",
";",
"/*",
"Return",
"value",
"*... | H5Pset_efile_prefix | tbeu/matio | train | O3 |
362 | [
"Copies",
"an",
"external",
"file",
"prefix",
"property",
"when",
"it's",
"retrieved",
"from",
"a",
"property",
"list"
] | [
"'static",
"herr_t",
"H5P__dapl_efile_pref_get",
"(",
"hid_t",
"H5_ATTR_UNUSED",
"prop_id",
",",
"const",
"char",
"H5_ATTR_UNUSED",
"*",
"name",
",",
"size_t",
"H5_ATTR_UNUSED",
"size",
",",
"void",
"*",
"value",
")",
"{",
"FUNC_ENTER_STATIC_NOERR",
"/*",
"Sanity",
... | H5P__dapl_efile_pref_get | tbeu/matio | train | O3 |
363 | [
"Takes",
"the",
"access",
"property",
"list",
"for",
"the",
"virtual",
"dataset,",
"dapl_id,",
"and",
"the",
"flag,",
"view,",
"and",
"sets",
"the",
"VDS",
"view",
"according",
"to",
"the",
"flag",
"value"
] | [
"'herr_t",
"H5Pset_virtual_view",
"(",
"hid_t",
"plist_id",
",",
"H5D_vds_view_t",
"view",
")",
"{",
"H5P_genplist_t",
"*",
"plist",
";",
"/*",
"Property",
"list",
"pointer",
"*/",
"herr_t",
"ret_value",
"=",
"SUCCEED",
";",
"/*",
"return",
"value",
"*/",
"FUN... | H5Pset_virtual_view | tbeu/matio | train | O3 |
364 | [
"Creates",
"a",
"copy",
"of",
"the",
"vds",
"file",
"prefix",
"string"
] | [
"'static",
"herr_t",
"H5P__dapl_vds_file_pref_copy",
"(",
"const",
"char",
"H5_ATTR_UNUSED",
"*",
"name",
",",
"size_t",
"H5_ATTR_UNUSED",
"size",
",",
"void",
"*",
"value",
")",
"{",
"FUNC_ENTER_NOAPI_NOINIT_NOERR",
"HDassert",
"(",
"value",
")",
";",
"*",
"(",
... | H5P__dapl_vds_file_pref_copy | tbeu/matio | train | O3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.