bug-gv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gv] [PATCH] get rid of core K&R, use gnulib's _GL_UNUSED and avoid


From: Bernhard R. Link
Subject: [bug-gv] [PATCH] get rid of core K&R, use gnulib's _GL_UNUSED and avoid some signed/unsigned comparisons
Date: Mon, 1 Aug 2011 21:31:46 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

This significantly reduces the number of warnings if requesting a
slightly bigger set of warnings.
---
 gv/src/Aaa.c           |   81 ++++++-----------------
 gv/src/Aaa_lex.c       |    3 +-
 gv/src/Button.c        |   29 ++------
 gv/src/Clip.c          |   54 +++++----------
 gv/src/FileSel.c       |  170 ++++++++++------------------------------------
 gv/src/Frame.c         |   68 +++++--------------
 gv/src/Ghostview.c     |  158 +++++++++++-------------------------------
 gv/src/MButton.c       |    6 +--
 gv/src/Scrollbar.c     |  142 +++++++++------------------------------
 gv/src/Vlist.c         |  124 +++++++++-------------------------
 gv/src/actions.c       |  174 +++++++++--------------------------------------
 gv/src/callbacks.c     |  177 +++++++++++++-----------------------------------
 gv/src/confirm.c       |   27 ++------
 gv/src/dialog.c        |   34 +++-------
 gv/src/file.c          |   24 +++----
 gv/src/gv_signal.c     |   19 ++----
 gv/src/info.c          |   16 +---
 gv/src/main.c          |   14 +---
 gv/src/misc.c          |  102 +++++++++-------------------
 gv/src/note.c          |   13 +---
 gv/src/options.c       |   57 ++++------------
 gv/src/options_fs.c    |    8 +--
 gv/src/options_gs.c    |   25 ++------
 gv/src/options_gv.c    |   19 ++----
 gv/src/options_setup.c |    8 +--
 gv/src/popup.c         |   15 +---
 gv/src/process.c       |   34 +++-------
 gv/src/ps.c            |   71 +++++---------------
 gv/src/resource.c      |    4 +-
 gv/src/save.c          |   22 ++-----
 gv/src/secscanf.c      |    2 +-
 gv/src/version.c       |   15 +---
 gv/src/zoom.c          |    4 +-
 33 files changed, 427 insertions(+), 1292 deletions(-)

diff --git a/gv/src/Aaa.c b/gv/src/Aaa.c
index dfd490a..508daac 100644
--- a/gv/src/Aaa.c
+++ b/gv/src/Aaa.c
@@ -277,14 +277,8 @@ PrintBox (box, level)
  *      Returns: none.
  */
 
-/*ARGSUSED*/
 static Boolean
-CvtStringToLayout (dpy, args, num_args, from, to, converter_data)
-    Display     *dpy;
-    XrmValue    *args;
-    Cardinal    *num_args;
-    XrmValue    *from, *to;
-    XtPointer   *converter_data;
+CvtStringToLayout (Display *dpy _GL_UNUSED, XrmValue *args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED, XrmValue *from, XrmValue *to, XtPointer 
*converter_data _GL_UNUSED)
 {
     LayoutConverterStruct layoutConverterStruct;
 
@@ -325,10 +319,7 @@ ClassInitialize(void)
     ENDMESSAGE(ClassInitialize)
 }
 
-/*ARGSUSED*/
-static XtGeometryResult GeometryManager(child, request, reply)
-  Widget              child;
-  XtWidgetGeometry    *request, *reply;
+static XtGeometryResult GeometryManager(Widget child, XtWidgetGeometry 
*request, XtWidgetGeometry *reply _GL_UNUSED)
 {
   AaaWidget    w = (AaaWidget) XtParent(child);
   SubInfoPtr   p = SubInfo(child);
@@ -387,11 +378,7 @@ static XtGeometryResult GeometryManager(child, request, 
reply)
   }
 }
 
-/* ARGSUSED */
-static void Initialize(request, new, args, num_args)
-Widget request, new;
-ArgList args;
-Cardinal *num_args;
+static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args 
_GL_UNUSED, Cardinal *num_args _GL_UNUSED)
 {
    AaaWidget l= (AaaWidget) new;
    Dimension prefwidth,prefheight;
@@ -410,8 +397,7 @@ Cardinal *num_args;
   ENDMESSAGE(Initialize)
 }
 
-static void ChangeManaged(gw)
-   Widget gw;
+static void ChangeManaged(Widget gw)
 {
     AaaWidget        w = (AaaWidget) gw;
     Widget              *children;
@@ -423,8 +409,7 @@ static void ChangeManaged(gw)
 }
 
 static void
-GetDesiredSize (child)
-    Widget  child;
+GetDesiredSize (Widget child)
 {
     XtWidgetGeometry    desired;
     SubInfoPtr          p;
@@ -443,16 +428,14 @@ GetDesiredSize (child)
     INFSMESSAGE1(GetDesiredSize for:,XtName(child))
 }
 
-static void InsertChild (child)
-    Widget  child;
+static void InsertChild (Widget child)
 {
     (*SuperClass->composite_class.insert_child) (child);
     GetDesiredSize (child);
 }
 
 static void
-Resize(gw)
-    Widget gw;
+Resize(Widget gw)
 {
     BEGINMESSAGE(Resize)
     IIMESSAGE(gw->core.width,gw->core.height)
@@ -464,11 +447,8 @@ Resize(gw)
 }
 
 /* ARGSUSED */
-static Boolean 
-SetValues(gold, greq, gnew, args, num_args)
-    Widget gold, greq, gnew;
-    ArgList args;
-    Cardinal *num_args;
+static Boolean
+SetValues(Widget gold, Widget greq _GL_UNUSED, Widget gnew, ArgList args 
_GL_UNUSED, Cardinal *num_args _GL_UNUSED)
 {
     AaaWidget    old = (AaaWidget) gold,
                     new = (AaaWidget) gnew;
@@ -483,9 +463,7 @@ SetValues(gold, greq, gnew, args, num_args)
 } /* SetValues */
 
 static XtGeometryResult
