diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-10-29 20:08:08 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-10-29 20:08:08 +0400 |
commit | 2d9783e0b938d0e3550fee7efbb3c6b8b5f18462 (patch) | |
tree | 09159c8a6b0b4d12bc00a9c21f80f641f69bdb47 /src | |
parent | 23af34b00ca14782ba5d1bbada43cd26962739b4 (diff) | |
download | emacs-2d9783e0b938d0e3550fee7efbb3c6b8b5f18462.tar.gz |
Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
* ftxfont.c (ftxfont_get_gcs):
* gtkutil.c (xg_set_widget_bg, xg_set_background_color):
* xfaces.c (x_free_colors, x_free_dpy_colors)
(x_create_gc, unload_color):
* xselect.c (x_property_data_to_lisp):
* xsettings.c (parse_settings):
* xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
(get_bits_and_offset): Adjust definition.
* frame.c (XParseGeometry): Adjust locals.
* lisp.h (toplevel): Adjust EMACS_UINT type definition.
* regex.h (toplevel): Likewise for reg_syntax_t.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 15 | ||||
-rw-r--r-- | src/frame.c | 2 | ||||
-rw-r--r-- | src/ftxfont.c | 2 | ||||
-rw-r--r-- | src/gtkutil.c | 4 | ||||
-rw-r--r-- | src/lisp.h | 2 | ||||
-rw-r--r-- | src/regex.h | 2 | ||||
-rw-r--r-- | src/xfaces.c | 8 | ||||
-rw-r--r-- | src/xselect.c | 2 | ||||
-rw-r--r-- | src/xsettings.c | 2 | ||||
-rw-r--r-- | src/xterm.c | 10 |
10 files changed, 33 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 71774535462..287215392db 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2013-10-29 Dmitry Antipov <dmantipov@yandex.ru> + + Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. + * ftxfont.c (ftxfont_get_gcs): + * gtkutil.c (xg_set_widget_bg, xg_set_background_color): + * xfaces.c (x_free_colors, x_free_dpy_colors) + (x_create_gc, unload_color): + * xselect.c (x_property_data_to_lisp): + * xsettings.c (parse_settings): + * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color) + (get_bits_and_offset): Adjust definition. + * frame.c (XParseGeometry): Adjust locals. + * lisp.h (toplevel): Adjust EMACS_UINT type definition. + * regex.h (toplevel): Likewise for reg_syntax_t. + 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca> * eval.c (run_hook_with_args): Use FUNCTIONP. diff --git a/src/frame.c b/src/frame.c index f2218b7bcb7..14e8fabd149 100644 --- a/src/frame.c +++ b/src/frame.c @@ -3844,7 +3844,7 @@ XParseGeometry (char *string, { int mask = NoValue; char *strind; - unsigned long int tempWidth, tempHeight; + unsigned long tempWidth, tempHeight; long int tempX, tempY; char *nextCharacter; diff --git a/src/ftxfont.c b/src/ftxfont.c index 8050f292600..d1aa3e40403 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -57,7 +57,7 @@ struct ftxfont_frame_data /* Return an array of 6 GCs for antialiasing. */ static GC * -ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned int background) +ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long background) { XColor color; XGCValues xgcv; diff --git a/src/gtkutil.c b/src/gtkutil.c index e20d01521f0..9edcc2a6ef4 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -1038,7 +1038,7 @@ xg_win_to_widget (Display *dpy, Window wdesc) /* Set the background of widget W to PIXEL. */ static void -xg_set_widget_bg (struct frame *f, GtkWidget *w, long unsigned int pixel) +xg_set_widget_bg (struct frame *f, GtkWidget *w, unsigned long pixel) { #ifdef HAVE_GTK3 GdkRGBA bg; @@ -1439,7 +1439,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position) BG is the pixel value to change to. */ void -xg_set_background_color (struct frame *f, long unsigned int bg) +xg_set_background_color (struct frame *f, unsigned long bg) { if (FRAME_GTK_WIDGET (f)) { diff --git a/src/lisp.h b/src/lisp.h index e1a6fc7c91a..c8b9497a314 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -71,7 +71,7 @@ typedef unsigned long long int EMACS_UINT; # define pI "ll" # elif INT_MAX < LONG_MAX typedef long int EMACS_INT; -typedef unsigned long int EMACS_UINT; +typedef unsigned long EMACS_UINT; # define EMACS_INT_MAX LONG_MAX # define pI "l" # else diff --git a/src/regex.h b/src/regex.h index bb737df5239..8f5bb56fbd1 100644 --- a/src/regex.h +++ b/src/regex.h @@ -40,7 +40,7 @@ extern "C" { The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ -typedef unsigned long int reg_syntax_t; +typedef unsigned long reg_syntax_t; /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ diff --git a/src/xfaces.c b/src/xfaces.c index 21a66d390d1..2145d7ff59d 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -535,7 +535,7 @@ DEFUN ("dump-colors", Fdump_colors, Sdump_colors, 0, 0, 0, is called. */ void -x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) +x_free_colors (struct frame *f, unsigned long *pixels, int npixels) { int class = FRAME_DISPLAY_INFO (f)->visual->class; @@ -560,7 +560,7 @@ x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) void x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, - long unsigned int *pixels, int npixels) + unsigned long *pixels, int npixels) { struct x_display_info *dpyinfo = x_display_info_for_display (dpy); int class = dpyinfo->visual->class; @@ -581,7 +581,7 @@ x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, are given by XGCV and MASK. */ static GC -x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv) +x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv) { GC gc; block_input (); @@ -1298,7 +1298,7 @@ load_face_colors (struct frame *f, struct face *face, /* Free color PIXEL on frame F. */ void -unload_color (struct frame *f, long unsigned int pixel) +unload_color (struct frame *f, unsigned long pixel) { if (pixel != -1) { diff --git a/src/xselect.c b/src/xselect.c index b4f4f9d43b6..34edc49feab 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2365,7 +2365,7 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format) Lisp_Object x_property_data_to_lisp (struct frame *f, const unsigned char *data, - Atom type, int format, long unsigned int size) + Atom type, int format, unsigned long size) { ptrdiff_t format_bytes = format >> 3; if (PTRDIFF_MAX / format_bytes < size) diff --git a/src/xsettings.c b/src/xsettings.c index e5a66c4cf0a..cff0c99548d 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -393,7 +393,7 @@ get_prop_window (struct x_display_info *dpyinfo) static int parse_settings (unsigned char *prop, - long unsigned int bytes, + unsigned long bytes, struct xsettings *settings) { Lisp_Object byteorder = Fbyteorder (); diff --git a/src/xterm.c b/src/xterm.c index c7fe9ec6ac8..906954618fe 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1643,7 +1643,7 @@ x_alloc_nearest_color (struct frame *f, Colormap cmap, XColor *color) get color reference counts right. */ unsigned long -x_copy_color (struct frame *f, long unsigned int pixel) +x_copy_color (struct frame *f, unsigned long pixel) { XColor color; @@ -1681,7 +1681,8 @@ x_copy_color (struct frame *f, long unsigned int pixel) Value is non-zero if successful. */ static bool -x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) +x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, + unsigned long *pixel, double factor, int delta) { XColor color, new; long bright; @@ -1757,7 +1758,8 @@ x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long un be allocated, use DEFAULT_PIXEL, instead. */ static void -x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel) +x_setup_relief_color (struct frame *f, struct relief *relief, double factor, + int delta, unsigned long default_pixel) { XGCValues xgcv; struct x_output *di = f->output_data.x; @@ -9686,7 +9688,7 @@ same_x_server (const char *name1, const char *name2) get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET to 5. */ static void -get_bits_and_offset (long unsigned int mask, int *bits, int *offset) +get_bits_and_offset (unsigned long mask, int *bits, int *offset) { int nr = 0; int off = 0; |