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

Function discovered_cmp

src/o_init.c:552–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

550
551/* discoveries qsort comparison function */
552staticfn int QSORTCALLBACK
553discovered_cmp(const genericptr v1, const genericptr v2)
554{
555 const char *s1 = *(const char **) v1;
556 const char *s2 = *(const char **) v2;
557 /* each element starts with "* " or " " but we don't sort by those */
558 int res = strcmpi(s1 + 2, s2 + 2);
559
560 if (res == 0) {
561 ; /* no tie-breaker needed */
562 }
563 return res;
564}
565
566staticfn char *
567sortloot_descr(int otyp, char *outbuf)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected