if (*buf == '#' || *buf == CR || *buf == LF || *buf == 0)
if (*buf == '#' || *buf == nsCRT::CR || *buf == nsCRT::LF || *buf == 0)
net_pop3_load_state(const char* searchhost,                     const char* searchuser,                    nsIFileSpec *mailDirectory){  char* buf;  char* newStr;  char* host;  char* user;  char* uidl;  char* flags;  Pop3UidlHost* result = NULL;  Pop3UidlHost* current = NULL;  Pop3UidlHost* tmp;  result = PR_NEWZAP(Pop3UidlHost);  if (!result) return NULL;  result->host = PL_strdup(searchhost);  result->user = PL_strdup(searchuser);  result->hash = PL_NewHashTable(20, PL_HashString, PL_CompareStrings, PL_CompareValues, nsnull, nsnull);  if (!result->host || !result->user || !result->hash) {    PR_FREEIF(result->host);	PR_FREEIF(result->user);	if (result->hash) PL_HashTableDestroy(result->hash);	PR_Free(result);	return NULL;  }  nsFileSpec fileSpec;  mailDirectory->GetFileSpec(&fileSpec);  fileSpec += "popstate.dat";  nsInputFileStream fileStream(fileSpec);  buf = (char*)PR_CALLOC(512);  if (buf) {	while (!fileStream.eof() && !fileStream.failed() && fileStream.is_open())  {      fileStream.readline(buf, 512);      if (*buf == '#' || *buf == CR || *buf == LF || *buf == 0)          continue;	  if (buf[0] == '*') {        /* It's a host&user line. */        current = NULL;        host = nsCRT::strtok(buf + 1, " \t\r\n", &newStr);        /* XP_FileReadLine uses LF on all platforms */        user = nsCRT::strtok(newStr, " \t\r\n", &newStr);        if (host == NULL || user == NULL) continue;        for (tmp = result ; tmp ; tmp = tmp->next) {            if (PL_strcmp(host, tmp->host) == 0 &&			  PL_strcmp(user, tmp->user) == 0) {                current = tmp;                break;            }        }        if (!current) {            current = PR_NEWZAP(Pop3UidlHost);            if (current) {                current->host = PL_strdup(host);                current->user = PL_strdup(user);                current->hash = PL_NewHashTable(20, PL_HashString, PL_CompareStrings, PL_CompareValues, nsnull, nsnull);                if (!current->host || !current->user || !current->hash) {                    PR_FREEIF(current->host);                    PR_FREEIF(current->user);                    if (current->hash) PL_HashTableDestroy(current->hash);                    PR_Free(current);                } else {                    current->next = result->next;                    result->next = current;                }            }        }	  } else {        /* It's a line with a UIDL on it. */        if (current) {            flags = nsCRT::strtok(buf, " \t\r\n", &newStr);		/* XP_FileReadLine uses LF on all platforms */            uidl = nsCRT::strtok(newStr, " \t\r\n", &newStr);            if (flags && uidl) {                PR_ASSERT((flags[0] == KEEP) || (flags[0] == DELETE_CHAR) ||                          (flags[0] == TOO_BIG));                 if ((flags[0] == KEEP) || (flags[0] == DELETE_CHAR) ||                    (flags[0] == TOO_BIG)) {                     put_hash(current, current->hash, uidl, flags[0]);                }            }        }	  }	}	PR_Free(buf);  }  if (fileStream.is_open())   fileStream.close();  return result;}