File: 13_prototypes3.patch

package info (click to toggle)
xfig 1%3A3.2.9a-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,960 kB
  • sloc: ansic: 76,504; sh: 3,214; makefile: 303; xml: 112; javascript: 22; csh: 5
file content (856 lines) | stat: -rw-r--r-- 24,305 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Date: Sat, 1 Feb 2025 09:50:16 +0100
Origin: upstream, https://sourceforge.net/p/mcj/xfig/ci/530c92f
Forwarded: not-needed
Bug: https://sourceforge.net/p/mcj/tickets/194/
Bug-Debian: https://bugs.debian.org/1098137
Last-Update: 2025-09-05
Subject: Fix old style definitions

--- a/src/d_text.c
+++ b/src/d_text.c
@@ -150,7 +150,7 @@ static char	preedit_filename[PATH_MAX] =
 static void     open_preedit_proc(int x, int y, unsigned int shift);
 static void     close_preedit_proc(int x, int y, unsigned int shift);
 static void     paste_preedit_proc(int x, int y, unsigned int shift);
-static Boolean	is_preedit_running();
+static Boolean	is_preedit_running(void);
 
 /********************************************************/
 /*							*/
--- a/src/d_text.h
+++ b/src/d_text.h
@@ -35,7 +35,7 @@ extern XIC	xim_ic;
 extern Boolean	xim_active;
 extern Boolean	xim_initialize(Widget w);
 extern void	xim_set_ic_geometry(XIC ic, int width, int height);
-extern void	kill_preedit();
+extern void	kill_preedit(void);
 extern void	text_drawing_selected (void);
 
 #endif
--- a/src/e_chop.c
+++ b/src/e_chop.c
@@ -140,19 +140,19 @@ clear_axe_objects(int x, int y, unsigned
 }
 
 static int
-point_sort_fcn(a, b)
-     s_point_s * a;
-     s_point_s * b;
+point_sort_fcn(const void *_a, const void *_b)
 {
+  const s_point_s *a = _a, *b = _b;
+
   return (a->dist == b->dist) ? 0
     : ((a->dist < b->dist) ? -1 : 1);
 }
 
 static int
-point_sort_reverse_fcn(a, b)
-     s_point_s * a;
-     s_point_s * b;
+point_sort_reverse_fcn(const void *_a, const void *_b)
 {
+  const s_point_s *a = _a, *b = _b;
+
   return (a->dist == b->dist) ? 0
     : ((a->dist > b->dist) ? -1 : 1);
 }
