1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Be more systematic about parens in C source code

Be more systematic about putting space before paren in calls,
and in avoiding unnecessary parentheses in macros.
This was partly inspired by my wading through gcc -E output
while debugging something else, and seeing too many parens.

This patch does not change the generated .o files on my platform.
This commit is contained in:
Paul Eggert 2024-01-20 16:52:31 -08:00
parent 0a47a5a4be
commit b6ed79b71c
46 changed files with 308 additions and 308 deletions

View File

@ -445,7 +445,7 @@ loaded by the special invocation:
where ``static'' defines a section of code which will be run upon the
object (containing class) being loaded. This is like:
__attribute__((constructor))
__attribute__ ((constructor))
on systems where shared object constructors are supported.

View File

@ -3825,7 +3825,7 @@ C_entries (int c_ext, /* extension of C */
{
case fstartlist:
/* This prevents tagging fb in
void (__attribute__((noreturn)) *fb) (void);
void (__attribute__ ((noreturn)) *fb) (void);
Fixing this is not easy and not very important. */
fvdef = finlist;
continue;
@ -4380,14 +4380,14 @@ Yacc_entries (FILE *inf)
#define LOOKING_AT(cp, kw) /* kw is the keyword, a literal string */ \
((assert ("" kw), true) /* syntax error if not a literal string */ \
&& strneq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \
&& strneq (cp, kw, sizeof (kw) - 1) /* cp points at kw */ \
&& notinname ((cp)[sizeof (kw)-1]) /* end of kw */ \
&& ((cp) = skip_spaces ((cp) + sizeof (kw) - 1), true)) /* skip spaces */
/* Similar to LOOKING_AT but does not use notinname, does not skip */
#define LOOKING_AT_NOCASE(cp, kw) /* the keyword is a literal string */ \
((assert ("" kw), true) /* syntax error if not a literal string */ \
&& strncaseeq ((cp), kw, sizeof (kw)-1) /* cp points at kw */ \
&& strncaseeq (cp, kw, sizeof (kw) - 1) /* cp points at kw */ \
&& ((cp) += sizeof (kw) - 1, true)) /* skip spaces */
/*

View File

@ -114,7 +114,7 @@ set_attribute (enum scmp_filter_attr attr, uint32_t value)
{ \
const struct scmp_arg_cmp arg_array[] = {__VA_ARGS__}; \
enum { arg_cnt = sizeof arg_array / sizeof *arg_array }; \
int status = seccomp_rule_add_array (ctx, (action), (syscall), \
int status = seccomp_rule_add_array (ctx, action, syscall, \
arg_cnt, arg_array); \
if (status < 0) \
fail (-status, "seccomp_rule_add_array (%s, %s, %d, {%s})", \
@ -143,7 +143,7 @@ export_filter (const char *file,
}
#define EXPORT_FILTER(file, function) \
export_filter ((file), (function), #function)
export_filter (file, function, #function)
int
main (int argc, char **argv)

View File

@ -1466,9 +1466,9 @@ static INTERVAL interval_free_list;
__asan_unpoison_memory_region ((b)->intervals, \
sizeof ((b)->intervals))
# define ASAN_POISON_INTERVAL(i) \
__asan_poison_memory_region ((i), sizeof (*(i)))
__asan_poison_memory_region (i, sizeof *(i))
# define ASAN_UNPOISON_INTERVAL(i) \
__asan_unpoison_memory_region ((i), sizeof (*(i)))
__asan_unpoison_memory_region (i, sizeof *(i))
#else
# define ASAN_POISON_INTERVAL_BLOCK(b) ((void) 0)
# define ASAN_UNPOISON_INTERVAL_BLOCK(b) ((void) 0)
@ -1752,25 +1752,25 @@ init_strings (void)
*/
# define ASAN_PREPARE_DEAD_SDATA(s, size) \
do { \
__asan_poison_memory_region ((s), sdata_size ((size))); \
__asan_unpoison_memory_region (&(((s))->string), \
__asan_poison_memory_region (s, sdata_size (size)); \
__asan_unpoison_memory_region (&(s)->string, \
sizeof (struct Lisp_String *)); \
__asan_unpoison_memory_region (&SDATA_NBYTES ((s)), \
sizeof (SDATA_NBYTES ((s)))); \
__asan_unpoison_memory_region (&SDATA_NBYTES (s), \
sizeof SDATA_NBYTES (s)); \
} while (false)
/* Prepare s for storing string data for NBYTES bytes. */
# define ASAN_PREPARE_LIVE_SDATA(s, nbytes) \
__asan_unpoison_memory_region ((s), sdata_size ((nbytes)))
__asan_unpoison_memory_region (s, sdata_size (nbytes))
# define ASAN_POISON_SBLOCK_DATA(b, size) \
__asan_poison_memory_region ((b)->data, (size))
__asan_poison_memory_region ((b)->data, size)
# define ASAN_POISON_STRING_BLOCK(b) \
__asan_poison_memory_region ((b)->strings, STRING_BLOCK_SIZE)
# define ASAN_UNPOISON_STRING_BLOCK(b) \
__asan_unpoison_memory_region ((b)->strings, STRING_BLOCK_SIZE)
# define ASAN_POISON_STRING(s) \
__asan_poison_memory_region ((s), sizeof (*(s)))
__asan_poison_memory_region (s, sizeof *(s))
# define ASAN_UNPOISON_STRING(s) \
__asan_unpoison_memory_region ((s), sizeof (*(s)))
__asan_unpoison_memory_region (s, sizeof *(s))
#else
# define ASAN_PREPARE_DEAD_SDATA(s, size) ((void) 0)
# define ASAN_PREPARE_LIVE_SDATA(s, nbytes) ((void) 0)
@ -2691,13 +2691,13 @@ struct float_block
};
#define XFLOAT_MARKED_P(fptr) \
GETMARKBIT (FLOAT_BLOCK (fptr), FLOAT_INDEX ((fptr)))
GETMARKBIT (FLOAT_BLOCK (fptr), FLOAT_INDEX (fptr))
#define XFLOAT_MARK(fptr) \
SETMARKBIT (FLOAT_BLOCK (fptr), FLOAT_INDEX ((fptr)))
SETMARKBIT (FLOAT_BLOCK (fptr), FLOAT_INDEX (fptr))
#define XFLOAT_UNMARK(fptr) \
UNSETMARKBIT (FLOAT_BLOCK (fptr), FLOAT_INDEX ((fptr)))
UNSETMARKBIT (FLOAT_BLOCK (fptr), FLOAT_INDEX (fptr))
#if GC_ASAN_POISON_OBJECTS
# define ASAN_POISON_FLOAT_BLOCK(fblk) \
@ -2707,9 +2707,9 @@ struct float_block
__asan_unpoison_memory_region ((fblk)->floats, \
sizeof ((fblk)->floats))
# define ASAN_POISON_FLOAT(p) \
__asan_poison_memory_region ((p), sizeof (struct Lisp_Float))
__asan_poison_memory_region (p, sizeof (struct Lisp_Float))
# define ASAN_UNPOISON_FLOAT(p) \
__asan_unpoison_memory_region ((p), sizeof (struct Lisp_Float))
__asan_unpoison_memory_region (p, sizeof (struct Lisp_Float))
#else
# define ASAN_POISON_FLOAT_BLOCK(fblk) ((void) 0)
# define ASAN_UNPOISON_FLOAT_BLOCK(fblk) ((void) 0)
@ -2803,13 +2803,13 @@ struct cons_block
};
#define XCONS_MARKED_P(fptr) \
GETMARKBIT (CONS_BLOCK (fptr), CONS_INDEX ((fptr)))
GETMARKBIT (CONS_BLOCK (fptr), CONS_INDEX (fptr))
#define XMARK_CONS(fptr) \
SETMARKBIT (CONS_BLOCK (fptr), CONS_INDEX ((fptr)))
SETMARKBIT (CONS_BLOCK (fptr), CONS_INDEX (fptr))
#define XUNMARK_CONS(fptr) \
UNSETMARKBIT (CONS_BLOCK (fptr), CONS_INDEX ((fptr)))
UNSETMARKBIT (CONS_BLOCK (fptr), CONS_INDEX (fptr))
/* Minimum number of bytes of consing since GC before next GC,
when memory is full. */
@ -2832,9 +2832,9 @@ static struct Lisp_Cons *cons_free_list;
# define ASAN_POISON_CONS_BLOCK(b) \
__asan_poison_memory_region ((b)->conses, sizeof ((b)->conses))
# define ASAN_POISON_CONS(p) \
__asan_poison_memory_region ((p), sizeof (struct Lisp_Cons))
__asan_poison_memory_region (p, sizeof (struct Lisp_Cons))
# define ASAN_UNPOISON_CONS(p) \
__asan_unpoison_memory_region ((p), sizeof (struct Lisp_Cons))
__asan_unpoison_memory_region (p, sizeof (struct Lisp_Cons))
#else
# define ASAN_POISON_CONS_BLOCK(b) ((void) 0)
# define ASAN_POISON_CONS(p) ((void) 0)
@ -3152,11 +3152,11 @@ Lisp_Object zero_vector;
#if GC_ASAN_POISON_OBJECTS
# define ASAN_POISON_VECTOR_CONTENTS(v, bytes) \
__asan_poison_memory_region ((v)->contents, (bytes))
__asan_poison_memory_region ((v)->contents, bytes)
# define ASAN_UNPOISON_VECTOR_CONTENTS(v, bytes) \
__asan_unpoison_memory_region ((v)->contents, (bytes))
__asan_unpoison_memory_region ((v)->contents, bytes)
# define ASAN_UNPOISON_VECTOR_BLOCK(b) \
__asan_unpoison_memory_region ((b)->data, sizeof ((b)->data))
__asan_unpoison_memory_region ((b)->data, sizeof (b)->data)
#else
# define ASAN_POISON_VECTOR_CONTENTS(v, bytes) ((void) 0)
# define ASAN_UNPOISON_VECTOR_CONTENTS(v, bytes) ((void) 0)
@ -3886,9 +3886,9 @@ struct symbol_block
# define ASAN_UNPOISON_SYMBOL_BLOCK(s) \
__asan_unpoison_memory_region ((s)->symbols, sizeof ((s)->symbols))
# define ASAN_POISON_SYMBOL(sym) \
__asan_poison_memory_region ((sym), sizeof (*(sym)))
__asan_poison_memory_region (sym, sizeof *(sym))
# define ASAN_UNPOISON_SYMBOL(sym) \
__asan_unpoison_memory_region ((sym), sizeof (*(sym)))
__asan_unpoison_memory_region (sym, sizeof *(sym))
#else
# define ASAN_POISON_SYMBOL_BLOCK(s) ((void) 0)

View File

@ -6008,7 +6008,7 @@ android_build_jstring (const char *text)
is created. */
#if __GNUC__ >= 3
#define likely(cond) __builtin_expect ((cond), 1)
#define likely(cond) __builtin_expect (cond, 1)
#else /* __GNUC__ < 3 */
#define likely(cond) (cond)
#endif /* __GNUC__ >= 3 */

View File

@ -309,7 +309,7 @@ extern struct timespec emacs_installation_time;
#define ANDROID_DELETE_LOCAL_REF(ref) \
((*android_java_env)->DeleteLocalRef (android_java_env, \
(ref)))
ref))
#define NATIVE_NAME(name) Java_org_gnu_emacs_EmacsNative_##name

View File

@ -298,8 +298,8 @@ enum
code after any drawing command, but code can be run whenever
someone asks for the handle necessary to draw. */
#define FRAME_ANDROID_DRAWABLE(f) \
(((f))->output_data.android->need_buffer_flip = true, \
FRAME_ANDROID_WINDOW ((f)))
((f)->output_data.android->need_buffer_flip = true, \
FRAME_ANDROID_WINDOW (f))
/* Return whether or not the frame F has been completely drawn. Used
while handling async input. */

View File

@ -216,7 +216,7 @@ extern ptrdiff_t advance_to_char_boundary (ptrdiff_t byte_pos);
/* Return the byte at byte position N.
Do not check that the position is in range. */
#define FETCH_BYTE(n) *(BYTE_POS_ADDR ((n)))
#define FETCH_BYTE(n) (*BYTE_POS_ADDR (n))
/* Define the actual buffer data structures. */

View File

@ -51,7 +51,7 @@ static Lisp_Object Vccl_program_table;
/* Return a hash table of id number ID. */
#define GET_HASH_TABLE(id) \
(XHASH_TABLE (XCDR (AREF (Vtranslation_hash_table_vector, (id)))))
XHASH_TABLE (XCDR (AREF (Vtranslation_hash_table_vector, id)))
/* CCL (Code Conversion Language) is a simple language which has
operations on one input buffer, one output buffer, and 7 registers.
@ -627,7 +627,7 @@ do \
{ \
struct ccl_program called_ccl; \
if (stack_idx >= 256 \
|| ! setup_ccl_program (&called_ccl, (symbol))) \
|| ! setup_ccl_program (&called_ccl, symbol)) \
{ \
if (stack_idx > 0) \
{ \
@ -818,7 +818,7 @@ while (0)
#define CCL_DECODE_CHAR(id, code) \
((id) == 0 ? (code) \
: (charset = CHARSET_FROM_ID ((id)), DECODE_CHAR (charset, (code))))
: (charset = CHARSET_FROM_ID (id), DECODE_CHAR (charset, code)))
/* Encode character C by some of charsets in CHARSET_LIST. Set ID to
the id of the used charset, ENCODED to the result of encoding.
@ -828,9 +828,9 @@ while (0)
do { \
unsigned ncode; \
\
charset = char_charset ((c), (charset_list), &ncode); \
charset = char_charset (c, charset_list, &ncode); \
if (! charset && ! NILP (charset_list)) \
charset = char_charset ((c), Qnil, &ncode); \
charset = char_charset (c, Qnil, &ncode); \
if (charset) \
{ \
(id) = CHARSET_ID (charset); \

View File

@ -82,7 +82,7 @@ extern void ccl_driver (struct ccl_program *, int *, int *, int, int,
#define CHECK_CCL_PROGRAM(x) \
do { \
if (NILP (Fccl_program_p (x))) \
wrong_type_argument (Qcclp, (x)); \
wrong_type_argument (Qcclp, x); \
} while (false);
#endif /* EMACS_CCL_H */

View File

@ -1790,7 +1790,7 @@ encode_char (struct charset *charset, int c)
return CHARSET_INVALID_CODE (charset);
}
if (! CHARSET_FAST_MAP_REF ((c), charset->fast_map)
if (! CHARSET_FAST_MAP_REF (c, charset->fast_map)
|| c < CHARSET_MIN_CHAR (charset) || c > CHARSET_MAX_CHAR (charset))
return CHARSET_INVALID_CODE (charset);

View File

@ -267,18 +267,18 @@ extern int emacs_mule_charset[256];
/* Return the attribute vector of charset whose symbol is SYMBOL. */
#define CHARSET_SYMBOL_ATTRIBUTES(symbol) \
Fgethash ((symbol), Vcharset_hash_table, Qnil)
Fgethash (symbol, Vcharset_hash_table, Qnil)
#define CHARSET_ATTR_ID(attrs) AREF ((attrs), charset_id)
#define CHARSET_ATTR_NAME(attrs) AREF ((attrs), charset_name)
#define CHARSET_ATTR_PLIST(attrs) AREF ((attrs), charset_plist)
#define CHARSET_ATTR_MAP(attrs) AREF ((attrs), charset_map)
#define CHARSET_ATTR_DECODER(attrs) AREF ((attrs), charset_decoder)
#define CHARSET_ATTR_ENCODER(attrs) AREF ((attrs), charset_encoder)
#define CHARSET_ATTR_SUBSET(attrs) AREF ((attrs), charset_subset)
#define CHARSET_ATTR_SUPERSET(attrs) AREF ((attrs), charset_superset)
#define CHARSET_ATTR_UNIFY_MAP(attrs) AREF ((attrs), charset_unify_map)
#define CHARSET_ATTR_DEUNIFIER(attrs) AREF ((attrs), charset_deunifier)
#define CHARSET_ATTR_ID(attrs) AREF (attrs, charset_id)
#define CHARSET_ATTR_NAME(attrs) AREF (attrs, charset_name)
#define CHARSET_ATTR_PLIST(attrs) AREF (attrs, charset_plist)
#define CHARSET_ATTR_MAP(attrs) AREF (attrs, charset_map)
#define CHARSET_ATTR_DECODER(attrs) AREF (attrs, charset_decoder)
#define CHARSET_ATTR_ENCODER(attrs) AREF (attrs, charset_encoder)
#define CHARSET_ATTR_SUBSET(attrs) AREF (attrs, charset_subset)
#define CHARSET_ATTR_SUPERSET(attrs) AREF (attrs, charset_superset)
#define CHARSET_ATTR_UNIFY_MAP(attrs) AREF (attrs, charset_unify_map)
#define CHARSET_ATTR_DEUNIFIER(attrs) AREF (attrs, charset_deunifier)
#define CHARSET_SYMBOL_ID(symbol) \
CHARSET_ATTR_ID (CHARSET_SYMBOL_ATTRIBUTES (symbol))
@ -290,7 +290,7 @@ extern int emacs_mule_charset[256];
/* Return the attribute vector of CHARSET. */
#define CHARSET_ATTRIBUTES(charset) \
(HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), (charset)->hash_index))
HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), (charset)->hash_index)
#define CHARSET_ID(charset) ((charset)->id)
#define CHARSET_HASH_INDEX(charset) ((charset)->hash_index)
@ -314,21 +314,21 @@ extern int emacs_mule_charset[256];
#define CHARSET_UNIFIED_P(charset) ((charset)->unified_p)
#define CHARSET_NAME(charset) \
(CHARSET_ATTR_NAME (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_NAME (CHARSET_ATTRIBUTES (charset))
#define CHARSET_MAP(charset) \
(CHARSET_ATTR_MAP (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_MAP (CHARSET_ATTRIBUTES (charset))
#define CHARSET_DECODER(charset) \
(CHARSET_ATTR_DECODER (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_DECODER (CHARSET_ATTRIBUTES (charset))
#define CHARSET_ENCODER(charset) \
(CHARSET_ATTR_ENCODER (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_ENCODER (CHARSET_ATTRIBUTES (charset))
#define CHARSET_SUBSET(charset) \
(CHARSET_ATTR_SUBSET (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_SUBSET (CHARSET_ATTRIBUTES (charset))
#define CHARSET_SUPERSET(charset) \
(CHARSET_ATTR_SUPERSET (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_SUPERSET (CHARSET_ATTRIBUTES (charset))
#define CHARSET_UNIFY_MAP(charset) \
(CHARSET_ATTR_UNIFY_MAP (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_UNIFY_MAP (CHARSET_ATTRIBUTES (charset))
#define CHARSET_DEUNIFIER(charset) \
(CHARSET_ATTR_DEUNIFIER (CHARSET_ATTRIBUTES (charset)))
CHARSET_ATTR_DEUNIFIER (CHARSET_ATTRIBUTES (charset))
INLINE void
set_charset_attr (struct charset *charset, enum charset_attr_index idx,
@ -345,7 +345,7 @@ set_charset_attr (struct charset *charset, enum charset_attr_index idx,
#define CHECK_CHARSET(x) \
do { \
if (! SYMBOLP (x) || CHARSET_SYMBOL_HASH_INDEX (x) < 0) \
wrong_type_argument (Qcharsetp, (x)); \
wrong_type_argument (Qcharsetp, x); \
} while (false)
@ -356,7 +356,7 @@ set_charset_attr (struct charset *charset, enum charset_attr_index idx,
ptrdiff_t idx; \
\
if (! SYMBOLP (x) || (idx = CHARSET_SYMBOL_HASH_INDEX (x)) < 0) \
wrong_type_argument (Qcharsetp, (x)); \
wrong_type_argument (Qcharsetp, x); \
id = XFIXNUM (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \
charset_id)); \
} while (false)
@ -367,7 +367,7 @@ set_charset_attr (struct charset *charset, enum charset_attr_index idx,
#define CHECK_CHARSET_GET_ATTR(x, attr) \
do { \
if (!SYMBOLP (x) || NILP (attr = CHARSET_SYMBOL_ATTRIBUTES (x))) \
wrong_type_argument (Qcharsetp, (x)); \
wrong_type_argument (Qcharsetp, x); \
} while (false)
@ -383,7 +383,7 @@ set_charset_attr (struct charset *charset, enum charset_attr_index idx,
contains the character C. */
#define CHAR_CHARSET(c) \
((c) < 0x80 ? CHARSET_FROM_ID (charset_ascii) \
: char_charset ((c), Qnil, NULL))
: char_charset (c, Qnil, NULL))
#if false
/* Char-table of charset-sets. Each element is a bool vector indexed
@ -410,18 +410,18 @@ extern Lisp_Object Vchar_charset_set;
: ((code) < (charset)->min_code || (code) > (charset)->max_code) \
? -1 \
: (charset)->unified_p \
? decode_char ((charset), (code)) \
? decode_char (charset, code) \
: (charset)->method == CHARSET_METHOD_OFFSET \
? ((charset)->code_linear_p \
? (int) ((code) - (charset)->min_code) + (charset)->code_offset \
: decode_char ((charset), (code))) \
: decode_char (charset, code)) \
: (charset)->method == CHARSET_METHOD_MAP \
? (((charset)->code_linear_p \
&& VECTORP (CHARSET_DECODER (charset))) \
? XFIXNUM (AREF (CHARSET_DECODER (charset), \
(code) - (charset)->min_code)) \
: decode_char ((charset), (code))) \
: decode_char ((charset), (code)))
: decode_char (charset, code)) \
: decode_char (charset, code))
extern Lisp_Object charset_work;
@ -462,7 +462,7 @@ extern bool charset_map_loaded;
/* Set CHARSET to the charset highest priority of C, CODE to the
code-point of C in CHARSET. */
#define SPLIT_CHAR(c, charset, code) \
((charset) = char_charset ((c), Qnil, &(code)))
((charset) = char_charset (c, Qnil, &(code)))
#define ISO_MAX_DIMENSION 3
@ -501,15 +501,15 @@ extern int iso_charset_table[ISO_MAX_DIMENSION][ISO_MAX_CHARS][ISO_MAX_FINAL];
|| ((CHARSET_UNIFIED_P (charset) \
|| (charset)->method == CHARSET_METHOD_SUBSET \
|| (charset)->method == CHARSET_METHOD_SUPERSET) \
? encode_char ((charset), (c)) != (charset)->invalid_code \
: (CHARSET_FAST_MAP_REF ((c), (charset)->fast_map) \
? encode_char (charset, c) != (charset)->invalid_code \
: (CHARSET_FAST_MAP_REF (c, (charset)->fast_map) \
&& ((charset)->method == CHARSET_METHOD_OFFSET \
? (c) >= (charset)->min_char && (c) <= (charset)->max_char \
: ((charset)->method == CHARSET_METHOD_MAP \
&& (charset)->compact_codes_p \
&& CHAR_TABLE_P (CHARSET_ENCODER (charset))) \
? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), (c))) \
: encode_char ((charset), (c)) != (charset)->invalid_code))))
? ! NILP (CHAR_TABLE_REF (CHARSET_ENCODER (charset), c)) \
: encode_char (charset, c) != (charset)->invalid_code))))
/* Special macros for emacs-mule encoding. */

View File

@ -314,9 +314,9 @@ static Lisp_Object Vbig5_coding_system;
/* ISO2022 section */
#define CODING_ISO_INITIAL(coding, reg) \
(XFIXNUM (AREF (AREF (CODING_ID_ATTRS ((coding)->id), \
coding_attr_iso_initial), \
reg)))
XFIXNUM (AREF (AREF (CODING_ID_ATTRS ((coding)->id), \
coding_attr_iso_initial), \
reg))
#define CODING_ISO_REQUEST(coding, charset_id) \
@ -466,7 +466,7 @@ enum iso_code_class_type
#define CODING_CCL_ENCODER(coding) \
AREF (CODING_ID_ATTRS ((coding)->id), coding_attr_ccl_encoder)
#define CODING_CCL_VALIDS(coding) \
(SDATA (AREF (CODING_ID_ATTRS ((coding)->id), coding_attr_ccl_valids)))
SDATA (AREF (CODING_ID_ATTRS ((coding)->id), coding_attr_ccl_valids))
/* Index for each coding category in `coding_categories' */
@ -4198,12 +4198,12 @@ decode_coding_iso_2022 (struct coding_system *coding)
#define ENCODE_ISO_CHARACTER(charset, c) \
do { \
unsigned code; \
CODING_ENCODE_CHAR (coding, dst, dst_end, (charset), (c), code); \
CODING_ENCODE_CHAR (coding, dst, dst_end, charset, c, code); \
\
if (CHARSET_DIMENSION (charset) == 1) \
ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code); \
ENCODE_ISO_CHARACTER_DIMENSION1 (charset, code); \
else \
ENCODE_ISO_CHARACTER_DIMENSION2 ((charset), code >> 8, code & 0xFF); \
ENCODE_ISO_CHARACTER_DIMENSION2 (charset, code >> 8, code & 0xFF); \
} while (0)

View File

@ -166,28 +166,28 @@ enum coding_attr_index
/* Return the name of a coding system specified by ID. */
#define CODING_ID_NAME(id) \
(HASH_KEY (XHASH_TABLE (Vcoding_system_hash_table), id))
HASH_KEY (XHASH_TABLE (Vcoding_system_hash_table), id)
/* Return the attribute vector of a coding system specified by ID. */
#define CODING_ID_ATTRS(id) \
(AREF (HASH_VALUE (XHASH_TABLE (Vcoding_system_hash_table), id), 0))
AREF (HASH_VALUE (XHASH_TABLE (Vcoding_system_hash_table), id), 0)
/* Return the list of aliases of a coding system specified by ID. */
#define CODING_ID_ALIASES(id) \
(AREF (HASH_VALUE (XHASH_TABLE (Vcoding_system_hash_table), id), 1))
AREF (HASH_VALUE (XHASH_TABLE (Vcoding_system_hash_table), id), 1)
/* Return the eol-type of a coding system specified by ID. */
#define CODING_ID_EOL_TYPE(id) \
(AREF (HASH_VALUE (XHASH_TABLE (Vcoding_system_hash_table), id), 2))
AREF (HASH_VALUE (XHASH_TABLE (Vcoding_system_hash_table), id), 2)
/* Return the spec vector of CODING_SYSTEM_SYMBOL. */
#define CODING_SYSTEM_SPEC(coding_system_symbol) \
(Fgethash (coding_system_symbol, Vcoding_system_hash_table, Qnil))
Fgethash (coding_system_symbol, Vcoding_system_hash_table, Qnil)
/* Return the ID of CODING_SYSTEM_SYMBOL. */
@ -209,7 +209,7 @@ enum coding_attr_index
do { \
if (CODING_SYSTEM_ID (x) < 0 \
&& NILP (Fcheck_coding_system (x))) \
wrong_type_argument (Qcoding_system_p, (x)); \
wrong_type_argument (Qcoding_system_p, x); \
} while (false)
@ -225,7 +225,7 @@ enum coding_attr_index
spec = CODING_SYSTEM_SPEC (x); \
} \
if (NILP (spec)) \
wrong_type_argument (Qcoding_system_p, (x)); \
wrong_type_argument (Qcoding_system_p, x); \
} while (false)
@ -242,7 +242,7 @@ enum coding_attr_index
id = CODING_SYSTEM_ID (x); \
} \
if (id < 0) \
wrong_type_argument (Qcoding_system_p, (x)); \
wrong_type_argument (Qcoding_system_p, x); \
} while (false)
@ -745,10 +745,9 @@ extern Lisp_Object from_unicode_buffer (const wchar_t *wstr);
#define decode_coding_c_string(coding, src, bytes, dst_object) \
do { \
(coding)->source = (src); \
(coding)->src_chars = (coding)->src_bytes = (bytes); \
decode_coding_object ((coding), Qnil, 0, 0, (bytes), (bytes), \
(dst_object)); \
(coding)->source = src; \
(coding)->src_chars = (coding)->src_bytes = bytes; \
decode_coding_object (coding, Qnil, 0, 0, bytes, bytes, dst_object); \
} while (false)

View File

@ -522,7 +522,7 @@ load_gccjit_if_necessary (bool mandatory)
#define DECL_BLOCK(name, func) \
gcc_jit_block *(name) = \
gcc_jit_function_new_block ((func), STR (name))
gcc_jit_function_new_block (func, STR (name))
#ifndef WINDOWSNT
# ifdef HAVE__SETJMP

View File

@ -260,8 +260,8 @@ composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop)
#define LGSTRING_CHAR(lgs, i) AREF (LGSTRING_HEADER (lgs), (i) + 1)
#define LGSTRING_CHAR_LEN(lgs) (ASIZE (LGSTRING_HEADER (lgs)) - 1)
#define LGSTRING_SET_FONT(lgs, val) ASET (LGSTRING_HEADER (lgs), 0, (val))
#define LGSTRING_SET_CHAR(lgs, i, c) ASET (LGSTRING_HEADER (lgs), (i) + 1, (c))
#define LGSTRING_SET_FONT(lgs, val) ASET (LGSTRING_HEADER (lgs), 0, val)
#define LGSTRING_SET_CHAR(lgs, i, c) ASET (LGSTRING_HEADER (lgs), (i) + 1, c)
#define LGSTRING_ID(lgs) AREF (lgs, 1)
#define LGSTRING_SET_ID(lgs, id) ASET (lgs, 1, id)
@ -270,9 +270,9 @@ composition_valid_p (ptrdiff_t start, ptrdiff_t end, Lisp_Object prop)
LGSTRING can hold. This is NOT the actual number of valid LGLYPHs;
to find the latter, walk the glyphs returned by LGSTRING_GLYPH
until the first one that is nil. */
#define LGSTRING_GLYPH_LEN(lgs) (ASIZE ((lgs)) - 2)
#define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 2)
#define LGSTRING_SET_GLYPH(lgs, idx, val) ASET ((lgs), (idx) + 2, (val))
#define LGSTRING_GLYPH_LEN(lgs) (ASIZE (lgs) - 2)
#define LGSTRING_GLYPH(lgs, idx) AREF (lgs, (idx) + 2)
#define LGSTRING_SET_GLYPH(lgs, idx, val) ASET (lgs, (idx) + 2, val)
INLINE Lisp_Object *
lgstring_glyph_addr (Lisp_Object lgs, ptrdiff_t idx)
{
@ -298,33 +298,33 @@ enum lglyph_indices
contributed to the glyph (since there isn't a 1:1 correspondence
between composed characters and the font glyphs). */
#define LGLYPH_NEW() make_nil_vector (LGLYPH_SIZE)
#define LGLYPH_FROM(g) XFIXNUM (AREF ((g), LGLYPH_IX_FROM))
#define LGLYPH_TO(g) XFIXNUM (AREF ((g), LGLYPH_IX_TO))
#define LGLYPH_CHAR(g) XFIXNUM (AREF ((g), LGLYPH_IX_CHAR))
#define LGLYPH_FROM(g) XFIXNUM (AREF (g, LGLYPH_IX_FROM))
#define LGLYPH_TO(g) XFIXNUM (AREF (g, LGLYPH_IX_TO))
#define LGLYPH_CHAR(g) XFIXNUM (AREF (g, LGLYPH_IX_CHAR))
#define LGLYPH_CODE(g) \
(NILP (AREF ((g), LGLYPH_IX_CODE)) \
(NILP (AREF (g, LGLYPH_IX_CODE)) \
? FONT_INVALID_CODE \
: cons_to_unsigned (AREF (g, LGLYPH_IX_CODE), TYPE_MAXIMUM (unsigned)))
#define LGLYPH_WIDTH(g) XFIXNUM (AREF ((g), LGLYPH_IX_WIDTH))
#define LGLYPH_LBEARING(g) XFIXNUM (AREF ((g), LGLYPH_IX_LBEARING))
#define LGLYPH_RBEARING(g) XFIXNUM (AREF ((g), LGLYPH_IX_RBEARING))
#define LGLYPH_ASCENT(g) XFIXNUM (AREF ((g), LGLYPH_IX_ASCENT))
#define LGLYPH_DESCENT(g) XFIXNUM (AREF ((g), LGLYPH_IX_DESCENT))
#define LGLYPH_ADJUSTMENT(g) AREF ((g), LGLYPH_IX_ADJUSTMENT)
#define LGLYPH_SET_FROM(g, val) ASET ((g), LGLYPH_IX_FROM, make_fixnum (val))
#define LGLYPH_SET_TO(g, val) ASET ((g), LGLYPH_IX_TO, make_fixnum (val))
#define LGLYPH_SET_CHAR(g, val) ASET ((g), LGLYPH_IX_CHAR, make_fixnum (val))
#define LGLYPH_WIDTH(g) XFIXNUM (AREF (g, LGLYPH_IX_WIDTH))
#define LGLYPH_LBEARING(g) XFIXNUM (AREF (g, LGLYPH_IX_LBEARING))
#define LGLYPH_RBEARING(g) XFIXNUM (AREF (g, LGLYPH_IX_RBEARING))
#define LGLYPH_ASCENT(g) XFIXNUM (AREF (g, LGLYPH_IX_ASCENT))
#define LGLYPH_DESCENT(g) XFIXNUM (AREF (g, LGLYPH_IX_DESCENT))
#define LGLYPH_ADJUSTMENT(g) AREF (g, LGLYPH_IX_ADJUSTMENT)
#define LGLYPH_SET_FROM(g, val) ASET (g, LGLYPH_IX_FROM, make_fixnum (val))
#define LGLYPH_SET_TO(g, val) ASET (g, LGLYPH_IX_TO, make_fixnum (val))
#define LGLYPH_SET_CHAR(g, val) ASET (g, LGLYPH_IX_CHAR, make_fixnum (val))
/* Callers must assure that VAL is not negative! */
#define LGLYPH_SET_CODE(g, val) \
ASET (g, LGLYPH_IX_CODE, \
val == FONT_INVALID_CODE ? Qnil : INT_TO_INTEGER (val))
#define LGLYPH_SET_WIDTH(g, val) ASET ((g), LGLYPH_IX_WIDTH, make_fixnum (val))
#define LGLYPH_SET_LBEARING(g, val) ASET ((g), LGLYPH_IX_LBEARING, make_fixnum (val))
#define LGLYPH_SET_RBEARING(g, val) ASET ((g), LGLYPH_IX_RBEARING, make_fixnum (val))
#define LGLYPH_SET_ASCENT(g, val) ASET ((g), LGLYPH_IX_ASCENT, make_fixnum (val))
#define LGLYPH_SET_DESCENT(g, val) ASET ((g), LGLYPH_IX_DESCENT, make_fixnum (val))
#define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), LGLYPH_IX_ADJUSTMENT, (val))
#define LGLYPH_SET_WIDTH(g, val) ASET (g, LGLYPH_IX_WIDTH, make_fixnum (val))
#define LGLYPH_SET_LBEARING(g, val) ASET (g, LGLYPH_IX_LBEARING, make_fixnum (val))
#define LGLYPH_SET_RBEARING(g, val) ASET (g, LGLYPH_IX_RBEARING, make_fixnum (val))
#define LGLYPH_SET_ASCENT(g, val) ASET (g, LGLYPH_IX_ASCENT, make_fixnum (val))
#define LGLYPH_SET_DESCENT(g, val) ASET (g, LGLYPH_IX_DESCENT, make_fixnum (val))
#define LGLYPH_SET_ADJUSTMENT(g, val) ASET (g, LGLYPH_IX_ADJUSTMENT, val)
#define LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0)

View File

@ -178,8 +178,8 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
/* Things that lib/reg* wants. */
#define mbrtowc(pwc, s, n, ps) mbtowc ((pwc), (s), (n))
#define wcrtomb(s, wc, ps) wctomb ((s), (wc))
#define mbrtowc(pwc, s, n, ps) mbtowc (pwc, s, n)
#define wcrtomb(s, wc, ps) wctomb (s, wc)
#define btowc(b) ((wchar_t) (b))
#define towupper(chr) toupper (chr)
#define towlower(chr) tolower (chr)
@ -317,7 +317,7 @@ extern int emacs_setenv_TZ (char const *);
type _GL_ATTRIBUTE_MAY_ALIAS *name = (type *) (addr)
#if 3 <= __GNUC__
# define ATTRIBUTE_SECTION(name) __attribute__((section (name)))
# define ATTRIBUTE_SECTION(name) __attribute__ ((section (name)))
#else
# define ATTRIBUTE_SECTION(name)
#endif

View File

@ -315,7 +315,7 @@ struct text_pos
/* Set marker MARKER from text position POS. */
#define SET_MARKER_FROM_TEXT_POS(MARKER, POS) \
set_marker_both ((MARKER), Qnil, CHARPOS ((POS)), BYTEPOS ((POS)))
set_marker_both (MARKER, Qnil, CHARPOS (POS), BYTEPOS (POS))
/* Value is non-zero if character and byte positions of POS1 and POS2
are equal. */
@ -399,7 +399,7 @@ GLYPH_CODE_FACE (Lisp_Object gc)
SET_GLYPH (glyph, XFIXNUM (XCAR (gc)), XFIXNUM (XCDR (gc))); \
else \
SET_GLYPH (glyph, (XFIXNUM (gc) & ((1 << CHARACTERBITS)-1)), \
(XFIXNUM (gc) >> CHARACTERBITS)); \
XFIXNUM (gc) >> CHARACTERBITS); \
} \
while (false)
@ -676,9 +676,9 @@ struct glyph
defined in lisp.h. */
#define SET_CHAR_GLYPH_FROM_GLYPH(GLYPH, FROM) \
SET_CHAR_GLYPH ((GLYPH), \
GLYPH_CHAR ((FROM)), \
GLYPH_FACE ((FROM)), \
SET_CHAR_GLYPH (GLYPH, \
GLYPH_CHAR (FROM), \
GLYPH_FACE (FROM), \
false)
/* Construct a glyph code from a character glyph GLYPH. If the
@ -689,9 +689,9 @@ struct glyph
do \
{ \
if ((GLYPH).u.ch < 256) \
SET_GLYPH ((G), (GLYPH).u.ch, ((GLYPH).face_id)); \
SET_GLYPH (G, (GLYPH).u.ch, (GLYPH).face_id); \
else \
SET_GLYPH ((G), -1, 0); \
SET_GLYPH (G, -1, 0); \
} \
while (false)
@ -837,7 +837,7 @@ struct glyph_matrix
#ifdef GLYPH_DEBUG
void check_matrix_pointer_lossage (struct glyph_matrix *);
#define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage ((MATRIX))
#define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage (MATRIX)
#else
#define CHECK_MATRIX(MATRIX) ((void) 0)
#endif
@ -1130,7 +1130,7 @@ struct glyph_row
#ifdef GLYPH_DEBUG
struct glyph_row *matrix_row (struct glyph_matrix *, int);
#define MATRIX_ROW(MATRIX, ROW) matrix_row ((MATRIX), (ROW))
#define MATRIX_ROW(MATRIX, ROW) matrix_row (MATRIX, ROW)
#else
#define MATRIX_ROW(MATRIX, ROW) ((MATRIX)->rows + (ROW))
#endif
@ -1166,12 +1166,12 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
MATRIX. */
#define MATRIX_ROW_GLYPH_START(MATRIX, ROW) \
(MATRIX_ROW ((MATRIX), (ROW))->glyphs[TEXT_AREA])
(MATRIX_ROW (MATRIX, ROW)->glyphs[TEXT_AREA])
/* Return the number of used glyphs in the text area of a row. */
#define MATRIX_ROW_USED(MATRIX, ROW) \
(MATRIX_ROW ((MATRIX), (ROW))->used[TEXT_AREA])
(MATRIX_ROW (MATRIX, ROW)->used[TEXT_AREA])
/* Return the character/ byte position at which the display of ROW
starts. BIDI Note: this is the smallest character/byte position
@ -1201,7 +1201,7 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
#define MATRIX_BOTTOM_TEXT_ROW(MATRIX, W) \
((MATRIX)->rows \
+ (MATRIX)->nrows \
- (window_wants_mode_line ((W)) ? 1 : 0))
- (window_wants_mode_line (W) ? 1 : 0))
/* Non-zero if the face of the last glyph in ROW's text area has
to be drawn to the end of the text area. */
@ -1211,7 +1211,7 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
/* Set and query the enabled_p flag of glyph row ROW in MATRIX. */
#define SET_MATRIX_ROW_ENABLED_P(MATRIX, ROW, VALUE) \
(MATRIX_ROW (MATRIX, ROW)->enabled_p = (VALUE))
(MATRIX_ROW (MATRIX, ROW)->enabled_p = VALUE)
#define MATRIX_ROW_ENABLED_P(MATRIX, ROW) \
(MATRIX_ROW (MATRIX, ROW)->enabled_p)
@ -1232,28 +1232,28 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
#define MR_PARTIALLY_VISIBLE_AT_BOTTOM(W, ROW) \
(((ROW)->y + (ROW)->height - (ROW)->extra_line_spacing) \
> WINDOW_BOX_HEIGHT_NO_MODE_LINE ((W)))
> WINDOW_BOX_HEIGHT_NO_MODE_LINE (W))
/* Non-zero if ROW is not completely visible in window W. */
#define MATRIX_ROW_PARTIALLY_VISIBLE_P(W, ROW) \
(MR_PARTIALLY_VISIBLE ((ROW)) \
&& (MR_PARTIALLY_VISIBLE_AT_TOP ((W), (ROW)) \
|| MR_PARTIALLY_VISIBLE_AT_BOTTOM ((W), (ROW))))
(MR_PARTIALLY_VISIBLE (ROW) \
&& (MR_PARTIALLY_VISIBLE_AT_TOP (W, ROW) \
|| MR_PARTIALLY_VISIBLE_AT_BOTTOM (W, ROW)))
/* Non-zero if ROW is partially visible at the top of window W. */
#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \
(MR_PARTIALLY_VISIBLE ((ROW)) \
&& MR_PARTIALLY_VISIBLE_AT_TOP ((W), (ROW)))
(MR_PARTIALLY_VISIBLE (ROW) \
&& MR_PARTIALLY_VISIBLE_AT_TOP (W, ROW))
/* Non-zero if ROW is partially visible at the bottom of window W. */
#define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW) \
(MR_PARTIALLY_VISIBLE ((ROW)) \
&& MR_PARTIALLY_VISIBLE_AT_BOTTOM ((W), (ROW)))
(MR_PARTIALLY_VISIBLE (ROW) \
&& MR_PARTIALLY_VISIBLE_AT_BOTTOM (W, ROW))
/* Return the bottom Y + 1 of ROW. */
@ -1263,7 +1263,7 @@ struct glyph_row *matrix_row (struct glyph_matrix *, int);
iterator structure pointed to by IT?. */
#define MATRIX_ROW_LAST_VISIBLE_P(ROW, IT) \
(MATRIX_ROW_BOTTOM_Y ((ROW)) >= (IT)->last_visible_y)
(MATRIX_ROW_BOTTOM_Y (ROW) >= (IT)->last_visible_y)
/* Non-zero if ROW displays a continuation line. */
@ -1537,9 +1537,9 @@ struct glyph_string
/* Return the desired face id for the mode line of window W. */
#define CURRENT_MODE_LINE_ACTIVE_FACE_ID(W) \
(CURRENT_MODE_LINE_ACTIVE_FACE_ID_3((W), \
CURRENT_MODE_LINE_ACTIVE_FACE_ID_3(W, \
XWINDOW (selected_window), \
(W)))
W)
/* Return the current height of the mode line of window W. If not known
from W->mode_line_height, look at W's current glyph matrix, or return
@ -1625,8 +1625,8 @@ struct glyph_string
#define VCENTER_BASELINE_OFFSET(FONT, F) \
(FONT_DESCENT (FONT) \
+ (FRAME_LINE_HEIGHT ((F)) - FONT_HEIGHT ((FONT)) \
+ (FRAME_LINE_HEIGHT ((F)) > FONT_HEIGHT ((FONT)))) / 2 \
+ (FRAME_LINE_HEIGHT (F) - FONT_HEIGHT (FONT) \
+ (FRAME_LINE_HEIGHT (F) > FONT_HEIGHT (FONT))) / 2 \
- (FONT_DESCENT (FRAME_FONT (F)) - FRAME_BASELINE_OFFSET (F)))
/* A heuristic test for fonts that claim they need a preposterously
@ -2858,12 +2858,12 @@ struct it
if ((IT)->glyph_row != NULL && (IT)->bidi_p) \
(IT)->glyph_row->reversed_p = (IT)->bidi_it.paragraph_dir == R2L; \
if (FRAME_RIF ((IT)->f) != NULL) \
FRAME_RIF ((IT)->f)->produce_glyphs ((IT)); \
FRAME_RIF ((IT)->f)->produce_glyphs (IT); \
else \
produce_glyphs ((IT)); \
produce_glyphs (IT); \
if ((IT)->glyph_row != NULL) \
inhibit_free_realized_faces =true; \
reset_box_start_end_flags ((IT)); \
reset_box_start_end_flags (IT); \
} while (false)
/* Bit-flags indicating what operation move_it_to should perform. */

View File

@ -134,8 +134,8 @@ static struct frame *frame_matrix_frame;
static int window_to_frame_vpos (struct window *, int);
static int window_to_frame_hpos (struct window *, int);
#define WINDOW_TO_FRAME_VPOS(W, VPOS) window_to_frame_vpos ((W), (VPOS))
#define WINDOW_TO_FRAME_HPOS(W, HPOS) window_to_frame_hpos ((W), (HPOS))
#define WINDOW_TO_FRAME_VPOS(W, VPOS) window_to_frame_vpos (W, VPOS)
#define WINDOW_TO_FRAME_HPOS(W, HPOS) window_to_frame_hpos (W, HPOS)
/* One element of the ring buffer containing redisplay history
information. */
@ -5240,7 +5240,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
/* Char insertion/deletion cost vector, from term.c */
#ifndef HAVE_ANDROID
#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS ((f))])
#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_TOTAL_COLS (f)])
#endif

View File

@ -39,13 +39,13 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
extern Lisp_Object disp_char_vector (struct Lisp_Char_Table *, int);
#define DISP_CHAR_VECTOR(dp, c) \
(ASCII_CHAR_P(c) \
(ASCII_CHAR_P (c) \
? (NILP ((dp)->ascii) \
? (dp)->defalt \
: (SUB_CHAR_TABLE_P ((dp)->ascii) \
? XSUB_CHAR_TABLE ((dp)->ascii)->contents[c] \
: (dp)->ascii)) \
: disp_char_vector ((dp), (c)))
: disp_char_vector (dp, c))
/* Defined in window.c. */
extern struct Lisp_Char_Table *window_display_table (struct window *);
@ -78,8 +78,8 @@ extern struct Lisp_Char_Table *buffer_display_table (void);
LENGTH), and set G to the final glyph. */
#define GLYPH_FOLLOW_ALIASES(base, length, g) \
do { \
while (GLYPH_ALIAS_P ((base), (length), (g))) \
SET_GLYPH_CHAR ((g), XFIXNUM ((base)[GLYPH_CHAR (g)])); \
while (GLYPH_ALIAS_P (base, length, g)) \
SET_GLYPH_CHAR (g, XFIXNUM ((base)[GLYPH_CHAR (g)])); \
if (!GLYPH_CHAR_VALID_P (g)) \
SET_GLYPH_CHAR (g, ' '); \
} while (false)

View File

@ -1908,7 +1908,7 @@ determines whether case is significant or ignored. */)
#define USE_HEURISTIC
#define XVECREF_YVECREF_EQUAL(ctx, xoff, yoff) \
buffer_chars_equal ((ctx), (xoff), (yoff))
buffer_chars_equal (ctx, xoff, yoff)
#define OFFSET ptrdiff_t

View File

@ -28,8 +28,8 @@ struct frame;
G_BEGIN_DECLS
#ifdef HAVE_PGTK
#define EMACS_TYPE_FIXED (emacs_fixed_get_type ())
#define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMACS_TYPE_FIXED))
#define EMACS_TYPE_FIXED emacs_fixed_get_type ()
#define EMACS_IS_FIXED(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, EMACS_TYPE_FIXED)
#endif
struct frame;

View File

@ -191,16 +191,16 @@ enum font_property_index
/* Return the numeric weight value of FONT. */
#define FONT_WEIGHT_NUMERIC(font) \
(FIXNUMP (AREF ((font), FONT_WEIGHT_INDEX)) \
? (XFIXNUM (AREF ((font), FONT_WEIGHT_INDEX)) >> 8) : -1)
(FIXNUMP (AREF (font, FONT_WEIGHT_INDEX)) \
? (XFIXNUM (AREF (font, FONT_WEIGHT_INDEX)) >> 8) : -1)
/* Return the numeric slant value of FONT. */
#define FONT_SLANT_NUMERIC(font) \
(FIXNUMP (AREF ((font), FONT_SLANT_INDEX)) \
? (XFIXNUM (AREF ((font), FONT_SLANT_INDEX)) >> 8) : -1)
(FIXNUMP (AREF (font, FONT_SLANT_INDEX)) \
? (XFIXNUM (AREF (font, FONT_SLANT_INDEX)) >> 8) : -1)
/* Return the numeric width value of FONT. */
#define FONT_WIDTH_NUMERIC(font) \
(FIXNUMP (AREF ((font), FONT_WIDTH_INDEX)) \
? (XFIXNUM (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1)
(FIXNUMP (AREF (font, FONT_WIDTH_INDEX)) \
? (XFIXNUM (AREF (font, FONT_WIDTH_INDEX)) >> 8) : -1)
/* Return the symbolic weight value of FONT. */
#define FONT_WEIGHT_SYMBOLIC(font) \
font_style_symbolic (font, FONT_WEIGHT_INDEX, false)
@ -222,19 +222,19 @@ enum font_property_index
/* Return the numeric weight value corresponding to the symbol NAME. */
#define FONT_WEIGHT_NAME_NUMERIC(name) \
(font_style_to_value (FONT_WEIGHT_INDEX, (name), false) >> 8)
(font_style_to_value (FONT_WEIGHT_INDEX, name, false) >> 8)
/* Return the numeric slant value corresponding to the symbol NAME. */
#define FONT_SLANT_NAME_NUMERIC(name) \
(font_style_to_value (FONT_SLANT_INDEX, (name), false) >> 8)
(font_style_to_value (FONT_SLANT_INDEX, name, false) >> 8)
/* Return the numeric width value corresponding to the symbol NAME. */
#define FONT_WIDTH_NAME_NUMERIC(name) \
(font_style_to_value (FONT_WIDTH_INDEX, (name), false) >> 8)
(font_style_to_value (FONT_WIDTH_INDEX, name, false) >> 8)
/* Set the font property PROP of FONT to VAL. PROP is one of
style-related font property index (FONT_WEIGHT/SLANT/WIDTH_INDEX).
VAL (integer or symbol) is the numeric or symbolic style value. */
#define FONT_SET_STYLE(font, prop, val) \
ASET ((font), prop, make_fixnum (font_style_to_value (prop, val, true)))
ASET (font, prop, make_fixnum (font_style_to_value (prop, val, true)))
#ifndef MSDOS
#define FONT_WIDTH(f) ((f)->max_width)
@ -549,7 +549,7 @@ GC_XFONT_OBJECT (Lisp_Object p)
return XUNTAG (p, Lisp_Vectorlike, struct font);
}
#define XSETFONT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FONT))
#define XSETFONT(a, b) XSETPSEUDOVECTOR (a, b, PVEC_FONT)
INLINE struct font *
CHECK_FONT_GET_OBJECT (Lisp_Object x)
@ -1004,13 +1004,13 @@ extern void font_deferred_log (const char *, Lisp_Object, Lisp_Object);
#define FONT_ADD_LOG(ACTION, ARG, RESULT) \
do { \
if (! EQ (Vfont_log, Qt)) \
font_add_log ((ACTION), (ARG), (RESULT)); \
font_add_log (ACTION, ARG, RESULT); \
} while (false)
#define FONT_DEFERRED_LOG(ACTION, ARG, RESULT) \
do { \
if (! EQ (Vfont_log, Qt)) \
font_deferred_log ((ACTION), (ARG), (RESULT)); \
font_deferred_log (ACTION, ARG, RESULT); \
} while (false)
/* FIXME: This is for use in functions that can be called while

View File

@ -266,19 +266,19 @@ font_def_new (Lisp_Object font_spec, Lisp_Object encoding,
#define RFONT_DEF_FACE(rfont_def) AREF (rfont_def, 0)
#define RFONT_DEF_SET_FACE(rfont_def, face_id) \
ASET ((rfont_def), 0, make_fixnum (face_id))
ASET (rfont_def, 0, make_fixnum (face_id))
#define RFONT_DEF_FONT_DEF(rfont_def) AREF (rfont_def, 1)
#define RFONT_DEF_SPEC(rfont_def) FONT_DEF_SPEC (AREF (rfont_def, 1))
#define RFONT_DEF_OBJECT(rfont_def) AREF (rfont_def, 2)
#define RFONT_DEF_SET_OBJECT(rfont_def, object) \
ASET ((rfont_def), 2, (object))
ASET (rfont_def, 2, object)
/* Score of RFONT_DEF is an integer value; the lowest 8 bits represent
the order of listing by font backends, the higher bits represents
the order given by charset priority list. The smaller value is
preferable. */
#define RFONT_DEF_SCORE(rfont_def) XFIXNUM (AREF (rfont_def, 3))
#define RFONT_DEF_SET_SCORE(rfont_def, score) \
ASET ((rfont_def), 3, make_fixnum (score))
ASET (rfont_def, 3, make_fixnum (score))
#define RFONT_DEF_NEW(rfont_def, font_def) \
do { \
(rfont_def) = make_nil_vector (4); \
@ -295,7 +295,7 @@ font_def_new (Lisp_Object font_spec, Lisp_Object encoding,
#define FONTSET_REF(fontset, c) \
(EQ (fontset, Vdefault_fontset) \
? CHAR_TABLE_REF (fontset, c) \
: fontset_ref ((fontset), (c)))
: fontset_ref (fontset, c))
static Lisp_Object
fontset_ref (Lisp_Object fontset, int c)
@ -315,7 +315,7 @@ fontset_ref (Lisp_Object fontset, int c)
specifying a range. */
#define FONTSET_SET(fontset, range, elt) \
Fset_char_table_range ((fontset), (range), (elt))
Fset_char_table_range (fontset, range, elt)
/* Modify the elements of FONTSET for characters in RANGE by replacing
@ -329,7 +329,7 @@ fontset_ref (Lisp_Object fontset, int c)
? (NILP (range) \
? set_fontset_fallback (fontset, make_vector (1, elt)) \
: (void) Fset_char_table_range (fontset, range, make_vector (1, elt))) \
: fontset_add ((fontset), (range), (elt), (add)))
: fontset_add (fontset, range, elt, add))
static void
fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Object add)

View File

@ -909,7 +909,7 @@ default_pixels_per_inch_y (void)
#define XFRAME(p) \
(eassert (FRAMEP (p)), XUNTAG (p, Lisp_Vectorlike, struct frame))
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
#define XSETFRAME(a, b) XSETPSEUDOVECTOR (a, b, PVEC_FRAME)
/* Given a window, return its frame as a Lisp_Object. */
#define WINDOW_FRAME(w) ((w)->frame)
@ -992,7 +992,7 @@ default_pixels_per_inch_y (void)
FRAME_DISPLAY_INFO (f)->font_resolution)
#else /* !HAVE_ANDROID */
#define FRAME_RES(f) (FRAME_RES_Y (f))
#define FRAME_RES(f) FRAME_RES_Y (f)
#endif /* HAVE_ANDROID */
#else /* !HAVE_WINDOW_SYSTEM */
@ -1130,12 +1130,12 @@ default_pixels_per_inch_y (void)
/* Height of F's bottom margin in frame lines. */
#define FRAME_BOTTOM_MARGIN(f) \
(FRAME_TOOL_BAR_BOTTOM_LINES (f))
FRAME_TOOL_BAR_BOTTOM_LINES (f)
/* Pixel height of frame F's bottom margin. */
#define FRAME_BOTTOM_MARGIN_HEIGHT(f) \
(FRAME_TOOL_BAR_BOTTOM_HEIGHT (f))
FRAME_TOOL_BAR_BOTTOM_HEIGHT (f)
/* Size of both vertical margins combined. */
@ -1159,7 +1159,7 @@ default_pixels_per_inch_y (void)
visible by the X server. */
#ifndef HAVE_X_WINDOWS
#define FRAME_REDISPLAY_P(f) (FRAME_VISIBLE_P (f))
#define FRAME_REDISPLAY_P(f) FRAME_VISIBLE_P (f)
#else
#define FRAME_REDISPLAY_P(f) (FRAME_VISIBLE_P (f) \
|| (FRAME_X_P (f) \

View File

@ -117,10 +117,10 @@ static void xg_widget_style_updated (GtkWidget *, gpointer);
#define gtk_box_new(ori, spacing) \
((ori) == GTK_ORIENTATION_HORIZONTAL \
? gtk_hbox_new (FALSE, (spacing)) : gtk_vbox_new (FALSE, (spacing)))
? gtk_hbox_new (FALSE, spacing) : gtk_vbox_new (FALSE, spacing))
#define gtk_scrollbar_new(ori, spacing) \
((ori) == GTK_ORIENTATION_HORIZONTAL \
? gtk_hscrollbar_new ((spacing)) : gtk_vscrollbar_new ((spacing)))
? gtk_hscrollbar_new (spacing) : gtk_vscrollbar_new (spacing))
#endif /* HAVE_GTK3 */
#define XG_BIN_CHILD(x) gtk_bin_get_child (GTK_BIN (x))

View File

@ -4875,7 +4875,7 @@ xbm_read_bitmap_data (struct frame *f, char *contents, char *end,
while (0)
#define expect_ident(IDENT) \
if (LA1 == XBM_TK_IDENT && strcmp (buffer, (IDENT)) == 0) \
if (LA1 == XBM_TK_IDENT && strcmp (buffer, IDENT) == 0) \
match (); \
else \
goto failure
@ -6154,7 +6154,7 @@ xpm_load_image (struct frame *f,
#define expect_ident(IDENT) \
if (LA1 == XPM_TK_IDENT \
&& strlen ((IDENT)) == len && memcmp ((IDENT), beg, len) == 0) \
&& strlen (IDENT) == len && memcmp (IDENT, beg, len) == 0) \
match (); \
else \
goto failure

View File

@ -9082,7 +9082,7 @@ process_tab_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void *
}
/* Access slot with index IDX of vector tab_bar_item_properties. */
#define PROP(IDX) AREF (tab_bar_item_properties, (IDX))
#define PROP(IDX) AREF (tab_bar_item_properties, IDX)
static void
set_prop_tab_bar (ptrdiff_t idx, Lisp_Object val)
{
@ -9466,7 +9466,7 @@ process_tool_bar_item (Lisp_Object key, Lisp_Object def, Lisp_Object data, void
}
/* Access slot with index IDX of vector tool_bar_item_properties. */
#define PROP(IDX) AREF (tool_bar_item_properties, (IDX))
#define PROP(IDX) AREF (tool_bar_item_properties, IDX)
static void
set_prop (ptrdiff_t idx, Lisp_Object val)
{

View File

@ -396,7 +396,7 @@ extern void unuse_menu_items (void);
/* Macros for dealing with lispy events. */
/* True if EVENT has data fields describing it (i.e. a mouse click). */
#define EVENT_HAS_PARAMETERS(event) (CONSP (event))
#define EVENT_HAS_PARAMETERS(event) CONSP (event)
/* Extract the head from an event.
This works on composite and simple events. */
@ -414,32 +414,32 @@ extern void unuse_menu_items (void);
: CAR_SAFE (CDR_SAFE (event)))
/* This does not handle touchscreen events. */
#define EVENT_END(event) (CAR_SAFE (CDR_SAFE (CDR_SAFE (event))))
#define EVENT_END(event) CAR_SAFE (CDR_SAFE (CDR_SAFE (event)))
/* Extract the click count from a multi-click event. */
#define EVENT_CLICK_COUNT(event) (Fnth (make_fixnum (2), (event)))
#define EVENT_CLICK_COUNT(event) Fnth (make_fixnum (2), event)
/* Extract the fields of a position. */
#define POSN_WINDOW(posn) (CAR_SAFE (posn))
#define POSN_POSN(posn) (CAR_SAFE (CDR_SAFE (posn)))
#define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x)))
#define POSN_WINDOW_POSN(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (posn))))
#define POSN_TIMESTAMP(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (posn)))))
#define POSN_SCROLLBAR_PART(posn) (Fnth (make_fixnum (4), (posn)))
#define POSN_WINDOW(posn) CAR_SAFE (posn)
#define POSN_POSN(posn) CAR_SAFE (CDR_SAFE (posn))
#define POSN_SET_POSN(posn,x) XSETCAR (XCDR (posn), x)
#define POSN_WINDOW_POSN(posn) CAR_SAFE (CDR_SAFE (CDR_SAFE (posn)))
#define POSN_TIMESTAMP(posn) CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (posn))))
#define POSN_SCROLLBAR_PART(posn) Fnth (make_fixnum (4), posn)
/* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events.
It's a cons if the click is over a string in the mode line. */
#define POSN_STRING(posn) (Fnth (make_fixnum (4), (posn)))
#define POSN_STRING(posn) Fnth (make_fixnum (4), posn)
/* If POSN_STRING is nil, event refers to buffer location. */
#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn)))
#define POSN_BUFFER_POSN(posn) (Fnth (make_fixnum (5), (posn)))
#define POSN_INBUFFER_P(posn) NILP (POSN_STRING (posn))
#define POSN_BUFFER_POSN(posn) Fnth (make_fixnum (5), posn)
/* Getting the kind of an event head. */
#define EVENT_HEAD_KIND(event_head) \
(Fget ((event_head), Qevent_kind))
Fget (event_head, Qevent_kind)
/* Address (if not 0) of struct timespec to zero out if a SIGIO interrupt
happens. */

View File

@ -369,11 +369,11 @@ typedef EMACS_INT Lisp_Word;
# define lisp_h_Qnil {0}
#endif
#define lisp_h_PSEUDOVECTORP(a,code) \
(lisp_h_VECTORLIKEP((a)) && \
((XUNTAG ((a), Lisp_Vectorlike, union vectorlike_header)->size \
& (PSEUDOVECTOR_FLAG | PVEC_TYPE_MASK)) \
== (PSEUDOVECTOR_FLAG | ((code) << PSEUDOVECTOR_AREA_BITS))))
#define lisp_h_PSEUDOVECTORP(a,code) \
(lisp_h_VECTORLIKEP (a) \
&& ((XUNTAG (a, Lisp_Vectorlike, union vectorlike_header)->size \
& (PSEUDOVECTOR_FLAG | PVEC_TYPE_MASK)) \
== (PSEUDOVECTOR_FLAG | ((code) << PSEUDOVECTOR_AREA_BITS))))
#define lisp_h_CHECK_FIXNUM(x) CHECK_TYPE (FIXNUMP (x), Qfixnump, x)
#define lisp_h_CHECK_SYMBOL(x) CHECK_TYPE (SYMBOLP (x), Qsymbolp, x)
@ -391,17 +391,17 @@ typedef EMACS_INT Lisp_Word;
* What about keeping the part after `symbols_with_pos_enabled` in
* a separate function? */
#define lisp_h_EQ(x, y) \
((XLI ((x)) == XLI ((y))) \
(XLI (x) == XLI (y) \
|| (symbols_with_pos_enabled \
&& (SYMBOL_WITH_POS_P ((x)) \
? (BARE_SYMBOL_P ((y)) \
? XLI (XSYMBOL_WITH_POS((x))->sym) == XLI (y) \
: SYMBOL_WITH_POS_P((y)) \
&& (XLI (XSYMBOL_WITH_POS((x))->sym) \
== XLI (XSYMBOL_WITH_POS((y))->sym))) \
: (SYMBOL_WITH_POS_P ((y)) \
&& BARE_SYMBOL_P ((x)) \
&& (XLI (x) == XLI ((XSYMBOL_WITH_POS ((y)))->sym))))))
&& (SYMBOL_WITH_POS_P (x) \
? (BARE_SYMBOL_P (y) \
? XLI (XSYMBOL_WITH_POS (x)->sym) == XLI (y) \
: (SYMBOL_WITH_POS_P (y) \
&& (XLI (XSYMBOL_WITH_POS (x)->sym) \
== XLI (XSYMBOL_WITH_POS (y)->sym)))) \
: (SYMBOL_WITH_POS_P (y) \
&& BARE_SYMBOL_P (x) \
&& (XLI (x) == XLI (XSYMBOL_WITH_POS (y)->sym))))))
#define lisp_h_FIXNUMP(x) \
(! (((unsigned) (XLI (x) >> (USE_LSB_TAG ? 0 : FIXNUM_BITS)) \
@ -417,10 +417,10 @@ typedef EMACS_INT Lisp_Word;
#define lisp_h_SYMBOL_TRAPPED_WRITE_P(sym) (XSYMBOL (sym)->u.s.trapped_write)
#define lisp_h_SYMBOL_VAL(sym) \
(eassert ((sym)->u.s.redirect == SYMBOL_PLAINVAL), (sym)->u.s.val.value)
#define lisp_h_SYMBOL_WITH_POS_P(x) PSEUDOVECTORP ((x), PVEC_SYMBOL_WITH_POS)
#define lisp_h_BARE_SYMBOL_P(x) TAGGEDP ((x), Lisp_Symbol)
#define lisp_h_SYMBOLP(x) ((BARE_SYMBOL_P ((x)) || \
(symbols_with_pos_enabled && (SYMBOL_WITH_POS_P ((x))))))
#define lisp_h_SYMBOL_WITH_POS_P(x) PSEUDOVECTORP (x, PVEC_SYMBOL_WITH_POS)
#define lisp_h_BARE_SYMBOL_P(x) TAGGEDP (x, Lisp_Symbol)
#define lisp_h_SYMBOLP(x) \
(BARE_SYMBOL_P (x) || (symbols_with_pos_enabled && SYMBOL_WITH_POS_P (x)))
#define lisp_h_TAGGEDP(a, tag) \
(! (((unsigned) (XLI (a) >> (USE_LSB_TAG ? 0 : VALBITS)) \
- (unsigned) (tag)) \
@ -1156,7 +1156,7 @@ XBARE_SYMBOL (Lisp_Object a)
INLINE struct Lisp_Symbol * ATTRIBUTE_NO_SANITIZE_UNDEFINED
XSYMBOL (Lisp_Object a)
{
eassert (SYMBOLP ((a)));
eassert (SYMBOLP (a));
if (!symbols_with_pos_enabled || BARE_SYMBOL_P (a))
return XBARE_SYMBOL (a);
return XBARE_SYMBOL (XSYMBOL_WITH_POS (a)->sym);
@ -1407,19 +1407,19 @@ dead_object (void)
== (PSEUDOVECTOR_FLAG | (code << PSEUDOVECTOR_AREA_BITS))))
#define XSETWINDOW_CONFIGURATION(a, b) \
(XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION))
#define XSETPROCESS(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_PROCESS))
#define XSETWINDOW(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_WINDOW))
#define XSETTERMINAL(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL))
#define XSETSUBR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUBR))
#define XSETBUFFER(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BUFFER))
#define XSETCHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE))
#define XSETBOOL_VECTOR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR))
#define XSETSUB_CHAR_TABLE(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE))
#define XSETTHREAD(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_THREAD))
#define XSETMUTEX(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_MUTEX))
#define XSETCONDVAR(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_CONDVAR))
#define XSETNATIVE_COMP_UNIT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_NATIVE_COMP_UNIT))
XSETPSEUDOVECTOR (a, b, PVEC_WINDOW_CONFIGURATION)
#define XSETPROCESS(a, b) XSETPSEUDOVECTOR (a, b, PVEC_PROCESS)
#define XSETWINDOW(a, b) XSETPSEUDOVECTOR (a, b, PVEC_WINDOW)
#define XSETTERMINAL(a, b) XSETPSEUDOVECTOR (a, b, PVEC_TERMINAL)
#define XSETSUBR(a, b) XSETPSEUDOVECTOR (a, b, PVEC_SUBR)
#define XSETBUFFER(a, b) XSETPSEUDOVECTOR (a, b, PVEC_BUFFER)
#define XSETCHAR_TABLE(a, b) XSETPSEUDOVECTOR (a, b, PVEC_CHAR_TABLE)
#define XSETBOOL_VECTOR(a, b) XSETPSEUDOVECTOR (a, b, PVEC_BOOL_VECTOR)
#define XSETSUB_CHAR_TABLE(a, b) XSETPSEUDOVECTOR (a, b, PVEC_SUB_CHAR_TABLE)
#define XSETTHREAD(a, b) XSETPSEUDOVECTOR (a, b, PVEC_THREAD)
#define XSETMUTEX(a, b) XSETPSEUDOVECTOR (a, b, PVEC_MUTEX)
#define XSETCONDVAR(a, b) XSETPSEUDOVECTOR (a, b, PVEC_CONDVAR)
#define XSETNATIVE_COMP_UNIT(a, b) XSETPSEUDOVECTOR (a, b, PVEC_NATIVE_COMP_UNIT)
/* Efficiently convert a pointer to a Lisp object and back. The
pointer is represented as a fixnum, so the garbage collector
@ -2542,7 +2542,7 @@ XHASH_TABLE (Lisp_Object a)
}
#define XSET_HASH_TABLE(VAR, PTR) \
(XSETPSEUDOVECTOR (VAR, PTR, PVEC_HASH_TABLE))
XSETPSEUDOVECTOR (VAR, PTR, PVEC_HASH_TABLE)
/* Value is the key part of entry IDX in hash table H. */
INLINE Lisp_Object

View File

@ -124,7 +124,7 @@ static struct android_fd_or_asset invalid_file_stream =
#define file_stream struct android_fd_or_asset
#define file_offset off_t
#define file_tell(n) (android_asset_lseek ((n), 0, SEEK_CUR))
#define file_tell(n) android_asset_lseek (n, 0, SEEK_CUR)
#define file_seek android_asset_lseek
#define file_stream_valid_p(p) ((p).asset || (p).fd >= 0)
#define file_stream_close android_close_asset

View File

@ -75,7 +75,7 @@ enum {
#define kCTVersionNumber10_9 0x00060000
#endif
#define MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE \
(CFSTR ("MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE"))
CFSTR ("MAC_FONT_CHARACTER_SET_STRING_ATTRIBUTE")
typedef const struct _EmacsScreenFont *ScreenFontRef; /* opaque */
@ -85,4 +85,4 @@ extern void macfont_update_antialias_threshold (void);
/* This is an undocumented function. */
extern void CGContextSetFontSmoothingStyle(CGContextRef, int)
__attribute__((weak_import));
__attribute__ ((weak_import));

View File

@ -2865,7 +2865,7 @@ IT_menu_calc_size (XMenu *menu, int *width, int *height)
do \
{ \
(GLYPH).type = CHAR_GLYPH; \
SET_CHAR_GLYPH ((GLYPH), CODE, FACE_ID, PADDING_P); \
SET_CHAR_GLYPH (GLYPH, CODE, FACE_ID, PADDING_P); \
(GLYPH).charpos = -1; \
} \
while (0)

View File

@ -601,7 +601,7 @@ seems to be limited for now (2009/05) to ja, zh, and ko. */
{
Lisp_Object script = assq_no_quit (XCAR (otf), Votf_script_alist);
return CONSP (script)
? [NSString stringWithLispString: SYMBOL_NAME (XCDR ((script)))]
? [NSString stringWithLispString: SYMBOL_NAME (XCDR (script))]
: @"";
}

View File

@ -278,9 +278,9 @@ char const * nstrace_fullscreen_type_name (int);
#define NSTRACE_WHEN(cond, ...) \
__attribute__((cleanup(nstrace_restore_global_trace_state))) \
__attribute__ ((cleanup (nstrace_restore_global_trace_state))) \
int nstrace_saved_enabled_global = nstrace_enabled_global; \
__attribute__((cleanup(nstrace_leave))) \
__attribute__ ((cleanup (nstrace_leave))) \
int nstrace_enabled = nstrace_enabled_global && (cond); \
if (nstrace_enabled) { ++nstrace_depth; } \
else { nstrace_enabled_global = 0; } \
@ -1290,7 +1290,7 @@ extern char gnustep_base_version[]; /* version tracking */
/* Little utility macros */
#define IN_BOUND(min, x, max) (((x) < (min)) \
? (min) : (((x)>(max)) ? (max) : (x)))
#define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX))
#define SCREENMAXBOUND(x) IN_BOUND (-SCREENMAX, x, SCREENMAX)
#ifdef NS_IMPL_COCOA

View File

@ -128,7 +128,7 @@ pdumper_do_now_and_after_late_load (pdumper_hook hook)
if (dumped_with_pdumper_p ()) \
(variable) = (value); \
else \
eassert (EQ ((variable), (value))); \
eassert (EQ (variable, value)); \
} while (0)
/* Actually load a dump. */

View File

@ -462,7 +462,7 @@ enum
#define FRAME_X_WINDOW(f) FRAME_GTK_OUTER_WIDGET (f)
#define FRAME_NATIVE_WINDOW(f) GTK_WINDOW (FRAME_X_WINDOW (f))
#define FRAME_GDK_WINDOW(f) \
(gtk_widget_get_window (FRAME_GTK_WIDGET (f)))
gtk_widget_get_window (FRAME_GTK_WIDGET (f))
#define FRAME_X_DISPLAY(f) (FRAME_DISPLAY_INFO (f)->gdpy)

View File

@ -99,7 +99,7 @@
#define IS_REAL_ASCII(c) ((c) < 0200)
/* 1 if C is a unibyte character. */
#define ISUNIBYTE(c) (SINGLE_BYTE_CHAR_P ((c)))
#define ISUNIBYTE(c) SINGLE_BYTE_CHAR_P (c)
/* The Emacs definitions should not be directly affected by locales. */
@ -1345,7 +1345,7 @@ struct range_table_work_area
/* Set a range (RANGE_START, RANGE_END) to WORK_AREA. */
#define SET_RANGE_TABLE_WORK_AREA(work_area, range_start, range_end) \
do { \
EXTEND_RANGE_TABLE ((work_area), 2); \
EXTEND_RANGE_TABLE (work_area, 2); \
(work_area).table[(work_area).used++] = (range_start); \
(work_area).table[(work_area).used++] = (range_end); \
} while (false)
@ -1380,7 +1380,7 @@ struct range_table_work_area
/* Set the bit for character C in a list. */
#define SET_LIST_BIT(c) (b[((c)) / BYTEWIDTH] |= 1 << ((c) % BYTEWIDTH))
#define SET_LIST_BIT(c) (b[(c) / BYTEWIDTH] |= 1 << ((c) % BYTEWIDTH))
/* Store characters in the range FROM to TO in the bitmap at B (for
@ -1403,7 +1403,7 @@ struct range_table_work_area
C1 = TRANSLATE (C0); \
if (! ASCII_CHAR_P (C1)) \
{ \
SET_RANGE_TABLE_WORK_AREA ((work_area), C1, C1); \
SET_RANGE_TABLE_WORK_AREA (work_area, C1, C1); \
if ((C1 = RE_CHAR_TO_UNIBYTE (C1)) < 0) \
C1 = C0; \
} \
@ -1446,7 +1446,7 @@ struct range_table_work_area
} \
} \
if (I < USED) \
SET_RANGE_TABLE_WORK_AREA ((work_area), C2, C2); \
SET_RANGE_TABLE_WORK_AREA (work_area, C2, C2); \
} \
} \
} while (false)
@ -1458,7 +1458,7 @@ struct range_table_work_area
do { \
int C0, C1, C2, I, USED = RANGE_TABLE_WORK_USED (work_area); \
\
SET_RANGE_TABLE_WORK_AREA ((work_area), (FROM), (TO)); \
SET_RANGE_TABLE_WORK_AREA (work_area, FROM, TO); \
for (C0 = (FROM); C0 <= (TO); C0++) \
{ \
C1 = TRANSLATE (C0); \
@ -1482,7 +1482,7 @@ struct range_table_work_area
} \
} \
if (I < USED) \
SET_RANGE_TABLE_WORK_AREA ((work_area), C1, C1); \
SET_RANGE_TABLE_WORK_AREA (work_area, C1, C1); \
} \
} while (false)
@ -3755,7 +3755,7 @@ execute_charset (re_char **pp, int c, int corig, bool unibyte,
int count;
rtp = CHARSET_RANGE_TABLE (p);
EXTRACT_NUMBER_AND_INCR (count, rtp);
*pp = CHARSET_RANGE_TABLE_END ((rtp), (count));
*pp = CHARSET_RANGE_TABLE_END (rtp, count);
}
else
*pp += 2 + CHARSET_BITMAP_SIZE (p);

View File

@ -6860,7 +6860,7 @@ sfnt_interpret_trap (struct sfnt_interpreter *interpreter,
(interpreter->SP - interpreter->stack)
#define TRAP(why) \
sfnt_interpret_trap (interpreter, (why))
sfnt_interpret_trap (interpreter, why)
#define MOVE(a, b, n) \
memmove (a, b, (n) * sizeof (uint32_t))

View File

@ -86,12 +86,12 @@ static AVOID vfatal (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0);
#ifndef HAVE_ANDROID
#define OUTPUT(tty, a) \
emacs_tputs ((tty), a, \
emacs_tputs (tty, a, \
FRAME_TOTAL_LINES (XFRAME (selected_frame)) - curY (tty), \
cmputc)
#define OUTPUT1(tty, a) emacs_tputs ((tty), a, 1, cmputc)
#define OUTPUTL(tty, a, lines) emacs_tputs ((tty), a, lines, cmputc)
#define OUTPUT1(tty, a) emacs_tputs (tty, a, 1, cmputc)
#define OUTPUTL(tty, a, lines) emacs_tputs (tty, a, lines, cmputc)
#define OUTPUT_IF(tty, a) \
do { \
@ -99,7 +99,8 @@ static AVOID vfatal (const char *, va_list) ATTRIBUTE_FORMAT_PRINTF (1, 0);
OUTPUT (tty, a); \
} while (0)
#define OUTPUT1_IF(tty, a) do { if (a) emacs_tputs ((tty), a, 1, cmputc); } while (0)
#define OUTPUT1_IF(tty, a) \
do { if (a) emacs_tputs (tty, a, 1, cmputc); } while (0)
#endif
@ -1117,7 +1118,7 @@ per_line_cost (const char *str)
int *char_ins_del_vector;
#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_COLS ((f))])
#define char_ins_del_cost(f) (&char_ins_del_vector[FRAME_COLS (f)])
static void
calculate_ins_del_char_costs (struct frame *f)

View File

@ -2265,14 +2265,14 @@ font_supported_scripts (FONTSIGNATURE * sig)
/* Match a single subrange. SYM is set if bit N is set in subranges. */
#define SUBRANGE(n,sym) \
if (subranges[(n) / 32] & (1U << ((n) % 32))) \
supported = Fcons ((sym), supported)
supported = Fcons (sym, supported)
/* Match multiple subranges. SYM is set if any MASK bit is set in
subranges[0 - 3]. */
#define MASK_ANY(mask0,mask1,mask2,mask3,sym) \
if ((subranges[0] & (mask0)) || (subranges[1] & (mask1)) \
|| (subranges[2] & (mask2)) || (subranges[3] & (mask3))) \
supported = Fcons ((sym), supported)
supported = Fcons (sym, supported)
/* 0: ASCII (a.k.a. "Basic Latin"),
1: Latin-1 supplement, 2: Latin Extended A, 3: Latin Extended B,

View File

@ -595,11 +595,11 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Non-nil if window W is leaf window (has a buffer). */
#define WINDOW_LEAF_P(W) \
(BUFFERP ((W)->contents))
BUFFERP ((W)->contents)
/* Non-nil if window W is internal (is a parent window). */
#define WINDOW_INTERNAL_P(W) \
(WINDOWP ((W)->contents))
WINDOWP ((W)->contents)
/* True if window W is a horizontal combination of windows. */
#define WINDOW_HORIZONTAL_COMBINATION_P(W) \
@ -610,7 +610,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
(WINDOW_INTERNAL_P (W) && !(W)->horizontal)
/* Window W's XFRAME. */
#define WINDOW_XFRAME(W) (XFRAME (WINDOW_FRAME ((W))))
#define WINDOW_XFRAME(W) XFRAME (WINDOW_FRAME (W))
/* Whether window W is a pseudo window. */
#define WINDOW_PSEUDO_P(W) ((W)->pseudo_window_p)
@ -630,11 +630,11 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Return the canonical column width of the frame of window W. */
#define WINDOW_FRAME_COLUMN_WIDTH(W) \
(FRAME_COLUMN_WIDTH (WINDOW_XFRAME ((W))))
FRAME_COLUMN_WIDTH (WINDOW_XFRAME (W))
/* Return the canonical line height of the frame of window W. */
#define WINDOW_FRAME_LINE_HEIGHT(W) \
(FRAME_LINE_HEIGHT (WINDOW_XFRAME ((W))))
FRAME_LINE_HEIGHT (WINDOW_XFRAME (W))
/* Return the pixel width of window W. This includes dividers, scroll
bars, fringes and margins, if any. */
@ -666,7 +666,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
#define MIN_SAFE_WINDOW_HEIGHT (1)
#define MIN_SAFE_WINDOW_PIXEL_HEIGHT(W) \
(WINDOW_FRAME_LINE_HEIGHT (W))
WINDOW_FRAME_LINE_HEIGHT (W)
/* True if window W has no other windows to its left on its frame. */
#define WINDOW_LEFTMOST_P(W) \
@ -1011,7 +1011,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Height in pixels of the mode line.
May be zero if W doesn't have a mode line. */
#define WINDOW_MODE_LINE_HEIGHT(W) \
(window_wants_mode_line ((W)) \
(window_wants_mode_line (W) \
? CURRENT_MODE_LINE_HEIGHT (W) \
: 0)
@ -1049,7 +1049,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Pixel height of window W without mode and header/tab line and bottom
divider. */
#define WINDOW_BOX_TEXT_HEIGHT(W) \
(WINDOW_PIXEL_HEIGHT ((W)) \
(WINDOW_PIXEL_HEIGHT (W) \
- WINDOW_BOTTOM_DIVIDER_WIDTH (W) \
- WINDOW_SCROLL_BAR_AREA_HEIGHT (W) \
- WINDOW_MODE_LINE_HEIGHT (W) \
@ -1065,7 +1065,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Convert window W relative pixel X to frame pixel coordinates. */
#define WINDOW_TO_FRAME_PIXEL_X(W, X) \
((X) + WINDOW_BOX_LEFT_EDGE_X ((W)))
((X) + WINDOW_BOX_LEFT_EDGE_X (W))
/* Convert window W relative pixel Y to frame pixel coordinates. */
#define WINDOW_TO_FRAME_PIXEL_Y(W, Y) \
@ -1073,7 +1073,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Convert frame relative pixel X to window relative pixel X. */
#define FRAME_TO_WINDOW_PIXEL_X(W, X) \
((X) - WINDOW_BOX_LEFT_EDGE_X ((W)))
((X) - WINDOW_BOX_LEFT_EDGE_X (W))
/* Convert frame relative pixel Y to window relative pixel Y. */
#define FRAME_TO_WINDOW_PIXEL_Y(W, Y) \
@ -1082,7 +1082,7 @@ wset_next_buffers (struct window *w, Lisp_Object val)
/* Convert a text area relative x-position in window W to frame X
pixel coordinates. */
#define WINDOW_TEXT_TO_FRAME_PIXEL_X(W, X) \
(window_box_left ((W), TEXT_AREA) + (X))
window_box_left (W, TEXT_AREA) + (X)
/* This is the window in which the terminal's cursor should be left when
nothing is being done with it. This must always be a leaf window, and its

View File

@ -3084,9 +3084,9 @@ funcall_with_backtraces (ptrdiff_t nargs, Lisp_Object *args)
}
#define SAFE_CALLMANY(inhibit_quit, f, array) \
dsafe__call ((inhibit_quit), f, ARRAYELTS (array), array)
dsafe__call (inhibit_quit, f, ARRAYELTS (array), array)
#define dsafe_calln(inhibit_quit, ...) \
SAFE_CALLMANY ((inhibit_quit), \
SAFE_CALLMANY (inhibit_quit, \
backtrace_on_redisplay_error \
? funcall_with_backtraces : Ffuncall, \
((Lisp_Object []) {__VA_ARGS__}))
@ -6775,7 +6775,7 @@ load_overlay_strings (struct it *it, ptrdiff_t charpos)
\
entries[n].string = (STRING); \
entries[n].overlay = (OVERLAY); \
priority = Foverlay_get ((OVERLAY), Qpriority); \
priority = Foverlay_get (OVERLAY, Qpriority); \
entries[n].priority = FIXNUMP (priority) ? XFIXNUM (priority) : 0; \
entries[n].after_string_p = (AFTER_P); \
++n; \
@ -29523,9 +29523,9 @@ dump_glyph_string (struct glyph_string *s)
# define ALLOCATE_HDC(hdc, f) \
Lisp_Object prev_quit = Vinhibit_quit; \
Vinhibit_quit = Qt; \
HDC hdc = get_frame_dc ((f))
HDC hdc = get_frame_dc (f)
# define RELEASE_HDC(hdc, f) \
release_frame_dc ((f), (hdc)); \
release_frame_dc (f, hdc); \
Vinhibit_quit = prev_quit
#else
# define ALLOCATE_HDC(hdc, f)

View File

@ -293,15 +293,15 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
/* True if face attribute ATTR is unspecified. */
#define UNSPECIFIEDP(ATTR) EQ ((ATTR), Qunspecified)
#define UNSPECIFIEDP(ATTR) EQ (ATTR, Qunspecified)
/* True if face attribute ATTR is `ignore-defface'. */
#define IGNORE_DEFFACE_P(ATTR) EQ ((ATTR), QCignore_defface)
#define IGNORE_DEFFACE_P(ATTR) EQ (ATTR, QCignore_defface)
/* True if face attribute ATTR is `reset'. */
#define RESET_P(ATTR) EQ ((ATTR), Qreset)
#define RESET_P(ATTR) EQ (ATTR, Qreset)
/* Size of hash table of realized faces in face caches (should be a
prime number). */
@ -1756,26 +1756,26 @@ the WIDTH times as wide as FACE on FRAME. */)
/* Access face attributes of face LFACE, a Lisp vector. */
#define LFACE_FAMILY(LFACE) AREF ((LFACE), LFACE_FAMILY_INDEX)
#define LFACE_FOUNDRY(LFACE) AREF ((LFACE), LFACE_FOUNDRY_INDEX)
#define LFACE_HEIGHT(LFACE) AREF ((LFACE), LFACE_HEIGHT_INDEX)
#define LFACE_WEIGHT(LFACE) AREF ((LFACE), LFACE_WEIGHT_INDEX)
#define LFACE_SLANT(LFACE) AREF ((LFACE), LFACE_SLANT_INDEX)
#define LFACE_UNDERLINE(LFACE) AREF ((LFACE), LFACE_UNDERLINE_INDEX)
#define LFACE_INVERSE(LFACE) AREF ((LFACE), LFACE_INVERSE_INDEX)
#define LFACE_FOREGROUND(LFACE) AREF ((LFACE), LFACE_FOREGROUND_INDEX)
#define LFACE_BACKGROUND(LFACE) AREF ((LFACE), LFACE_BACKGROUND_INDEX)
#define LFACE_STIPPLE(LFACE) AREF ((LFACE), LFACE_STIPPLE_INDEX)
#define LFACE_SWIDTH(LFACE) AREF ((LFACE), LFACE_SWIDTH_INDEX)
#define LFACE_OVERLINE(LFACE) AREF ((LFACE), LFACE_OVERLINE_INDEX)
#define LFACE_STRIKE_THROUGH(LFACE) AREF ((LFACE), LFACE_STRIKE_THROUGH_INDEX)
#define LFACE_BOX(LFACE) AREF ((LFACE), LFACE_BOX_INDEX)
#define LFACE_FONT(LFACE) AREF ((LFACE), LFACE_FONT_INDEX)
#define LFACE_INHERIT(LFACE) AREF ((LFACE), LFACE_INHERIT_INDEX)
#define LFACE_FONTSET(LFACE) AREF ((LFACE), LFACE_FONTSET_INDEX)
#define LFACE_EXTEND(LFACE) AREF ((LFACE), LFACE_EXTEND_INDEX)
#define LFACE_FAMILY(LFACE) AREF (LFACE, LFACE_FAMILY_INDEX)
#define LFACE_FOUNDRY(LFACE) AREF (LFACE, LFACE_FOUNDRY_INDEX)
#define LFACE_HEIGHT(LFACE) AREF (LFACE, LFACE_HEIGHT_INDEX)
#define LFACE_WEIGHT(LFACE) AREF (LFACE, LFACE_WEIGHT_INDEX)
#define LFACE_SLANT(LFACE) AREF (LFACE, LFACE_SLANT_INDEX)
#define LFACE_UNDERLINE(LFACE) AREF (LFACE, LFACE_UNDERLINE_INDEX)
#define LFACE_INVERSE(LFACE) AREF (LFACE, LFACE_INVERSE_INDEX)
#define LFACE_FOREGROUND(LFACE) AREF (LFACE, LFACE_FOREGROUND_INDEX)
#define LFACE_BACKGROUND(LFACE) AREF (LFACE, LFACE_BACKGROUND_INDEX)
#define LFACE_STIPPLE(LFACE) AREF (LFACE, LFACE_STIPPLE_INDEX)
#define LFACE_SWIDTH(LFACE) AREF (LFACE, LFACE_SWIDTH_INDEX)
#define LFACE_OVERLINE(LFACE) AREF (LFACE, LFACE_OVERLINE_INDEX)
#define LFACE_STRIKE_THROUGH(LFACE) AREF (LFACE, LFACE_STRIKE_THROUGH_INDEX)
#define LFACE_BOX(LFACE) AREF (LFACE, LFACE_BOX_INDEX)
#define LFACE_FONT(LFACE) AREF (LFACE, LFACE_FONT_INDEX)
#define LFACE_INHERIT(LFACE) AREF (LFACE, LFACE_INHERIT_INDEX)
#define LFACE_FONTSET(LFACE) AREF (LFACE, LFACE_FONTSET_INDEX)
#define LFACE_EXTEND(LFACE) AREF (LFACE, LFACE_EXTEND_INDEX)
#define LFACE_DISTANT_FOREGROUND(LFACE) \
AREF ((LFACE), LFACE_DISTANT_FOREGROUND_INDEX)
AREF (LFACE, LFACE_DISTANT_FOREGROUND_INDEX)
/* True if LFACE is a Lisp face. A Lisp face is a vector of size
LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */

View File

@ -84,7 +84,7 @@ typedef GtkWidget *xt_or_gtk_widget;
#undef XSync
/* gdk_window_process_all_updates is deprecated in GDK 3.22. */
#if GTK_CHECK_VERSION (3, 22, 0)
#define XSync(d, b) do { XSync ((d), (b)); } while (false)
#define XSync(d, b) do { XSync (d, b); } while (false)
#else
#define XSync(d, b) do { gdk_window_process_all_updates (); \
XSync (d, b); } while (false)
@ -1402,7 +1402,7 @@ extern void x_mark_frame_dirty (struct frame *f);
code after any drawing command, but we can run code whenever
someone asks for the handle necessary to draw. */
#define FRAME_X_DRAWABLE(f) \
(x_mark_frame_dirty ((f)), FRAME_X_RAW_DRAWABLE ((f)))
(x_mark_frame_dirty (f), FRAME_X_RAW_DRAWABLE (f))
#ifdef HAVE_XDBE
#define FRAME_X_DOUBLE_BUFFERED_P(f) \
@ -1447,7 +1447,7 @@ extern void x_mark_frame_dirty (struct frame *f);
FRAME_X_WINDOW (f))
#else /* !USE_GTK */
#define FRAME_OUTER_WINDOW(f) (FRAME_X_WINDOW (f))
#define FRAME_OUTER_WINDOW(f) FRAME_X_WINDOW (f)
#endif /* !USE_GTK */
#endif

View File

@ -33,9 +33,9 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#ifdef WINDOWSNT
/* Cannot include <process.h> because of the local header by the same
name, sigh. */
uintptr_t _beginthread (void (__cdecl *)(void *), unsigned, void *);
uintptr_t _beginthread (void (__cdecl *) (void *), unsigned, void *);
# if !defined __x86_64__
# define ALIGN_STACK __attribute__((force_align_arg_pointer))
# define ALIGN_STACK __attribute__ ((force_align_arg_pointer))
# endif
# include <windows.h> /* for Sleep */
#else /* !WINDOWSNT */