Commit a9e7a9d5 authored by Paul Eggert's avatar Paul Eggert
Browse files

Minor tweaks to recently-changed code.

Space before paren, avoid overparenthesization, etc.
parent 51867ae2
...@@ -142,19 +142,19 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */ ...@@ -142,19 +142,19 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#endif #endif
#endif #endif
#if defined(HAVE_NTGUI) && !defined(DebPrint) #if defined HAVE_NTGUI && !defined DebPrint
# if defined(EMACSDEBUG) # ifdef EMACSDEBUG
extern void _DebPrint (const char *fmt, ...); extern void _DebPrint (const char *fmt, ...);
# define DebPrint(stuff) _DebPrint stuff # define DebPrint(stuff) _DebPrint stuff
# else # else
# define DebPrint(stuff) # define DebPrint(stuff)
# endif /* EMACSDEBUG */ # endif
#endif /* DebPrint */ #endif
#if defined(CYGWIN) && defined(HAVE_NTGUI) #if defined CYGWIN && defined HAVE_NTGUI
#define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */ # define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */
#define _WIN32_WINNT 0x500 /* Win2k */ # define _WIN32_WINNT 0x500 /* Win2k */
#endif /* CYGWIN && HAVE_NTGUI */ #endif
#ifdef emacs /* Don't do this for lib-src. */ #ifdef emacs /* Don't do this for lib-src. */
/* Tell regex.c to use a type compatible with Emacs. */ /* Tell regex.c to use a type compatible with Emacs. */
......
...@@ -34,18 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ ...@@ -34,18 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef WINDOWSNT #ifdef WINDOWSNT
#include <fcntl.h> #include <fcntl.h>
#include "w32.h" #include "w32.h"
#endif
#if defined (WINDOWSNT)
#include "w32heap.h" #include "w32heap.h"
#endif #endif
#if defined (WINDOWSNT) || defined (HAVE_NTGUI) #if defined WINDOWSNT || defined HAVE_NTGUI
#include "w32select.h" #include "w32select.h"
#include "w32font.h" #include "w32font.h"
#endif #endif
#if defined (HAVE_NTGUI) && defined (CYGWIN) #if defined HAVE_NTGUI && defined CYGWIN
#include "cygw32.h" #include "cygw32.h"
#endif #endif
...@@ -179,7 +176,7 @@ static uprintmax_t heap_bss_diff; ...@@ -179,7 +176,7 @@ static uprintmax_t heap_bss_diff;
We mark being in the exec'd process by a daemon name argument of We mark being in the exec'd process by a daemon name argument of
form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors, form "--daemon=\nFD0,FD1\nNAME" where FD are the pipe file descriptors,
NAME is the original daemon name, if any. */ NAME is the original daemon name, if any. */
#if defined (NS_IMPL_COCOA) || (defined (HAVE_NTGUI) && defined (CYGWIN)) #if defined NS_IMPL_COCOA || (defined HAVE_NTGUI && defined CYGWIN)
# define DAEMON_MUST_EXEC # define DAEMON_MUST_EXEC
#endif #endif
...@@ -698,7 +695,7 @@ main (int argc, char **argv) ...@@ -698,7 +695,7 @@ main (int argc, char **argv)
char *dname_arg = 0; char *dname_arg = 0;
#ifdef DAEMON_MUST_EXEC #ifdef DAEMON_MUST_EXEC
char dname_arg2[80]; char dname_arg2[80];
#endif /* DAEMON_MUST_EXEC */ #endif
char *ch_to_dir; char *ch_to_dir;
#if GC_MARK_STACK #if GC_MARK_STACK
...@@ -1378,9 +1375,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem ...@@ -1378,9 +1375,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#ifdef WINDOWSNT #ifdef WINDOWSNT
syms_of_ntproc (); syms_of_ntproc ();
#endif /* WINDOWSNT */ #endif /* WINDOWSNT */
#if defined (CYGWIN) && defined (HAVE_NTGUI) #if defined CYGWIN && defined HAVE_NTGUI
syms_of_cygw32 (); syms_of_cygw32 ();
#endif /* defined(CYGWIN) && defined (HAVE_NTGUI) */ #endif
syms_of_window (); syms_of_window ();
syms_of_xdisp (); syms_of_xdisp ();
syms_of_font (); syms_of_font ();
...@@ -1415,9 +1412,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem ...@@ -1415,9 +1412,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
syms_of_fontset (); syms_of_fontset ();
#endif /* HAVE_NTGUI */ #endif /* HAVE_NTGUI */
#if defined (WINDOWSNT) || defined (HAVE_NTGUI) #if defined WINDOWSNT || defined HAVE_NTGUI
syms_of_w32select (); syms_of_w32select ();
#endif /* WINDOWSNT || HAVE_NTGUI */ #endif
#ifdef MSDOS #ifdef MSDOS
syms_of_xmenu (); syms_of_xmenu ();
...@@ -1465,10 +1462,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem ...@@ -1465,10 +1462,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
globals_of_w32menu (); globals_of_w32menu ();
#endif /* HAVE_NTGUI */ #endif /* HAVE_NTGUI */
#if defined (WINDOWSNT) || defined (HAVE_NTGUI) #if defined WINDOWSNT || defined HAVE_NTGUI
globals_of_w32select (); globals_of_w32select ();
#endif /* WINDOWSNT || HAVE_NTGUI */ #endif
} }
init_charset (); init_charset ();
......
...@@ -75,11 +75,12 @@ typedef struct x_bitmap_record Bitmap_Record; ...@@ -75,11 +75,12 @@ typedef struct x_bitmap_record Bitmap_Record;
#endif /* HAVE_X_WINDOWS */ #endif /* HAVE_X_WINDOWS */
#ifdef HAVE_NTGUI #ifdef HAVE_NTGUI
# ifdef WINDOWSNT
/* We only need (or want) w32.h when we're _not_ /* We need (or want) w32.h only when we're _not_ compiling for Cygwin. */
* compiling for Cygwin */ #ifdef WINDOWSNT
# include "w32.h" # include "w32.h"
# endif /* WINDOWSNT */ #endif
/* W32_TODO : Color tables on W32. */ /* W32_TODO : Color tables on W32. */
#undef COLOR_TABLE_SUPPORT #undef COLOR_TABLE_SUPPORT
...@@ -571,7 +572,7 @@ extern Lisp_Object Vlibrary_cache; ...@@ -571,7 +572,7 @@ extern Lisp_Object Vlibrary_cache;
do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0) do { Vlibrary_cache = Fcons (Fcons (type, status), Vlibrary_cache); } while (0)
#else #else
#define CACHE_IMAGE_TYPE(type, status) #define CACHE_IMAGE_TYPE(type, status)
#endif /* WINDOWSNT */ #endif
#define ADD_IMAGE_TYPE(type) \ #define ADD_IMAGE_TYPE(type) \
do { Vimage_types = Fcons (type, Vimage_types); } while (0) do { Vimage_types = Fcons (type, Vimage_types); } while (0)
...@@ -594,7 +595,7 @@ define_image_type (struct image_type *type) ...@@ -594,7 +595,7 @@ define_image_type (struct image_type *type)
if (type->init) if (type->init)
{ {
#if defined (HAVE_NTGUI) && defined (WINDOWSNT) #if defined HAVE_NTGUI && defined WINDOWSNT
/* If we failed to load the library before, don't try again. */ /* If we failed to load the library before, don't try again. */
Lisp_Object tested = Fassq (target_type, Vlibrary_cache); Lisp_Object tested = Fassq (target_type, Vlibrary_cache);
if (CONSP (tested) && NILP (XCDR (tested))) if (CONSP (tested) && NILP (XCDR (tested)))
...@@ -3013,7 +3014,7 @@ static const struct image_keyword xpm_format[XPM_LAST] = ...@@ -3013,7 +3014,7 @@ static const struct image_keyword xpm_format[XPM_LAST] =
{":background", IMAGE_STRING_OR_NIL_VALUE, 0} {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
}; };
#if defined(HAVE_NTGUI) && defined(WINDOWSNT) #if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_xpm_functions (void); static bool init_xpm_functions (void);
#else #else
#define init_xpm_functions NULL #define init_xpm_functions NULL
...@@ -3240,7 +3241,7 @@ init_xpm_functions (void) ...@@ -3240,7 +3241,7 @@ init_xpm_functions (void)
#endif /* WINDOWSNT */ #endif /* WINDOWSNT */
#if defined (HAVE_NTGUI) && !defined (WINDOWSNT) #if defined HAVE_NTGUI && !defined WINDOWSNT
/* Glue for code below */ /* Glue for code below */
#define fn_XpmReadFileToImage XpmReadFileToImage #define fn_XpmReadFileToImage XpmReadFileToImage
#define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer #define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer
...@@ -5352,7 +5353,7 @@ static const struct image_keyword png_format[PNG_LAST] = ...@@ -5352,7 +5353,7 @@ static const struct image_keyword png_format[PNG_LAST] =
{":background", IMAGE_STRING_OR_NIL_VALUE, 0} {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
}; };
#if defined(HAVE_NTGUI) && defined (WINDOWSNT) #if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_png_functions (void); static bool init_png_functions (void);
#else #else
#define init_png_functions NULL #define init_png_functions NULL
...@@ -6011,7 +6012,7 @@ static const struct image_keyword jpeg_format[JPEG_LAST] = ...@@ -6011,7 +6012,7 @@ static const struct image_keyword jpeg_format[JPEG_LAST] =
{":background", IMAGE_STRING_OR_NIL_VALUE, 0} {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
}; };
#if defined(HAVE_NTGUI) && defined(WINDOWSNT) #if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_jpeg_functions (void); static bool init_jpeg_functions (void);
#else #else
#define init_jpeg_functions NULL #define init_jpeg_functions NULL
...@@ -6075,7 +6076,7 @@ jpeg_image_p (Lisp_Object object) ...@@ -6075,7 +6076,7 @@ jpeg_image_p (Lisp_Object object)
different name. This name, jpeg_boolean, remains in effect through different name. This name, jpeg_boolean, remains in effect through
the rest of image.c. the rest of image.c.
*/ */
#if defined (CYGWIN) && defined (HAVE_NTGUI) #if defined CYGWIN && defined HAVE_NTGUI
#define boolean jpeg_boolean #define boolean jpeg_boolean
#endif #endif
#include <jpeglib.h> #include <jpeglib.h>
...@@ -7071,7 +7072,7 @@ static const struct image_keyword gif_format[GIF_LAST] = ...@@ -7071,7 +7072,7 @@ static const struct image_keyword gif_format[GIF_LAST] =
{":background", IMAGE_STRING_OR_NIL_VALUE, 0} {":background", IMAGE_STRING_OR_NIL_VALUE, 0}
}; };
#if defined(HAVE_NTGUI) && defined(WINDOWSNT) #if defined HAVE_NTGUI && defined WINDOWSNT
static bool init_gif_functions (void); static bool init_gif_functions (void);
#else #else
#define init_gif_functions NULL #define init_gif_functions NULL
......
...@@ -313,7 +313,7 @@ static Lisp_Object Qmouse_fixup_help_message; ...@@ -313,7 +313,7 @@ static Lisp_Object Qmouse_fixup_help_message;
/* Symbols to denote kinds of events. */ /* Symbols to denote kinds of events. */
static Lisp_Object Qfunction_key; static Lisp_Object Qfunction_key;
Lisp_Object Qmouse_click; Lisp_Object Qmouse_click;
#if defined (HAVE_NTGUI) #ifdef HAVE_NTGUI
Lisp_Object Qlanguage_change; Lisp_Object Qlanguage_change;
#endif #endif
static Lisp_Object Qdrag_n_drop; static Lisp_Object Qdrag_n_drop;
...@@ -3947,7 +3947,7 @@ kbd_buffer_get_event (KBOARD **kbp, ...@@ -3947,7 +3947,7 @@ kbd_buffer_get_event (KBOARD **kbp,
x_activate_menubar (XFRAME (event->frame_or_window)); x_activate_menubar (XFRAME (event->frame_or_window));
} }
#endif #endif
#if defined (HAVE_NTGUI) #ifdef HAVE_NTGUI
else if (event->kind == LANGUAGE_CHANGE_EVENT) else if (event->kind == LANGUAGE_CHANGE_EVENT)
{ {
/* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */ /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */
...@@ -11394,7 +11394,7 @@ syms_of_keyboard (void) ...@@ -11394,7 +11394,7 @@ syms_of_keyboard (void)
DEFSYM (Qconfig_changed_event, "config-changed-event"); DEFSYM (Qconfig_changed_event, "config-changed-event");
DEFSYM (Qmenu_enable, "menu-enable"); DEFSYM (Qmenu_enable, "menu-enable");
#if defined (HAVE_NTGUI) #ifdef HAVE_NTGUI
DEFSYM (Qlanguage_change, "language-change"); DEFSYM (Qlanguage_change, "language-change");
#endif #endif
......
...@@ -107,7 +107,7 @@ enum event_kind ...@@ -107,7 +107,7 @@ enum event_kind
HORIZ_WHEEL_EVENT, /* A wheel event generated by a second HORIZ_WHEEL_EVENT, /* A wheel event generated by a second
horizontal wheel that is present on some horizontal wheel that is present on some
mice. See WHEEL_EVENT. */ mice. See WHEEL_EVENT. */
#if defined (HAVE_NTGUI) #ifdef HAVE_NTGUI
LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is
generated when HAVE_NTGUI or on Mac OS generated when HAVE_NTGUI or on Mac OS
when the keyboard layout or input when the keyboard layout or input
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment