]> git.eshelyaron.com Git - emacs.git/commitdiff
Modernize k&r cairo-related function declarations.
authorYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 16 Feb 2015 01:53:40 +0000 (10:53 +0900)
committerYAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
Mon, 16 Feb 2015 01:53:40 +0000 (10:53 +0900)
* gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
(xg_print_frames_dialog): Modernize k&r declarations.

* xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
(Fx_print_frames_dialog): Modernize k&r declarations.

* xterm.c (x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip)
(x_end_cr_clip, x_set_cr_source_with_gc_foreground)
(x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
(x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data)
(x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw)
(x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
(x_draw_rectangle, x_clear_window, x_fill_trapezoid_for_relief)
(x_clear_area): Modernize k&r declarations.

src/ChangeLog
src/gtkutil.c
src/xfns.c
src/xterm.c

index 5df51b487bd46103a6dcdbedaf38463be3c005e5..76ca07d2dda50bf747befbb0113cecae3ff7f041 100644 (file)
@@ -1,9 +1,23 @@
 2015-02-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
+       * gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
+       (xg_print_frames_dialog): Modernize k&r declarations.
+
+       * xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
+       (Fx_print_frames_dialog): Modernize k&r declarations.
+
        * xterm.c (x_draw_window_divider): Use x_fill_rectangle instead of
        XFillRectangle.
        (x_draw_horizontal_wave) [USE_CAIRO]: New function.
        (x_draw_underwave) [USE_CAIRO]: Use it.
+       (x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip)
+       (x_end_cr_clip, x_set_cr_source_with_gc_foreground)
+       (x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
+       (x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data)
+       (x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw)
+       (x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
+       (x_draw_rectangle, x_clear_window, x_fill_trapezoid_for_relief)
+       (x_clear_area): Modernize k&r declarations.
 
 2015-02-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
index f111ea80cef4486079cda87c8d820ecc19f4d440..e357eb857304e1bbb698d69a38f391c3523ad1bb 100644 (file)
@@ -4051,7 +4051,7 @@ static GtkPrintSettings *print_settings = NULL;
 static GtkPageSetup *page_setup = NULL;
 
 void
-xg_page_setup_dialog ()
+xg_page_setup_dialog (void)
 {
   GtkPageSetup *new_page_setup = NULL;
 
@@ -4065,7 +4065,7 @@ xg_page_setup_dialog ()
 }
 
 Lisp_Object
-xg_get_page_setup ()
+xg_get_page_setup (void)
 {
   Lisp_Object result, orientation_symbol;
   GtkPageOrientation orientation;
@@ -4107,11 +4107,8 @@ xg_get_page_setup ()
 }
 
 static void
-draw_page (operation, context, page_nr, user_data)
-     GtkPrintOperation *operation;
-     GtkPrintContext *context;
-     gint page_nr;
-     gpointer user_data;
+draw_page (GtkPrintOperation *operation, GtkPrintContext *context,
+          gint page_nr, gpointer user_data)
 {
   Lisp_Object frames = *((Lisp_Object *) user_data);
   struct frame *f = XFRAME (Fnth (make_number (page_nr), frames));
@@ -4121,8 +4118,7 @@ draw_page (operation, context, page_nr, user_data)
 }
 
 void
-xg_print_frames_dialog (frames)
-     Lisp_Object frames;
+xg_print_frames_dialog (Lisp_Object frames)
 {
   GtkPrintOperation *print;
   GtkPrintOperationResult res;
index 23af4388e5f52762d4456a43bbfcf9ef4e81c05a..5b591d317697f39903b2235a3c5e6ff6c188404c 100644 (file)
@@ -6158,8 +6158,7 @@ FRAMES should be nil (the selected frame), a frame, or a list of
 frames (each of which corresponds to one page).  Optional arg TYPE
 should be either `pdf' (default), `png', `ps', or `svg'.  Supported
 types are determined by the compile-time configuration of cairo.  */)
-     (frames, type)
-     Lisp_Object frames, type;
+     (Lisp_Object frames, Lisp_Object type)
 {
   Lisp_Object result, rest, tmp;
   cairo_surface_type_t surface_type;
@@ -6224,7 +6223,7 @@ types are determined by the compile-time configuration of cairo.  */)
 DEFUN ("x-page-setup-dialog", Fx_page_setup_dialog, Sx_page_setup_dialog, 0, 0, 0,
        doc: /* Pop up a page setup dialog.
 The current page setup can be obtained using `x-get-page-setup'.  */)
-     ()
+     (void)
 {
   block_input ();
   xg_page_setup_dialog ();
@@ -6247,7 +6246,7 @@ The return value is an alist containing the following keys:
 The paper width can be obtained as the sum of width, left-margin, and
 right-margin values.  Likewise, the paper height is the sum of height,
 top-margin, and bottom-margin values.  */)
-     ()
+     (void)
 {
   Lisp_Object result;
 
@@ -6263,8 +6262,7 @@ DEFUN ("x-print-frames-dialog", Fx_print_frames_dialog, Sx_print_frames_dialog,
 FRAMES should be nil (the selected frame), a frame, or a list of
 frames (each of which corresponds to one page).  Each frame should be
 visible.  */)
-     (frames)
-     Lisp_Object frames;
+     (Lisp_Object frames)
 {
   Lisp_Object rest, tmp;
 
index ae421a8d79589029d90a733a42295af3295688b7..6cc96587ab728253c6f2f46f5a8a99f0c50af391 100644 (file)
@@ -348,10 +348,7 @@ static cairo_status_t x_cr_accumulate_data (void *,
 #define FRAME_CR_SURFACE(f)    ((f)->output_data.x->cr_surface)
 
 static struct x_gc_ext_data *
-x_gc_get_ext_data (f, gc, create_if_not_found_p)
-     struct frame *f;
-     GC gc;
-     int create_if_not_found_p;
+x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p)
 {
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   XEDataObject object;
@@ -376,8 +373,7 @@ x_gc_get_ext_data (f, gc, create_if_not_found_p)
 }
 
 static void
-x_extension_initialize (dpyinfo)
-     struct x_display_info *dpyinfo;
+x_extension_initialize (struct x_display_info *dpyinfo)
 {
   XExtCodes *ext_codes = XAddExtension (dpyinfo->display);
 
@@ -398,9 +394,7 @@ x_cr_destroy_surface (struct frame *f)
 }
 
 cairo_t *
-x_begin_cr_clip (f, gc)
-     struct frame *f;
-     GC gc;
+x_begin_cr_clip (struct frame *f, GC gc)
 {
   cairo_t *cr = FRAME_CR_CONTEXT (f);
 
@@ -445,16 +439,13 @@ x_begin_cr_clip (f, gc)
 }
 
 void
-x_end_cr_clip (f)
-     struct frame *f;
+x_end_cr_clip (struct frame *f)
 {
   cairo_restore (FRAME_CR_CONTEXT (f));
 }
 
 void
-x_set_cr_source_with_gc_foreground (f, gc)
-     struct frame *f;
-     GC gc;
+x_set_cr_source_with_gc_foreground (struct frame *f, GC gc)
 {
   XGCValues xgcv;
   XColor color;
@@ -467,9 +458,7 @@ x_set_cr_source_with_gc_foreground (f, gc)
 }
 
 void
-x_set_cr_source_with_gc_background (f, gc)
-     struct frame *f;
-     GC gc;
+x_set_cr_source_with_gc_background (struct frame *f, GC gc)
 {
   XGCValues xgcv;
   XColor color;
@@ -487,10 +476,7 @@ static int max_fringe_bmp = 0;
 static cairo_pattern_t **fringe_bmp = 0;
 
 static void
-x_cr_define_fringe_bitmap (which, bits, h, wd)
-     int which;
-     unsigned short *bits;
-     int h, wd;
+x_cr_define_fringe_bitmap (int which, unsigned short *bits, int h, int wd)
 {
   int i, stride;
   cairo_surface_t *surface;
@@ -528,8 +514,7 @@ x_cr_define_fringe_bitmap (which, bits, h, wd)
 }
 
 static void
-x_cr_destroy_fringe_bitmap (which)
-     int which;
+x_cr_destroy_fringe_bitmap (int which)
 {
   if (which >= max_fringe_bmp)
     return;
@@ -588,9 +573,7 @@ x_cr_draw_image (struct frame *f,
 }
 
 void
-x_cr_draw_frame (cr, f)
-     cairo_t *cr;
-     struct frame *f;
+x_cr_draw_frame (cairo_t *cr, struct frame *f)
 {
   int width, height;
 
@@ -605,10 +588,8 @@ x_cr_draw_frame (cr, f)
 }
 
 static cairo_status_t
-x_cr_accumulate_data (closure, data, length)
-     void *closure;
-     const unsigned char *data;
-     unsigned int length;
+x_cr_accumulate_data (void *closure, const unsigned char *data,
+                     unsigned int length)
 {
   Lisp_Object *acc = (Lisp_Object *) closure;
 
@@ -618,8 +599,7 @@ x_cr_accumulate_data (closure, data, length)
 }
 
 static void
-x_cr_destroy (arg)
-     Lisp_Object arg;
+x_cr_destroy (Lisp_Object arg)
 {
   cairo_t *cr = (cairo_t *) XSAVE_POINTER (arg, 0);
 
@@ -629,9 +609,7 @@ x_cr_destroy (arg)
 }
 
 Lisp_Object
-x_cr_export_frames (frames, surface_type)
-     Lisp_Object frames;
-     cairo_surface_type_t surface_type;
+x_cr_export_frames (Lisp_Object frames, cairo_surface_type_t surface_type)
 {
   struct frame *f;
   cairo_surface_t *surface;
@@ -730,8 +708,7 @@ x_cr_export_frames (frames, surface_type)
 #endif /* USE_CAIRO */
 
 static void
-x_prepare_for_xlibdraw (f)
-     struct frame *f;
+x_prepare_for_xlibdraw (struct frame *f)
 {
 #ifdef USE_CAIRO
   if (f == NULL)
@@ -760,11 +737,7 @@ x_prepare_for_xlibdraw (f)
 }
 
 static void
-x_set_clip_rectangles (f, gc, rectangles, n)
-     struct frame *f;
-     GC gc;
-     XRectangle *rectangles;
-     int n;
+x_set_clip_rectangles (struct frame *f, GC gc, XRectangle *rectangles, int n)
 {
   XSetClipRectangles (FRAME_X_DISPLAY (f), gc, 0, 0, rectangles, n, Unsorted);
 #ifdef USE_CAIRO
@@ -780,9 +753,7 @@ x_set_clip_rectangles (f, gc, rectangles, n)
 }
 
 static void
-x_reset_clip_rectangles (f, gc)
-     struct frame *f;
-     GC gc;
+x_reset_clip_rectangles (struct frame *f, GC gc)
 {
   XSetClipMask (FRAME_X_DISPLAY (f), gc, None);
 #ifdef USE_CAIRO
@@ -796,11 +767,8 @@ x_reset_clip_rectangles (f, gc)
 }
 
 static void
-x_fill_rectangle (f, gc, x, y, width, height)
-     struct frame *f;
-     GC gc;
-     int x, y;
-     unsigned int width, height;
+x_fill_rectangle (struct frame *f, GC gc, int x, int y,
+                 unsigned int width, unsigned int height)
 {
 #ifdef USE_CAIRO
   cairo_t *cr;
@@ -817,11 +785,8 @@ x_fill_rectangle (f, gc, x, y, width, height)
 }
 
 static void
-x_draw_rectangle (f, gc, x, y, width, height)
-     struct frame *f;
-     GC gc;
-     int x, y;
-     unsigned int width, height;
+x_draw_rectangle (struct frame *f, GC gc, int x, int y,
+                 unsigned int width, unsigned int height)
 {
 #ifdef USE_CAIRO
   cairo_t *cr;
@@ -839,8 +804,7 @@ x_draw_rectangle (f, gc, x, y, width, height)
 }
 
 static void
-x_clear_window (f)
-     struct frame *f;
+x_clear_window (struct frame *f)
 {
 #ifdef USE_CAIRO
   cairo_t *cr;
@@ -856,12 +820,8 @@ x_clear_window (f)
 
 #ifdef USE_CAIRO
 static void
-x_fill_trapezoid_for_relief (f, gc, x, y, width, height, top_p)
-     struct frame *f;
-     GC gc;
-     int x, y;
-     unsigned int width, height;
-     int top_p;
+x_fill_trapezoid_for_relief (struct frame *f, GC gc, int x, int y,
+                            unsigned int width, unsigned int height, int top_p)
 {
   cairo_t *cr;
 
@@ -3667,10 +3627,7 @@ x_clear_area1 (Display *dpy, Window window,
 
 
 void
-x_clear_area (f, x, y, width, height)
-     struct frame *f;
-     int x, y;
-     int width, height;
+x_clear_area (struct frame *f, int x, int y, int width, int height)
 {
 #ifdef USE_CAIRO
   cairo_t *cr;