Description: Always pass the right amount of arguments to DoPolygonMeasureCursor()
 To this end, define it with standard argument list and then fix the resulting errors.
 .
 #748174 identifies and names this function alone, but GCC 14, in all warning modes,
 for a pre-ANSI declaration, NEVER warns for a wrong number of arguments.
 .
 I'd say in principle there's more in this package,
 but I trust their static analyser more than GCC's on this matter.
Author: наб <nabijaczleweli@nabijaczleweli.xyz>
Bug-Debian: https://bugs.debian.org/748174
Forwarded: no
Last-Update: 2024-09-01

--- tgif-4.2.5.orig/polygon.c
+++ tgif-4.2.5/polygon.c
@@ -653,10 +653,8 @@ typedef struct tagPolygonMeasureCursorIn
 } PolygonMeasureCursorInfo;
 
 static
-void DoPolygonMeasureCursor(ppmci, start, num_pts, x, y, dx, dy, erase, drag,
-      closed)
-   PolygonMeasureCursorInfo *ppmci;
-   int start, num_pts, x, y, dx, dy, erase, drag, closed;
+void DoPolygonMeasureCursor(PolygonMeasureCursorInfo *ppmci, int start, int num_pts, int x, int y, int dx, int dy, int erase, int drag,
+      int closed)
 {
    char buf[80], w_buf[80], h_buf[80], x_buf[80], y_buf[80], a_buf[80];
    int angle2=0;
--- tgif-4.2.5.orig/polygon.c
+++ tgif-4.2.5/polygon.c
@@ -788,7 +788,7 @@ void ContinueForStructSplinePolygonContr
    /* the previous curve has already been drawn */
    /* draw the measure cursor */
    DoPolygonMeasureCursor(&pmci, POLYGON_DOSHOW, num_pts, ABS_X(grid_x),
-         ABS_Y(grid_y), 0, 0, POLYGON_ERASE, POLYGON_DRAG);
+         ABS_Y(grid_y), 0, 0, POLYGON_ERASE, POLYGON_DRAG, 0);
    while (!done) {
       XEvent input, ev;
 
@@ -828,7 +828,7 @@ void ContinueForStructSplinePolygonContr
          }
          DoPolygonMeasureCursor(&pmci, POLYGON_DOSHOW, num_pts, ABS_X(grid_x),
                ABS_Y(grid_y), ABS_SIZE(abs(grid_x-LastX)),
-               ABS_SIZE(abs(grid_y-LastY)), POLYGON_ERASE, POLYGON_DRAG);
+               ABS_SIZE(abs(grid_y-LastY)), POLYGON_ERASE, POLYGON_DRAG, 0);
          MARKHO(drawWindow, revDefaultGC, dash_vs[0].x, dash_vs[0].y);
          MARKHO(drawWindow, revDefaultGC, dash_vs[1].x, dash_vs[1].y);
          values.line_style = LineOnOffDash;
@@ -923,13 +923,13 @@ void ContinueForStructSplinePolygonContr
          XChangeGC(mainDisplay, revDefaultGC, GCLineStyle, &values);
          DoPolygonMeasureCursor(&pmci, POLYGON_DOSHOW, num_pts, ABS_X(grid_x),
                ABS_Y(grid_y), ABS_SIZE(abs(grid_x-LastX)),
-               ABS_SIZE(abs(grid_y-LastY)), POLYGON_DRAW, POLYGON_DRAG);
+               ABS_SIZE(abs(grid_y-LastY)), POLYGON_DRAW, POLYGON_DRAG, 0);
       } else if (input.type == KeyPress) {
          if (KeyPressEventIsEscape(&input.xkey)) {
             /* erase */
             DoPolygonMeasureCursor(&pmci, POLYGON_ENDSHOW, num_pts,
                   ABS_X(grid_x), ABS_Y(grid_y), ABS_SIZE(abs(grid_x-LastX)),
-                  ABS_SIZE(abs(grid_y-LastY)), POLYGON_ERASE, POLYGON_DRAG);
+                  ABS_SIZE(abs(grid_y-LastY)), POLYGON_ERASE, POLYGON_DRAG, 0);
             MARKHO(drawWindow, revDefaultGC, dash_vs[0].x, dash_vs[0].y);
             MARKHO(drawWindow, revDefaultGC, dash_vs[1].x, dash_vs[1].y);
             values.line_style = LineOnOffDash;
@@ -945,7 +945,7 @@ void ContinueForStructSplinePolygonContr
          /* erase */
          DoPolygonMeasureCursor(&pmci, POLYGON_ENDSHOW, num_pts, ABS_X(grid_x),
                ABS_Y(grid_y), ABS_SIZE(abs(grid_x-LastX)),
-               ABS_SIZE(abs(grid_y-LastY)), POLYGON_ERASE, POLYGON_DRAG);
+               ABS_SIZE(abs(grid_y-LastY)), POLYGON_ERASE, POLYGON_DRAG, 0);
          MARKHO(drawWindow, revDefaultGC, dash_vs[0].x, dash_vs[0].y);
          MARKHO(drawWindow, revDefaultGC, dash_vs[1].x, dash_vs[1].y);
          values.line_style = LineOnOffDash;
