/* -------------------------------------------------------------- */
/* (B) For working with the length (in bytes and characters) of a */
-/* section of internally-formatted text */
+/* section of internally-formatted text */
/* -------------------------------------------------------------- */
static inline const Bufbyte*
ASSERT_VALID_BYTIND_BACKWARD_UNSAFE(buf, bi):
If error-checking is enabled, assert that the given byte index
is within range and satisfies ASSERT_VALID_BYTIND() and also
- does not refer to the beginning of the buffer. (i.e. movement
+ does not refer to the beginning of the buffer. (i.e. movement
backwards is OK.) Otherwise, do nothing.
ASSERT_VALID_BYTIND_FORWARD_UNSAFE(buf, bi):
If error-checking is enabled, assert that the given byte index
is within range and satisfies ASSERT_VALID_BYTIND() and also
- does not refer to the end of the buffer. (i.e. movement
+ does not refer to the end of the buffer. (i.e. movement
forwards is OK.) Otherwise, do nothing.
VALIDATE_BYTIND_BACKWARD(buf, bi):
Typical use is
TO_EXTERNAL_FORMAT (DATA, (ptr, len),
- LISP_BUFFER, buffer,
+ LISP_BUFFER, buffer,
Qfile_name);
The source or sink can be specified in one of these ways:
} while (0)
#define DFC_SOURCE_C_STRING_TO_ARGS(val) \
do { \
- dfc_source.data.ptr = (val); \
+ dfc_source.data.ptr = (val); \
assert(dfc_source.data.ptr != NULL); \
dfc_source.data.len = strlen((const char*) \
(dfc_source.data.ptr)); \
dfc_sink.data.len); \
assert(!NILP(sink)); \
} while (0)
-
+
#define DFC_LISP_LSTREAM_USE_CONVERTED_DATA(sink) /* data already used */
#define DFC_LISP_BUFFER_USE_CONVERTED_DATA(sink) \
Lstream_delete (XLSTREAM (dfc_sink.lisp_object))
contiguous in memory. Note that the character *at* N may not be
contiguous in memory. */
#define BI_BUF_FLOOR_OF(b, n) \
- (BI_BUF_BEGV (b) < (b)->text->gpt && (b)->text->gpt < (n) ? \
+ (BI_BUF_BEGV (b) < (b)->text->gpt && (b)->text->gpt < (n) ? \
(b)->text->gpt : BI_BUF_BEGV (b))
#define BUF_FLOOR_OF(b, n) \
bytind_to_bufpos (b, BI_BUF_FLOOR_OF (b, bufpos_to_bytind (b, n)))
#define BI_BUF_CEILING_OF_IGNORE_ACCESSIBLE(b, n) \
((n) < (b)->text->gpt && (b)->text->gpt < BI_BUF_Z (b) ? \
(b)->text->gpt : BI_BUF_Z (b))
-#define BUF_CEILING_OF_IGNORE_ACCESSIBLE(b, n) \
+#define BUF_CEILING_OF_IGNORE_ACCESSIBLE(b, n) \
bytind_to_bufpos \
(b, BI_BUF_CEILING_OF_IGNORE_ACCESSIBLE (b, bufpos_to_bytind (b, n)))
#define BI_BUF_FLOOR_OF_IGNORE_ACCESSIBLE(b, n) \
- (BI_BUF_BEG (b) < (b)->text->gpt && (b)->text->gpt < (n) ? \
+ (BI_BUF_BEG (b) < (b)->text->gpt && (b)->text->gpt < (n) ? \
(b)->text->gpt : BI_BUF_BEG (b))
-#define BUF_FLOOR_OF_IGNORE_ACCESSIBLE(b, n) \
+#define BUF_FLOOR_OF_IGNORE_ACCESSIBLE(b, n) \
bytind_to_bufpos \
(b, BI_BUF_FLOOR_OF_IGNORE_ACCESSIBLE (b, bufpos_to_bytind (b, n)))