--- a/src/e_edit.c
+++ b/src/e_edit.c
@@ -328,7 +328,7 @@ static char	*pic_names[] = {
 static int	ellipse_flag;
 static intptr_t	fill_flag;
 static intptr_t	flip_pic_flag;
-static void	(*done_proc) ();
+static void	(*done_proc) (void);
 static int	button_result;
 static intptr_t	textjust;
 static Color	pen_color, fill_color;
--- a/src/u_search.c
+++ b/src/u_search.c
@@ -139,10 +139,7 @@ next_arc_found(int x, int y, int toleran
 /* this rotates (x, y) into a coordinate system orthogonal to the ellipse semi-axes */
 
 inline static void
-vector_rotate(a, b, angle)
-     double * a;
-     double * b;
-     float angle;
+vector_rotate(double *a, double *b, float angle)
 {
   double x = fabs((*a * cos((double)angle)) - (*b * sin((double)angle)));
   double y = fabs((*a * sin((double)angle)) + (*b * cos((double)angle)));
--- a/src/w_canvas.c
+++ b/src/w_canvas.c
@@ -76,7 +76,7 @@ void		(*canvas_leftbut_proc) (int x, int
 void		(*canvas_middlebut_proc) (int x, int y, unsigned int shift);
 void		(*canvas_middlebut_save) (int x, int y, unsigned int shift);
 void		(*canvas_rightbut_proc) (int x, int y, unsigned int shift);
-void		(*return_proc) ();
+void		(*return_proc) (void);
 
 int		clip_xmin, clip_ymin, clip_xmax, clip_ymax;
 int		clip_width, clip_height;
--- a/src/w_canvas.h
+++ b/src/w_canvas.h
@@ -31,7 +31,7 @@ extern void	(*canvas_leftbut_proc) (int
 extern void	(*canvas_middlebut_proc) (int x, int y, unsigned int shift);
 extern void	(*canvas_middlebut_save) (int x, int y, unsigned int shift);
 extern void	(*canvas_rightbut_proc) (int x, int y, unsigned int shift);
-extern void	(*return_proc) ();
+extern void	(*return_proc) (void);
 extern void	null_proc(void);
 extern void	null_proc_button(int x, int y, unsigned int shift);
 extern void	null_proc_kbd(char *c, int clen, KeySym keysym);
--- a/src/w_cmdpanel.c
+++ b/src/w_cmdpanel.c
@@ -828,7 +828,7 @@ delete_all_cmd(Widget w, int closure, in
 /* Toggle canvas orientation from Portrait to Landscape or vice versa */
 
 void
-change_orient()
+change_orient(void)
 {
 	Dimension	formw, formh;
 	int		dx, dy;
--- a/src/w_cmdpanel.h
+++ b/src/w_cmdpanel.h
@@ -50,15 +50,15 @@ typedef struct main_menu_struct {
 
 extern main_menu_info main_menus[];
 
-extern void	init_cmd_panel();
+extern void	init_cmd_panel(void);
 extern void	add_cmd_actions(void);
 extern void	quit(Widget w, XtPointer closure, XtPointer call_data);
 extern void	new(Widget w, XtPointer closure, XtPointer call_data);
 extern void	paste(Widget w, XtPointer closure, XtPointer call_data);
 extern void	delete_all_cmd(Widget w, int closure, int call_data);
-extern void	setup_cmd_panel();
-extern void	change_orient();
-extern void	setup_cmd_panel();
+extern void	setup_cmd_panel(void);
+extern void	change_orient(void);
+extern void	setup_cmd_panel(void);
 extern void	show_global_settings(Widget w);
 extern void	acc_load_recent_file(Widget w, XEvent *event, String *params, Cardinal *nparams);
 extern int	num_main_menus(void);
--- a/src/w_color.h
+++ b/src/w_color.h
@@ -90,13 +90,13 @@ typedef struct _CMY {
 
 extern RGB	RGBWhite, RGBBlack;
 
-RGB	MixRGB();
-RGB	MixHSV();
+RGB	MixRGB(void);
+RGB	MixHSV(void);
 RGB	HSVToRGB(HSV hsv);
 HSV	RGBToHSV(RGB rgb);
-float	RGBDist();
+float	RGBDist(void);
 RGB	PctToRGB(float rr, float gg, float bb);
-HSV	PctToHSV();
-RGB	CMYToRGB();
-CMY	RGBToCMY();
+HSV	PctToHSV(void);
+RGB	CMYToRGB(void);
+CMY	RGBToCMY(void);
 #endif /* W_COLOR_H */
--- a/src/w_icons.c
+++ b/src/w_icons.c
@@ -2153,7 +2153,7 @@ icon_struct	areameas_ic;
 
 
 
-void populate_icons_big()
+void populate_icons_big(void)
 {
 	icon_struct	regpoly_ic_ = { regpoly_width_big, regpoly_height_big, (char*)regpoly_bits_big };
 	icon_struct	addpt_ic_ = { addpt_width_big, addpt_height_big, (char*)addpt_bits_big };
@@ -2242,7 +2242,7 @@ void populate_icons_big()
 }
 
 
-void populate_icons_small()
+void populate_icons_small(void)
 {
 	icon_struct	regpoly_ic_ = { regpoly_width_small, regpoly_height_small, (char*)regpoly_bits_small };
 	icon_struct	addpt_ic_ = { addpt_width_small, addpt_height_small, (char*)addpt_bits_small };
@@ -3255,14 +3255,14 @@ icon_struct	spl_bckgnd_ic = { spl_bckgnd
 int mode_sw_ht;
 int mode_sw_wd;
 
-void setup_icons_small()
+void setup_icons_small(void)
 {
 	mode_sw_ht = MODE_SW_HT_SMALL;
 	mode_sw_wd = MODE_SW_WD_SMALL;
 	populate_icons_small();
 }
 
-void setup_icons_big()
+void setup_icons_big(void)
 {
 	mode_sw_ht = MODE_SW_HT_BIG;
 	mode_sw_wd = MODE_SW_WD_BIG;
--- a/src/w_icons.h
+++ b/src/w_icons.h
@@ -26,8 +26,8 @@
 extern int mode_sw_ht;
 extern int mode_sw_wd;
 
-void setup_icons_small();
-void setup_icons_big();
+void setup_icons_small(void);
+void setup_icons_big(void);
 
 
 typedef struct _icon_struct {
--- a/src/w_indpanel.c
+++ b/src/w_indpanel.c
@@ -3772,8 +3772,7 @@ show_halign(ind_sw_info *sw)
 /* GRID MODE	 */		// isometric grid
 
 static void
-show_gridmode(sw)
-    ind_sw_info	   *sw;
+show_gridmode(ind_sw_info *sw)
 {
     update_choice_pixmap(sw, cur_gridmode);
 
@@ -4559,7 +4558,7 @@ dec_zoom_centered(ind_sw_info *sw)
 
 /* zoom in either from wheel or accelerator, centering canvas on mouse */
 void
-wheel_inc_zoom()
+wheel_inc_zoom(void)
 {
     Window	 root, child;
     int		 x1, y1, junk;
@@ -4581,7 +4580,7 @@ wheel_inc_zoom()
 
 /* zoom out either from wheel or accelerator, centering canvas on mouse */
 void
-wheel_dec_zoom()
+wheel_dec_zoom(void)
 {
     Window	 root, child;
     int		 x1, y1, junk;
--- a/src/w_intersect.c
+++ b/src/w_intersect.c
@@ -93,12 +93,9 @@ boxes_overlap(struct f_point * p1a, stru
 }
 
 static void
-do_circle_ellipse_intersect(r, X, Y, e, x, y, arc, isect_cb)
-     double r, X, Y;
-     F_ellipse * e;
-     int x, y;
-     F_arc * arc;
-     isect_cb_s * isect_cb;
+do_circle_ellipse_intersect(
+	double r, double X, double Y, F_ellipse *e, int x, int y,
+	F_arc *arc, isect_cb_s *isect_cb)
 {
   double K, L, M, N;
   double hix, hiy;
@@ -197,11 +194,7 @@ do_circle_ellipse_intersect(r, X, Y, e,
 }
 
 static void
-circle_ellipse_intersect(c, e, x, y, isect_cb)
-     F_ellipse * c;
-     F_ellipse * e;
-     int x, y;
-     isect_cb_s * isect_cb;
+circle_ellipse_intersect(F_ellipse *c, F_ellipse *e, int x, int y, isect_cb_s *isect_cb)
 {
   double r = (double)(c->radiuses.x);
   double X  = (double)(c->center.x - e->center.x);
@@ -211,18 +204,12 @@ circle_ellipse_intersect(c, e, x, y, ise
 }
 
 static void
-do_circle_circle(PX, PY, X2, Y2, R1, R2, OX, OY, arc, arc2, isect_cb)
-     double PX;				/* event point	*/
-     double PY;
-     double X2;				/* translated arc center */
-     double Y2;
-     double R1;				/* circle radius */
-     double R2;
-     double OX;				/* circle -> arc displacement */
-     double OY;
-     F_arc * arc;
-     F_arc * arc2;
-     isect_cb_s * isect_cb;
+do_circle_circle(
+	double PX, double PY, /* event point */
+	double X2, double Y2, /* translated arc center */
+	double R1, double R2, /* circle radius */
+	double OX, double OY, /* circle -> arc displacement */
+	F_arc *arc, F_arc *arc2, isect_cb_s *isect_cb)
 {
   double dc = hypot(Y2, X2);
 
@@ -310,11 +297,7 @@ do_circle_circle(PX, PY, X2, Y2, R1, R2,
 }
 
 static void
-circle_circle_intersect(e1, e2, x, y, isect_cb)
-     F_ellipse * e1;
-     F_ellipse * e2;
-     int x, y;
-     isect_cb_s * isect_cb;
+circle_circle_intersect(F_ellipse *e1, F_ellipse *e2, int x, int y, isect_cb_s *isect_cb)
 {
   double PX = (double)(x - e1->center.x);
   double PY = (double)(y - e1->center.y);
@@ -331,11 +314,7 @@ circle_circle_intersect(e1, e2, x, y, is
 
 
 static void
-non_ortho_ellipse_ellipse_intersect(e1, e2, x, y, isect_cb)
-     F_ellipse * e1;
-     F_ellipse * e2;
-     int x, y;
-     isect_cb_s * isect_cb;
+non_ortho_ellipse_ellipse_intersect(F_ellipse *e1, F_ellipse *e2, int x, int y, isect_cb_s *isect_cb)
 {						/* ellipse-ellipse -- non-orthogonal */
 
   double A, B, C, D;
@@ -568,11 +547,7 @@ non_ortho_ellipse_ellipse_intersect(e1,
 
 
 static void
-ortho_ellipse_ellipse_intersect(e1, e2, x, y, isect_cb)
-     F_ellipse * e1;
-     F_ellipse * e2;
-     int x, y;
-     isect_cb_s * isect_cb;
+ortho_ellipse_ellipse_intersect(F_ellipse *e1, F_ellipse *e2, int x, int y, isect_cb_s *isect_cb)
 {						/* ellipse-ellipse -- orthogonal */
   /*
    * x^2 / a^2   +   y^2 / b2  =  1					Eq  1,  origin ctrd, eclipse 1
@@ -776,16 +751,9 @@ intersect_ellipse_ellipse_handler(F_elli
 }
 
 static void
-do_intersect_ellipse_polyline(ecx, ecy, ea, eb, theta, l, x, y, arc, isect_cb)
-     double ecx;
-     double ecy;
-     double ea;
-     double eb;
-     double theta;
-     F_line * l;
-     int x, y;
-     F_arc * arc;
-     isect_cb_s * isect_cb;
+do_intersect_ellipse_polyline(
+	double ecx, double ecy, double ea, double eb, double theta,
+	F_line *l, int x, int y, F_arc *arc, isect_cb_s *isect_cb)
 {
   /* if arc is non-null, ecx, ecy, ea, and eb arc from arc.*/
   /* if isect_cb is non-null, return the intersects */
@@ -1215,10 +1183,7 @@ intersect_spline_arc_handler(void *obj1,
 }
 
 static void
-intersect_text_text_handler(t1, t2, x, y)
-     F_text * t1;
-     F_text * t2;
-     int x, y;
+intersect_text_text_handler(F_text *t1, F_text *t2, int x, int y)
 {
   F_line * f1_line_p = build_text_bounding_box(t1);
   F_line * f2_line_p = build_text_bounding_box(t2);
@@ -1228,10 +1193,7 @@ intersect_text_text_handler(t1, t2, x, y
 }
 
 static void
-intersect_text_arc_handler(t, a, x, y)
-     F_text * t;
-     F_arc * a;
-     int x, y;
+intersect_text_arc_handler(F_text *t, F_arc *a, int x, int y)
 {
   F_line * f_line_p = build_text_bounding_box(t);
   intersect_polyline_arc_handler(f_line_p, a, x, y, NULL);
@@ -1257,11 +1219,7 @@ intersect_arc_arc_handler(F_arc * a1, F_
 }
 
 static void
-intersect_ellipse_handler(obj1, obj2, type2, x, y)
-     void * obj1;
-     void * obj2;
-     int type2;
-     int x, y;
+intersect_ellipse_handler(void *obj1, void *obj2, int type2, int x, int y)
 {
   switch (type2) {
   case O_ELLIPSE:
@@ -1283,11 +1241,7 @@ intersect_ellipse_handler(obj1, obj2, ty
 }
 
 static void
-intersect_polyline_handler(obj1, obj2, type2, x, y)
-     void * obj1;
-     void * obj2;
-     int type2;
-     int x, y;
+intersect_polyline_handler(void *obj1, void *obj2, int type2, int x, int y)
 {
   switch (type2) {
   case O_ELLIPSE:
@@ -1309,11 +1263,7 @@ intersect_polyline_handler(obj1, obj2, t
 }
 
 static void
-intersect_spline_handler(obj1, obj2, type2, x, y)
-     void * obj1;
-     void * obj2;
-     int type2;
-     int x, y;
+intersect_spline_handler(void *obj1, void *obj2, int type2, int x, int y)
 {
   switch (type2) {
   case O_ELLIPSE:
@@ -1335,11 +1285,7 @@ intersect_spline_handler(obj1, obj2, typ
 }
 
 static void
-intersect_text_handler(obj1, obj2, type2, x, y)
-     void * obj1;
-     void * obj2;
-     int type2;
-     int x, y;
+intersect_text_handler(void *obj1, void *obj2, int type2, int x, int y)
 {
   switch (type2) {
   case O_ELLIPSE:
@@ -1361,11 +1307,7 @@ intersect_text_handler(obj1, obj2, type2
 }
 
 static void
-intersect_arc_handler(obj1, obj2, type2, x, y)
-     void * obj1;
-     void * obj2;
-     int type2;
-     int x, y;
+intersect_arc_handler(void *obj1, void *obj2, int type2, int x, int y)
 {
   switch (type2) {
   case O_ELLIPSE:
@@ -1387,12 +1329,7 @@ intersect_arc_handler(obj1, obj2, type2,
 }
 
 void
-snap_intersect_handler(obj1, type1, obj2, type2, x, y)
-     void * obj1;
-     int type1;
-     void * obj2;
-     int type2;
-     int x, y;
+snap_intersect_handler(void *obj1, int type1, void *obj2, int type2, int x, int y)
 {
   switch (type1) {
   case O_ELLIPSE:
--- a/src/w_keyboard.c
+++ b/src/w_keyboard.c
@@ -414,7 +414,7 @@ static Widget keyboard_input = None;
 
 
 static void
-create_keyboard_panel()
+create_keyboard_panel(void)
 {
   Widget keyboard_form;
   Widget label, usage_hint;
--- a/src/w_layers.c
+++ b/src/w_layers.c
@@ -725,7 +725,7 @@ any_active_in_compound(F_compound *cmpnd
 }
 
 void
-update_layerpanel()
+update_layerpanel(void)
 {
     /*
      * We must test for the widgets, as this is called by
--- a/src/w_layers.h
+++ b/src/w_layers.h
@@ -50,6 +50,6 @@ extern void	reset_layers(void);
 extern void	reset_depths(void);
 
 extern int	LAYER_WD, LAYER_HT;
-extern void update_layerpanel ();
+extern void update_layerpanel (void);
 
 #endif
--- a/src/w_modepanel.c
+++ b/src/w_modepanel.c
@@ -496,7 +496,7 @@ void setup_mode_panel(void)
     SetValues(mode_panel);
 }
 
-void update_modepanel()
+void update_modepanel(void)
 {
     int			i;
     mode_sw_info	*sw;
--- a/src/w_modepanel.h
+++ b/src/w_modepanel.h
@@ -45,7 +45,7 @@ typedef struct mode_switch_struct {
 
 extern void change_mode (icon_struct *icon);
 extern void turn_off_current (void);
-extern void update_modepanel ();
+extern void update_modepanel (void);
 extern void setup_mode_panel(void);
 
 #endif
--- a/src/w_mousefun.c
+++ b/src/w_mousefun.c
@@ -108,7 +108,7 @@ setup_mousefun(void)
     set_mousefun("", "", "", "", "", "");
 }
 
-void update_mousepanel()
+void update_mousepanel(void)
 {
     if (mousefun) {
 	if (appres.showballoons)
--- a/src/w_mousefun.h
+++ b/src/w_mousefun.h
@@ -28,9 +28,9 @@ void		set_mousefun(char *left, char *mid
 void		draw_mousefun_mode(void);
 void		draw_mousefun_ind(void);
 void		draw_mousefun_unitbox(void);
-void		shift_top_mousfun();
+void		shift_top_mousfun(void);
 void		draw_mousefun_topruler(Widget w, XEvent *event, String *params, Cardinal *num_params);
-void		shift_side_mousfun();
+void		shift_side_mousfun(void);
 void		draw_mousefun_sideruler(Widget w, XEvent *event, String *params, Cardinal *num_params);
 void		draw_mousefun_canvas(void);
 void		draw_mousefun(char *left, char *middle, char *right);
@@ -42,10 +42,10 @@ void		notused_right(void);
 void		clear_right(void);
 void		draw_mousefun_kbd(void);
 void		clear_mousefun_kbd(void);
-void		init_mousefun_actions();
+void		init_mousefun_actions(void);
 extern String	kbd_translations;
 extern void init_kbd_actions (void);
-extern void update_mousepanel ();
+extern void update_mousepanel (void);
 extern void draw_shift_mousefun_canvas(void);
 extern void draw_shift_mousefun_canvas2(char *tl, char *tm, char *tr);
 
--- a/src/w_rulers.c
+++ b/src/w_rulers.c
@@ -389,7 +389,7 @@ init_unitbox(Widget tool)
 static Widget	unit_popup, unit_panel, cancel, set, beside, below, label;
 
 void
-update_rulerpanel()
+update_rulerpanel(void)
 {
     char msg[80];
 
--- a/src/w_rulers.h
+++ b/src/w_rulers.h
@@ -35,7 +35,7 @@ extern void	resize_sideruler (void);
 extern void	resize_topruler (void);
 extern void	setup_sideruler (void);
 extern void	reset_rulers (void);
-extern void	update_rulerpanel ();
+extern void	update_rulerpanel (void);
 extern void	setup_rulers(void);
 extern void	set_rulermark(int x, int y);
 extern void	erase_siderulermark(void);
--- a/src/w_snap.c
+++ b/src/w_snap.c
@@ -57,7 +57,7 @@ snap_mode_e snap_mode = SNAP_MODE_NONE;
 
 void snap_release(Widget w, XtPointer closure, XtPointer call_data);
 
-static void snap_polyline_handler(F_line * l, int x, int y);
+static void snap_polyline_handler(F_line *l, int x, int y);
 
 
 /*                   */
@@ -83,11 +83,7 @@ snap_rotate_vector(double * dx, double *
 /* defined by two points					*/
 
 static double
-point_to_line(px, py, l1, l2)
-     int px;
-     int py;
-     struct f_point * l1;
-     struct f_point * l2;
+point_to_line(int px, int py, struct f_point *l1, struct f_point *l2)
 {
   double x0 = (double)px;
   double y0 = (double)py;
@@ -123,10 +119,7 @@ get_line_from_points(double * c, struct
 /*                                                              */
 
 static void
-snap_polyline_endpoint_handler(l, x, y)
-     F_line  *l;
-     int x;
-     int y;
+snap_polyline_endpoint_handler(F_line *l, int x, int y)
 {
   struct f_point * point;
   double mind = HUGE_VAL;
@@ -146,7 +139,7 @@ snap_polyline_endpoint_handler(l, x, y)
 /*                                                              */
 
 void
-snap_polyline_focus_handler(F_line * l, int x, int y)
+snap_polyline_focus_handler(F_line *l, int x, int y)
 {
 	(void)x;
 	(void)y;
@@ -178,10 +171,7 @@ snap_polyline_focus_handler(F_line * l,
 /*                                                              */
 
 static void
-snap_polyline_midpoint_handler(l, x, y)
-     F_line  *l;
-     int x;
-     int y;
+snap_polyline_midpoint_handler(F_line *l, int x, int y)
 {
   struct f_point * prev_point = NULL;
   struct f_point * point;
@@ -210,12 +200,7 @@ snap_polyline_midpoint_handler(l, x, y)
 /*                                                              */
 
 static void
-do_snap_polyline_normal(l, x, y, cur_point_x, cur_point_y)
-     F_line  *l;
-     int x;
-     int y;
-     double cur_point_x;
-     double cur_point_y;
+do_snap_polyline_normal(F_line *l, int x, int y, double cur_point_x, double cur_point_y)
 {
   struct f_point * prev_point = NULL;
   struct f_point * point;
@@ -260,10 +245,7 @@ do_snap_polyline_normal(l, x, y, cur_poi
 }
 
 static void
-snap_polyline_normal_handler(l, x, y)
-     F_line  *l;
-     int x;
-     int y;
+snap_polyline_normal_handler(F_line *l, int x, int y)
 {
   do_snap_polyline_normal(l, x, y, (double)(cur_point->x), (double)(cur_point->y));
 }
@@ -273,10 +255,7 @@ snap_polyline_normal_handler(l, x, y)
 /*                                                                      */
 
 static void
-snap_ellipse_focus_ellipse_handler(e, x, y)
-     F_ellipse  *e;
-     int x;
-     int y;
+snap_ellipse_focus_ellipse_handler(F_ellipse *e, int x, int y)
 {
   int idx;
   int idy;
@@ -336,12 +315,7 @@ check_alignment(double x,  double y,
 /*                                                                      */
 
 static void
-snap_ellipse_normal_ellipse_handler(e, x, y, cur_point_x, cur_point_y)
-     F_ellipse  *e;
-     int x;
-     int y;
-     double cur_point_x;
-     double cur_point_y;
+snap_ellipse_normal_ellipse_handler(F_ellipse *e, int x, int y, double cur_point_x, double cur_point_y)
 {
 
   /*
@@ -443,14 +417,7 @@ snap_ellipse_normal_ellipse_handler(e, x
 /*                                                                      */
 
 static void
-circle_normal_handler(center_x, center_y, radius, x, y, cur_point_x, cur_point_y)
-     double center_x;
-     double center_y;
-     double radius;
-     int x;
-     int y;
-     double cur_point_x;
-     double cur_point_y;
+circle_normal_handler(double center_x, double center_y, double radius, int x, int y, double cur_point_x, double cur_point_y)
 {
   double a;
   double txa, tya;
@@ -484,12 +451,7 @@ circle_normal_handler(center_x, center_y
 }
 
 static void
-snap_ellipse_normal_circle_handler(e, x, y, cur_point_x, cur_point_y)
-     F_ellipse  *e;
-     int x;
-     int y;
-     double cur_point_x;
-     double cur_point_y;
+snap_ellipse_normal_circle_handler(F_ellipse *e, int x, int y, double cur_point_x, double cur_point_y)
 {
   circle_normal_handler((double)(e->center.x),
 			(double)(e->center.y),
@@ -504,12 +466,7 @@ snap_ellipse_normal_circle_handler(e, x,
 /*                                                                      */
 
 static void
-circle_tangent_handler(center_x, center_y, r, x, y)
-     double center_x;
-     double center_y;
-     double r;
-     int x;
-     int y;
+circle_tangent_handler(double center_x, double center_y, double r, int x, int y)
 {
   double p = hypot(center_y - (double)(cur_point->y),
 		   center_x - (double)(cur_point->x));
@@ -549,10 +506,7 @@ circle_tangent_handler(center_x, center_
 }
 
 static void
-snap_ellipse_tangent_circle_handler(e, x, y)
-     F_ellipse  *e;
-     int x;
-     int y;
+snap_ellipse_tangent_circle_handler(F_ellipse *e, int x, int y)
 {
   circle_tangent_handler((double)(e->center.x), (double)(e->center.y),
 			 (double)(e->radiuses.x), x, y);
@@ -564,10 +518,7 @@ snap_ellipse_tangent_circle_handler(e, x
 /*                                                                      */
 
 static void
-snap_ellipse_tangent_ellipse_handler(e, x, y)
-     F_ellipse  *e;
-     int x;
-     int y;
+snap_ellipse_tangent_ellipse_handler(F_ellipse *e, int x, int y)
 {
 
   /*
@@ -705,10 +656,7 @@ snap_ellipse_tangent_ellipse_handler(e,
 /*                                                                      */
 
 static void
-snap_ellipse_endpoint_handler(e, x, y)
-     F_ellipse  *e;
-     int x;
-     int y;
+snap_ellipse_endpoint_handler(F_ellipse *e, int x, int y)
 {
   int i;
   double tx,ty;
@@ -742,10 +690,7 @@ snap_ellipse_endpoint_handler(e, x, y)
 /*                                      */
 
 static void
-snap_polyline_handler(l, x, y)
-     F_line  *l;
-     int x;
-     int y;
+snap_polyline_handler(F_line *l, int x, int y)
 {
   switch (snap_mode) {
   case SNAP_MODE_ENDPOINT:
@@ -782,10 +727,7 @@ snap_polyline_handler(l, x, y)
 /*                                      */
 
 static void
-snap_spline_handler(s, x, y)
-     F_spline  *s;
-     int x;
-     int y;
+snap_spline_handler(F_spline *s, int x, int y)
 {
   switch (snap_mode) {
   case SNAP_MODE_ENDPOINT:
@@ -859,10 +801,7 @@ snap_spline_handler(s, x, y)
 /*                                      */
 
 static void
-snap_text_handler(t, x, y)
-     F_text  *t;
-     int x;
-     int y;
+snap_text_handler(F_text *t, int x, int y)
 {
   F_line * f_line_p = build_text_bounding_box(t);
   snap_polyline_handler(f_line_p, x, y);
@@ -871,10 +810,7 @@ snap_text_handler(t, x, y)
 
 
 Boolean
-is_point_on_arc(a, x, y)
-     F_arc * a;
-     int x;
-     int y;
+is_point_on_arc(F_arc *a, int x, int y)
 {
   /*
    * check if the found point is on the arc and not on the
@@ -906,10 +842,7 @@ is_point_on_arc(a, x, y)
 /*                                      */
 
 static void
-snap_arc_handler(a, x, y)
-     F_arc  *a;
-     int x;
-     int y;
+snap_arc_handler(F_arc *a, int x, int y)
 {
   switch (snap_mode) {
   case SNAP_MODE_ENDPOINT:
@@ -1017,10 +950,7 @@ snap_arc_handler(a, x, y)
 /*                                      */
 
 static void
-snap_ellipse_handler(e, x, y)
-     F_ellipse  *e;
-     int x;
-     int y;
+snap_ellipse_handler(F_ellipse *e, int x, int y)
 {
   switch (snap_mode) {
   case SNAP_MODE_ENDPOINT:
@@ -1155,10 +1085,7 @@ snap_handler(void *p, int type, int x, i
 /*              */
 
 Boolean
-snap_process(px, py, state)
-     int * px;
-     int * py;
-     unsigned int state;
+snap_process(int *px, int *py, unsigned int state)
 {
   int hold_objmask = cur_objmask;
 
@@ -1373,8 +1300,7 @@ Widget snap_indicator_label;
 
 
 void
-init_snap_panel(parent)
-    Widget	 parent;
+init_snap_panel(Widget parent)
 {
   Widget dlabel;
   DeclareArgs(10);