diff options
| author | Dmitry Antipov | 2013-10-29 20:08:08 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2013-10-29 20:08:08 +0400 |
| commit | 2d9783e0b938d0e3550fee7efbb3c6b8b5f18462 (patch) | |
| tree | 09159c8a6b0b4d12bc00a9c21f80f641f69bdb47 /src | |
| parent | 23af34b00ca14782ba5d1bbada43cd26962739b4 (diff) | |
| download | emacs-2d9783e0b938d0e3550fee7efbb3c6b8b5f18462.tar.gz emacs-2d9783e0b938d0e3550fee7efbb3c6b8b5f18462.zip | |
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 @@ | |||
| 1 | 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. | ||
| 4 | * ftxfont.c (ftxfont_get_gcs): | ||
| 5 | * gtkutil.c (xg_set_widget_bg, xg_set_background_color): | ||
| 6 | * xfaces.c (x_free_colors, x_free_dpy_colors) | ||
| 7 | (x_create_gc, unload_color): | ||
| 8 | * xselect.c (x_property_data_to_lisp): | ||
| 9 | * xsettings.c (parse_settings): | ||
| 10 | * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color) | ||
| 11 | (get_bits_and_offset): Adjust definition. | ||
| 12 | * frame.c (XParseGeometry): Adjust locals. | ||
| 13 | * lisp.h (toplevel): Adjust EMACS_UINT type definition. | ||
| 14 | * regex.h (toplevel): Likewise for reg_syntax_t. | ||
| 15 | |||
| 1 | 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca> | 16 | 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 17 | ||
| 3 | * eval.c (run_hook_with_args): Use FUNCTIONP. | 18 | * 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, | |||
| 3844 | { | 3844 | { |
| 3845 | int mask = NoValue; | 3845 | int mask = NoValue; |
| 3846 | char *strind; | 3846 | char *strind; |
| 3847 | unsigned long int tempWidth, tempHeight; | 3847 | unsigned long tempWidth, tempHeight; |
| 3848 | long int tempX, tempY; | 3848 | long int tempX, tempY; |
| 3849 | char *nextCharacter; | 3849 | char *nextCharacter; |
| 3850 | 3850 | ||
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 | |||
| 57 | /* Return an array of 6 GCs for antialiasing. */ | 57 | /* Return an array of 6 GCs for antialiasing. */ |
| 58 | 58 | ||
| 59 | static GC * | 59 | static GC * |
| 60 | ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned int background) | 60 | ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long background) |
| 61 | { | 61 | { |
| 62 | XColor color; | 62 | XColor color; |
| 63 | XGCValues xgcv; | 63 | 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) | |||
| 1038 | /* Set the background of widget W to PIXEL. */ | 1038 | /* Set the background of widget W to PIXEL. */ |
| 1039 | 1039 | ||
| 1040 | static void | 1040 | static void |
| 1041 | xg_set_widget_bg (struct frame *f, GtkWidget *w, long unsigned int pixel) | 1041 | xg_set_widget_bg (struct frame *f, GtkWidget *w, unsigned long pixel) |
| 1042 | { | 1042 | { |
| 1043 | #ifdef HAVE_GTK3 | 1043 | #ifdef HAVE_GTK3 |
| 1044 | GdkRGBA bg; | 1044 | GdkRGBA bg; |
| @@ -1439,7 +1439,7 @@ x_wm_set_size_hint (struct frame *f, long int flags, bool user_position) | |||
| 1439 | BG is the pixel value to change to. */ | 1439 | BG is the pixel value to change to. */ |
| 1440 | 1440 | ||
| 1441 | void | 1441 | void |
| 1442 | xg_set_background_color (struct frame *f, long unsigned int bg) | 1442 | xg_set_background_color (struct frame *f, unsigned long bg) |
| 1443 | { | 1443 | { |
| 1444 | if (FRAME_GTK_WIDGET (f)) | 1444 | if (FRAME_GTK_WIDGET (f)) |
| 1445 | { | 1445 | { |
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; | |||
| 71 | # define pI "ll" | 71 | # define pI "ll" |
| 72 | # elif INT_MAX < LONG_MAX | 72 | # elif INT_MAX < LONG_MAX |
| 73 | typedef long int EMACS_INT; | 73 | typedef long int EMACS_INT; |
| 74 | typedef unsigned long int EMACS_UINT; | 74 | typedef unsigned long EMACS_UINT; |
| 75 | # define EMACS_INT_MAX LONG_MAX | 75 | # define EMACS_INT_MAX LONG_MAX |
| 76 | # define pI "l" | 76 | # define pI "l" |
| 77 | # else | 77 | # 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" { | |||
| 40 | The bits are given in alphabetical order, and | 40 | The bits are given in alphabetical order, and |
| 41 | the definitions shifted by one from the previous bit; thus, when we | 41 | the definitions shifted by one from the previous bit; thus, when we |
| 42 | add or remove a bit, only one other definition need change. */ | 42 | add or remove a bit, only one other definition need change. */ |
| 43 | typedef unsigned long int reg_syntax_t; | 43 | typedef unsigned long reg_syntax_t; |
| 44 | 44 | ||
| 45 | /* If this bit is not set, then \ inside a bracket expression is literal. | 45 | /* If this bit is not set, then \ inside a bracket expression is literal. |
| 46 | If set, then such a \ quotes the following character. */ | 46 | 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, | |||
| 535 | is called. */ | 535 | is called. */ |
| 536 | 536 | ||
| 537 | void | 537 | void |
| 538 | x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) | 538 | x_free_colors (struct frame *f, unsigned long *pixels, int npixels) |
| 539 | { | 539 | { |
| 540 | int class = FRAME_DISPLAY_INFO (f)->visual->class; | 540 | int class = FRAME_DISPLAY_INFO (f)->visual->class; |
| 541 | 541 | ||
| @@ -560,7 +560,7 @@ x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) | |||
| 560 | 560 | ||
| 561 | void | 561 | void |
| 562 | x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, | 562 | x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, |
| 563 | long unsigned int *pixels, int npixels) | 563 | unsigned long *pixels, int npixels) |
| 564 | { | 564 | { |
| 565 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); | 565 | struct x_display_info *dpyinfo = x_display_info_for_display (dpy); |
| 566 | int class = dpyinfo->visual->class; | 566 | int class = dpyinfo->visual->class; |
| @@ -581,7 +581,7 @@ x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, | |||
| 581 | are given by XGCV and MASK. */ | 581 | are given by XGCV and MASK. */ |
| 582 | 582 | ||
| 583 | static GC | 583 | static GC |
| 584 | x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv) | 584 | x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv) |
| 585 | { | 585 | { |
| 586 | GC gc; | 586 | GC gc; |
| 587 | block_input (); | 587 | block_input (); |
| @@ -1298,7 +1298,7 @@ load_face_colors (struct frame *f, struct face *face, | |||
| 1298 | /* Free color PIXEL on frame F. */ | 1298 | /* Free color PIXEL on frame F. */ |
| 1299 | 1299 | ||
| 1300 | void | 1300 | void |
| 1301 | unload_color (struct frame *f, long unsigned int pixel) | 1301 | unload_color (struct frame *f, unsigned long pixel) |
| 1302 | { | 1302 | { |
| 1303 | if (pixel != -1) | 1303 | if (pixel != -1) |
| 1304 | { | 1304 | { |
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) | |||
| 2365 | 2365 | ||
| 2366 | Lisp_Object | 2366 | Lisp_Object |
| 2367 | x_property_data_to_lisp (struct frame *f, const unsigned char *data, | 2367 | x_property_data_to_lisp (struct frame *f, const unsigned char *data, |
| 2368 | Atom type, int format, long unsigned int size) | 2368 | Atom type, int format, unsigned long size) |
| 2369 | { | 2369 | { |
| 2370 | ptrdiff_t format_bytes = format >> 3; | 2370 | ptrdiff_t format_bytes = format >> 3; |
| 2371 | if (PTRDIFF_MAX / format_bytes < size) | 2371 | 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) | |||
| 393 | 393 | ||
| 394 | static int | 394 | static int |
| 395 | parse_settings (unsigned char *prop, | 395 | parse_settings (unsigned char *prop, |
| 396 | long unsigned int bytes, | 396 | unsigned long bytes, |
| 397 | struct xsettings *settings) | 397 | struct xsettings *settings) |
| 398 | { | 398 | { |
| 399 | Lisp_Object byteorder = Fbyteorder (); | 399 | 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) | |||
| 1643 | get color reference counts right. */ | 1643 | get color reference counts right. */ |
| 1644 | 1644 | ||
| 1645 | unsigned long | 1645 | unsigned long |
| 1646 | x_copy_color (struct frame *f, long unsigned int pixel) | 1646 | x_copy_color (struct frame *f, unsigned long pixel) |
| 1647 | { | 1647 | { |
| 1648 | XColor color; | 1648 | XColor color; |
| 1649 | 1649 | ||
| @@ -1681,7 +1681,8 @@ x_copy_color (struct frame *f, long unsigned int pixel) | |||
| 1681 | Value is non-zero if successful. */ | 1681 | Value is non-zero if successful. */ |
| 1682 | 1682 | ||
| 1683 | static bool | 1683 | static bool |
| 1684 | x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) | 1684 | x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, |
| 1685 | unsigned long *pixel, double factor, int delta) | ||
| 1685 | { | 1686 | { |
| 1686 | XColor color, new; | 1687 | XColor color, new; |
| 1687 | long bright; | 1688 | long bright; |
| @@ -1757,7 +1758,8 @@ x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long un | |||
| 1757 | be allocated, use DEFAULT_PIXEL, instead. */ | 1758 | be allocated, use DEFAULT_PIXEL, instead. */ |
| 1758 | 1759 | ||
| 1759 | static void | 1760 | static void |
| 1760 | x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel) | 1761 | x_setup_relief_color (struct frame *f, struct relief *relief, double factor, |
| 1762 | int delta, unsigned long default_pixel) | ||
| 1761 | { | 1763 | { |
| 1762 | XGCValues xgcv; | 1764 | XGCValues xgcv; |
| 1763 | struct x_output *di = f->output_data.x; | 1765 | struct x_output *di = f->output_data.x; |
| @@ -9686,7 +9688,7 @@ same_x_server (const char *name1, const char *name2) | |||
| 9686 | get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET | 9688 | get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET |
| 9687 | to 5. */ | 9689 | to 5. */ |
| 9688 | static void | 9690 | static void |
| 9689 | get_bits_and_offset (long unsigned int mask, int *bits, int *offset) | 9691 | get_bits_and_offset (unsigned long mask, int *bits, int *offset) |
| 9690 | { | 9692 | { |
| 9691 | int nr = 0; | 9693 | int nr = 0; |
| 9692 | int off = 0; | 9694 | int off = 0; |