c = READCHAR;
}
- if (c >= 0)
- UNREAD (c);
+ UNREAD (c);
*p = '\0';
}
nskip *= 10;
nskip += c - '0';
}
- if (c >= 0)
- UNREAD (c);
+ UNREAD (c);
if (load_force_doc_strings
&& (EQ (readcharfun, Qget_file_char)
if (!(c > 040
&& c != 0x8a0
&& (c >= 0200
- || !(strchr ("\"';()[]#`,", c)))))
+ || strchr ("\"';()[]#`,", c) == NULL)))
{
/* No symbol character follows, this is the empty
symbol. */
- if (c >= 0)
- UNREAD (c);
+ UNREAD (c);
return Fmake_symbol (build_string (""));
}
goto read_symbol;
next_char = READCHAR;
ok = (next_char <= 040
|| (next_char < 0200
- && (strchr ("\"';()[]#?`,.", next_char))));
+ && strchr ("\"';()[]#?`,.", next_char) != NULL));
UNREAD (next_char);
if (ok)
return make_number (c);
/* Otherwise, READ_BUFFER contains only ASCII. */
}
- /* We want readchar_count to be the number of characters, not
- bytes. Hence we adjust for multibyte characters in the
- string. ... But it doesn't seem to be necessary, because
- READCHAR *does* read multibyte characters from buffers. */
- /* readchar_count -= (p - read_buffer) - nchars; */
if (read_pure)
return make_pure_string (read_buffer, nchars, p - read_buffer,
(force_multibyte
if (next_char <= 040
|| (next_char < 0200
- && (strchr ("\"';([#?`,", next_char))))
+ && strchr ("\"';([#?`,", next_char) != NULL))
{
*pch = c;
return Qnil;
{
char *p = read_buffer;
int quoted = 0;
+ int start_position = readchar_count - 1;
{
char *end = read_buffer + read_buffer_size;
else
*p++ = c;
c = READCHAR;
- } while (c > 040
- && c != 0x8a0 /* NBSP */
- && (c >= 0200
- || !(strchr ("\"';()[]#`,", c))));
+ }
+ while (c > 040
+ && c != 0x8a0 /* NBSP */
+ && (c >= 0200
+ || strchr ("\"';()[]#`,", c) == NULL));
if (p == end)
{
end = read_buffer + read_buffer_size;
}
*p = 0;
- if (c >= 0)
- UNREAD (c);
+ UNREAD (c);
}
if (!quoted && !uninterned_symbol)
if (EQ (Vread_with_symbol_positions, Qt)
|| EQ (Vread_with_symbol_positions, readcharfun))
Vread_symbol_positions_list =
- /* Kind of a hack; this will probably fail if characters
- in the symbol name were escaped. Not really a big
- deal, though. */
- Fcons (Fcons (result,
- make_number (readchar_count
- - XFASTINT (Flength (Fsymbol_name (result))))),
+ Fcons (Fcons (result, make_number (start_position)),
Vread_symbol_positions_list);
return result;
}