-QueryGeometry (gw, request, preferred_return)
-    Widget              gw;
-    XtWidgetGeometry    *request, *preferred_return;
+QueryGeometry (Widget gw, XtWidgetGeometry *request, XtWidgetGeometry 
*preferred_return)
 {
     AaaWidget        w = (AaaWidget) gw;
     XtGeometryResult    result;
@@ -547,9 +525,7 @@ QueryGeometry (gw, request, preferred_return)
  */
 
 static ExprPtr
-LookupVariable (child, quark)
-    BoxPtr      child;
-    XrmQuark    quark;
+LookupVariable (BoxPtr child, XrmQuark quark)
 {
     BoxPtr      parent, box;
 
@@ -565,13 +541,8 @@ LookupVariable (child, quark)
     return((ExprPtr)NULL);
 }
 
-                
 static double
-Evaluate (l, box, expr, natural)
-    AaaWidget    l;
-    BoxPtr          box;
-    ExprPtr         expr;
-    double          natural;
+Evaluate (AaaWidget l, BoxPtr box, ExprPtr expr, double natural)
 {
     double      left, right, down;
     Widget      widget;
@@ -639,8 +610,7 @@ Evaluate (l, box, expr, natural)
 }
 
 static void
-DisposeExpr (expr)
-    ExprPtr expr;
+DisposeExpr (ExprPtr expr)
 {
     MEMBEGINMESSAGE(DisposeExpr)
     if (!expr) {
@@ -694,10 +664,7 @@ DisposeExpr (expr)
 
 /* compute the natural sizes of a box */
 static void
-ComputeNaturalSizes (l, box, dir)
-    AaaWidget    l;
-    BoxPtr          box;
-    LayoutDirection dir;
+ComputeNaturalSizes (AaaWidget l, BoxPtr box, LayoutDirection dir)
 {
     BoxPtr      child;
     Widget      w;
@@ -809,8 +776,7 @@ ComputeNaturalSizes (l, box, dir)
   ((dist >= 0) ? 0.5 : -0.5))) : 0)
 
 static Bool
-ComputeSizes (box)
-    BoxPtr          box;
+ComputeSizes (BoxPtr box)
 {
     LayoutDirection dir;
     BoxPtr          child;
@@ -914,9 +880,7 @@ ComputeSizes (box)
 }
 
 static void
-SetSizes (box, x, y)
-    BoxPtr      box;
-    Position    x, y;
+SetSizes (BoxPtr box, Position x, Position y)
 {
     BoxPtr      child;
     int         width, height;
@@ -970,8 +934,7 @@ SetSizes (box, x, y)
 }
 
 static void
-AaaFreeLayout (box)
-    BoxPtr  box;
+AaaFreeLayout (BoxPtr box)
 {
     BoxPtr  child, next;
     
@@ -1024,9 +987,7 @@ AaaFreeLayout (box)
 
 
 static void
-AaaGetNaturalSize (l, widthp, heightp)
-    AaaWidget    l;
-    Dimension       *widthp, *heightp;   
+AaaGetNaturalSize (AaaWidget l, Dimension *widthp, Dimension *heightp)
 {
     BoxPtr              box;
 
@@ -1054,10 +1015,8 @@ AaaGetNaturalSize (l, widthp, heightp)
 }
 
 static void
-AaaLayout (l, attemptResize)
-    AaaWidget    l;
-    Bool            attemptResize;
-{                                   
+AaaLayout(AaaWidget l, Bool attemptResize)
+{
     BoxPtr              box = l->aaa.layout;
     Dimension           width, height;
     Dimension           pwidth, pheight;
diff --git a/gv/src/Aaa_lex.c b/gv/src/Aaa_lex.c
index c17e56e..b6eefae 100644
--- a/gv/src/Aaa_lex.c
+++ b/gv/src/Aaa_lex.c
@@ -136,8 +136,7 @@ layout_scan_error(s,layoutConverterStructP)
 
 
 static void
-maxlen_exceeded(layoutConverterStructP)
-   void *layoutConverterStructP;
+maxlen_exceeded(void *layoutConverterStructP)
 {
    layout_scan_error("Expression too long.",layoutConverterStructP);
 }
diff --git a/gv/src/Button.c b/gv/src/Button.c
index 623a99b..ecf48b5 100644
--- a/gv/src/Button.c
+++ b/gv/src/Button.c
@@ -168,11 +168,8 @@ static void ClassInitialize()
 /* Initialize */
 /*---------------------------------------------------*/
 
-static void 
-Initialize(request, new, args, num_args)
-Widget request, new;
-ArgList args;                  /* unused */
-Cardinal *num_args;            /* unused */
+static void
+Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED)
 {
   ButtonWidget bw = (ButtonWidget) new;
 
@@ -314,12 +311,8 @@ Region region;
 /* ACTIONS */
 /*##################################################-*/
 
-void 
-ButtonHighlight(w,event,params,num_params)
-Widget w;
-XEvent *event;
-String *params;                /* unused */
-Cardinal *num_params;  /* unused */
+void
+ButtonHighlight(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal 
*num_params _GL_UNUSED)
 {
   ButtonWidget bw = (ButtonWidget)w;
   Boolean set;
@@ -333,12 +326,8 @@ Cardinal *num_params;      /* unused */
   ENDMESSAGE(ButtonHighlight)
 }
 
-void 
-ButtonSet(w,event,params,num_params)
-Widget w;
-XEvent *event;
-String *params;                /* unused */
-Cardinal *num_params;  /* unused */
+void
+ButtonSet(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal 
*num_params _GL_UNUSED)
 {
   ButtonWidget bw = (ButtonWidget)w;
 
@@ -351,11 +340,7 @@ Cardinal *num_params;      /* unused */
 }
 
 void
-ButtonUnset(w,event,params,num_params)
-Widget w;
-XEvent *event;
-String *params;                /* unused */
-Cardinal *num_params;
+ButtonUnset(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal 
*num_params _GL_UNUSED)
 {
   ButtonWidget bw = (ButtonWidget)w;
 
diff --git a/gv/src/Clip.c b/gv/src/Clip.c
index 4002685..c4874bf 100644
--- a/gv/src/Clip.c
+++ b/gv/src/Clip.c
@@ -154,9 +154,7 @@ WidgetClass clipWidgetClass = (WidgetClass) &clipClassRec;
 /* SendReport */
 /*---------------------------------------------------*/
 
-static void SendReport (cw, changed)
-   ClipWidget cw;
-   unsigned int changed;
+static void SendReport (ClipWidget cw, unsigned int changed)
 {
    Widget child = CW_CHILD;
 
@@ -206,10 +204,7 @@ static void Realize (gw, valueMask, attributes)
 /*---------------------------------------------------*/
 
 static void
-Initialize(request, new, args, num_args)
-   Widget request, new;
-   ArgList args;
-   Cardinal *num_args;
+Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED)
 {
    ClipWidget cw = (ClipWidget) new;
 
@@ -245,8 +240,7 @@ SetValues(current, request, new)
 /* Resize */
 /*---------------------------------------------------*/
 
-static void Resize (w)
-   Widget w;
+static void Resize (Widget w)
 {
    ClipWidget cw = (ClipWidget) w;
    Widget child  = CW_CHILD;
@@ -283,8 +277,7 @@ static void Resize (w)
 /*---------------------------------------------------*/
 
 static void
-GetDesiredSizeOfChild(child)
-   Widget child;
+GetDesiredSizeOfChild(Widget child)
 {
    ClipWidget cw;
    XtWidgetGeometry desired;
@@ -306,8 +299,7 @@ GetDesiredSizeOfChild(child)
 /*---------------------------------------------------*/
 
 static void
-InsertChild(child)
-   Widget  child;
+InsertChild(Widget child)
 {
    BEGINMESSAGE(InsertChild)
    SMESSAGE(XtName(child))
@@ -321,10 +313,7 @@ InsertChild(child)
 /*---------------------------------------------------*/
 
 static void
-GetNaturalSize(cw,wP,hP)
-   ClipWidget cw;
-   Dimension *wP;
-   Dimension *hP;
+GetNaturalSize(ClipWidget cw, Dimension *wP, Dimension *hP)
 {
    BEGINMESSAGE(GetNaturalSize)
    *wP = CW_CHILD_NAT_WIDTH;
@@ -337,9 +326,7 @@ GetNaturalSize(cw,wP,hP)
 /*---------------------------------------------------*/
 
 static XtGeometryResult
-QueryGeometry(w,request,preferred_return)
-   Widget w;
-   XtWidgetGeometry *request, *preferred_return;
+QueryGeometry(Widget w, XtWidgetGeometry *request, XtWidgetGeometry 
*preferred_return)
 {
    ClipWidget cw = (ClipWidget)w;
    Dimension nw,nh;
@@ -375,9 +362,7 @@ QueryGeometry(w,request,preferred_return)
 #define IS_REQUEST(fff) (request->request_mode & fff)
 
 static XtGeometryResult
-GeometryManager(child,request,geometry_return)
-   Widget child;
-   XtWidgetGeometry *request, *geometry_return;
+GeometryManager(Widget child, XtWidgetGeometry *request, XtWidgetGeometry 
*geometry_return _GL_UNUSED)
 {
    ClipWidget cw;
    XtGeometryResult answer;
@@ -443,8 +428,7 @@ GeometryManager(child,request,geometry_return)
 /* ChangeManaged */
 /*---------------------------------------------------*/
 
-static void ChangeManaged(w)
-   Widget w;
+static void ChangeManaged(Widget w)
 {
    ClipWidget cw = (ClipWidget) w;
    Widget child = CW_CHILD;
@@ -480,8 +464,7 @@ static void ChangeManaged(w)
 /*---------------------------------------------------*/
 
 static XtGeometryResult
-LayoutClip(cw)
-   ClipWidget cw;
+LayoutClip(ClipWidget cw)
 {
    XtWidgetGeometry request;
    XtGeometryResult answer;
@@ -540,11 +523,8 @@ LayoutClip(cw)
 /* ClipWidgetCheckCoordinates */
 /*###################################################*/
 
-void 
-ClipWidgetCheckCoordinates(w, x, y, xP, yP)
-   Widget w;
-   int x, y;
-   int *xP,*yP;
+void
+ClipWidgetCheckCoordinates(Widget w, int x, int y, int *xP, int *yP)
 {
   ClipWidget cw = (ClipWidget)w;
   Widget  child = CW_CHILD;
@@ -566,20 +546,18 @@ ClipWidgetCheckCoordinates(w, x, y, xP, yP)
 /* ClipWidgetSetCoordinates */
 /*###################################################*/
 
-void 
-ClipWidgetSetCoordinates(w, x, y)
-   Widget w;
-   int x, y;
+void
+ClipWidgetSetCoordinates(Widget w, int x, int y)
 {
    ClipWidget cw = (ClipWidget)w;
    Widget  child = CW_CHILD;
    int px,py;
- 
+
    BEGINMESSAGE(ClipWidgetSetCoordinates)
    ClipWidgetCheckCoordinates(w, x, y, &px,&py);
    XtMoveWidget(child, (Position)px, (Position)py);
    CW_CHILD_NAT_X = (Position)px;
    CW_CHILD_NAT_Y = (Position)py;
-   SendReport (w, (XawPRSliderX | XawPRSliderY));
+   SendReport (cw, (XawPRSliderX | XawPRSliderY));
    ENDMESSAGE(ClipWidgetSetCoordinates)
 }
diff --git a/gv/src/FileSel.c b/gv/src/FileSel.c
index c80bb85..1bf101f 100644
--- a/gv/src/FileSel.c
+++ b/gv/src/FileSel.c
@@ -449,10 +449,7 @@ ClassInitialize(void)
    Initialize
 
-------------------------------------------------------------------------------*/
 
-static void Initialize(request, new, argl, num_argl)
-   Widget      request, new;
-   ArgList     argl;
-   Cardinal    *num_argl;
+static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList argl 
_GL_UNUSED, Cardinal *num_argl _GL_UNUSED)
 {
    FS_WIDGET   new;
 
@@ -560,10 +557,7 @@ static void Initialize(request, new, argl, num_argl)
    Realize
 
-------------------------------------------------------------------------------*/
 
-static void Realize (w, valueMask, attrs)
-    Widget w;
-    XtValueMask *valueMask;
-    XSetWindowAttributes *attrs;
+static void Realize (Widget w, XtValueMask *valueMask, XSetWindowAttributes 
*attrs)
 {
    FS_WIDGET w;
    BEGINMESSAGE(Realize)
@@ -577,10 +571,7 @@ static void Realize (w, valueMask, attrs)
    SetValues
 
-------------------------------------------------------------------------------*/
 
-static Boolean SetValues(current, request, new, in_args, in_num_args)
-  Widget       current, request, new;
-  ArgList      in_args;
-  Cardinal     *in_num_args;
+static Boolean SetValues(Widget current, Widget request _GL_UNUSED, Widget 
new, ArgList in_args _GL_UNUSED, Cardinal *in_num_args _GL_UNUSED)
 {
   FS_WIDGET    new;
   FileSelectionWidget cfs = (FileSelectionWidget)current;
@@ -629,9 +620,8 @@ static Boolean SetValues(current, request, new, in_args, 
in_num_args)
    Destroy
 
-------------------------------------------------------------------------------*/
 
-static void 
-Destroy(w)
-   Widget      w;
+static void
+Destroy(Widget w)
 {
    FS_WIDGET w;
 
@@ -660,8 +650,7 @@ Destroy(w)
    strwild
 
-------------------------------------------------------------------------------*/
 
-static Boolean strwild(string,wild)
-   char        *string, *wild;
+static Boolean strwild(char *string, char *wild)
 {
   char  *cwild;
   int   nwild;
@@ -721,11 +710,7 @@ static Boolean strwild(string,wild)
 
-------------------------------------------------------------------------------*/
 
 static void
-strreplace(out,find,replace,in)
-   char *out;
-   char *find;
-   char *replace;
-   char *in;
+strreplace(char *out, char *find, char *replace, char *in)
 {
    int locat = 0;
    int findlength;
@@ -757,8 +742,7 @@ strreplace(out,find,replace,in)
 ----------------------------------------------------------------------*/
 
 static void
-appendDirEndSeparator(path)
-   char *path;
+appendDirEndSeparator(char *path)
 {
    size_t l=0;
    BEGINMESSAGE(appendDirEndSeparator)
@@ -774,9 +758,7 @@ appendDirEndSeparator(path)
 ----------------------------------------------------------------------*/
 
 static void
-savestrcpy(dest,source)
-  char *dest;
-  char *source;
+savestrcpy(char *dest, char *source)
 {
   BEGINMESSAGE(savestrcpy)
   strncpy(dest,source,FS_MAXNAMLEN-1);
@@ -789,9 +771,7 @@ savestrcpy(dest,source)
 ----------------------------------------------------------------------*/
 
 static void
-setText(w,line)
-  Widget w;
-  String line;
+setText(Widget w, String line)
 {
   USE_Arg(1);
 
@@ -807,9 +787,7 @@ setText(w,line)
 ----------------------------------------------------------------------*/
 
 static void
-savestrcat(dest,source)
-  char *dest;
-  char *source;
+savestrcat(char *dest, char *source)
 {
   size_t ld,ls;
   char *s;
@@ -827,8 +805,7 @@ savestrcat(dest,source)
    translateTildeInPath
 
-------------------------------------------------------------------------------*/
 
-static void translateTildeInPath(path)
-  char *path;
+static void translateTildeInPath(char *path)
 {
   char *pos;
 
@@ -854,9 +831,7 @@ static void translateTildeInPath(path)
    FScompareEntries
 
-------------------------------------------------------------------------------*/
 
-static int FScompareEntries(a, b)
-  const void *a;
-  const void *b;
+static int FScompareEntries(const void *a, const void *b)
 {
   String *p = (String*) a;
   String *q = (String*) b;
@@ -869,9 +844,7 @@ static int FScompareEntries(a, b)
    SetPreferredButton
 
-------------------------------------------------------------------------------*/
 
-static void preferButton(w,prefer)
-   Widget w;
-   int prefer;
+static void preferButton(Widget w, int prefer)
 {
    BEGINMESSAGE(preferButton)
    if (w) {
@@ -881,10 +854,7 @@ static void preferButton(w,prefer)
    ENDMESSAGE(preferButton)
 }
 
-static void SetPreferredButton(w,position,install)
-   Widget      w;
-   int                 position;
-   int         install;
+static void SetPreferredButton(Widget w, int position, int install)
 {
    FS_WIDGET   w;
    char        name[10];
@@ -914,11 +884,7 @@ static void SetPreferredButton(w,position,install)
     FS_preferButtonAction
 
-------------------------------------------------------------------------------*/
 
-static void FS_preferButtonAction(w, event, params, nparams)
-   Widget      w;
-   XEvent      *event;
-   String      *params;
-   Cardinal    *nparams;
+static void FS_preferButtonAction(Widget w, XEvent *event _GL_UNUSED, String 
*params, Cardinal *nparams)
 {
    FileSelectionWidget FS_FILE_SELECTION;
 
@@ -960,11 +926,7 @@ static void FS_preferButtonAction(w, event, params, 
nparams)
     FS_listAction
 
-------------------------------------------------------------------------------*/
 
-static void FS_listAction(w, event, params, nparams)
-  Widget       w;
-  XEvent       *event;
-  String       *params;
-  Cardinal     *nparams;
+static void FS_listAction(Widget w, XEvent *event, String *params, Cardinal 
*nparams)
 {
 #  define HISTORY_POINTS 10
 #  define DECAY_TIME 200
@@ -1178,11 +1140,7 @@ break_scrolling:
    FS_textfieldBackSpaceAction 
 
-------------------------------------------------------------------------------*/
 
-static void FS_textfieldBackSpaceAction(w, event, parms, nparms)
-   Widget      w;
-   XEvent      *event;
-   String      *parms;
-   Cardinal    *nparms;
+static void FS_textfieldBackSpaceAction(Widget w, XEvent *event _GL_UNUSED, 
String *parms _GL_UNUSED, Cardinal *nparms _GL_UNUSED)
 {
    BEGINMESSAGE(FS_textfieldBackSpaceAction)
 
@@ -1203,11 +1161,7 @@ static void FS_textfieldBackSpaceAction(w, event, parms, 
nparms)
    FS_textfieldDeleteAction 
 
-------------------------------------------------------------------------------*/
 
-static void FS_textfieldDeleteAction(w, event, parms, nparms)
-   Widget      w;
-   XEvent      *event;
-   String      *parms;
-   Cardinal    *nparms;
+static void FS_textfieldDeleteAction(Widget w, XEvent *event _GL_UNUSED, 
String *parms _GL_UNUSED, Cardinal *nparms _GL_UNUSED)
 {
    BEGINMESSAGE(FS_textfieldDeleteAction)
 
@@ -1228,11 +1182,7 @@ static void FS_textfieldDeleteAction(w, event, parms, 
nparms)
    FS_textfieldFocusAction 
 
-------------------------------------------------------------------------------*/
 
-static void FS_textfieldFocusAction(w, event, parms, nparms)
-   Widget      w;
-   XEvent      *event;
-   String      *parms;
-   Cardinal    *nparms;
+static void FS_textfieldFocusAction(Widget w, XEvent *event _GL_UNUSED, String 
*parms _GL_UNUSED, Cardinal *nparms _GL_UNUSED)
 {
    USE_Arg(5);
 
@@ -1265,9 +1215,7 @@ static void FS_textfieldFocusAction(w, event, parms, 
nparms)
     MulticlickNotify
 
-------------------------------------------------------------------------------*/
 
-static void MulticlickNotify (client_data, idp)
-    XtPointer client_data;
-    XtIntervalId *idp;
+static void MulticlickNotify(XtPointer client_data, XtIntervalId *idp 
_GL_UNUSED)
 {
     FS_WIDGET client_data;
    
@@ -1280,10 +1228,7 @@ static void MulticlickNotify (client_data, idp)
    changeList
 
-------------------------------------------------------------------------------*/
 
-static void changeList(w,list,entries)
-  Widget w;
-  String *list;
-  int entries;
+static void changeList(Widget w, String *list, int entries)
 {
   int i,e,l;
   USE_Arg(2);
@@ -1328,8 +1273,7 @@ static void changeList(w,list,entries)
    changeLists
 
-------------------------------------------------------------------------------*/
 
-static void changeLists(FS_FILE_SELECTION) 
-   FileSelectionWidget FS_FILE_SELECTION;
+static void changeLists(FileSelectionWidget FS_FILE_SELECTION)
 {
    BEGINMESSAGE(changeLists)
    IMESSAGE(TOPDIR_ENTRIES)
@@ -1359,10 +1303,7 @@ SetIncompleteDirectoryView(FileSelectionWidget fs, 
String *list)
 ----------------------------------------------------------------------*/
 
 static void
-SplitPath(path,dir,file)
-  String path;
-  char *dir;
-  char *file;
+SplitPath(String path, char *dir, char *file)
 {
   char tmp[FS_MAXNAMLEN];
   char *s;
@@ -1391,10 +1332,7 @@ SplitPath(path,dir,file)
 ----------------------------------------------------------------------*/
 
 static void
-CombineToPath(path,dir,file)
-  String path;
-  char *dir;
-  char *file;
+CombineToPath(String path, char *dir, char *file)
 {
   char tmp[FS_MAXNAMLEN];
 
@@ -1412,9 +1350,7 @@ CombineToPath(path,dir,file)
    SetDirectoryView
 ----------------------------------------------------------------------*/
 
-static void SetDirectoryView(fs,dir)
-   FileSelectionWidget fs;
-   char *dir;
+static void SetDirectoryView(FileSelectionWidget fs, char *dir)
 {
    DIR                 *dirp;
    struct dirent       *dp;
@@ -1597,9 +1533,7 @@ static void SetDirectoryView(fs,dir)
 
-------------------------------------------------------------------------------*/
 
 static void
-rescanProc(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+rescanProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data 
_GL_UNUSED)
 {
    FS_WIDGET XtParent(w);
 
@@ -1614,9 +1548,7 @@ rescanProc(w, client_data, call_data)
 
-------------------------------------------------------------------------------*/
 
 static void
-filtersProc(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+filtersProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data 
_GL_UNUSED)
 {
    FS_WIDGET XtParent(XtParent(XtParent(w)));
    Arg args[2];
@@ -1641,9 +1573,7 @@ filtersProc(w, client_data, call_data)
 
-------------------------------------------------------------------------------*/
 
 static void
-dirsProc(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+dirsProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data 
_GL_UNUSED)
 {
   FS_WIDGET XtParent(XtParent(XtParent(w)));
   USE_Arg(2);
@@ -1669,9 +1599,7 @@ dirsProc(w, client_data, call_data)
 ----------------------------------------------------------------------*/
 
 static void
-TopDirSelectionProc(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+TopDirSelectionProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer 
call_data)
 {
   FS_WIDGET XtParent(XtParent(XtParent(XtParent(w))));
   int item = (int)(intptr_t)call_data;
@@ -1716,9 +1644,7 @@ TopDirSelectionProc(w, client_data, call_data)
 
-------------------------------------------------------------------------------*/
 
 static void
-CurDirSelectionProc(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+CurDirSelectionProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer 
call_data)
 {
    FS_WIDGET   XtParent(XtParent(XtParent(XtParent(w))));
    char                name[10];
@@ -1760,9 +1686,7 @@ CurDirSelectionProc(w, client_data, call_data)
 
-------------------------------------------------------------------------------*/
 
 static void
-SubDirSelectionProc(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+SubDirSelectionProc(Widget w, XtPointer client_data _GL_UNUSED, XtPointer 
call_data)
 {
   int item = (int)(intptr_t) call_data;
   FS_WIDGET XtParent(XtParent(XtParent(XtParent(w))));
@@ -1802,13 +1726,7 @@ SubDirSelectionProc(w, client_data, call_data)
    CreateTextField
 
-------------------------------------------------------------------------------*/
 
-static void CreateTextField(frameP,textP,value,text_trans,namebase,parent)
-   Widget *frameP;
-   Widget *textP;
-   char *value;
-   XtTranslations text_trans;
-   String namebase;
-   Widget parent;
+static void CreateTextField(Widget *frameP, Widget *textP, char *value, 
XtTranslations text_trans, String namebase, Widget parent)
 {
    USE_Arg(10);
    char name[15];
@@ -1839,9 +1757,7 @@ static void 
CreateTextField(frameP,textP,value,text_trans,namebase,parent)
    CreateList
 
-------------------------------------------------------------------------------*/
 
-static void cb_scroll(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+static void cb_scroll(Widget w, XtPointer client_data, XtPointer call_data)
 {
   Widget p;
   char *s;
@@ -1899,15 +1815,7 @@ SMESSAGE(XtName(p))
 }
 
 static void
-CreateList(scrollP,frameP,clipP,aaaP,listP,list_trans,namebase,parent)
-   Widget *scrollP;
-   Widget *frameP;
-   Widget *clipP;
-   Widget *aaaP;
-   Widget *listP;
-   XtTranslations list_trans;
-   String namebase;
-   Widget parent;
+CreateList(Widget *scrollP, Widget *frameP, Widget *clipP, Widget *aaaP, 
Widget *listP, XtTranslations list_trans, String namebase, Widget parent)
 {
    USE_Arg(5);
    char name[15];
@@ -1953,11 +1861,7 @@ 
CreateList(scrollP,frameP,clipP,aaaP,listP,list_trans,namebase,parent)
    BuildMenu
 
-------------------------------------------------------------------------------*/
 
-static Widget BuildMenu(parent,descrip,defaultdescrip,cb)
-  Widget parent;
-  String descrip;
-  String defaultdescrip;
-  XtCallbackProc cb;
+static Widget BuildMenu(Widget parent, String descrip, String defaultdescrip, 
XtCallbackProc cb)
 {
   Widget m,w=NULL;
   char *md,*d,*tmp;
@@ -2048,7 +1952,7 @@ XawFileSelectionSetPath(Widget w,String string)
 ########################################################################*/
 
 void
-XawFileSelectionScan(Widget w,int indicator)
+XawFileSelectionScan(Widget w,int indicator _GL_UNUSED)
 {
    FS_WIDGET   w;
 
diff --git a/gv/src/Frame.c b/gv/src/Frame.c
index bb0f7c6..6b3e378 100644
--- a/gv/src/Frame.c
+++ b/gv/src/Frame.c
@@ -180,13 +180,7 @@ WidgetClass frameWidgetClass =     (WidgetClass) 
(&frameClassRec);
 }
 
 Boolean
-FrameConvertStringToFrameType ( display, args, num_args,  from, to, 
converter_data)
-   Display *display;
-   XrmValuePtr args;
-   Cardinal *num_args;
-   XrmValuePtr from;
-   XrmValuePtr to;
-   XtPointer *converter_data;
+FrameConvertStringToFrameType(Display *display, XrmValue *args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED, XrmValuePtr from, XrmValuePtr to, XtPointer 
*converter_data _GL_UNUSED)
 {
    String s = (String) from->addr;
 
@@ -219,9 +213,7 @@ ClassInitialize(void)
 /*---------------------------------------------------*/
 
 static GC
-shadow_getGC (w,pixel)
-    Widget w;
-    Pixel  pixel;
+shadow_getGC (Widget w, Pixel pixel)
 {
    Screen    *scn = XtScreen (w);
    XtGCMask  valuemask;
@@ -240,10 +232,7 @@ shadow_getGC (w,pixel)
 }
 
 static void
-Initialize(request, new, args, num_args)
-   Widget request, new;
-   ArgList args;
-   Cardinal *num_args;
+Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED)
 {
    FrameWidget fw = (FrameWidget) new;
 
@@ -268,8 +257,7 @@ Initialize(request, new, args, num_args)
 /*---------------------------------------------------*/
 
 static void
-Destroy (w)
-   Widget w;
+Destroy (Widget w)
 {
    FrameWidget fw = (FrameWidget) w;
 
@@ -285,9 +273,8 @@ Destroy (w)
 
 #define MIN_CHILD 4
 
-static void 
-Resize(w)
-   Widget w;
+static void
+Resize(Widget w)
 {
    int x,y,cw,ch,hs,vs,bw,sw;
    FrameWidget fw = (FrameWidget) w;
@@ -344,17 +331,8 @@ Resize(w)
   bottom_polygon[i].x = (short) (xx);  \
   bottom_polygon[i].y = (short) (yy)
 
-void 
-FrameDrawFrame (gw, x, y, w, h, frame_type, fw, lightgc, darkgc)
-   Widget  gw;
-   int     x;
-   int     y;
-   int     w; 
-   int     h;
-   XawFrameType frame_type;
-   int     fw;
-   GC      lightgc;
-   GC      darkgc;
+void
+FrameDrawFrame (Widget gw, int x, int y, int w, int h, XawFrameType 
frame_type, int fw, GC lightgc, GC darkgc)
 {
    XPoint top_polygon[6];
    XPoint bottom_polygon[6];
@@ -431,10 +409,7 @@ FrameDrawFrame (gw, x, y, w, h, frame_type, fw, lightgc, 
darkgc)
 #undef bottomPolygon
 
 static void
-Redisplay(w, event, region)
-   Widget w;
-   XEvent *event;              /* unused */
-   Region region;              /* unused */
+Redisplay(Widget w, XEvent *event _GL_UNUSED, Region region _GL_UNUSED)
 {
    FrameWidget fw = (FrameWidget) w;
    int wh,ww,sw,bw;
@@ -460,8 +435,7 @@ Redisplay(w, event, region)
 /*---------------------------------------------------*/
 
 static void
-GetDesiredSizeOfChild(child)
-   Widget child;
+GetDesiredSizeOfChild(Widget child)
 {
    FrameWidget fw;
 
@@ -490,8 +464,7 @@ GetDesiredSizeOfChild(child)
 /*---------------------------------------------------*/
 
 static void
-InsertChild(child)
-   Widget  child;
+InsertChild(Widget child)
 {
    BEGINMESSAGE(InsertChild)
    (*SuperClass->composite_class.insert_child) (child);
@@ -504,10 +477,7 @@ InsertChild(child)
 /*---------------------------------------------------*/
 
 static void
-GetNaturalSize(fw,wP,hP)
-   FrameWidget fw;
-   Dimension *wP;
-   Dimension *hP;
+GetNaturalSize(FrameWidget fw, Dimension *wP, Dimension *hP)
 {
    BEGINMESSAGE(GetNaturalSize)
    *wP = FW_CHILD_NAT_WIDTH  + 2*FW_NAT_SHADOW +2*FW_NAT_HSPACE;
@@ -520,8 +490,7 @@ GetNaturalSize(fw,wP,hP)
 /*---------------------------------------------------*/
 
 static void
-ChangeManaged(w)
-   Widget w;
+ChangeManaged(Widget w)
 {
    FrameWidget fw = (FrameWidget) w;
 
@@ -538,9 +507,7 @@ ChangeManaged(w)
 #define IS_REQUEST(fff) (request->request_mode & fff)
 
 static XtGeometryResult
-GeometryManager(child,request,geometry_return)
-   Widget child;
-   XtWidgetGeometry *request, *geometry_return;
+GeometryManager(Widget child, XtWidgetGeometry *request, XtWidgetGeometry 
*geometry_return _GL_UNUSED)
 {
    FrameWidget fw;
    XtGeometryResult answer;
@@ -596,9 +563,7 @@ GeometryManager(child,request,geometry_return)
 /*---------------------------------------------------*/
 
 static XtGeometryResult
-QueryGeometry(w,request,preferred_return)
-   Widget w;
-   XtWidgetGeometry *request, *preferred_return;
+QueryGeometry(Widget w, XtWidgetGeometry *request, XtWidgetGeometry 
*preferred_return)
 {
    FrameWidget fw = (FrameWidget)w;
    Dimension nw,nh;
@@ -632,8 +597,7 @@ QueryGeometry(w,request,preferred_return)
 /*---------------------------------------------------*/
 
 static XtGeometryResult
-LayoutFrame(fw)
-   FrameWidget fw;
+LayoutFrame(FrameWidget fw)
 {
    XtWidgetGeometry request;
    XtGeometryResult answer;
diff --git a/gv/src/Ghostview.c b/gv/src/Ghostview.c
index 3c9763f..eb8768c 100644
--- a/gv/src/Ghostview.c
+++ b/gv/src/Ghostview.c
@@ -271,8 +271,7 @@ WidgetClass ghostviewWidgetClass = 
(WidgetClass)&ghostviewClassRec;
 
 static Pixmap pix = 0;
 
-static void Copy_pixmap(w)
-    Widget w;
+static void Copy_pixmap(Widget w)
 {
    GhostviewWidget gvw = (GhostviewWidget) w;
 
@@ -292,8 +291,8 @@ static void Copy_pixmap(w)
   }      
 
 }
-static void Realize_pixmap(w)
-    Widget w;
+
+static void Realize_pixmap(Widget w)
 {
     if(!pix) {
         Display *dpy = XtDisplay(w);
@@ -309,11 +308,8 @@ static void Realize_pixmap(w)
     } 
 }
 
-static void 
-Redisplay(w, event, region)
-Widget w;
-XEvent *event;
-Region region;
+static void
+Redisplay(Widget w, XEvent *event _GL_UNUSED, Region region _GL_UNUSED)
 {
 
   BEGINMESSAGE(Redisplay)
@@ -331,11 +327,7 @@ Region region;
 
/*###################################################################################*/
 
 static void
-Message(w, event, params, num_params)
-   Widget w;
-   XEvent *event;
-   String *params;             /* unused */
-   Cardinal *num_params;       /* unused */
+Message(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal 
*num_params _GL_UNUSED)
 {
    GhostviewWidget gvw = (GhostviewWidget) w;
    GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w);
@@ -367,11 +359,7 @@ Message(w, event, params, num_params)
 }
 
 static void
-action_changeCursor(w, event, params, num_params)
-   Widget w;
-   XEvent *event;
-   String *params;
-   Cardinal *num_params;
+action_changeCursor(Widget w, XEvent *event _GL_UNUSED, String *params, 
Cardinal *num_params)
 {
    int which=0;
 
@@ -389,9 +377,7 @@ action_changeCursor(w, event, params, num_params)
 /*----------------------------------------------------------*/
 
 static void
-ChangeCursor(gvw, which)
-   GhostviewWidget gvw;
-   int which;
+ChangeCursor(GhostviewWidget gvw, int which)
 {
    Widget w = (Widget) gvw;
    Cursor cursor;
@@ -435,11 +421,7 @@ ChangeCursor(gvw, which)
 
/*###################################################################################*/
 
 static void
-Notify(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+Notify(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal 
*num_params _GL_UNUSED)
 {
   GhostviewWidget gvw = (GhostviewWidget) w;
   GhostviewReturnStruct ret_val;
@@ -471,8 +453,7 @@ Notify(w, event, params, num_params)
 static Boolean broken_pipe = False;
 
 static SIGVAL
-CatchPipe(i)
-    int i;
+CatchPipe(int i _GL_UNUSED)
 {
     broken_pipe = True;
 #ifdef SIGNALRETURNSINT
@@ -492,15 +473,12 @@ CatchPipe(i)
 
/*###################################################################################*/
 
 static void
-Input(client_data, source, id)
-    XtPointer client_data;
-    int *source;
-    XtInputId *id;
+Input(XtPointer client_data, int *source _GL_UNUSED, XtInputId *id _GL_UNUSED)
 {
     Widget w = (Widget) client_data;
     GhostviewWidget gvw = (GhostviewWidget) w;
     int bytes_written;
-    SIGVAL (*oldsig)();
+    SIGVAL (*oldsig)(int);
 
     BEGINMESSAGE(Input)
 
@@ -641,10 +619,7 @@ Input(client_data, source, id)
 
/*###################################################################################*/
 
 static void
-Output(client_data, source, id)
-    XtPointer client_data;
-    int *source;
-    XtInputId *id;
+Output(XtPointer client_data, int *source, XtInputId *id _GL_UNUSED)
 {
     Widget w = (Widget) client_data;
     GhostviewWidget gvw = (GhostviewWidget) w;
@@ -737,10 +712,7 @@ ClassPartInitialize(class)
 
/*###################################################################################*/
 
 static void
-Initialize(request, new, args, num_args)
-    Widget request, new;
-    ArgList args;      /* unused */
-    Cardinal *num_args;        /* unused */
+Initialize(Widget request, Widget new, ArgList args _GL_UNUSED, Cardinal 
*num_args _GL_UNUSED)
 {
     XGCValues  values;
     XtGCMask   mask;
@@ -803,10 +775,7 @@ Initialize(request, new, args, num_args)
 
/*###################################################################################*/
 
 static void
-Realize(w, valueMask, attributes)
-    Widget w;
-    Mask *valueMask;
-    XSetWindowAttributes *attributes;
+Realize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
 
@@ -828,8 +797,7 @@ Realize(w, valueMask, attributes)
 
/*###################################################################################*/
 
 static void
-Destroy(w)
-    Widget w;
+Destroy(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
 
@@ -848,9 +816,7 @@ Destroy(w)
 
/*###################################################################################*/
 
 static void
-SetBackground(w,clear)
-    Widget w;
-    Bool clear;
+SetBackground(Widget w, Bool clear)
 {
    GhostviewWidget gvw = (GhostviewWidget) w;
 
@@ -889,8 +855,7 @@ SetBackground(w,clear)
 
/*###################################################################################*/
 
 static void
-Resize(w)
-  Widget w;
+Resize(Widget w _GL_UNUSED)
 {
   BEGINMESSAGE(Resize)
   ENDMESSAGE(Resize)
@@ -903,7 +868,7 @@ Resize(w)
 
/*###################################################################################*/
 
 static Boolean
-SetValues(Widget current, Widget request, Widget new, ArgList unused1, 
Cardinal *unused2)
+SetValues(Widget current, Widget request, Widget new, ArgList unused1 
_GL_UNUSED, Cardinal *unused2 _GL_UNUSED)
 {
     GhostviewWidget cgvw = (GhostviewWidget) current;
     GhostviewWidget rgvw = (GhostviewWidget) request;
@@ -1007,9 +972,7 @@ SetValues(Widget current, Widget request, Widget new, 
ArgList unused1, Cardinal
 
/*###################################################################################*/
 
 static XtGeometryResult 
-QueryGeometry(w, intended, requested)
-Widget w;
-XtWidgetGeometry *intended, *requested;
+QueryGeometry(Widget w, XtWidgetGeometry *intended, XtWidgetGeometry 
*requested)
 {
     Dimension new_width, new_height;
     Boolean change, width_req, height_req;
@@ -1049,9 +1012,7 @@ XtWidgetGeometry *intended, *requested;
 
/*###################################################################################*/
 
 static void
-Layout(w, xfree, yfree)
-    Widget w;
-    Boolean xfree, yfree;
+Layout(Widget w, Boolean xfree, Boolean yfree)
 {
     Dimension width = w->core.width;
     Dimension height = w->core.height;
@@ -1113,10 +1074,8 @@ Layout(w, xfree, yfree)
 static Boolean SetProperty(Widget w, Pixmap bpixmap);
 
 static Boolean
-ComputeSize(w, xfree, yfree, width, height)
-  Widget w;
-  Boolean xfree, yfree;        /* Am I allowed to change width or height */
-  Dimension *width, *height;
+ComputeSize(Widget w, Boolean xfree, Boolean yfree, Dimension *width, 
Dimension *height)
+  /* xfree, yfree: Am I allowed to change width or height */
 {
   GhostviewWidget gvw = (GhostviewWidget) w;
   Dimension new_width = *width;
@@ -1203,9 +1162,7 @@ static Boolean alloc_error;
 static XErrorHandler oldhandler;
 
 static int
-catch_alloc (dpy, err)
-Display *dpy;
-XErrorEvent *err;
+catch_alloc (Display *dpy, XErrorEvent *err)
 {
     if (err->error_code == BadAlloc) alloc_error = True;
     if (alloc_error) return 0;
@@ -1219,10 +1176,9 @@ XErrorEvent *err;
  * Returns True if a new interpreter was started, False otherwise.
  */
 
/*###################################################################################*/
- 
+
 static Boolean
-Setup(w)
-   Widget w;
+Setup(Widget w)
 {
    GhostviewWidget gvw = (GhostviewWidget) w;
    Pixmap bpixmap;
@@ -1298,8 +1254,7 @@ Setup(w)
 
  
 static Boolean
-SetProperty(w, bpixmap)
-   Widget w; Pixmap bpixmap;
+SetProperty(Widget w, Pixmap bpixmap)
 {
    GhostviewWidget gvw = (GhostviewWidget) w;
    GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w);
@@ -1378,8 +1333,7 @@ SetProperty(w, bpixmap)
  */
 
 static void
-StartInterpreter(w)
-    Widget w;
+StartInterpreter(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     int        std_in[2];
@@ -1642,8 +1596,7 @@ StartInterpreter(w)
 int restarted = 0;
 
 static void
-StopInterpreter(w)
-    Widget w;
+StopInterpreter(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(StopInterpreter)
@@ -1698,8 +1651,7 @@ StopInterpreter(w)
 
/*###################################################################################*/
 
 static void
-InterpreterFailed(w)
-    Widget w;
+InterpreterFailed(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(InterpreterFailed)
@@ -1741,15 +1693,7 @@ GhostviewDrawRectangle(w,x,y,width,height)
 #define GV_O_H ((GV_O_L) | (GV_O_S))
 #define GV_O_V ((GV_O_P) | (GV_O_U))
 
-static void GhostviewOrientCoords(gvw,x,y,xP,yP,widthP,heightP,orientP)
-  GhostviewWidget gvw;
-  int x;
-  int y;
-  int *xP;
-  int *yP;
-  int *widthP;
-  int *heightP;
-  int *orientP;
+static void GhostviewOrientCoords(GhostviewWidget gvw, int x, int y, int *xP, 
int *yP, int *widthP, int *heightP, int *orientP)
 {
   BEGINMESSAGE(GhostviewOrientCoords)
   switch (gvw->ghostview.orientation) {
@@ -1779,13 +1723,7 @@ static void 
GhostviewOrientCoords(gvw,x,y,xP,yP,widthP,heightP,orientP)
 /* GhostviewCornersPS */
 /*------------------------------------------------------------*/
 
-static void GhostviewCornersPS(gvw,o,pslxP,psrxP,pslyP,psuyP)
-  GhostviewWidget gvw;
-  int o;
-  int *pslxP;
-  int *psrxP;
-  int *pslyP;
-  int *psuyP;
+static void GhostviewCornersPS(GhostviewWidget gvw, int o, int *pslxP, int 
*psrxP, int *pslyP, int *psuyP)
 {
   if (o & GV_O_P) {
     *pslxP=gvw->ghostview.llx; *psrxP=gvw->ghostview.urx;
@@ -1927,8 +1865,7 @@ GhostviewGetAreaOfBB (
 
/*###################################################################################*/
 
 void
-GhostviewClearBackground(w)
-    Widget w;
+GhostviewClearBackground(Widget w)
 {
     BEGINMESSAGE(GhostviewClearBackground)
       if (XtIsRealized(w)) { if(!pix || w != page) SetBackground(w,True); }
@@ -1940,8 +1877,7 @@ GhostviewClearBackground(w)
 
/*###################################################################################*/
 
 void
-GhostviewSetup(w)
-    Widget w;
+GhostviewSetup(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(GhostviewSetup)
@@ -1956,8 +1892,7 @@ GhostviewSetup(w)
  */
 
/*###################################################################################*/
 void
-GhostviewDisableInterpreter(w)
-    Widget w;
+GhostviewDisableInterpreter(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(GhostviewDisableInterpreter)
@@ -1974,8 +1909,7 @@ GhostviewDisableInterpreter(w)
 
/*###################################################################################*/
 
 void
-GhostviewEnableInterpreter(w)
-    Widget w;
+GhostviewEnableInterpreter(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(GhostviewEnableInterpreter)
@@ -2020,8 +1954,7 @@ GhostviewState(
 
/*###################################################################################*/
 
 Boolean
-GhostviewIsInterpreterReady(w)
-    Widget w;
+GhostviewIsInterpreterReady(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(GhostviewIsInterpreterReady)
@@ -2043,8 +1976,7 @@ GhostviewIsInterpreterReady(w)
 
/*###################################################################################*/
 
 Boolean
-GhostviewIsBusy(w)
-    Widget w;
+GhostviewIsBusy(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(GhostviewIsBusy)
@@ -2059,8 +1991,7 @@ GhostviewIsBusy(w)
 
/*###################################################################################*/
 
 Boolean
-GhostviewIsInterpreterRunning(w)
-    Widget w;
+GhostviewIsInterpreterRunning(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     BEGINMESSAGE(GhostviewIsInterpreterRunning)
@@ -2133,8 +2064,7 @@ GhostviewSendPS(Widget w, FILE *fp, gv_off_t begin, 
gv_off_t len, Bool doclose)
 
/*###################################################################################*/
 
 Boolean
-GhostviewNextPage(w)
-    Widget w;
+GhostviewNextPage(Widget w)
 {
     GhostviewWidget gvw = (GhostviewWidget) w;
     GhostviewWidgetClass gvc = (GhostviewWidgetClass) XtClass(w);
@@ -2192,13 +2122,7 @@ GhostviewNextPage(w)
        }
 
 Boolean
-XmuCvtStringToPalette(dpy, args, num_args, fromVal, toVal, data)
-    Display    *dpy;
-    XrmValue   *args;          /* unused */
-    Cardinal   *num_args;      /* unused */
-    XrmValue   *fromVal;
-    XrmValue   *toVal;
-    XtPointer  *data;          /* unused */
+XmuCvtStringToPalette(Display *dpy, XrmValue *args _GL_UNUSED, Cardinal 
*num_args _GL_UNUSED, XrmValue *fromVal, XrmValue *toVal, XtPointer *data 
_GL_UNUSED)
 {
     static XrmQuark            XrmQEmonochrome;
     static XrmQuark            XrmQEgrayscale;
diff --git a/gv/src/MButton.c b/gv/src/MButton.c
index 34abf39..38fbeaa 100644
--- a/gv/src/MButton.c
+++ b/gv/src/MButton.c
@@ -138,11 +138,7 @@ static void ClassInitialize(void)
 }
 
 void
-PopupMenu(w, event, params, num_params)
-Widget w;
-XEvent * event;
-String * params;
-Cardinal * num_params;
+PopupMenu(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, 
Cardinal *num_params)
 {
   MButtonWidget mbw = (MButtonWidget) w;
   Widget temp;
diff --git a/gv/src/Scrollbar.c b/gv/src/Scrollbar.c
index b7c8642..138011e 100644
--- a/gv/src/Scrollbar.c
+++ b/gv/src/Scrollbar.c
@@ -317,10 +317,7 @@ WidgetClass scrollbarWidgetClass = 
(WidgetClass)&scrollbarClassRec;
     EraseThumbRegion
 
###############################################################################*/
 
-static void EraseThumbRegion(SBW,yt,yb,xl,xr)
-   ScrollbarWidget SBW;
-   Dimension yt,yb;
-   Dimension xl,xr;
+static void EraseThumbRegion(ScrollbarWidget SBW, Dimension yt, Dimension yb, 
Dimension xl, Dimension xr)
 {
    USE_FILL;
 
@@ -334,10 +331,7 @@ static void EraseThumbRegion(SBW,yt,yb,xl,xr)
     PaintThumbCover
 
###############################################################################*/
 
-static void PaintThumbCover(SBW,yt,yb,xl,xr)
-   ScrollbarWidget SBW;
-   Dimension yt,yb;
-   Dimension xl,xr;
+static void PaintThumbCover(ScrollbarWidget SBW, Dimension yt, Dimension 
yb,Dimension xl,Dimension xr)
 {
    USE_FILL;
 
@@ -351,11 +345,7 @@ static void PaintThumbCover(SBW,yt,yb,xl,xr)
     PaintShadowAtSidesOfThumb
 
###############################################################################*/
 
-static void PaintShadowAtSidesOfThumb(SBW,yt,yb,xl,xr,s)
-   ScrollbarWidget SBW;
-   Dimension yt,yb;
-   Dimension xl,xr;
-   Dimension s;
+static void PaintShadowAtSidesOfThumb(ScrollbarWidget SBW, Dimension yt, 
Dimension yb, Dimension xl, Dimension xr, Dimension s)
 {
    USE_FILL;
 
@@ -372,12 +362,7 @@ static void PaintShadowAtSidesOfThumb(SBW,yt,yb,xl,xr,s)
     PaintShadowAtEndOfThumb
 
###############################################################################*/
 
-static void PaintShadowAtEndOfThumb(SBW,yt,yb,xl,xr,s,part)
-   ScrollbarWidget SBW;
-   Dimension yt,yb;
-   Dimension xl,xr;
-   Dimension s;
-   int part;
+static void PaintShadowAtEndOfThumb(ScrollbarWidget SBW, Dimension yt, 
Dimension yb, Dimension xl, Dimension xr, Dimension s, int part)
 {
    XPoint shadowPT[4];
    USE_FILL;
@@ -443,12 +428,7 @@ static void PaintMiddleOfThumb(ScrollbarWidget SBW, 
Dimension yt, Dimension yb,
     PaintEndOfThumb
 
###############################################################################*/
 
-static void PaintEndOfThumb(SBW,yt,yb,xl,xr,s,part)
-   ScrollbarWidget SBW;
-   Dimension yt,yb;
-   Dimension xl,xr;
-   Dimension s;
-   int part;
+static void PaintEndOfThumb(ScrollbarWidget SBW, Dimension yt, Dimension yb, 
Dimension xl, Dimension xr, Dimension s, int part)
 {
    BEGINMESSAGE(PaintEndOfThumb)
    if (part==UPPER_PART) {
@@ -471,9 +451,7 @@ static void PaintEndOfThumb(SBW,yt,yb,xl,xr,s,part)
     GetRelativeThumbLocation
 
###############################################################################*/
 
-static void GetRelativeThumbLocation(SBW,newtop,newbot)
-   ScrollbarWidget SBW;
-   Dimension *newtop, *newbot;
+static void GetRelativeThumbLocation(ScrollbarWidget SBW, Dimension *newtop, 
Dimension *newbot)
 {
    Dimension scroll_length = (Dimension) _SCROLL_LENGTH_-MIN_THUMB;
    Dimension end_of_scroll_region = (Dimension) _END_OF_SCROLL_REGION_;
@@ -492,9 +470,7 @@ static void GetRelativeThumbLocation(SBW,newtop,newbot)
     AdjustThumbShadow
 
###############################################################################*/
 
-static Boolean AdjustThumbShadow(SBW,newtop,newbot)
-    ScrollbarWidget SBW;
-    Dimension newtop,newbot;
+static Boolean AdjustThumbShadow(ScrollbarWidget SBW, Dimension newtop, 
Dimension newbot)
 {
     Dimension xl = (Dimension) _LEFT_START_OF_SCROLL_REGION_;
     Dimension xr = (Dimension) _RIGHT_END_OF_SCROLL_REGION_;
@@ -520,8 +496,7 @@ static Boolean AdjustThumbShadow(SBW,newtop,newbot)
     PaintThumb
 
###############################################################################*/
 
-static void PaintThumb(SBW)
-    ScrollbarWidget SBW;
+static void PaintThumb(ScrollbarWidget SBW)
 {
     Dimension xl = (Dimension) _LEFT_START_OF_SCROLL_REGION_;
     Dimension xr = (Dimension) _RIGHT_END_OF_SCROLL_REGION_;
@@ -583,10 +558,7 @@ static void PaintThumb(SBW)
 
 #define COORD(name,value) short name = (short) (value)
 
-static void PaintArrows(SBW,which,mode)
-   ScrollbarWidget SBW;
-   int which;
-   int mode;
+static void PaintArrows(ScrollbarWidget SBW, int which, int mode)
 {
    BEGINMESSAGE(PaintArrows)
 
@@ -704,8 +676,7 @@ static void PaintArrows(SBW,which,mode)
     CreateGC
 
###############################################################################*/
 
-static void CreateGC(w)
-    Widget w;
+static void CreateGC(Widget w)
 {
     SCROLLBARWIDGET w;
     XGCValues gcValues;
@@ -754,8 +725,7 @@ static void CreateGC(w)
     SetDimensions
 
###############################################################################*/
 
-static void SetDimensions(SBW)
-   ScrollbarWidget SBW;
+static void SetDimensions(ScrollbarWidget SBW)
 {
    Dimension tmp;
 
@@ -853,16 +823,14 @@ static void ClassInitialize(void)
     Initialize
 
###############################################################################*/
 
-static void Initialize( request, new, args, num_args )
-    Widget request;            /* what the client asked for */
-    Widget new;                        /* what we're going to give him */
-    ArgList args;
-    Cardinal *num_args;
+static void Initialize(Widget request _GL_UNUSED, Widget new, ArgList args 
_GL_UNUSED, Cardinal *num_args _GL_UNUSED)
+/* request: what the client asked for */
+/* new: what we're going to give him */
 {
     SCROLLBARWIDGET new;
 
     BEGINMESSAGE(Initialize)
-    CreateGC(SBW);
+    CreateGC(new);
     if (WIDTH == 0)  WIDTH  = (IS_VERTICAL)   ? THICKNESS : LENGTH;
     if (HEIGHT == 0) HEIGHT = (IS_HORIZONTAL) ? THICKNESS : LENGTH;
     SHADOW_BASE = _SC_INIT_VALUE_;
@@ -885,10 +853,7 @@ static void Initialize( request, new, args, num_args )
     Realize
 
###############################################################################*/
 
-static void Realize (w, valueMask, attributes)
-    Widget w;
-    Mask *valueMask;
-    XSetWindowAttributes *attributes;
+static void Realize(Widget w, Mask *valueMask, XSetWindowAttributes 
*attributes)
 {
     SCROLLBARWIDGET w;
     BEGINMESSAGE(Realize)
@@ -906,12 +871,7 @@ static void Realize (w, valueMask, attributes)
     SetValues
 
###############################################################################*/
 
-static Boolean SetValues(old, request, new, args, num_args)
-   Widget      old,
-               request,
-               new;
-   ArgList     args;
-   Cardinal    *num_args;
+static Boolean SetValues(Widget old, Widget request _GL_UNUSED, Widget new, 
ArgList args _GL_UNUSED, Cardinal *num_args _GL_UNUSED)
 {
    SCROLLBARWIDGET     new;
    ScrollbarWidget     old_sbw = (ScrollbarWidget) old;
@@ -939,7 +899,7 @@ static Boolean SetValues(old, request, new, args, num_args)
       THUMB != old_sbw->scrollbar.thumb) {
       INFMESSAGE(GC has changed)
       XtReleaseGC((Widget)SBW, SCROLLBAR_GC); /*###jp### changed 21.10.94*/
-      CreateGC(SBW);
+      CreateGC(new);
       redraw = TRUE;
    }
 
@@ -973,8 +933,7 @@ static Boolean SetValues(old, request, new, args, num_args)
    Resize
 
###############################################################################*/
 
-static void Resize(w)
-   Widget w;
+static void Resize(Widget w)
 {
    SCROLLBARWIDGET w;
    XEvent event;
@@ -994,10 +953,7 @@ static void Resize(w)
    bounding box to minimize visual disturbances.
 
###############################################################################*/
 
-static void Redisplay(w, event, region)
-   Widget      w;
-   XEvent      *event;
-   Region      region;
+static void Redisplay(Widget w, XEvent *event, Region region)
 {
    SCROLLBARWIDGET w;
    ScrollbarWidgetClass swclass = (ScrollbarWidgetClass) XtClass (w);
@@ -1075,8 +1031,7 @@ static void Destroy (w)
 
 #define CHECK(field) if (newEvent->field != oldEvent->field) return False;
 
-static Boolean CompareEvents (oldEvent, newEvent)
-    XEvent *oldEvent, *newEvent;
+static Boolean CompareEvents (XEvent *oldEvent, XEvent *newEvent)
 {
     INFMESSAGE(executing Procedure: CompareEvents)
     CHECK(xany.display);
@@ -1117,10 +1072,7 @@ struct EventData {
    int                 count;
 };
 
-static Bool PeekNotifyEvent (dpy, event, args)
-   Display     *dpy;
-   XEvent      *event;
-   char        *args;
+static Bool PeekNotifyEvent (Display *dpy, XEvent *event, char *args)
 {
    struct EventData *eventData = (struct EventData*)args;
    INFMESSAGE(executing Procedure: PeekNotifyEvent)
@@ -1132,9 +1084,7 @@ static Bool PeekNotifyEvent (dpy, event, args)
     LookAhead
 
###############################################################################*/
 
-static Boolean LookAhead (w, event)
-   Widget      w;
-   XEvent      *event;
+static Boolean LookAhead (Widget w, XEvent *event)
 {
    XEvent      newEvent;
    struct      EventData eventData;
@@ -1160,10 +1110,7 @@ static Boolean LookAhead (w, event)
 
 #define GET_EVENT_POS(kind) *position = (is_vertical) ? event->kind.y : 
event->kind.x
 
-static void ExtractPosition (event,position,is_vertical)
-   XEvent      *event;
-   Position    *position;
-   Boolean      is_vertical;
+static void ExtractPosition(XEvent *event, Position *position, Boolean 
is_vertical)
 {
    BEGINMESSAGE(ExtractPosition)
    switch( event->type ) {
@@ -1188,12 +1135,7 @@ static void ExtractPosition (event,position,is_vertical)
     HandleThumb
 
###############################################################################*/
 
-/* ARGSUSED */
-static void HandleThumb (w, event, params, num_params)
-   Widget w;
-   XEvent *event;
-   String *params;             /* unused */
-   Cardinal *num_params;       /* unused */
+static void HandleThumb (Widget w, XEvent *event, String *params, Cardinal 
*num_params)
 {
    SCROLLBARWIDGET w;
    Position position;
@@ -1220,11 +1162,7 @@ static void HandleThumb (w, event, params, num_params)
     HandleAutoscroll
 
###############################################################################*/
 
-static void HandleAutoscroll(w, event, params, num_params)
-   Widget w;
-   XEvent *event;
-   String *params;
-   Cardinal *num_params;
+static void HandleAutoscroll(Widget w, XEvent *event, String *params 
_GL_UNUSED, Cardinal *num_params)
 {
    SCROLLBARWIDGET w;
    static Position old_position;
@@ -1266,9 +1204,7 @@ static void HandleAutoscroll(w, event, params, num_params)
     RepeatNotify
 
###############################################################################*/
 
-static void RepeatNotify (client_data, idp)
-    XtPointer client_data;
-    XtIntervalId *idp;
+static void RepeatNotify (XtPointer client_data, XtIntervalId *idp _GL_UNUSED)
 {
     SCROLLBARWIDGET client_data;
     int call_data=0;
@@ -1306,11 +1242,7 @@ static void RepeatNotify (client_data, idp)
 
###############################################################################*/
 
 
-static void NotifyScroll(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+static void NotifyScroll(Widget w, XEvent *event, String *params _GL_UNUSED, 
Cardinal *num_params _GL_UNUSED)
 {
     SCROLLBARWIDGET w;
     Position tsoar = (Position) ARROW_TOP_TO_BORDER;
@@ -1365,11 +1297,7 @@ static void NotifyScroll(w, event, params, num_params)
 
###############################################################################*/
 
 /* ARGSUSED */
-static void EndScroll(w, event, params, num_params )
-    Widget w;
-    XEvent *event;             /* unused */
-    String *params;            /* unused */
-    Cardinal *num_params;      /* unused */
+static void EndScroll(Widget w, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
     SCROLLBARWIDGET w;
 
@@ -1387,11 +1315,7 @@ static void EndScroll(w, event, params, num_params )
     MoveThumb
 
###############################################################################*/
 
-static void MoveThumb (w, event, params, num_params)
-   Widget w;
-   XEvent *event;
-   String *params;             /* unused */
-   Cardinal *num_params;       /* unused */
+static void MoveThumb(Widget w, XEvent *event, String *params _GL_UNUSED, 
Cardinal *num_params _GL_UNUSED)
 {
    SCROLLBARWIDGET w;
    Position position;
@@ -1431,11 +1355,7 @@ static void MoveThumb (w, event, params, num_params)
     NotifyThumb
 
###############################################################################*/
 
-static void NotifyThumb(w, event, params, num_params )
-   Widget w;
-   XEvent *event;
-   String *params;             /* unused */
-   Cardinal *num_params;       /* unused */
+static void NotifyThumb(Widget w, XEvent *event, String *params _GL_UNUSED, 
Cardinal *num_params _GL_UNUSED)
 {
    register SCROLLBARWIDGET w;
 
diff --git a/gv/src/Vlist.c b/gv/src/Vlist.c
index c1392d8..d8d1187 100644
--- a/gv/src/Vlist.c
+++ b/gv/src/Vlist.c
@@ -180,11 +180,8 @@ static void ClassInitialize(void)
 /* Initialize */
 /*---------------------------------------------------*/
 
-static void 
-Initialize(request, new, args, num_args)
-Widget request, new;
-ArgList args;                  /* unused */
-Cardinal *num_args;            /* unused */
+static void
+Initialize(Widget request _GL_UNUSED, Widget new, ArgList args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED)
 {
   VlistWidget vw = (VlistWidget) new;
   String s="";
@@ -239,11 +236,8 @@ Cardinal *num_args;                /* unused */
 /* Redisplay */
 /*---------------------------------------------------*/
 
-static void 
-Redisplay(w, event, region)
-Widget w;
-XEvent *event;
-Region region;
+static void
+Redisplay(Widget w, XEvent *event, Region region)
 {
   BEGINMESSAGE(Redisplay)
   PaintVlistWidget(w, event, region);
@@ -254,8 +248,7 @@ Region region;
 /* Resize */
 /*---------------------------------------------------*/
 
-static void shiftLabel(vw)
-  VlistWidget vw;
+static void shiftLabel(VlistWidget vw)
 {
   BEGINMESSAGE(shiftLabel)
   if (vw->vlist.allow_marks) {
@@ -266,8 +259,7 @@ static void shiftLabel(vw)
   ENDMESSAGE(shiftLabel)
 }
 
-static void Resize(w)
-  Widget w;
+static void Resize(Widget w)
 {
   VlistWidget vw = (VlistWidget) w;
   BEGINMESSAGE(Resize)
@@ -280,11 +272,8 @@ static void Resize(w)
 /* SetValues */
 /*---------------------------------------------------*/
 
-static Boolean 
-SetValues (current, request, new, args, num_args)
-Widget current, request, new;
-ArgList args;
-Cardinal *num_args;
+static Boolean
+SetValues (Widget current, Widget request _GL_UNUSED, Widget new, ArgList args 
_GL_UNUSED, Cardinal *num_args _GL_UNUSED)
 {
   VlistWidget cvw = (VlistWidget) current;
   VlistWidget nvw = (VlistWidget) new;
@@ -309,9 +298,8 @@ Cardinal *num_args;
 /* Destroy */
 /*---------------------------------------------------*/
 
-static void 
-Destroy(w)
-Widget w;
+static void
+Destroy(Widget w)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -329,9 +317,7 @@ Widget w;
 /*---------------------------------------------------*/
 
 static void
-PaintEntryString(w, entry)
-  Widget w;
-  int entry;
+PaintEntryString(Widget w, int entry)
 {
   VlistWidget vw = (VlistWidget)w;
   char * s;
@@ -371,12 +357,7 @@ PaintEntryString(w, entry)
 /*---------------------------------------------------*/
 
 static int
-PaintMark(w, region, entry, style,erase)
-  Widget w;
-  Region region;
-  int entry;
-  int style;
-  Boolean erase;
+PaintMark(Widget w, Region region, int entry, int style, Boolean erase)
 {
   VlistWidget vw = (VlistWidget)w;
   int ss,ulx,uly,lrx,lry,ret=0;
@@ -437,12 +418,7 @@ PaintMark(w, region, entry, style,erase)
 }
 
 static void
-PaintMarkOfEntry(w, region, entry, style,erase)
-  Widget w;
-  Region region;
-  int entry;
-  int style;
-  Boolean erase;
+PaintMarkOfEntry(Widget w, Region region, int entry, int style, Boolean erase)
 {
   VlistWidget vw = (VlistWidget)w;
   int pstyle,dstyle,d,p;
@@ -486,12 +462,8 @@ PaintMarkOfEntry(w, region, entry, style,erase)
 /* PaintMarkMarkOfEntry */
 /*---------------------------------------------------*/
 
-static void 
-PaintMarkMarkOfEntry(w, region, entry, erase)
-  Widget w;
-  Region region;
-  int entry;
-  Boolean erase;
+static void
+PaintMarkMarkOfEntry(Widget w, Region region, int entry, Boolean erase)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -538,11 +510,8 @@ PaintMarkMarkOfEntry(w, region, entry, erase)
 /* PaintMarksOfEntries */
 /*---------------------------------------------------*/
 
-static void 
-PaintMarksOfEntries(w, event, region)
-Widget w;
-XEvent *event;
-Region region;
+static void
+PaintMarksOfEntries(Widget w, XEvent *event _GL_UNUSED, Region region)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -565,11 +534,8 @@ Region region;
 /* PaintVlistWidget */
 /*---------------------------------------------------*/
 
-static void 
-PaintVlistWidget(w, event, region)
-Widget w;
-XEvent *event;
-Region region;
+static void
+PaintVlistWidget(Widget w, XEvent *event, Region region)
 {
   Dimension width;
   char *s, *o;
@@ -649,8 +615,7 @@ Region region;
 /*###################################################*/
 
 int
-VlistSelected(w)
-  Widget w;
+VlistSelected(Widget w)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -664,8 +629,7 @@ VlistSelected(w)
 /*###################################################*/
 
 int
-VlistHighlighted(w)
-  Widget w;
+VlistHighlighted(Widget w)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -679,8 +643,7 @@ VlistHighlighted(w)
 /*###################################################*/
 
 int
-VlistEntries(w)
-  Widget w;
+VlistEntries(Widget w)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -694,8 +657,7 @@ VlistEntries(w)
 /*###################################################*/
 
 char*
-VlistVlist(w)
-  Widget w;
+VlistVlist(Widget w)
 {
   VlistWidget vw = (VlistWidget)w;
 
@@ -709,9 +671,7 @@ VlistVlist(w)
 /*###################################################*/
 
 int
-VlistEntryOfPosition(w,y)
-  Widget w;
-  int y;
+VlistEntryOfPosition(Widget w, int y)
 {
   VlistWidget vw = (VlistWidget)w;
   int entry = -1;
@@ -736,11 +696,7 @@ VlistEntryOfPosition(w,y)
 /*###################################################*/
 
 void
-VlistPositionOfEntry(w,e,yuP,ylP)
-  Widget w;
-  int e;
-  int *yuP;
-  int *ylP;
+VlistPositionOfEntry(Widget w, int e, int *yuP, int *ylP)
 {
   VlistWidget vw = (VlistWidget)w;
   float h;
@@ -760,10 +716,7 @@ VlistPositionOfEntry(w,e,yuP,ylP)
 /*###################################################*/
 
 void
-VlistChangeMark(w,entry,change)
-  Widget w;
-  int entry;
-  int change;
+VlistChangeMark(Widget w, int entry,int change)
 {
   VlistWidget vw = (VlistWidget)w;
   char *vlist=vw->vlist.vlist;
@@ -843,12 +796,8 @@ VlistChangeMark(w,entry,change)
 /* vlist_change_mark */
 /*---------------------------------------------------*/
 
-static void 
-vlist_change_mark(w,e,change,kind)
-  Widget w;
-  int e;
-  int change;
-  int kind;
+static void
+vlist_change_mark(Widget w, int e, int change, int kind)
 {
   VlistWidget vw = (VlistWidget)w;
   int *eP;
@@ -880,11 +829,8 @@ vlist_change_mark(w,e,change,kind)
 /* VlistChangeSelected */
 /*###################################################*/
 
-void 
-VlistChangeSelected(w,entry,change)
-  Widget w;
-  int entry;
-  int change;
+void
+VlistChangeSelected(Widget w, int entry, int change)
 {
   BEGINMESSAGE(VlistChangeSelected)
   vlist_change_mark(w,entry,change,1);
@@ -895,11 +841,8 @@ VlistChangeSelected(w,entry,change)
 /* VlistChangeHighlighted */
 /*###################################################*/
 
-void 
-VlistChangeHighlighted(w,entry,change)
-  Widget w;
-  int entry;
-  int change;
+void
+VlistChangeHighlighted(Widget w, int entry, int change)
 {
   BEGINMESSAGE(VlistChangeHighlighted)
   vlist_change_mark(w,entry,change,-1);
@@ -1000,8 +943,7 @@ float VlistVisibleLength(Widget w, unsigned int height)
   int entriesvisible = -1;
 
   if (vw->vlist.ydelta > 0) {
-    if (height < 0) entriesvisible = -1;
-    else            entriesvisible = height/vw->vlist.ydelta;
+    entriesvisible = height/vw->vlist.ydelta;
   }
 #if 0
   printf("fitting %d entries of height %d in %d",
diff --git a/gv/src/actions.c b/gv/src/actions.c
index 1554112..e22c793 100644
--- a/gv/src/actions.c
+++ b/gv/src/actions.c
@@ -76,11 +76,7 @@
 /*##################################################################*/
 
 void
-action_shellConfigureNotify(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_shellConfigureNotify(Widget w, XEvent *event, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   static int width=0,height=0;
   int new_width=0,new_height=0;
@@ -128,10 +124,8 @@ static int scroll_success(Widget clip, int e, int x, int 
y, int nx, int ny)
   }
 }
 
-static void 
-catch_timer(client_data, idp)
-  XtPointer client_data;
-  XtIntervalId *idp;
+static void
+catch_timer(XtPointer client_data, XtIntervalId *idp _GL_UNUSED)
 {
   Widget w = (Widget) client_data;
   Cardinal n = 0;
@@ -141,11 +135,7 @@ catch_timer(client_data, idp)
 }
 
 void
-action_page(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_page(Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
   int a,e,x,y,nx,ny,cw,ch,d;
   float f;
@@ -331,12 +321,12 @@ action_page(w, event, params, num_params)
 save_params:
   INFMESSAGE(saving params)
   ++i;
-  if (i<*num_params) {
+  if (i<(int)*num_params) {
     old_num_params = *num_params - i;
     INFIMESSAGE(saving,old_num_params)
     old_params = (String*) XtMalloc(old_num_params*sizeof(String));
     old=0;
-    while (i < *num_params) {
+    while (i < (int)*num_params) {
       old_params[old] = XtNewString(params[i]);
       INFSMESSAGE(saving,old_params[old])
       ++i; old++;
@@ -351,11 +341,7 @@ save_params:
 /*##################################################################*/
 
 void
-action_menuPopdown(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_menuPopdown(Widget w, XEvent *event, String *params, Cardinal 
*num_params)
 {
   BEGINMESSAGE(action_menuPopdown)
   while (w) {
@@ -373,11 +359,7 @@ action_menuPopdown(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_toc(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_toc(Widget w _GL_UNUSED, XEvent *event, String *params, Cardinal 
*num_params)
 {
   static int xf,yf,xo,yo,xp,yp,dyo;
   static Boolean scroll_initialized=False;
@@ -484,11 +466,7 @@ action_toc(w, event, params, num_params)
 /*############################################################*/
 
 void
-action_otherPage(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_otherPage(Widget w, XEvent *event, String *params _GL_UNUSED, Cardinal 
*num_params _GL_UNUSED)
 {
   static int xo=0,yo=0;
   static Time to = 0;
@@ -537,11 +515,7 @@ action_otherPage(w, event, params, num_params)
 /*############################################################*/
 
 void
-action_movePage(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_movePage(Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
 #   define HISTORY_POINTS 10
 #   define DECAY_TIME 200
@@ -667,11 +641,7 @@ break_movePage:
 /*##################################################################*/
 
 void
-action_panner(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_panner(Widget w, XEvent *event, String *params, Cardinal *num_params)
 {
     int x,y,cw,ch;
     static int xo,yo,xp,yp;
@@ -722,11 +692,7 @@ action_panner(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_handleDSC(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_handleDSC(Widget w, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_handleDSC)
   cb_handleDSC(w, (XtPointer)1, NULL);
@@ -739,11 +705,7 @@ action_handleDSC(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_antialias(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_antialias(Widget w, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_antialias)
   cb_antialias(w, (XtPointer)1, NULL);
@@ -756,11 +718,7 @@ action_antialias(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_quit(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_quit(Widget w, XEvent *event _GL_UNUSED, String *params _GL_UNUSED, 
Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_quit)
   cb_quitGhostview(w, NULL, NULL);
@@ -773,11 +731,7 @@ action_quit(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_open(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_open(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_open)
   cb_openFile((Widget)NULL,(XtPointer)NULL, NULL);
@@ -789,11 +743,7 @@ action_open(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_reopen(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_reopen(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_reopen)
   if (!XtIsSensitive(reopenEntry)) {INFMESSAGE(insensitive) 
ENDMESSAGE(action_reopen) return; }
@@ -806,11 +756,7 @@ action_reopen(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_savepos(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_savepos(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_savepos)
   if (!XtIsSensitive(saveposEntry)) {INFMESSAGE(insensitive) 
ENDMESSAGE(action_savepos) return; }
@@ -823,11 +769,7 @@ action_savepos(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_presentation(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_presentation(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String 
*params _GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_savepos)
   if (!XtIsSensitive(presentationEntry)) {INFMESSAGE(insensitive) 
ENDMESSAGE(action_presentation) return; }
@@ -841,11 +783,7 @@ action_presentation(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_save(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_save(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params, 
Cardinal *num_params)
 {
     BEGINMESSAGE(action_save)
     if (*num_params<1)  {
@@ -879,11 +817,7 @@ action_save(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_print(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_print(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params, 
Cardinal *num_params)
 {
 
     BEGINMESSAGE(action_print)
@@ -911,11 +845,7 @@ action_print(w, event, params, num_params)
 }
 
 void
-action_print_pos(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_print_pos(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
 
     BEGINMESSAGE(action_print_pos)
@@ -929,11 +859,7 @@ action_print_pos(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_setPageMark(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_setPageMark(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String 
*params, Cardinal *num_params)
 {
     char *current   = "current";
     char *even      = "even";
@@ -964,11 +890,7 @@ action_setPageMark(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_autoResize(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_autoResize(Widget w, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
     BEGINMESSAGE(action_autoResize)
     cb_autoResize(w, (XtPointer)1, NULL);
@@ -980,11 +902,7 @@ action_autoResize(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_setScale(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_setScale(Widget w, XEvent *event _GL_UNUSED, String *params, Cardinal 
*num_params)
 {
     int i;
 
@@ -1012,11 +930,7 @@ action_setScale(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_setOrientation(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_setOrientation(Widget w, XEvent *event _GL_UNUSED, String *params, 
Cardinal *num_params)
 {
     int o;
 
@@ -1039,11 +953,7 @@ action_setOrientation(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_setPagemedia(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_setPagemedia(Widget w, XEvent *event _GL_UNUSED, String *params, 
Cardinal *num_params)
 {
     int m;
 
@@ -1067,11 +977,7 @@ action_setPagemedia(w, event, params, num_params)
 
 #define IS_ZOOM(sss) (!strcmp(XtName(sss),"zoomPopup"))
 void
-action_dismissPopup(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_dismissPopup(Widget w, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
    Widget s;
    BEGINMESSAGE(action_dismissPopup)
@@ -1099,16 +1005,12 @@ action_dismissPopup(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_deleteWindow(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_deleteWindow(Widget w, XEvent *event, String *params _GL_UNUSED, 
Cardinal *num_params _GL_UNUSED)
 {
    BEGINMESSAGE(action_deleteWindow)
    if (w) {
       INFSMESSAGE(widget:,XtName(w))
-      if (event->type == ClientMessage && event->xclient.data.l[0] == 
wm_delete_window) {
+      if (event->type == ClientMessage && (Atom)event->xclient.data.l[0] == 
wm_delete_window) {
          if (w==toplevel)     { INFMESSAGE(toplevel) 
cb_quitGhostview((Widget)NULL,NULL,NULL); }
          else                 { action_dismissPopup(w,NULL,NULL,NULL); }
       }
@@ -1122,11 +1024,7 @@ action_deleteWindow(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_eraseLocator(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_eraseLocator(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String 
*params _GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
     Arg args[1];
 
@@ -1143,11 +1041,7 @@ action_eraseLocator(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_checkFile(w, event, params, num_params)
-    Widget w;
-    XEvent *event;
-    String *params;
-    Cardinal *num_params;
+action_checkFile(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String 
*params, Cardinal *num_params)
 {
     BEGINMESSAGE(action_checkFile)
     if (*num_params != 1) {INFMESSAGE(no parameters) 
ENDMESSAGE(action_checkFile) return;}
@@ -1163,11 +1057,7 @@ action_checkFile(w, event, params, num_params)
 /*##################################################################*/
 
 void
-action_watchFile(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+action_watchFile(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, String *params 
_GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   BEGINMESSAGE(action_watchFile)
   cb_watchFile(NULL,(XtPointer)1,NULL);
diff --git a/gv/src/callbacks.c b/gv/src/callbacks.c
index 00a3ad8..96b6bdc 100644
--- a/gv/src/callbacks.c
+++ b/gv/src/callbacks.c
@@ -183,9 +183,7 @@ XTextProperty* char_to_xtp ( Display* dpy, char* s ) {
 }
 
 void
-cb_showTitle(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_showTitle(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data 
_GL_UNUSED)
 {
   String t=NULL,s;
   Arg args[2];
@@ -234,9 +232,7 @@ cb_showTitle(w, client_data, call_data)
 /*############################################################*/
 
 void
-cb_newtocScrollbar(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_newtocScrollbar(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data)
 {
   BEGINMESSAGE(cb_newtocScrollbar)
   if (((int)(intptr_t)client_data)==1) {
@@ -257,9 +253,7 @@ cb_newtocScrollbar(w, client_data, call_data)
 /* cb_newtocVisibleAdjust */
 /*##################################################################*/
 
-void cb_newtocVisibleAdjust(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+void cb_newtocVisibleAdjust(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
   int entries;
 
@@ -282,9 +276,7 @@ void cb_newtocVisibleAdjust(w, client_data, call_data)
 /*############################################################*/
 
 void
-cb_adjustSlider(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_adjustSlider(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data)
 {
     static Dimension opw=0,oph=0,opvw=0,opvh=0;
     static Position opvx=0,opvy=0;
@@ -337,9 +329,7 @@ cb_adjustSlider(w, client_data, call_data)
 /* cb_antialias */
 /*##################################################################*/
 
-void cb_antialias(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+void cb_antialias(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_antialias)
   if (client_data) {
@@ -357,9 +347,7 @@ void cb_antialias(w, client_data, call_data)
 /* cb_useBackingPixmap */
 /*##################################################################*/
 
-void cb_useBackingPixmap(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+void cb_useBackingPixmap(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
   int i = (int)(intptr_t)client_data;
 
@@ -380,9 +368,7 @@ void cb_useBackingPixmap(w, client_data, call_data)
 /* cb_handleDSC */
 /*##################################################################*/
 
-void cb_handleDSC(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+void cb_handleDSC(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_handleDSC)
   if (client_data) {
@@ -402,9 +388,7 @@ void cb_handleDSC(w, client_data, call_data)
 /* cb_handleEOF */
 /*##################################################################*/
 
-void cb_handleEOF(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+void cb_handleEOF(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_handleEOF)
   if (client_data) {
@@ -424,9 +408,7 @@ void cb_handleEOF(w, client_data, call_data)
 /* cb_stopInterpreter */
 /*##################################################################*/
 
-void cb_stopInterpreter(w, client_data, call_data)
-   Widget w;
-   XtPointer client_data, call_data;
+void cb_stopInterpreter(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_stopInterpreter)
    GhostviewDisableInterpreter(page);
@@ -438,9 +420,7 @@ void cb_stopInterpreter(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_pageAdjustNotify(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_pageAdjustNotify(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data)
 {
   BEGINMESSAGE(cb_pageAdjustNotify)
   if (gv_scroll_mode == SCROLL_MODE_GHOSTVIEW) {
@@ -458,9 +438,7 @@ cb_pageAdjustNotify(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_checkFile(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_checkFile(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     int changed;
 
@@ -482,9 +460,7 @@ cb_checkFile(w, client_data, call_data)
 /* watch_file */
 /*------------------------------------------------------------*/
 
-static void watch_file (client_data, idp)
-  XtPointer client_data;
-  XtIntervalId *idp;
+static void watch_file (XtPointer client_data, XtIntervalId *idp _GL_UNUSED)
 {
   static XtIntervalId timer = (XtIntervalId) 0;
   unsigned long t = (unsigned long) app_res.watch_file_frequency;
@@ -517,9 +493,7 @@ static void watch_file (client_data, idp)
 }
 
 void
-cb_watchFile(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_watchFile(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
   BEGINMESSAGE(cb_watchFile)
   if (client_data) {
@@ -534,8 +508,7 @@ cb_watchFile(w, client_data, call_data)
 /* cb_print */
 /*##################################################################*/
 
-static char *make_pagelist(mode)
-   int mode;
+static char *make_pagelist(int mode)
 {
    Boolean mode_valid=False;
    char *pagelist=NULL;
@@ -564,8 +537,7 @@ static char *make_pagelist(mode)
    return pagelist;
 }
 
-static char *get_pagelist(modep)
-   int *modep;
+static char *get_pagelist(int *modep)
 {
    char *pagelist=NULL;
    int mode= *modep;
@@ -592,9 +564,7 @@ static char *get_pagelist(modep)
 }
 
 void
-cb_print(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_print(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     char *prompt=GV_PRINT_MESSAGE;
     char *buttonlabel=GV_PRINT_BUTTON_LABEL;
@@ -644,9 +614,7 @@ cb_print(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_print_pos(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_print_pos(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     char *pagelist=NULL;
     static char buf[MAX_LOCATOR_LENGTH];
@@ -675,9 +643,7 @@ cb_print_pos(w, client_data, call_data)
 }
 
 void
-cb_doPrintPos(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_doPrintPos(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data)
 {
     String print_command;
     FILE* posfile = fopen(gv_savepos_filename, "a");
@@ -705,9 +671,7 @@ cb_doPrintPos(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_doPrint(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_doPrint(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data)
 {
     String print_command;
     String error=NULL;
@@ -755,9 +719,7 @@ cb_doPrint(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_cancelPrint(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_cancelPrint(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
     BEGINMESSAGE(cb_cancelPrint)
     cb_popdownNotePopup((Widget)NULL,(XtPointer)NULL,NULL);
@@ -770,9 +732,7 @@ cb_cancelPrint(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_save(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_save(Widget w, XtPointer client_data, XtPointer call_data)
 {
     Arg args[10];
     Cardinal n;  
@@ -861,9 +821,7 @@ cb_save(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_doSave(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_doSave(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     String name;
     String error=NULL;
@@ -916,9 +874,7 @@ cb_doSave(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_openFile(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_openFile(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data)
 {
     Arg args[1];
     Cardinal n;
@@ -953,9 +909,7 @@ cb_openFile(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_doOpenFile(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_doOpenFile(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data _GL_UNUSED)
 {
     String name,error;
 
@@ -982,9 +936,7 @@ cb_doOpenFile(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_reopen(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_reopen(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data _GL_UNUSED)
 {
     char *error=NULL;
     BEGINMESSAGE(reopen_file)
@@ -1004,9 +956,7 @@ cb_reopen(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_savepos(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_savepos(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data _GL_UNUSED)
 {
     FILE* posfile = fopen(gv_savepos_filename, "a");
 
@@ -1026,9 +976,7 @@ cb_savepos(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_presentation(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_presentation(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
     int pid;
     sighandler_t sigold;
@@ -1057,9 +1005,7 @@ cb_presentation(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_redisplay(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_redisplay(Widget w, XtPointer client_data _GL_UNUSED, XtPointer call_data 
_GL_UNUSED)
 {
     BEGINMESSAGE(cb_redisplay)
     if (w && (XtClass(w) == ghostviewWidgetClass) && (w != page)) {
@@ -1076,9 +1022,7 @@ cb_redisplay(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_page(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_page(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
   int np;
   int cp;
@@ -1125,9 +1069,7 @@ cb_page(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_positionPage(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_positionPage(Widget w, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
   Widget clip,control,gvw;
   int clw,clh,cow,coh,px=0,py=0,x=0,y=0;
@@ -1188,9 +1130,7 @@ cb_positionPage(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_setPageMark(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_setPageMark(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     int r=(int)(intptr_t)client_data;
     int entry=XawVlistInvalid,change=XawVlistInvalid;
@@ -1216,9 +1156,7 @@ cb_setPageMark(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_autoResize(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_autoResize(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
   Arg args[1];
 
@@ -1241,9 +1179,7 @@ cb_autoResize(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_setScale(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_setScale(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
   int i=(int)(intptr_t)client_data;
 
@@ -1266,9 +1202,7 @@ cb_setScale(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_setOrientation(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_setOrientation(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data)
 {
     int o = (int)(intptr_t) client_data;
     int changed = 1;
@@ -1315,9 +1249,7 @@ cb_setOrientation(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_setPagemedia(w, client_data, call_data)
-   Widget w;
-   XtPointer client_data, call_data;
+cb_setPagemedia(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data)
 {
    int media = (int)(intptr_t)client_data;
    int media_bbox = doc ? doc->nummedia : 0;
@@ -1349,9 +1281,7 @@ cb_setPagemedia(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_track(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_track(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data)
 {
     GhostviewReturnStruct *p = (GhostviewReturnStruct *)call_data;
 
@@ -1384,9 +1314,7 @@ cb_track(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_message(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_message(Widget w, XtPointer client_data, XtPointer call_data)
 {
     int i;
     char *error;
@@ -1442,9 +1370,7 @@ cb_message(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_destroy(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_destroy(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     BEGINMESSAGE(cb_destroy)
     XtDestroyWidget((Widget)client_data);
@@ -1456,10 +1382,7 @@ cb_destroy(w, client_data, call_data)
 /*------------------------------------------------------------------*/
 
 static void
-cb_shutdown(w, client_data, call_data)
-   Widget w;
-   XtPointer client_data;
-   XtPointer call_data;
+cb_shutdown(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_shutdown)
 
@@ -1519,9 +1442,7 @@ cb_shutdown(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_destroyGhost(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_destroyGhost(Widget w, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     BEGINMESSAGE(cb_destroyGhost)
     GhostviewDisableInterpreter((Widget) client_data);
@@ -1555,9 +1476,7 @@ cb_destroyGhost(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_quitGhostview(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_quitGhostview(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
   char *message=NULL;
  
@@ -1584,9 +1503,7 @@ cb_quitGhostview(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_cancelQuit(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_cancelQuit(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_cancelQuit)
   cb_popdownConfirmPopup((Widget)NULL,(XtPointer)NULL,NULL);
@@ -1598,9 +1515,7 @@ cb_cancelQuit(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_doQuit(w, client_data, call_data)
-  Widget w;
-  XtPointer client_data, call_data;
+cb_doQuit(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, XtPointer 
call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_doQuit)
   cb_popdownConfirmPopup((Widget)NULL,(XtPointer)NULL,NULL);
@@ -1614,7 +1529,7 @@ cb_doQuit(w, client_data, call_data)
 /*##################################################################*/
 
 static void
-cb_setPassword(Widget w, XtPointer client_data, XtPointer call_data)
+cb_setPassword(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
     String password;
 
@@ -1633,7 +1548,7 @@ cb_setPassword(Widget w, XtPointer client_data, XtPointer 
call_data)
 /*##################################################################*/
 
 static void
-cb_cancelPassword(Widget w, XtPointer client_data, XtPointer call_data)
+cb_cancelPassword(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
     cb_popdownDialogPopup((Widget)NULL,(XtPointer)NULL,NULL);
 }
@@ -1643,7 +1558,7 @@ cb_cancelPassword(Widget w, XtPointer client_data, 
XtPointer call_data)
 /* Ask for the password needed to view a pdf file */
 /*##################################################################*/
 void
-cb_askPassword(Widget w, XtPointer client_data, XtPointer call_data)
+cb_askPassword(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
   DialogPopupSetPrompt(passwordPromptLabel);
   DialogPopupSetMessage(passwordRequiredLabel);
diff --git a/gv/src/confirm.c b/gv/src/confirm.c
index 0ed993f..f0eb851 100644
--- a/gv/src/confirm.c
+++ b/gv/src/confirm.c
@@ -74,9 +74,7 @@ static int preferedButton=0,initialButton=0;
    cb_popdownConfirmPopup
 #########################################################*/
 
-void cb_popdownConfirmPopup(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;  
+void cb_popdownConfirmPopup(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_popdownConfirmPopup)
   if (confirmPopupVisible) {
@@ -97,9 +95,7 @@ void cb_popdownConfirmPopup(w, client_data, call_data)
    cb_popupConfirmPopup
 #########################################################*/
 
-void cb_popupConfirmPopup(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;  
+void cb_popupConfirmPopup(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
   BEGINMESSAGE(cb_popupConfirmPopup)
   if (!confirmPopupVisible) {
@@ -118,12 +114,8 @@ void cb_popupConfirmPopup(w, client_data, call_data)
    action_preferConfirmPopupButton
 #########################################################*/
 
-void 
-action_preferConfirmPopupButton(w, event, params, num_params)
-  Widget w;
-  XEvent *event;
-  String *params;
-  Cardinal *num_params;
+void
+action_preferConfirmPopupButton(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, 
String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
   Widget pref,pref_old;
 
@@ -147,9 +139,7 @@ action_preferConfirmPopupButton(w, event, params, 
num_params)
     ConfirmPopupSetButton
 #########################################################*/
 
-void ConfirmPopupSetButton(button,callback)
-  int button;
-  XtCallbackProc callback;
+void ConfirmPopupSetButton(int button, XtCallbackProc callback)
 {
   Widget response=NULL;
 
@@ -169,9 +159,7 @@ void ConfirmPopupSetButton(button,callback)
     ConfirmPopupSetMessage
 #########################################################*/
 
-void ConfirmPopupSetMessage(which,message)
-  String which;
-  String message;
+void ConfirmPopupSetMessage(String which, String message)
 {
   Arg args[3];
   Cardinal n;
@@ -211,8 +199,7 @@ void ConfirmPopupSetMessage(which,message)
     ConfirmPopupSetInitialButton
 #########################################################*/
 
-void ConfirmPopupSetInitialButton(button)
-  int button;
+void ConfirmPopupSetInitialButton(int button)
 {
   BEGINMESSAGE(ConfirmPopupSetInitialButton)
   initialButton=button;
diff --git a/gv/src/dialog.c b/gv/src/dialog.c
index db0c669..ed782c3 100644
--- a/gv/src/dialog.c
+++ b/gv/src/dialog.c
@@ -81,9 +81,7 @@ static int preferedButton=0;
    cb_popdownDialogPopup
 
###############################################################################*/
 
-void cb_popdownDialogPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;  
+void cb_popdownDialogPopup(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popdownDialogPopup)
    if (dialogPopupVisible) {
@@ -98,9 +96,7 @@ void cb_popdownDialogPopup(w, client_data, call_data)
    cb_popupDialogPopup
 
###############################################################################*/
 
-void cb_popupDialogPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;  
+void cb_popupDialogPopup(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popupDialogPopup)
    if (!dialogPopupVisible) {
@@ -118,12 +114,8 @@ void cb_popupDialogPopup(w, client_data, call_data)
    action_preferDialogPopupButton
 
###############################################################################*/
 
-void 
-action_preferDialogPopupButton(w, event, params, num_params)
-   Widget w;
-   XEvent *event;
-   String *params;
-   Cardinal *num_params;
+void
+action_preferDialogPopupButton(Widget w _GL_UNUSED, XEvent *event _GL_UNUSED, 
String *params _GL_UNUSED, Cardinal *num_params _GL_UNUSED)
 {
    Widget pref,pref_old;
 
@@ -218,11 +210,8 @@ void makeDialogPopup(void)
     DialogPopupSetButton
 
###############################################################################*/
 
-void DialogPopupSetButton(button,label,callback)
- int button;
- String label;
- XtCallbackProc callback;
- {
+void DialogPopupSetButton(int button, String label, XtCallbackProc callback)
+{
     Arg args[5];
     Cardinal n;
     Widget response=NULL;
@@ -251,7 +240,7 @@ void DialogPopupSetButton(button,label,callback)
 
###############################################################################*/
 
 void DialogPopupClearText(void)
- {
+{
     Arg args[5];
     Cardinal n;
     Widget response;
@@ -269,8 +258,7 @@ void DialogPopupClearText(void)
     DialogPopupSetText
 
###############################################################################*/
 
-void DialogPopupSetText(s)
-    String s;
+void DialogPopupSetText(String s)
 {
     Arg args[10];
     Cardinal n;
@@ -362,8 +350,7 @@ String DialogPopupGetText(void)
     DialogPopupSetPrompt
 
###############################################################################*/
 
-void DialogPopupSetPrompt(newprompt)
-    String newprompt;
+void DialogPopupSetPrompt(String newprompt)
 {
     Arg args[5];
     Cardinal n;
@@ -382,8 +369,7 @@ void DialogPopupSetPrompt(newprompt)
     DialogPopupSetMessage
 
###############################################################################*/
 
-void DialogPopupSetMessage(message)
-    String message;
+void DialogPopupSetMessage(String message)
 {
     Arg args[5];
     Cardinal n;
diff --git a/gv/src/file.c b/gv/src/file.c
index c33e683..365703a 100644
--- a/gv/src/file.c
+++ b/gv/src/file.c
@@ -71,8 +71,7 @@
 /*############################################################*/
 
 char *
-file_getDirOfPath(path)
-   char *path;
+file_getDirOfPath(char *path)
 {
    char *dir=NULL;
    char *pos;
@@ -98,8 +97,7 @@ file_getDirOfPath(path)
 /*############################################################*/
 
 char *
-file_locateFilename(path)
-   char *path;
+file_locateFilename(char *path)
 {
    char *tmp=NULL;
    BEGINMESSAGE(file_locateFileName)
@@ -171,7 +169,7 @@ file_getTmpFilename(const char *baseDirectory, const char 
*baseFilename, int *fi
          l = snprintf(tempFilename, sizeof(tempFilename),
                         "%.*s/gv_%s_%s.XXXXXX",
                         len, baseDirectory, tmpName, tmpExt);
-        if (l < 0 || l >= sizeof(tempFilename) )
+        if (l < 0 || l >= (int)sizeof(tempFilename) )
                 break;
          file_translateTildeInPath(tempFilename, sizeof(tempFilename));
         oldumask = umask(0077);
@@ -227,8 +225,7 @@ void file_translateTildeInPath(char *path, size_t s)
 /* file_fileIsDir */
 /*############################################################*/
 
-int file_fileIsDir(fn)
-  char *fn;
+int file_fileIsDir(char *fn)
 {
   struct stat s;
   int r=0;
@@ -250,8 +247,7 @@ int file_fileIsDir(fn)
 /*############################################################*/
 
 int
-file_fileIsNotUseful(fn)
-  char *fn;
+file_fileIsNotUseful(char *fn)
 {
   struct stat s;
   int r=0;
@@ -279,10 +275,9 @@ file_fileIsNotUseful(fn)
 /* If the file ends in .pdf, change this to .ps.*/
 /* Return pointer to temp copy if changed, else to input string. */
 /*############################################################*/
- 
+
 char *
-file_pdfname2psname (name)
-  char *name;
+file_pdfname2psname(char *name)
 {
   char *e;
 
@@ -309,10 +304,9 @@ file_pdfname2psname (name)
 /*############################################################*/
 /* file_getUsefulName */
 /*############################################################*/
- 
+
 char *
-file_getUsefulName(name)
-  char *name;
+file_getUsefulName(char *name)
 {
   char *e,*c;
   String mext,ext;
diff --git a/gv/src/gv_signal.c b/gv/src/gv_signal.c
index e1b404a..4663577 100644
--- a/gv/src/gv_signal.c
+++ b/gv/src/gv_signal.c
@@ -103,9 +103,7 @@ static int signal_signalIsOk(void)
 /* signal_scb_terminate */
 /*------------------------------------------------------------*/
 
-static void signal_scb_terminate(client_data,sidP)
-  XtPointer client_data;
-  XtSignalId *sidP;
+static void signal_scb_terminate(XtPointer client_data _GL_UNUSED, XtSignalId 
*sidP _GL_UNUSED)
 {
   BEGINMESSAGE(signal_scb_terminate)
   cb_doQuit(NULL,NULL,NULL);
@@ -116,8 +114,7 @@ static void signal_scb_terminate(client_data,sidP)
 /* signal_sh_terminate */
 /*------------------------------------------------------------*/
 
-static SIGVAL signal_sh_terminate(sig)
-  int sig;
+static SIGVAL signal_sh_terminate(int sig)
 {
   BEGINMESSAGE(signal_fatalSignalHandler)
   if (signal_signalIsOk()) {
@@ -140,9 +137,7 @@ static SIGVAL signal_sh_terminate(sig)
 /* signal_scb_updateFile */
 /*------------------------------------------------------------*/
 
-static void signal_scb_updateFile(client_data,sidP)
-  XtPointer client_data;
-  XtSignalId *sidP;
+static void signal_scb_updateFile(XtPointer client_data _GL_UNUSED, XtSignalId 
*sidP _GL_UNUSED)
 {
   BEGINMESSAGE(signal_scb_updateFile)
   if (gv_filename) {
@@ -161,8 +156,7 @@ static void signal_scb_updateFile(client_data,sidP)
 /* signal_sh_updateFile */
 /*------------------------------------------------------------*/
 
-static SIGVAL signal_sh_updateFile(sig)
-  int sig;
+static SIGVAL signal_sh_updateFile(int sig)
 {
   BEGINMESSAGE(signal_sh_updateFile)
   if (signal_signalIsOk()) {
@@ -184,10 +178,9 @@ static SIGVAL signal_sh_updateFile(sig)
 /* signal_setSignalHandlers */
 /*############################################################*/
 
-void signal_setSignalHandlers(on)
-  int on;
+void signal_setSignalHandlers(int on)
 {
-  SIGVAL (*sht)(),(*shu)();
+  SIGVAL (*sht)(int),(*shu)(int);
 
   BEGINMESSAGE(signal_setSignalHandlers)
 
diff --git a/gv/src/info.c b/gv/src/info.c
index a751f7b..819af18 100644
--- a/gv/src/info.c
+++ b/gv/src/info.c
@@ -91,9 +91,7 @@ static int FontSetWidth( XFontSet fnt ) {
    cb_popupInfoPopup
 
###############################################################################*/
 
-void cb_popupInfoPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+void cb_popupInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popupInfoPopup)
    if (!infoPopupCreated) { makeInfoPopup(); }
@@ -113,9 +111,7 @@ void cb_popupInfoPopup(w, client_data, call_data)
    cb_popdownInfoPopup
 
###############################################################################*/
 
-void cb_popdownInfoPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;  
+void cb_popdownInfoPopup(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popdownInfoPopup)
    if (infoPopupCreated && infoPopupVisible) {
@@ -129,9 +125,7 @@ void cb_popdownInfoPopup(w, client_data, call_data)
    cb_appendInfoPopup
 
###############################################################################*/
 
-void cb_appendInfoPopup(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+void cb_appendInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data)
 {
     Arg args[5];
     Cardinal n;
@@ -174,9 +168,7 @@ void cb_appendInfoPopup(w, client_data, call_data)
    cb_resetInfoPopup
 
###############################################################################*/
 
-void cb_resetInfoPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;  
+void cb_resetInfoPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
    Arg args[5];
    Cardinal n;
diff --git a/gv/src/main.c b/gv/src/main.c
index 74296c3..2322bcd 100644
--- a/gv/src/main.c
+++ b/gv/src/main.c
@@ -287,14 +287,8 @@ static XtActionsRec actions[] = {
 --------------------------------------------------------------*/
 
 static Boolean
-dummyCvtStringToPixmap(dpy, args, num_args, fromVal, toVal,converter_data)
-   Display   *dpy;
-   XrmValue  *args;
-   Cardinal  *num_args;
-   XrmValue  *fromVal;
-   XrmValue  *toVal;
-   XtPointer *converter_data;
-{   
+dummyCvtStringToPixmap(Display *dpy _GL_UNUSED, XrmValue *args _GL_UNUSED, 
Cardinal *num_args _GL_UNUSED, XrmValue *fromVal _GL_UNUSED, XrmValue *toVal 
_GL_UNUSED, XtPointer *converter_data _GL_UNUSED)
+{
    BEGINMESSAGE(dummyCvtStringToPixmap)
 #  ifdef MESSAGES
    {
@@ -327,9 +321,7 @@ void main_createScaleMenu(void);
    Main
 
#################################################################################*/
 
-int main(argc, argv)
-  int  argc;
-  char *argv[];
+int main(int argc, char *argv[])
 {
   MAINBEGINMESSAGE(main)
   gv_safe_gs_workdir = GV_LIBDIR "/safe-gs-workdir";
diff --git a/gv/src/misc.c b/gv/src/misc.c
index cdfe7a1..c50eed4 100644
--- a/gv/src/misc.c
+++ b/gv/src/misc.c
@@ -161,10 +161,8 @@ typedef struct
   XtIntervalId timer;
 } EyeGuideDataStruct,*EyeGuideData;
 
-static void 
-misc_catchEyeGuideTimer(client_data, idp)
-  XtPointer client_data;
-  XtIntervalId *idp;
+static void
+misc_catchEyeGuideTimer(XtPointer client_data, XtIntervalId *idp _GL_UNUSED)
 {
   EyeGuideData egd = (EyeGuideData) client_data;
 
@@ -173,11 +171,8 @@ misc_catchEyeGuideTimer(client_data, idp)
   ENDMESSAGE(misc_catchEyeGuideTimer)
 }
 
-void 
-misc_drawEyeGuide(w,d,x,y)
-  Widget w;
-  int d;
-  int x,y;
+void
+misc_drawEyeGuide(Widget w, int d, int x, int y)
 {
   unsigned long t = (unsigned long) 1000;
   static EyeGuideData egd = NULL;
@@ -241,7 +236,7 @@ misc_drawEyeGuide(w,d,x,y)
 static int pagepos_x,pagepos_y,pagepos_saved=0;
 
 void
-misc_savePagePosition()
+misc_savePagePosition(void)
 {
   int x,y,psx,psy;
   BEGINMESSAGE(misc_savePagePosition)
@@ -259,9 +254,7 @@ misc_savePagePosition()
 /*############################################################*/
 
 int
-misc_restorePagePosition(xP,yP)
-  int *xP;
-  int *yP;
+misc_restorePagePosition(int *xP, int *yP)
 {
   BEGINMESSAGE(misc_restorePagePosition)
   if (pagepos_saved) {
@@ -279,7 +272,7 @@ misc_restorePagePosition(xP,yP)
 /*############################################################*/
 
 void
-misc_resetPagePosition()
+misc_resetPagePosition(void)
 {
   BEGINMESSAGE(misc_resetPagePosition)
   pagepos_saved = 0;
@@ -291,11 +284,8 @@ misc_resetPagePosition()
 /*############################################################*/
 
 void
-misc_setPageMarker(entry,kind,event,check_toc)
-  int entry;
-  int kind; /* 0 = selected, 1 = highlighted , 2 = bring selected in sight*/
-  XEvent *event;
-  Boolean check_toc;
+misc_setPageMarker(int entry, int kind, XEvent *event, Boolean check_toc)
+  /* kind: 0 = selected, 1 = highlighted , 2 = bring selected in sight*/
 {
   int firstvisible, lastvisible;
   Boolean b = False;
@@ -343,9 +333,7 @@ misc_setPageMarker(entry,kind,event,check_toc)
 /*------------------------------------------------------------*/
 
 static String
-misc_openFile(name, fpP)
-   String name;
-   FILE **fpP;
+misc_openFile(String name, FILE **fpP)
 {
    char *str,*error=NULL;
    FILE *fp=NULL;
@@ -381,8 +369,7 @@ misc_openFile(name, fpP)
 /*############################################################*/
 
 String
-misc_testFile(name)
-   String name;
+misc_testFile(String name)
 {
    char *error;
    BEGINMESSAGE(misc_testFile)
@@ -395,8 +382,7 @@ misc_testFile(name)
 /* misc_changeFile */
 /*############################################################*/
 
-String misc_changeFile(name)
-  String name;
+String misc_changeFile(String name)
 {
   FILE *fp=NULL;
   String error=NULL;
@@ -459,9 +445,7 @@ String misc_changeFile(name)
 /* close_file */
 /*############################################################*/
 
-String close_file(file,name)
-  FILE *file;
-  String name;
+String close_file(FILE *file, String name)
 {
   char *error=NULL;
 
@@ -486,8 +470,7 @@ String close_file(file,name)
 /*############################################################*/
 
 int
-check_file(mode)
-int mode;
+check_file(int mode)
 {
    int status=0;
    struct stat sbuf;
@@ -546,8 +529,7 @@ int mode;
 /*------------------------------------------------------------*/
 
 static void
-render_page(gvw)
-    Widget gvw;
+render_page(Widget gvw)
 {
     int i;
 
@@ -652,9 +634,7 @@ render_page(gvw)
 /*############################################################*/
 
 void
-show_page(number,data1)
-   int number;
-   XtPointer data1;
+show_page(int number, XtPointer data1)
 {
    Bool need_layout = False;
    Bool need_setup  = False;
@@ -849,10 +829,7 @@ show_page(number,data1)
  */
 /*############################################################*/
 
-static void misc_setSensitive(w,s,b)
-  Widget w;
-  Boolean s;
-  Boolean b;
+static void misc_setSensitive(Widget w, Boolean s, Boolean b)
 {
   if (s) {
     if (!b) ButtonReset(w,NULL,NULL,NULL);
@@ -860,10 +837,7 @@ static void misc_setSensitive(w,s,b)
   }
 }
 
-static void misc_setBitmap(w,s,b)
-  Widget w;
-  Boolean s;
-  Pixmap b;
+static void misc_setBitmap(Widget w, Boolean s, Pixmap b)
 {
   Arg args[1];
   if (s) {
@@ -875,7 +849,7 @@ static void misc_setBitmap(w,s,b)
 }
 
 Boolean
-setup_ghostview()
+setup_ghostview(void)
 {
     Arg args[10];
     Cardinal n;
@@ -1005,7 +979,7 @@ setup_ghostview()
         INFMESSAGE(toc available)
        if (doc->labels_useful) {
            for (i = 0; i < doc->numpages; i++) 
-               maxlen = max(maxlen, strlen(doc->pages[i].label));
+               maxlen = max(maxlen, (int)strlen(doc->pages[i].label));
        } else {
            double x;
            x = doc->numpages;
@@ -1188,7 +1162,7 @@ layout_ghostview(void)
 /*############################################################*/
 
 void
-setup_layout_ghostview()
+setup_layout_ghostview(void)
 {
   BEGINMESSAGE(setup_layout_ghostview )
   ENDMESSAGE(setup_layout_ghostview)
@@ -1317,13 +1291,12 @@ set_new_scale(void)
 /*------------------------------------------------------------*/
 
 static void
-set_orientationButton_label(orientation)
-   int orientation;
+set_orientationButton_label(int orientation)
 {
    Arg args[1];
    Widget w = portraitEntry;
    String label;
-    
+
    BEGINMESSAGE(set_orientationButton_label)
    if (orientation == O_LANDSCAPE)       w = landscapeEntry;
    else if (orientation == O_UPSIDEDOWN) w = upsidedownEntry;
@@ -1339,10 +1312,8 @@ set_orientationButton_label(orientation)
 /* set_newBitmapIfChanged */
 /*------------------------------------------------------------*/
 
-static void 
-set_newBitmapIfChanged(w,new_bitmap)
-   Widget w;
-   Pixmap new_bitmap;
+static void
+set_newBitmapIfChanged(Widget w, Pixmap new_bitmap)
 {
    Arg args[1];
    Pixmap old_bitmap;
@@ -1362,8 +1333,7 @@ set_newBitmapIfChanged(w,new_bitmap)
 /*------------------------------------------------------------*/
 
 static Boolean
-set_new_orientation(pagenumber)
-   int pagenumber;
+set_new_orientation(int pagenumber)
 {
    Boolean changed  = False;
    int from_doc = 0;
@@ -1444,8 +1414,7 @@ set_new_orientation(pagenumber)
 /*------------------------------------------------------------*/
 
 static void
-set_pagemediaButton_label(media_id)
-   int media_id;
+set_pagemediaButton_label(int media_id)
 { 
    String s = NULL;
    Arg args[1];
@@ -1473,8 +1442,7 @@ out:
 /*------------------------------------------------------------*/
 
 static Boolean
-set_new_pagemedia(pagenumber)
-   int pagenumber;
+set_new_pagemedia(int pagenumber)
 {
    int new_llx,new_lly,new_urx,new_ury;
    Boolean changed = False;
@@ -1606,7 +1574,7 @@ same_document_media(void)
 /* misc_buildPagemediaMenu */
 /*############################################################*/
 
-void misc_buildPagemediaMenu()
+void misc_buildPagemediaMenu(void)
 {
   Widget w;
   int i,num_doc_media;
@@ -1665,10 +1633,7 @@ void misc_buildPagemediaMenu()
 /*------------------------------------------------------------*/
 
 Widget
-build_label_menu(parent, name, label, bitmap)
-    Widget parent;
-    String name, label;
-    Pixmap bitmap;
+build_label_menu(Widget parent, String name, String label, Pixmap bitmap)
 {
     Arg args[5];
     Cardinal n;
@@ -1695,9 +1660,7 @@ build_label_menu(parent, name, label, bitmap)
 /*############################################################*/
 
 int
-catch_Xerror(dpy, err)
-    Display *dpy;
-    XErrorEvent *err;
+catch_Xerror(Display *dpy, XErrorEvent *err)
 {
     BEGINMESSAGE(catch_Xerror)
     if (err->error_code == BadImplementation) {
@@ -1719,8 +1682,7 @@ catch_Xerror(dpy, err)
 /*############################################################*/
 
 char *
-quote_filename (string) 
-     char *string;
+quote_filename (char *string)
 {
     int c;
     char *result, *r, *s;
diff --git a/gv/src/note.c b/gv/src/note.c
index d958d55..2435960 100644
--- a/gv/src/note.c
+++ b/gv/src/note.c
@@ -73,9 +73,7 @@ static Widget doneButton=NULL;
    cb_popupNotePopup
 
###############################################################################*/
 
-void cb_popupNotePopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+void cb_popupNotePopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popupNotePopup)
    if (!notePopupVisible) {
@@ -92,9 +90,7 @@ void cb_popupNotePopup(w, client_data, call_data)
    cb_popdownNotePopup
 
###############################################################################*/
 
-void cb_popdownNotePopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+void cb_popdownNotePopup(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popdownNotePopup)
    if (notePopupVisible) {
@@ -108,7 +104,7 @@ void cb_popdownNotePopup(w, client_data, call_data)
    makeNotePopup
 
###############################################################################*/
 
-void makeNotePopup()
+void makeNotePopup(void)
 {
    Arg          args[10];
    Cardinal     n;
@@ -154,8 +150,7 @@ void makeNotePopup()
 
###############################################################################*/
 
 void
-NotePopupShowMessage(message)
-    String message;
+NotePopupShowMessage(String message)
 {
     Arg args[5];
     Cardinal n;
diff --git a/gv/src/options.c b/gv/src/options.c
index 0f04b06..5c98dfd 100644
--- a/gv/src/options.c
+++ b/gv/src/options.c
@@ -71,9 +71,7 @@
    options_cb_popup
 #######################################################*/
 
-void options_cb_popup(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_cb_popup(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
   OptionPopup op = (OptionPopup) client_data;
 
@@ -92,9 +90,7 @@ void options_cb_popup(w, client_data, call_data)
    options_cb_popdown
 #######################################################*/
 
-void options_cb_popdown(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_cb_popdown(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
   OptionPopup op = (OptionPopup) client_data;
 
@@ -111,9 +107,7 @@ void options_cb_popdown(w, client_data, call_data)
    options_cb_changeMenuLabel
 #######################################################*/
 
-void options_cb_changeMenuLabel(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_cb_changeMenuLabel(Widget w, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
   Arg      args[1];
   Cardinal n;
@@ -135,10 +129,7 @@ void options_cb_changeMenuLabel(w, client_data, call_data)
    options_textApply
 #######################################################*/
 
-void options_textApply(w,bP,sP)
-  Widget w;
-  Boolean *bP;
-  String *sP;
+void options_textApply(Widget w, Boolean *bP, String *sP)
 {
   if (!bP || (bP && *bP==True)) XtFree(*sP);
   if (bP) *bP=True;
@@ -150,12 +141,7 @@ void options_textApply(w,bP,sP)
    options_createLabeledMenu
 #######################################################*/
 
-void options_createLabeledMenu(name,parent,lP,mbP,mP)
-  String name;
-  Widget parent;
-  Widget *lP;
-  Widget *mbP;
-  Widget *mP;
+void options_createLabeledMenu(String name, Widget parent, Widget *lP, Widget 
*mbP, Widget *mP)
 {
   char s[50];
   Arg args[1];
@@ -175,9 +161,7 @@ void options_createLabeledMenu(name,parent,lP,mbP,mP)
    options_realize
 #######################################################*/
 
-void options_realize(popup,aaa)
-  Widget popup;
-  Widget aaa;
+void options_realize(Widget popup, Widget aaa)
 {
   Dimension    minw,minh;
   Arg args[3];
@@ -200,12 +184,7 @@ void options_realize(popup,aaa)
    options_setArg
 #######################################################*/
 
-void options_setArg(argiP,argvP,format,name,value)
-  String *argiP;
-  String *argvP;
-  String format;
-  String name;
-  String value;
+void options_setArg(String *argiP, String *argvP, String format, String name, 
String value)
 {
   *argiP = XtMalloc((strlen(format)+strlen(name)+3)*sizeof(char));
   strcpy(*argiP,name);
@@ -220,8 +199,7 @@ void options_setArg(argiP,argvP,format,name,value)
    options_squeezeMultiline
 #######################################################*/
 
-String  options_squeezeMultiline(s)
-  String s;
+String  options_squeezeMultiline(String s)
 {
   char *b,*e,*d,*md;
 
@@ -246,8 +224,7 @@ String  options_squeezeMultiline(s)
    options_squeeze
 #######################################################*/
 
-String  options_squeeze(s)
-  String s;
+String  options_squeeze(String s)
 {
   String d,md;
 
@@ -275,9 +252,7 @@ String  options_squeeze(s)
 
 #   define END_OF_RECORD "\n"
 
-static char* options_readline(infile,lineP)
-  FILE *infile;
-  String *lineP;
+static char* options_readline(FILE *infile, String *lineP)
 {
   char tmp[MAX_RECORD_LENGTH];
   char *esc;
@@ -301,10 +276,7 @@ static char* options_readline(infile,lineP)
    options_writeline
 ------------------------------------------------------*/
 
-static void options_writeline(outfile,header,value)
-  FILE *outfile;
-  String header;
-  String value;
+static void options_writeline(FILE *outfile, String header, String value)
 {
   int num_nl=0;
   char *line;
@@ -326,7 +298,7 @@ static void options_writeline(outfile,header,value)
       *s++='\0';
     }
   }
-  if (i==strlen(header)) i=24;
+  if (i==(int)strlen(header)) i=24;
   line = XtMalloc((strlen(header) + strlen(value) + num_nl*3 + i + 
2)*sizeof(char));
   line[0]='\0';
   strcpy(line,header);
@@ -366,10 +338,7 @@ static void options_writeline(outfile,header,value)
    options_save
 #######################################################*/
 
-void options_save(argn,argi,argv)
-  int  argn;
-  String *argi;
-  String *argv;
+void options_save(int argn, String *argi, String *argv)
 {
   FILE *tempfile;
   FILE *infile;
diff --git a/gv/src/options_fs.c b/gv/src/options_fs.c
index d22ed02..34e87ae 100644
--- a/gv/src/options_fs.c
+++ b/gv/src/options_fs.c
@@ -107,9 +107,7 @@ static void options_fs_setOptionsAtEntry(void)
    options_fs_cb_apply
 ------------------------------------------------------*/
 
-static void options_fs_cb_apply(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+static void options_fs_cb_apply(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    Arg args[5];
    Cardinal n;
@@ -138,9 +136,7 @@ static void options_fs_cb_apply(w, client_data, call_data)
 ------------------------------------------------------*/
 
 static
-void options_fs_cb_save(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_fs_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
   int    argn = 0;
   String argi[30];
diff --git a/gv/src/options_gs.c b/gv/src/options_gs.c
index 2d41526..4fb77fc 100644
--- a/gv/src/options_gs.c
+++ b/gv/src/options_gs.c
@@ -126,10 +126,7 @@ static void options_gs_setOptionsAtEntry(void)
    options_gs_apply
 ------------------------------------------------------*/
 
-static Boolean options_gs_change (w,sP,fP)
-  Widget w;
-  String *sP;
-  String *fP;
+static Boolean options_gs_change (Widget w, String *sP, String *fP)
 {
   String v;
   Boolean r=False;
@@ -145,9 +142,7 @@ static Boolean options_gs_change (w,sP,fP)
   return(r);
 }
 
-static void options_gs_cb_apply(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+static void options_gs_cb_apply(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    Arg args[10];
    Cardinal n;
@@ -202,13 +197,7 @@ static void options_gs_cb_apply(w, client_data, call_data)
    options_gs_cb_save
 ------------------------------------------------------*/
 
-static void options_gs_setArg(w,argiP,argvP,argnP,format,name)
-  Widget w;
-  String *argiP;
-  String *argvP;
-  int    *argnP;
-  String format;
-  String name;
+static void options_gs_setArg(Widget w, String *argiP, String *argvP, int 
*argnP, String format, String name)
 {
   String s;
   s = widgets_getText(w);
@@ -219,9 +208,7 @@ static void 
options_gs_setArg(w,argiP,argvP,argnP,format,name)
 }
 
 static
-void options_gs_cb_save(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_gs_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
   int    argn = 0;
   String argi[20];
@@ -260,9 +247,7 @@ void options_gs_cb_save(w, client_data, call_data)
    options_gs_cb_defaults
 ------------------------------------------------------*/
 
-static void options_gs_cb_defaults(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+static void options_gs_cb_defaults(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
   XrmDatabase db = NULL;
   String *sP = intern_resources;
diff --git a/gv/src/options_gv.c b/gv/src/options_gv.c
index 1a77887..a38cfec 100644
--- a/gv/src/options_gv.c
+++ b/gv/src/options_gv.c
@@ -174,9 +174,7 @@ static void options_gv_setOptionsAtEntry(void)
    options_gv_getScales
 ------------------------------------------------------*/
 
-static void options_gv_getScales(bP,sP)
-  int *sP;
-  int *bP;
+static void options_gv_getScales(int *bP,int *sP)
 {
   Arg args[1];
   Cardinal n;
@@ -207,9 +205,7 @@ static void options_gv_getScales(bP,sP)
    options_gv_cb_apply
 ------------------------------------------------------*/
 
-static void options_gv_cb_apply(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+static void options_gv_cb_apply(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    Arg args[5];
    Cardinal n;
@@ -368,8 +364,7 @@ static void options_gv_cb_apply(w, client_data, call_data)
    ENDMESSAGE(options_gv_cb_apply)
 }
 
-static char* orientation2extern(l)
-   String l;
+static char* orientation2extern(String l)
 {
    int i;
    for (i=0; orientations[i]; i++)
@@ -383,9 +378,7 @@ static char* orientation2extern(l)
 ------------------------------------------------------*/
 
 static
-void options_gv_cb_save(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_gv_cb_save(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
   int    argn = 0;
   String argi[30];
@@ -467,7 +460,7 @@ void options_gv_cb_save(w, client_data, call_data)
    options_gv_createScaleMenus
 ######################################################*/
 
-void options_gv_createScaleMenus()
+void options_gv_createScaleMenus(void)
 {
   int i,sn=0,bn=0;
   Boolean change;
@@ -514,7 +507,7 @@ void options_gv_createScaleMenus()
    options_gv_createMediaMenus
 ######################################################*/
 
-void options_gv_createMediaMenus()
+void options_gv_createMediaMenus(void)
 {
   int i;
   Widget w;
diff --git a/gv/src/options_setup.c b/gv/src/options_setup.c
index 8eb911d..bbc6fd0 100644
--- a/gv/src/options_setup.c
+++ b/gv/src/options_setup.c
@@ -162,9 +162,7 @@ static void options_setup_setOptionsAtEntry(void)
    options_setup_cb_apply
 ------------------------------------------------------*/
 
-static void options_setup_cb_apply(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+static void options_setup_cb_apply(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
    Arg args[5];
    Cardinal n;
@@ -306,9 +304,7 @@ static void options_setup_cb_apply(w, client_data, 
call_data)
 ------------------------------------------------------*/
 
 static
-void options_setup_cb_save(w, client_data, call_data)
-  Widget       w;
-  XtPointer    client_data, call_data;
+void options_setup_cb_save(Widget w _GL_UNUSED, XtPointer client_data 
_GL_UNUSED, XtPointer call_data _GL_UNUSED)
 {
   int    argn = 0;
   String argi[30];
diff --git a/gv/src/popup.c b/gv/src/popup.c
index aaaf5c8..efaf9f2 100644
--- a/gv/src/popup.c
+++ b/gv/src/popup.c
@@ -54,9 +54,7 @@
 /*##################################################################*/
 
 void
-cb_popdownPopup(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_popdownPopup(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
     BEGINMESSAGE(cb_popdownPopup)
     XtPopdown((Widget)client_data);
@@ -69,9 +67,7 @@ cb_popdownPopup(w, client_data, call_data)
 /*##################################################################*/
 
 void
-cb_popupPopup(w, client_data, call_data)
-    Widget w;
-    XtPointer client_data, call_data;
+cb_popupPopup(Widget w _GL_UNUSED, XtPointer client_data, XtPointer call_data 
_GL_UNUSED)
 {
     BEGINMESSAGE(cb_popupPopup)
     XtPopup((Widget)client_data,XtGrabNone);
@@ -88,12 +84,7 @@ static int wmbdecor = 0;
 static int wmsdecor = 0;
 
 void
-popup_positionPopup(popup,ref_widget,mode,refx,refy)
-   Widget popup;
-   Widget ref_widget;
-   int mode;
-   int refx;
-   int refy;
+popup_positionPopup(Widget popup, Widget ref_widget, int mode, int refx, int 
refy)
 {
    Arg args[5];
    Cardinal n;
diff --git a/gv/src/process.c b/gv/src/process.c
index d5db2a1..beec649 100644
--- a/gv/src/process.c
+++ b/gv/src/process.c
@@ -112,8 +112,7 @@ static ProcessData process_get_pd(void)
 /* process_remove_pd */
 /*------------------------------------------------------------*/
 
-static void process_remove_pd(pd)
-   ProcessData pd;
+static void process_remove_pd(ProcessData pd)
 {
    BEGINMESSAGE(process_remove_pd)
    if (gpd == pd) gpd = pd->next;
@@ -141,8 +140,7 @@ static void process_remove_pd(pd)
 #define CHILD_OKAY            0
 #define CHILD_EXITED          1
 
-static int process_child_status(pd)
-   ProcessData pd;
+static int process_child_status(ProcessData pd)
 {
    int status;
    pid_t child_pid;
@@ -164,9 +162,7 @@ static int process_child_status(pd)
 /*##############################################################*/
 
 void
-cb_processKillProcess(w, client_data, call_data)
-   Widget w;
-   XtPointer client_data, call_data;
+cb_processKillProcess(Widget w _GL_UNUSED, XtPointer client_data, XtPointer 
call_data _GL_UNUSED)
 {
    ProcessData pd;
    BEGINMESSAGE(cb_processKillProcess)
@@ -179,8 +175,7 @@ cb_processKillProcess(w, client_data, call_data)
 /* process_kill_process */
 /*##############################################################*/
 
-void process_kill_process(pd)
-   ProcessData pd;
+void process_kill_process(ProcessData pd)
 {
    int status;
    BEGINMESSAGE(process_kill_process)
@@ -199,7 +194,7 @@ void process_kill_process(pd)
 /* process_kill_all_processes */
 /*##############################################################*/
 
-void process_kill_all_processes()
+void process_kill_all_processes(void)
 {
    BEGINMESSAGE(process_kill_all_processes)
    while (gpd) process_kill_process(gpd);
@@ -210,9 +205,7 @@ void process_kill_all_processes()
 /* process_notify */
 /*------------------------------------------------------------*/
 
-static void process_notify (client_data, idp)
-   XtPointer client_data;
-   XtIntervalId *idp;
+static void process_notify(XtPointer client_data, XtIntervalId *idp _GL_UNUSED)
 {
    pid_t child_pid;
    ProcessData pd = (ProcessData) client_data;
@@ -235,11 +228,7 @@ static void process_notify (client_data, idp)
 /* process_fork */
 /*##############################################################*/
 
-ProcessData process_fork (name,command,notify_proc,data)
-   String name;
-   String command;
-   ProcessNotifyProc notify_proc;
-   XtPointer data;
+ProcessData process_fork(String name, String command, ProcessNotifyProc 
notify_proc, XtPointer data)
 {
    ProcessData pd;
    pid_t       pid;
@@ -304,8 +293,7 @@ ProcessData process_fork (name,command,notify_proc,data)
 /* process_set_shell_resize */
 /*------------------------------------------------------------*/
 
-static Boolean process_set_shell_resize(allow_resize)
-   Boolean allow_resize;
+static Boolean process_set_shell_resize(Boolean allow_resize)
 {
    Boolean old_allow_resize;
    ShellWidget sw = (ShellWidget)toplevel;
@@ -318,9 +306,7 @@ static Boolean process_set_shell_resize(allow_resize)
 /* process_menu */
 /*##############################################################*/
 
-void process_menu(pd,action)
-   ProcessData pd;
-   int action;
+void process_menu(ProcessData pd, int action)
 {
 
    Arg args[5];
@@ -440,7 +426,7 @@ void process_menu(pd,action)
 /* process_disallow_quit */
 /*##############################################################*/
 
-char *process_disallow_quit()
+char *process_disallow_quit(void)
 {
 # define MAX_DISALLOW_QUIT_MESSAGE 512
   static char message[MAX_DISALLOW_QUIT_MESSAGE];
diff --git a/gv/src/ps.c b/gv/src/ps.c
index 248081c..aa0134f 100644
--- a/gv/src/ps.c
+++ b/gv/src/ps.c
@@ -112,10 +112,7 @@ extern int gv_infoSkipErrors;
 
 /* We use this helper function for providing proper */
 /* case and colon :-) insensitive DSC matching */
-static int dsc_strncmp(s1, s2, n)
-  char *s1;
-  char *s2;
-  size_t n;
+static int dsc_strncmp(const char *s1, const char *s2, size_t n)
 {
  char *tmp;    
 
@@ -332,16 +329,7 @@ static void ps_dynMemExhaust(void)
 /*###########################################################*/
 
 struct document *
-psscan(fileP,filename,filename_raw,filename_dscP,cmd_scan_pdf,filename_uncP,cmd_uncompress,scanstyle,gv_gs_safeDir)
-    FILE **fileP;
-    char *filename;
-    char *filename_raw;
-    char **filename_dscP;
-    char *cmd_scan_pdf;
-    char **filename_uncP;
-    char *cmd_uncompress;
-    int scanstyle;
-    int gv_gs_safeDir;
+psscan(FILE **fileP, char *filename, char *filename_raw, char **filename_dscP, 
char *cmd_scan_pdf, char **filename_uncP, char *cmd_uncompress, int scanstyle, 
int gv_gs_safeDir)
 {
     FILE *file;
     struct document *doc;
@@ -1441,8 +1429,7 @@ continuepage:
 /*###########################################################*/
 
 void
-psfree(doc)
-    struct document *doc;
+psfree(struct document *doc)
 {
     int i;
 
@@ -1472,8 +1459,7 @@ psfree(doc)
 /*----------------------------------------------------------*/
 
 static char *
-gettextline(line)
-    char *line;
+gettextline(char *line)
 {
     char *cp;
 
@@ -1501,9 +1487,7 @@ gettextline(line)
 /*----------------------------------------------------------*/
 
 static char *
-ps_gettext(line, next_char)
-    char *line;
-    char **next_char;
+ps_gettext(char *line, char **next_char)
 {
     char text[PSLINELENGTH];   /* Temporary storage for text */
     char *cp;
@@ -1618,8 +1602,7 @@ ps_gettext(line, next_char)
 #define MAX_PS_IO_FGETCHARS_BUF_SIZE 57344
 #define BREAK_PS_IO_FGETCHARS_BUF_SIZE 49152
 
-static FileData ps_io_init(file)
-   FILE *file;
+static FileData ps_io_init(FILE *file)
 {
    FileData fd;
    Cardinal size = sizeof(FileDataStruct);
@@ -1645,8 +1628,7 @@ static FileData ps_io_init(file)
 /*----------------------------------------------------------*/
 
 static void
-ps_io_exit(fd)
-   FileData fd;
+ps_io_exit(FileData fd)
 {
    BEGINMESSAGE(ps_io_exit)
    XtFree(FD_BUF);
@@ -1659,9 +1641,7 @@ ps_io_exit(fd)
 /*----------------------------------------------------------*/
 
 static int
-ps_io_fseek(fd,offset)
-   FileData fd;
-   gv_off_t offset;
+ps_io_fseek(FileData fd, gv_off_t offset)
 {
    int status;
    BEGINMESSAGE(ps_io_fseek)
@@ -1678,8 +1658,7 @@ ps_io_fseek(fd,offset)
 /*----------------------------------------------------------*/
 
 static gv_off_t
-ps_io_ftell(fd)
-   FileData fd;
+ps_io_ftell(FileData fd)
 {
    BEGINMESSAGE(ps_io_ftell)
    IMESSAGE(FD_FILEPOS)
@@ -1692,10 +1671,7 @@ ps_io_ftell(fd)
 /*----------------------------------------------------------*/
 
 #ifdef USE_MEMMOVE_CODE
-static void ps_memmove (d, s, l)
-  char *d;
-  const char *s;
-  unsigned l;
+static void ps_memmove (char *d, const char *s, unsigned l)
 {
   if (s < d) for (s += l, d += l; l; --l) *--d = *--s;
   else if (s != d) for (; l; --l)         *d++ = *s++;
@@ -1704,9 +1680,7 @@ static void ps_memmove (d, s, l)
 #   define ps_memmove memmove
 #endif
 
-static char * ps_io_fgetchars(fd,num)
-   FileData fd;
-   int num;
+static char * ps_io_fgetchars(FileData fd, int num)
 {
    char *eol=NULL,*tmp;
    size_t size_of_char = sizeof(char);
@@ -1833,11 +1807,7 @@ static char * ps_io_fgetchars(fd,num)
 */
 /*----------------------------------------------------------*/
 
-static char * readline (fd, lineP, positionP, line_lenP)
-   FileData fd;
-   char **lineP;
-   gv_off_t *positionP;
-   unsigned int *line_lenP;
+static char * readline(FileData fd, char **lineP, gv_off_t *positionP, 
unsigned int *line_lenP)
 {
    unsigned int nbytes=0;
    int skipped=0;
@@ -1988,12 +1958,8 @@ static char * readline (fd, lineP, positionP, line_lenP)
 /*###########################################################*/
 
 char *
-pscopyuntil(fd, to, begin, end, comment)
-   FileData fd;
-   FILE *to;
-   long begin;                 /* set negative to avoid initial seek */
-   long end;
-   char *comment;
+pscopyuntil(FileData fd, FILE *to, long begin, long end, char *comment)
+   /* begin: set negative to avoid initial seek */
 {
    char *line;
    int comment_length;
@@ -2071,8 +2037,7 @@ pscopyuntil(fd, to, begin, end, comment)
 /* Check whether the line contains nothing but white space. */
 /*----------------------------------------------------------*/
 
-static int blank(line)
-   char *line;
+static int blank(char *line)
 {
    char *cp = line;
 
@@ -2088,11 +2053,7 @@ static int blank(line)
 /*##########################################################*/
 
 void
-pscopydoc(dest_file,src_filename,d,pagelist)
-    FILE *dest_file;
-    char *src_filename;
-    Document d;
-    char *pagelist;
+pscopydoc(FILE *dest_file, char *src_filename, Document d, char *pagelist)
 {
     FILE *src_file;
     char text[PSLINELENGTH];
diff --git a/gv/src/resource.c b/gv/src/resource.c
index 1547542..e543311 100644
--- a/gv/src/resource.c
+++ b/gv/src/resource.c
@@ -132,8 +132,8 @@ resource_buildDatabase (
                         Display *display,
                         char *app_class,
                         char *app_name,
-                        int *argcP,
-                        char **argv)
+                        int *argcP _GL_UNUSED,
+                        char **argv _GL_UNUSED)
 {
   XrmDatabase gvdb = XtDatabase(display);
   XrmDatabase db = NULL;
diff --git a/gv/src/save.c b/gv/src/save.c
index faaf48c..9d082e9 100644
--- a/gv/src/save.c
+++ b/gv/src/save.c
@@ -66,7 +66,7 @@
 /*############################################################*/
 
 SaveData
-save_allocSaveData()
+save_allocSaveData(void)
 {
    SaveData sd;
    Cardinal size = sizeof(SaveDataStruct);
@@ -83,8 +83,7 @@ save_allocSaveData()
 /*############################################################*/
 
 void
-save_freeSaveData(sd)
-   SaveData sd;
+save_freeSaveData(SaveData sd)
 {
    BEGINMESSAGE(save_freeSaveData)
    XtFree(sd->save_fn);
@@ -106,9 +105,7 @@ save_freeSaveData(sd)
 
 
 static String
-print_file(print_command,print_filename)
-   String print_command;
-   String print_filename;
+print_file(String print_command, String print_filename)
 {
    String error=NULL;
    char *print_quoted_filename;
@@ -160,9 +157,7 @@ print_file(print_command,print_filename)
 /*------------------------------------------------------------*/
 
 static void
-save_forkPDFToPSConversionDone(client_data,type)
-   XtPointer client_data;
-   int type;
+save_forkPDFToPSConversionDone(XtPointer client_data, int type)
 {
    char *error=NULL;
    SaveData sd = (SaveData) client_data;
@@ -193,8 +188,7 @@ save_forkPDFToPSConversionDone(client_data,type)
 /*------------------------------------------------------------*/
 
 static String
-save_forkPDFToPSConversion(sd)
-   SaveData sd;
+save_forkPDFToPSConversion(SaveData sd)
 {
    char command[512], tmp[512];
    char proc_name[256];
@@ -266,11 +260,7 @@ save_forkPDFToPSConversion(sd)
 /*------------------------------------------------------------*/
 
 static String
-save_copyToFile(save_filename,src_filename,pagelist,scanstyle)
-   String save_filename;
-   String src_filename;
-   char *pagelist;
-   int scanstyle;
+save_copyToFile(String save_filename, String src_filename, char *pagelist, int 
scanstyle)
 {
    FILE *save_file=NULL;
    FILE *src_file=NULL;
diff --git a/gv/src/secscanf.c b/gv/src/secscanf.c
index 5169325..9959023 100644
--- a/gv/src/secscanf.c
+++ b/gv/src/secscanf.c
@@ -282,7 +282,7 @@ sec_sscanf(const char *s, const char *fmt, ...)
                                        goto stop;
                                buf = va_arg(ap, char *);
                                size = va_arg(ap, size_t) - nul_terminated;
-                               if (size > s - string)
+                               if (size > (size_t)(s - string))
                                        size = s - string;
                                strncpy(buf, string, size);
                                if (nul_terminated)
diff --git a/gv/src/version.c b/gv/src/version.c
index b4f40e4..6a2276c 100644
--- a/gv/src/version.c
+++ b/gv/src/version.c
@@ -73,9 +73,7 @@ static        Bool    version_up = False;
 
###############################################################################*/
 
 void
-cb_popdownVersionPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+cb_popdownVersionPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popdownVersionPopup)
    if (version_up) {
@@ -97,9 +95,7 @@ cb_popdownVersionPopup(w, client_data, call_data)
 
###############################################################################*/
 
 void
-cb_popupVersionPopup(w, client_data, call_data)
-   Widget      w;
-   XtPointer   client_data, call_data;
+cb_popupVersionPopup(Widget w _GL_UNUSED, XtPointer client_data _GL_UNUSED, 
XtPointer call_data _GL_UNUSED)
 {
    BEGINMESSAGE(cb_popupVersionPopup)
    if (!version_up) {
@@ -121,8 +117,7 @@ cb_popupVersionPopup(w, client_data, call_data)
 
 static char *VersionPopup_layout = etc. etc.
 
-static void SetVersionPopupLayout(l)
-   Widget              l;
+static void SetVersionPopupLayout(Widget l)
 {
    static XrmValue     from,to;
    static Bool                 success=False;
@@ -164,9 +159,7 @@ static void SetVersionPopupLayout(l)
 
###############################################################################*/
 
 void
-makeVersionPopup(parent,name)
-   Widget parent;
-   String name;
+makeVersionPopup(Widget parent, String name)
 {
    char                **line;
    Arg         args[10];
diff --git a/gv/src/zoom.c b/gv/src/zoom.c
index ccf6c4c..ccd964e 100644
--- a/gv/src/zoom.c
+++ b/gv/src/zoom.c
@@ -80,9 +80,7 @@ static char* zoom_redisplay  = "redisplay";
 /*##################################################################*/
 
 void
-zoom_createZoom(w, call_data)
-    Widget w;
-    XtPointer call_data;
+zoom_createZoom(Widget w _GL_UNUSED, XtPointer call_data)
 {
     Arg args[25];
     Cardinal n;
-- 
1.7.2.5



reply via email to

[Prev in Thread] Current Thread [Next in Thread]