]> code.delx.au - gnu-emacs/commitdiff
Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
authorDmitry Antipov <dmantipov@yandex.ru>
Tue, 29 Oct 2013 16:08:08 +0000 (20:08 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Tue, 29 Oct 2013 16:08:08 +0000 (20:08 +0400)
* 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.

src/ChangeLog
src/frame.c
src/ftxfont.c
src/gtkutil.c
src/lisp.h
src/regex.h
src/xfaces.c
src/xselect.c
src/xsettings.c
src/xterm.c

index 717745354624c335aa0c8242b2f3e698d635dbfc..287215392db4417b53e2d3a43d7f05bb707fe402 100644 (file)
@@ -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.
index f2218b7bcb7574823c434171bdbf2ecaee2ef3d4..14e8fabd1497c570854cd62915a11c705be4c3cb 100644 (file)
@@ -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;
 
index 8050f292600a53474fadb2f0a5e6f6097056fc0d..d1aa3e404037c9d5602054a5e22a60d38794913c 100644 (file)
@@ -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;
index e20d01521f08ac9a244ee3ee1be2b2f80cbe490d..9edcc2a6ef49e7b61c690d867ab343a26aea1fc6 100644 (file)
@@ -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))
     {
index e1a6fc7c91a01dd0bfcb51c260554ddb6471b9e2..c8b9497a314796e15ea244f012b5e2f08d5987c8 100644 (file)
@@ -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
index bb737df52394ba01557b944d79d48d556a40d708..8f5bb56fbd143e628d96aca5bfd8506974c25388 100644 (file)
@@ -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.  */
index 21a66d390d1365f1782445120ab21cbd5d20eb87..2145d7ff59ddec9d5db780a5570b2cecdaab5b1c 100644 (file)
@@ -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)
     {
index b4f4f9d43b60cadf8e9081dcf31f672254268caa..34edc49feab9000e5d10c3fd88769820a7ae5092 100644 (file)
@@ -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)
index e5a66c4cf0a7a91eaaee82e957c676699b40fdfc..cff0c99548dc5dfed290adbd1fb30b87eb54bc3f 100644 (file)
@@ -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 ();
index c7fe9ec6ac8c59089eef3e93f812b4acc481388d..906954618fef40774736aa3a5899d7c2f72b94d8 100644 (file)
@@ -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;