// if (!strlen(helpfile))
if (helpfile[0] == '\0')
return FALSE;
is...() expect unsignedunsigned char values (or EOF)
isspace(buf[len-1]) is UB when buf[len-1] < 0. Better as ((unsigned char *buf*)buf)[len-1] or the like.
Rather than only test for 0, test if not all read. Unclear the roll of ch herein the send_to_char().
size_t nread = fread(buf, 1, flen, fhelp);
...
//if (!nread) {
// send_to_char("Unable to read helpfiles list.\r\n", ch);
if (nread != flen) {
send_to_char("Unable to read entire helpfiles list.\r\n", ch);
Maybe add file name and length read to message?
Maybe add file name and length read to message?
Unneeded code
if (len > 0 && buf[len-1] == '\n') buf[--len] = '\0'; not needed when followed by while (len > 0 && isspace(buf[len-1])) buf[--len] = '\0';