+// Returns FALSE if *p points to the end of a token, TRUE otherwise.
+// Also modifies *p **IF** the first and second characters are both
+// quotes ('"'); it deletes one of them.
+static BOOLEAN KeepReading(IN OUT CHAR16 *p, IN OUT BOOLEAN *IsQuoted) {
+ BOOLEAN MoreToRead = FALSE;
+ CHAR16 *Temp = NULL;
+// while (*p && *p != '"' && ((*p != ' ' && *p != '\t' && *p != '=' && *p != '#' && *p != ',') || IsQuoted)) {
+
+ if ((p == NULL) || (IsQuoted == NULL))
+ return FALSE;
+
+ if (*p == L'\0')
+ return FALSE;
+
+ if ((*p != ' ' && *p != '\t' && *p != '=' && *p != '#' && *p != ',') || *IsQuoted) {
+ MoreToRead = TRUE;
+ }
+ if (*p == L'"') {
+ if (p[1] == L'"') {
+ Temp = StrDuplicate(&p[1]);
+ if (Temp != NULL) {
+ StrCpy(p, Temp);
+ FreePool(Temp);
+ }
+ MoreToRead = TRUE;
+ } else {
+ *IsQuoted = !(*IsQuoted);
+ MoreToRead = FALSE;
+ } // if/else second character is a quote
+ } // if first character is a quote
+
+ return MoreToRead;
+} // BOOLEAN KeepReading()
+