mirror of
https://github.com/uffejakobsen/acme.git
synced 2025-02-19 09:31:42 +00:00
added comments for next change
git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@173 4df02467-bbd4-4a76-a152-e7ce94205b78
This commit is contained in:
parent
c64ffcfced
commit
2fbbc0324e
@ -379,6 +379,8 @@ static void parse_quoted_character(char closing_quote)
|
|||||||
{
|
{
|
||||||
intval_t value;
|
intval_t value;
|
||||||
|
|
||||||
|
// FIXME - this will fail with backslash escaping!
|
||||||
|
|
||||||
// read character to parse - make sure not at end of statement
|
// read character to parse - make sure not at end of statement
|
||||||
if (GetQuotedByte() == CHAR_EOS)
|
if (GetQuotedByte() == CHAR_EOS)
|
||||||
return;
|
return;
|
||||||
|
@ -256,7 +256,7 @@ char GetByte(void)
|
|||||||
// necessary, because in RAM the source already has
|
// necessary, because in RAM the source already has
|
||||||
// high-level format
|
// high-level format
|
||||||
// Otherwise, the source is a file. This means we will call
|
// Otherwise, the source is a file. This means we will call
|
||||||
// GetFormatted() which will do a shit load of conversions.
|
// get_processed_from_file() which will do a shit load of conversions.
|
||||||
switch (Input_now->source) {
|
switch (Input_now->source) {
|
||||||
case INPUTSRC_RAM:
|
case INPUTSRC_RAM:
|
||||||
GotByte = *(Input_now->src.ram_ptr++);
|
GotByte = *(Input_now->src.ram_ptr++);
|
||||||
@ -379,7 +379,8 @@ char *Input_skip_or_store_block(boolean store)
|
|||||||
// if wanted, store
|
// if wanted, store
|
||||||
if (store)
|
if (store)
|
||||||
DYNABUF_APPEND(GlobalDynaBuf, GotByte);
|
DYNABUF_APPEND(GlobalDynaBuf, GotByte);
|
||||||
} while ((GotByte != CHAR_EOS) && (GotByte != byte));
|
// it's not enough to check the previous char for backslash, because it might be an escaped backslash...
|
||||||
|
} while ((GotByte != CHAR_EOS) && (GotByte != byte)); // FIXME - this would fail with backslash escaping!
|
||||||
break;
|
break;
|
||||||
case CHAR_SOB:
|
case CHAR_SOB:
|
||||||
++depth;
|
++depth;
|
||||||
@ -418,7 +419,7 @@ void Input_until_terminator(char terminator)
|
|||||||
// Okay, read quoted stuff.
|
// Okay, read quoted stuff.
|
||||||
GetQuotedByte(); // throws error on EOS
|
GetQuotedByte(); // throws error on EOS
|
||||||
DYNABUF_APPEND(GlobalDynaBuf, GotByte);
|
DYNABUF_APPEND(GlobalDynaBuf, GotByte);
|
||||||
} while ((GotByte != CHAR_EOS) && (GotByte != byte));
|
} while ((GotByte != CHAR_EOS) && (GotByte != byte)); // FIXME - this would fail with backslash escaping!
|
||||||
// on error, exit now, before calling GetByte()
|
// on error, exit now, before calling GetByte()
|
||||||
if (GotByte != byte)
|
if (GotByte != byte)
|
||||||
return;
|
return;
|
||||||
@ -550,6 +551,7 @@ int Input_read_filename(boolean allow_library, boolean *uses_lib)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME - this will fail with backslash escaping!
|
||||||
// read characters until closing quote (or EOS) is reached
|
// read characters until closing quote (or EOS) is reached
|
||||||
// append platform-converted characters to current string
|
// append platform-converted characters to current string
|
||||||
while ((GotByte != CHAR_EOS) && (GotByte != end_quote)) {
|
while ((GotByte != CHAR_EOS) && (GotByte != end_quote)) {
|
||||||
@ -579,6 +581,7 @@ int Input_accept_comma(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read optional info about parameter length
|
// read optional info about parameter length
|
||||||
|
// FIXME - move to different file!
|
||||||
int Input_get_force_bit(void)
|
int Input_get_force_bit(void)
|
||||||
{
|
{
|
||||||
char byte;
|
char byte;
|
||||||
|
@ -374,6 +374,7 @@ static enum eos encode_string(const struct encoder *inner_encoder, char xor)
|
|||||||
if (GotByte == '"') {
|
if (GotByte == '"') {
|
||||||
// read initial character
|
// read initial character
|
||||||
GetQuotedByte();
|
GetQuotedByte();
|
||||||
|
// FIXME - this will fail with backslash escaping!
|
||||||
// send characters until closing quote is reached
|
// send characters until closing quote is reached
|
||||||
while (GotByte && (GotByte != '"')) {
|
while (GotByte && (GotByte != '"')) {
|
||||||
output_8(xor ^ encoding_encode_char(GotByte));
|
output_8(xor ^ encoding_encode_char(GotByte));
|
||||||
@ -1201,6 +1202,7 @@ static enum eos throw_string(const char prefix[], void (*fn)(const char *))
|
|||||||
if (GotByte == '"') {
|
if (GotByte == '"') {
|
||||||
// parse string
|
// parse string
|
||||||
GetQuotedByte(); // read initial character
|
GetQuotedByte(); // read initial character
|
||||||
|
// FIXME - this will fail with backslash escaping!
|
||||||
// send characters until closing quote is reached
|
// send characters until closing quote is reached
|
||||||
while (GotByte && (GotByte != '"')) {
|
while (GotByte && (GotByte != '"')) {
|
||||||
DYNABUF_APPEND(user_message, GotByte);
|
DYNABUF_APPEND(user_message, GotByte);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user