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

Function wordcount

src/end.c:1792–1806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1790}
1791
1792staticfn int
1793wordcount(char *p)
1794{
1795 int words = 0;
1796
1797 while (*p) {
1798 while (*p && isspace((uchar) *p))
1799 p++;
1800 if (*p)
1801 words++;
1802 while (*p && !isspace((uchar) *p))
1803 p++;
1804 }
1805 return words;
1806}
1807
1808staticfn void
1809bel_copy1(char **inp, char *out)

Callers 1

build_english_listFunction · 0.85

Calls 1

isspaceFunction · 0.85

Tested by

no test coverage detected