File fix-gcc15.patch of Package graywolf

From f4adc937500c50a4fa2a7d2990611a052ae29cbe Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Tue, 6 Jan 2026 12:44:41 +0000
Subject: [PATCH] Fix compilation for gcc15

by ensuring proper function prototypes are used
---
 include/yalecad/deck.h        |  6 +--
 include/yalecad/dialog.h      |  2 +-
 include/yalecad/dset.h        | 12 +++---
 include/yalecad/graph.h       | 22 +++++-----
 include/yalecad/hash.h        |  2 +-
 include/yalecad/heap.h        |  4 +-
 include/yalecad/list.h        |  8 ++--
 include/yalecad/quicksort.h   |  2 +-
 include/yalecad/rbtree.h      | 22 +++++-----
 include/yalecad/tree.h        |  4 +-
 src/Ylib/assign.c             | 10 ++---
 src/Ylib/deck.c               |  6 +--
 src/Ylib/dialog.c             | 14 +++----
 src/Ylib/draw.c               | 16 +++----
 src/Ylib/dset.c               | 10 ++---
 src/Ylib/edcolors.c           |  4 +-
 src/Ylib/graph.c              | 52 +++++++++++------------
 src/Ylib/hash.c               |  4 +-
 src/Ylib/heap.c               | 12 +++---
 src/Ylib/list.c               |  6 +--
 src/Ylib/log.c                |  4 +-
 src/Ylib/path.c               |  8 ++--
 src/Ylib/plot.c               |  2 +-
 src/Ylib/quicksort.c          |  6 +--
 src/Ylib/rbtree.c             | 48 ++++++++++-----------
 src/Ylib/relpath.c            |  2 +-
 src/Ylib/stats.c              |  2 +-
 src/Ylib/system.c             |  2 +-
 src/Ylib/wgraphics.c          |  4 +-
 src/Ylib/ydebug.c             |  2 +-
 src/genrows/draw.c            | 79 +++++++++++++++++------------------
 src/genrows/genrows.c         |  8 ++--
 src/genrows/globals.h         |  3 ++
 src/genrows/merge.c           |  2 +-
 src/genrows/readpar.c         |  4 +-
 src/mc_compact/cdraw.c        |  7 ++--
 src/mc_compact/changraph.c    |  2 +-
 src/mc_compact/compact.h      |  1 +
 src/mc_compact/movestrat.c    |  6 +--
 src/mc_compact/movestrat2.c   |  9 ++--
 src/mc_compact/multi.c        | 14 +++----
 src/mc_compact/readcgraph.c   |  2 +-
 src/mc_compact/readcgraph_l.h |  3 +-
 src/mc_compact/readtiles.c    |  2 +-
 src/mc_compact/readtiles_l.h  |  2 +-
 src/mc_compact/xcompact.c     |  2 +-
 src/mc_compact/ycompact.c     |  2 +-
 src/mincut/main.c             |  5 ++-
 src/mincut/readcells.c        |  2 +-
 src/mincut/readcells_l.h      |  2 +-
 src/syntax/main.c             |  3 +-
 src/syntax/readcells.c        |  2 +-
 src/syntax/readcells_l.h      |  2 +-
 src/twflow/autoflow.c         |  5 +--
 src/twflow/globals.h          |  8 ++++
 src/twflow/graphics.c         |  3 --
 src/twflow/main.c             |  2 -
 src/twflow/program.c          |  1 -
 src/twflow/readobjects.c      |  2 +-
 src/twflow/readobjects_l.h    |  2 +-
 src/twmc/analyze.c            |  6 +--
 src/twmc/compact.c            |  4 +-
 src/twmc/configpads.c         |  4 +-
 src/twmc/gmain.c              |  4 +-
 src/twmc/graphics.c           | 30 ++++++-------
 src/twmc/initialize.c         |  4 +-
 src/twmc/main.c               |  6 +--
 src/twmc/outgeo.c             |  2 +-
 src/twmc/outpin.c             |  7 ++--
 src/twmc/output.c             | 14 +++----
 src/twmc/overlap.c            |  4 +-
 src/twmc/partition.c          |  4 +-
 src/twmc/paths.c              |  4 +-
 src/twmc/placepads.c          |  5 +--
 src/twmc/readcells.c          |  2 +-
 src/twmc/readcells_l.h        |  2 +-
 src/twmc/readnets.c           |  2 +-
 src/twmc/readnets_l.h         |  2 +-
 src/twmc/readpar.c            |  4 +-
 src/twmc/rmain.c              |  4 +-
 src/twmc/sortpad.c            |  4 +-
 src/twmc/uloop.c              | 12 +++---
 src/twmc/unbust.c             | 26 ++++++------
 src/twmc/unet.c               |  8 ++--
 src/twmc/wireest.c            |  2 +-
 src/twmc/wireratio.c          |  2 +-
 src/twsc/cell_width.c         |  6 +--
 src/twsc/configpads.c         |  1 -
 src/twsc/findcost.c           |  1 -
 src/twsc/graphics.c           |  6 +--
 src/twsc/groute.h             |  2 +
 src/twsc/main.c               |  7 ++--
 src/twsc/mergeseg.c           |  5 ++-
 src/twsc/outpins.c            | 15 ++++---
 src/twsc/outpins1.c           | 30 ++++++-------
 src/twsc/output.c             |  1 -
 src/twsc/parser.c             |  7 ++--
 src/twsc/readcell.c           |  2 +-
 src/twsc/readcell_l.h         |  2 +-
 src/twsc/readnets.c           |  7 ++--
 src/twsc/readnets_l.h         |  4 +-
 src/twsc/readpar.c            |  4 +-
 src/twsc/rmoverlap.c          |  2 +-
 src/twsc/sortpad.c            |  4 +-
 src/twsc/standard.h           |  3 +-
 src/twsc/steiner.c            |  1 -
 src/twsc/uloop.c              | 14 +++----
 src/twsc/utemp.c              |  1 -
 108 files changed, 386 insertions(+), 392 deletions(-)

diff --git a/include/yalecad/deck.h b/include/yalecad/deck.h
index a3d74e41..4bc64284 100644
--- a/include/yalecad/deck.h
+++ b/include/yalecad/deck.h
@@ -169,7 +169,7 @@ extern VOIDPTR Ydeck_dequeue( P1(YDECK *deck) ) ;
     Returns data (interger or pointer) stored on card.  
 */
 
-extern VOID Ydeck_dump ( P2( YDECK *deckPtr, VOID (*userPrint)() ) );
+extern VOID Ydeck_dump ( P2( YDECK *deckPtr, VOID (*userPrint)(void *) ) );
 /*
 Arguments:
     YDECK *deckPt ;
@@ -178,7 +178,7 @@ extern VOID Ydeck_dump ( P2( YDECK *deckPtr, VOID (*userPrint)() ) );
     For each data item in the deck, call the user print function.
 */
 
-extern VOID Ydeck_empty( P2( YDECK *deck, VOID (*userDelete)() ) ) ;
+extern VOID Ydeck_empty( P2( YDECK *deck, VOID (*userDelete)(void *) ) ) ;
 /* 
 Arguments:
     YDECK *deck ;
@@ -189,7 +189,7 @@ extern VOID Ydeck_empty( P2( YDECK *deck, VOID (*userDelete)() ) ) ;
     Should be used if deck is to be used again.
 */
 
-extern VOID Ydeck_free( P2( YDECK *deck, VOID (*userDelete)() ) ) ;
+extern VOID Ydeck_free( P2( YDECK *deck, VOID (*userDelete)(void *) ) ) ;
 /* 
 Arguments:
     YDECK *deck ;
diff --git a/include/yalecad/dialog.h b/include/yalecad/dialog.h
index 9923824c..af1e9f00 100644
--- a/include/yalecad/dialog.h
+++ b/include/yalecad/dialog.h
@@ -29,7 +29,7 @@ typedef struct {
 typedef struct {
     INT   type ;
     char  *string ;
-    BOOL  bool ;
+    BOOL  boolx ;
 } TWDRETURNBOX, *TWDRETURNPTR ;
 
 typedef void (*dialog_callback_t)(TWDRETURNPTR, INT);
diff --git a/include/yalecad/dset.h b/include/yalecad/dset.h
index dbe53ced..ed3bd66d 100644
--- a/include/yalecad/dset.h
+++ b/include/yalecad/dset.h
@@ -17,8 +17,8 @@ REVISIONS:  Sun Dec  8 23:30:16 EST 1991 - removed indirection
 
 typedef struct ydsetrec {
     YTREEPTR dtree ;            /* rbtree holding sets */
-    INT (*compare_func)() ;	/* how to compare functions in rbtree */
-    VOID (*user_delete)() ;	/* how to delete functions in rbtree */
+    INT (*compare_func)(void *, void*) ;	/* how to compare functions in rbtree */
+    VOID (*user_delete)(void *) ;	/* how to delete functions in rbtree */
     YTREEPTR superset_tree ;	/* tree to store the superset */
     YTREEPTR subset_tree ;	/* tree to store the subsets */
     YTREEPTR parent_tree ;	/* tree to store the parents */
@@ -29,7 +29,7 @@ typedef struct ydsetrec {
   NOTE that the users comparison function will be similar to 
   comparison function used in the rbtree package.
   ---------------------------------------*/
-extern YDSETPTR Ydset_init( P1(INT (*compare_func)() ) ) ;
+extern YDSETPTR Ydset_init( P1(INT (*compare_func)(void *, void*) ) ) ;
 /*
 Function:
     Initialize the union/find routines.  Returns back a set.
@@ -44,7 +44,7 @@ extern YDSETPTR Ydset_init( P1(INT (*compare_func)() ) ) ;
   Free all elements in the set but leaves the set intact
   This may be used recursively.
   ---------------------------------------*/
-extern VOID Ydset_empty( P2(YDSETPTR set,VOID (*userDelete)() ) );
+extern VOID Ydset_empty( P2(YDSETPTR set,VOID (*userDelete)(void *) ) );
 /*
   free all elements of a superset.  Function userDelete is applied to user data.
 */
@@ -103,7 +103,7 @@ VOIDPTR Ydset_find_set( P2( YDSETPTR dset, VOIDPTR data ));
   Free all elements in the set and the set.
   This can be used recursively.
   ---------------------------------------*/
-extern VOID Ydset_free( P2(YDSETPTR set,VOID (*userDelete)() ) );
+extern VOID Ydset_free( P2(YDSETPTR set,VOID (*userDelete)(void *) ) );
 /*
   free the entire superset.  Function userDelete is applied to user data.
 */
@@ -148,7 +148,7 @@ extern INT Ydset_verify( P1(YDSETPTR set));
 /*------------------------
   Ydset_dump
   ------------------------*/
-extern void Ydset_dump(P2( YDSETPTR set, VOID (*printFunc)() ) );
+extern void Ydset_dump(P2( YDSETPTR set, VOID (*printFunc)(void *) ) );
 
 #endif /* YDSET_H */
 
diff --git a/include/yalecad/graph.h b/include/yalecad/graph.h
index e2f4c02b..7bd26fd0 100644
--- a/include/yalecad/graph.h
+++ b/include/yalecad/graph.h
@@ -32,9 +32,9 @@ typedef struct graph_edge *YEDGEPTR;
   Thus, the user edge weight function is optional and only
   should be used if the user need dynamic edge weights.
   -------------------------------------------------------------*/
-extern YGRAPHPTR Ygraph_init(P4(INT(*compare_node)(),
-                                INT(*compare_edge)(),
-                                INT(*user_edge_weight)(),
+extern YGRAPHPTR Ygraph_init(P4(INT(*compare_node)(void *, void*),
+                                INT(*compare_edge)(void *, void*),
+                                INT(*user_edge_weight)(void *),
                                 INT flags));
 /*
 Arguments:
@@ -99,7 +99,7 @@ extern YNODEPTR Ygraph_nodeInsert( P2(YGRAPHPTR graph,
 /*--------------------------------------------------
   Ygraph_edgeDelete: free edges from data structure
   --------------------------------------------------*/
-extern VOID Ygraph_edgeDelete(P3(YGRAPHPTR graph,YEDGEPTR  edge,VOID (*userEdgeFree)()));
+extern VOID Ygraph_edgeDelete(P3(YGRAPHPTR graph,YEDGEPTR  edge,VOID (*userEdgeFree)(void *)));
 
 /*-------------------------------------------------
   Ygraph_edgeInsert: insert an edge into the graph  
@@ -140,7 +140,7 @@ then NULL returned.
 /*---------------------------------------------
   empty all nodes and edge from the graph
   ---------------------------------------------*/
-VOID Ygraph_empty(P3(YGRAPHPTR graph,VOID (*nodeDelete)(),VOID (*edgeDelete)()));
+VOID Ygraph_empty(P3(YGRAPHPTR graph,VOID (*nodeDelete)(void *),VOID (*edgeDelete)(void *)));
 
 /*-------------------------------------------------
   Ygraph_nodeCount
@@ -247,7 +247,7 @@ extern VOIDPTR Ygraph_nodeData( P1( YNODEPTR node));
 /*--------------------------------------------------
   free and empty the graph
   --------------------------------------------------*/
-extern VOID Ygraph_free(P3(YGRAPHPTR graph,VOID (*nodeDelete)(),VOID (*edgeDelete)()));
+extern VOID Ygraph_free(P3(YGRAPHPTR graph,VOID (*nodeDelete)(void *),VOID (*edgeDelete)(void *)));
 
 /*-------------------------------------------------
   Ygraph_edgeEnumerate
@@ -353,7 +353,7 @@ VOID Ygraph_edgeIntervalPop(P1(YGRAPHPTR graph));
   free_node: free node from data structure
   --------------------------------------------------*/
 extern VOID Ygraph_nodeDelete(P4(YGRAPHPTR graph,YNODEPTR node,
-                         VOID (*nodeFree)(),VOID (*edgeFree)()));
+                         VOID (*nodeFree)(void *),VOID (*edgeFree)(void *)));
 
 /*-------------------------------------------------
   Ygraph_nodeVeriy: exercise node data structure
@@ -518,23 +518,23 @@ extern int Ygraph_verify(P1(YGRAPHPTR graph));
 /*------------------------------------------------------------
   Ygraph_dump: print graph stats and call user print functions
   ------------------------------------------------------------*/
-extern VOID Ygraph_dump(P3(YGRAPHPTR graph,VOID (*printNode)(),VOID (*printEdge)()));
+extern VOID Ygraph_dump(P3(YGRAPHPTR graph,VOID (*printNode)(void *),VOID (*printEdge)(void *)));
 
 /*---------------------------------------------------------
   Sets up the users draw functions for Ygraph_draw.
   ---------------------------------------------------------*/
-extern VOID Ygraph_drawFunctions(P3( YGRAPHPTR graph, VOID (*userNodeDraw)(), VOID (*userEdgeDraw)()));
+extern VOID Ygraph_drawFunctions(P3( YGRAPHPTR graph, VOID (*userNodeDraw)(void *, INT), VOID (*userEdgeDraw)(void *, INT)));
 
 /*---------------------------------------------------------
   Get the current edge weight function
   ---------------------------------------------------------*/
-extern INT (*Ygraph_getEdgeWeightFunction(P1(YGRAPHPTR graph)))();
+extern INT (*Ygraph_getEdgeWeightFunction(P1(YGRAPHPTR graph)))(void *);
 
 /*---------------------------------------------------------
   Set the current edge weight function
   ---------------------------------------------------------*/
 extern VOID Ygraph_setEdgeWeightFunction(P2(YGRAPHPTR graph,
-					    INT (*userEdgeWeight)()));
+					    INT (*userEdgeWeight)(void *)));
 
 /*---------------------------------------------------------
   Call the users drawing functions for all required nodes 
diff --git a/include/yalecad/hash.h b/include/yalecad/hash.h
index 58012e7c..402d569f 100644
--- a/include/yalecad/hash.h
+++ b/include/yalecad/hash.h
@@ -76,7 +76,7 @@ extern char *Yhash_add( P4( YHASHPTR  hashtable, char *key,
 */
 
 
-extern void Yhash_table_delete( P2(YHASHPTR  hashtable,INT (*userdelete)() ) ) ;
+extern void Yhash_table_delete( P2(YHASHPTR  hashtable,INT (*userdelete)(void *) ) ) ;
 /*
 Function:
     Frees the memory associated with a hash table. The user
diff --git a/include/yalecad/heap.h b/include/yalecad/heap.h
index 8d8e5b5e..148db0f1 100644
--- a/include/yalecad/heap.h
+++ b/include/yalecad/heap.h
@@ -32,7 +32,7 @@
 *****************************************************************************/
 
 typedef struct heap {
-  INT (*heap_cmp)();
+  INT (*heap_cmp)(void *, void *);
   struct heap_el *top;
 } YHEAP, *YHEAPPTR;
 
@@ -57,7 +57,7 @@ typedef struct heap {
  ************************************************************************/
 
 extern YHEAPPTR Yheap_init();
-extern YHEAPPTR Yheap_init_with_parms(P1(INT (*fn)()));
+extern YHEAPPTR Yheap_init_with_parms(P1(INT (*fn)(void *, void *)));
 extern VOID Yheap_empty(P1(YHEAPPTR));
 extern VOID Yheap_free(P1(YHEAPPTR));
 extern VOID Yheap_insert(P2(YHEAPPTR, VOIDPTR));
diff --git a/include/yalecad/list.h b/include/yalecad/list.h
index dcc6ce1c..abfb754d 100644
--- a/include/yalecad/list.h
+++ b/include/yalecad/list.h
@@ -25,7 +25,7 @@ static char Ylist_h_SID[] = "@(#) list.h Yale Version 1.7 12/9/91" ;
 *****************************************************************************/
 
 typedef struct ylist {
-  INT (*comp)();
+  INT (*comp)(void *, void*);
   INT size;
   struct ylist_el *first, *last;
   struct ylist *next;
@@ -226,7 +226,7 @@ typedef struct ylist_el {
  *  									*
  ************************************************************************/
 extern YLIST Ylist_create();
-extern YLIST Ylist_create_with_parms(P1(INT (*comp)()));
+extern YLIST Ylist_create_with_parms(P1(INT (*comp)(void *, void*)));
 extern VOID Ylist_enqueue(P2(YLIST list, VOIDPTR data));
 extern VOID Ylist_push(P2(YLIST list, VOIDPTR data));
 extern VOID Ylist_insert_after(P3(YLIST list, YLIST_EL item, VOIDPTR data));
@@ -234,8 +234,8 @@ extern VOID Ylist_insert_before(P3(YLIST list, YLIST_EL item, VOIDPTR data));
 extern VOID Ylist_insert_in_order(P2(YLIST list, VOIDPTR data));
 extern VOIDPTR  Ylist_dequeue(P1(YLIST));
 extern VOIDPTR  Ylist_pop(P1(YLIST));
-extern VOID Ylist_delete(P3(YLIST, YLIST_EL, INT (*user_delete)() ));
-extern BOOL Ylist_find_and_delete(P3(YLIST list,VOIDPTR data,INT (*user_delete)()));
+extern VOID Ylist_delete(P3(YLIST, YLIST_EL, INT (*user_delete)(void *) ));
+extern BOOL Ylist_find_and_delete(P3(YLIST list,VOIDPTR data,INT (*user_delete)(void *)));
 extern YLIST Ylist_sort(P1(YLIST list));
 extern VOID Ylist_append(P2(YLIST l1, YLIST l2));
 extern VOID Ylist_clear(P1(YLIST list));
diff --git a/include/yalecad/quicksort.h b/include/yalecad/quicksort.h
index ff92faa0..fb0efe43 100644
--- a/include/yalecad/quicksort.h
+++ b/include/yalecad/quicksort.h
@@ -7,6 +7,6 @@ DATE:	    Tue Mar  3 16:01:25 EST 1992
 #define YQUICKSORT_H
 
 
-extern VOID Yquicksort( P4(VOIDPTR base, INT n, INT size, INT (*compare)() ) ) ;
+extern VOID Yquicksort( P4(VOIDPTR base, INT n, INT size, INT (*compare)(char *, char *) ) ) ;
 
 #endif /* YQUICKSORT_H */
diff --git a/include/yalecad/rbtree.h b/include/yalecad/rbtree.h
index 939ab0f3..80ac4e4a 100644
--- a/include/yalecad/rbtree.h
+++ b/include/yalecad/rbtree.h
@@ -38,7 +38,7 @@ typedef struct tree *YTREEPTR ;
 #define	SEARCH_CLOSEST		3
 
 /* ******************* BINARY TREE INCLUDE FILES ****************** */
-extern YTREEPTR Yrbtree_init( P1(INT (*compare_func)() ) ) ;
+extern YTREEPTR Yrbtree_init( P1(INT (*compare_func)(void*, void*) ) ) ;
 /* 
 Arguments:
     INT compare_func() ;
@@ -195,7 +195,7 @@ extern VOID Yrbtree_intervalPop( P1(YTREEPTR tree) ) ;
 */
 
 extern VOID Yrbtree_interval_free( P4(YTREEPTR tree, VOIDPTR low_key,
-				VOIDPTR high_key, VOID (*userDelete)()) );
+				VOIDPTR high_key, VOID (*userDelete)(void *)) );
 /* 
 Arguments:
     YTREEPTR tree ;
@@ -208,7 +208,7 @@ extern VOID Yrbtree_interval_free( P4(YTREEPTR tree, VOIDPTR low_key,
     See below for an example.
 */
 
-extern BOOL Yrbtree_delete( P3(YTREEPTR tree,  VOIDPTR key, VOID (*userDelete)() ) ) ;
+extern BOOL Yrbtree_delete( P3(YTREEPTR tree,  VOIDPTR key, VOID (*userDelete)(void *) ) ) ;
 /* 
 Arguments:
     YTREEPTR tree ;
@@ -237,7 +237,7 @@ extern BOOL Yrbtree_delete( P3(YTREEPTR tree,  VOIDPTR key, VOID (*userDelete)()
     Returns 1 if successful, 0 otherwise.
 */
 
-extern BOOL Yrbtree_deleteCurrentInterval(P2(YTREEPTR tree,VOID (*userDelete)()));
+extern BOOL Yrbtree_deleteCurrentInterval(P2(YTREEPTR tree,VOID (*userDelete)(void *)));
 /*
 Function:
    While in an interval loop, deletes the current element.  This allows
@@ -246,7 +246,7 @@ extern BOOL Yrbtree_deleteCurrentInterval(P2(YTREEPTR tree,VOID (*userDelete)())
    how it is used.
 */
 
-extern BOOL Yrbtree_deleteCurrentEnumerate(P2(YTREEPTR tree,VOID (*userDel)()));
+extern BOOL Yrbtree_deleteCurrentEnumerate(P2(YTREEPTR tree,VOID (*userDel)(void *)));
 /*
 Function:
    Like Yrbtree_deleteCurrentInterval, this routine is call from inside an
@@ -256,7 +256,7 @@ extern BOOL Yrbtree_deleteCurrentEnumerate(P2(YTREEPTR tree,VOID (*userDel)()));
    function.  See the rbtree test program to see how it is used.
 */
 
-extern VOID Yrbtree_empty( P2(YTREEPTR tree, VOID (*userDelete)() ) ) ;
+extern VOID Yrbtree_empty( P2(YTREEPTR tree, VOID (*userDelete)(void *) ) ) ;
 /*
 Arguments:
    YTREEPTR tree;
@@ -266,7 +266,7 @@ extern VOID Yrbtree_empty( P2(YTREEPTR tree, VOID (*userDelete)() ) ) ;
    unallocated using userDelete function
 */
 
-extern VOID Yrbtree_free( P2(YTREEPTR tree, VOID (*userDelete)() ) ) ;
+extern VOID Yrbtree_free( P2(YTREEPTR tree, VOID (*userDelete)(void *) ) ) ;
 /*
 Arguments:
    YTREEPTR tree;
@@ -282,7 +282,7 @@ extern INT Yrbtree_size( P1(YTREEPTR tree) ) ;
    Find the total elements in the tree.
 */
 
-extern INT(*Yrbtree_get_compare( P1(YTREEPTR tree) ))() ;
+extern INT(*Yrbtree_get_compare( P1(YTREEPTR tree) ))(void *, void*) ;
 /*
 Function:
    Returns a pointer to the tree's comparison function.
@@ -346,21 +346,21 @@ extern VOIDPTR Yrbtree_revlist( P2(YTREEPTR tree, BOOL startFlag) ) ;
    Enumerate the tree in reverse order.
 */
 
-extern VOID Yrbtree_dump( P2(YTREEPTR tree, VOID (*print_key)() )) ;
+extern VOID Yrbtree_dump( P2(YTREEPTR tree, VOID (*print_key)(char *) )) ;
 /*
 Function:
    Dump the contents of a tree.  Print keys takes one argument,
    a key.
 */
 
-extern VOID Yrbtree_resort( P2(YTREEPTR tree, INT (*compare_func)() )) ;
+extern VOID Yrbtree_resort( P2(YTREEPTR tree, INT (*compare_func)(void*, void*) )) ;
 /*
 Function:
    Takes a tree and resorts the tree with a new comparison function.
    All search markers are reset to NIL.
 */
 
-extern YTREEPTR Yrbtree_copy( P2(YTREEPTR tree,INT (*compare_func)() ) );
+extern YTREEPTR Yrbtree_copy( P2(YTREEPTR tree,INT (*compare_func)(void*, void*) ) );
 /*
 Function:
    Make a copy of a tree sorted with the given comparison function.
diff --git a/include/yalecad/tree.h b/include/yalecad/tree.h
index ebc1a7ae..85c1ce95 100644
--- a/include/yalecad/tree.h
+++ b/include/yalecad/tree.h
@@ -12,7 +12,7 @@ DATE:	    Mar 30, 1990
 #ifndef RBTREE_H
 typedef struct tree {
     char       *root ;                  /* the root of the tree */
-    INT        (*compare_func)() ;     /* how to compare two keys */
+    INT        (*compare_func)(void*, void*) ;     /* how to compare two keys */
     INT        offset ;                /* how to get the key */
 } YTREEBOX, *YTREEPTR ;
 #endif
@@ -28,7 +28,7 @@ typedef struct tree {
 }
 
 /* ******************* BINARY TREE INCLUDE FILES ****************** */
-extern YTREEPTR Ytree_init( P2(INT compare_func(), INT offset ) ) ;
+extern YTREEPTR Ytree_init( P2(INT compare_func(void*, void*), INT offset ) ) ;
 /* 
 Arguments:
     INT compare_func() ;
diff --git a/src/Ylib/assign.c b/src/Ylib/assign.c
index d5c99c94..4bf5daa2 100644
--- a/src/Ylib/assign.c
+++ b/src/Ylib/assign.c
@@ -63,12 +63,12 @@ static INT *h4S = (INT *) NULL ;
 static INT *h5S = (INT *) NULL ;
 static INT *h6S = (INT *) NULL ;
 
-static void initassign();
-static void shortestpath();
-static void augmentation();
+static void initassign(INT[], INT[], INT, INT);
+static void shortestpath(INT[], INT[], INT[], INT[], INT[], INT[], INT, INT *, INT *, INT, INT);
+static void augmentation(INT[], INT, INT);
 static void transformation( INT ys[], INT yt[], INT dplus[], INT dminus[], INT d, int m, int n );
-static INT *allocatevector() ;
-static INT **allocatematrix() ;
+static INT *allocatevector(INT) ;
+static INT **allocatematrix(INT, INT) ;
 
 INT *Yassign( cost_matrix, m, n )
 INT  **cost_matrix ;
diff --git a/src/Ylib/deck.c b/src/Ylib/deck.c
index 2d30bf3b..93d59629 100644
--- a/src/Ylib/deck.c
+++ b/src/Ylib/deck.c
@@ -210,7 +210,7 @@ INT Ydeck_notEmpty( deckPtr )
 /* remove all cards from the deck */
 /*--------------------------------*/
 VOID Ydeck_empty(deckPtr,userDelete)
-     VOID (*userDelete)();
+     VOID (*userDelete)(void *);
      YDECK *deckPtr;
 {
   VOIDPTR deckData;
@@ -232,7 +232,7 @@ VOID Ydeck_empty(deckPtr,userDelete)
 /*-----------------------------------------*/
 VOID Ydeck_free(deckPtr,userDelete)
      YDECK *deckPtr;
-     VOID (*userDelete)();
+     VOID (*userDelete)(void *);
 {
   Ydeck_empty(deckPtr,userDelete);
   YFREE(deckPtr);
@@ -243,7 +243,7 @@ VOID Ydeck_free(deckPtr,userDelete)
 /*-------------------------------------------------*/
 VOID Ydeck_dump( deckPtr, userPrint ) 
      YDECK *deckPtr ;
-     VOID (*userPrint)();
+     VOID (*userPrint)(void *);
 {
   
   fprintf( stderr,"%d cards\n",deckPtr->size);
diff --git a/src/Ylib/dialog.c b/src/Ylib/dialog.c
index b1d3ee3a..f61ead10 100644
--- a/src/Ylib/dialog.c
+++ b/src/Ylib/dialog.c
@@ -143,7 +143,7 @@ static TWDIALOGPTR  fieldS ;         /* the current dialog array */
 static INT world2pix_x(int) ;
 static INT world2pix_y(int) ;
 static INT world2fonty(int) ;
-static INT pixlen() ;
+static INT pixlen(INT) ;
 static void set_stipple_font( P2(BOOL stippleOn, INT font_change ) ) ;
 static void debug_dialog( P1( TWDIALOGPTR fieldp ) ) ;
 static void check_cases( P3( TWDIALOGPTR fieldp, INT select, dialog_callback_t user_function )) ;
@@ -307,7 +307,7 @@ dialog_callback_t user_function ;
 	    /* initial on button of a case switch */
 	    ASSERTNCONT( fptr->group > 0 && fptr->group < numwinS,
 		"TWdialog", "init_switch out of bounds\n" ) ;
-	    dataS[fptr->group].bool = TRUE ;
+	    dataS[fptr->group].boolx = TRUE ;
 	}
     }
     /* now raise all the subwindows */
@@ -446,7 +446,7 @@ dialog_callback_t user_function ;
 				0L, world2fonty( 0L ),
 				dptr->string, 
 				strlen(dptr->string)) ;
-			} else if( dptr->bool ){
+			} else if( dptr->boolx ){
 			    /* a case switch that is on */
 			    XFillRectangle( dpyS,win, 
 				contextArrayS[fptr->color],
@@ -563,9 +563,9 @@ dialog_callback_t user_function ;
 	dptr = &(dataS[i]) ;
 	if( fptr->group == group ){
 	    if( i == select ){
-		dptr->bool = TRUE ;
+		dptr->boolx = TRUE ;
 	    } else {
-		dptr->bool = FALSE ;
+		dptr->boolx = FALSE ;
 	    }
 	}
     }
@@ -607,7 +607,7 @@ static void draw_fields( TWDIALOGPTR fieldp )
 		dptr->string, strlen(dptr->string)) ;
 	} else if( fptr->type == BUTTONTYPE ){
 	    XClearWindow( dpyS, winS[i] ) ;
-	    if( dptr->bool ){
+	    if( dptr->boolx ){
 		/* true initially */
 		XFillRectangle( dpyS,winS[i], contextArrayS[fptr->color],
 		    0,0,
@@ -708,7 +708,7 @@ static void edit_field( INT field, Window win, XEvent event, dialog_callback_t u
     finish = FALSE ;
     press = TRUE ; /* initially we got a keyboard event */
     /* tell user data has changed */
-    dptr->bool = TRUE ;
+    dptr->boolx = TRUE ;
     do {
 	if( press ){
 	    /* initialize buffer */
diff --git a/src/Ylib/draw.c b/src/Ylib/draw.c
index 5928facf..33288c5d 100644
--- a/src/Ylib/draw.c
+++ b/src/Ylib/draw.c
@@ -224,12 +224,12 @@ VOID (*_TWdrawArb)(P3( INT ref_num, INT color, char *label )) ;
 
 
 /* the local routines seen by the routines in this file only */
-static VOID drawDRect() ;
-static VOID drawWRect() ;
-static VOID drawDArb() ;
-static VOID drawWArb() ;
-static VOID drawDLine() ;
-static VOID drawWLine() ;
+static VOID drawDRect(INT, INT, INT, INT, INT, INT, char *) ;
+static VOID drawWRect(INT, INT, INT, INT, INT, INT, char *) ;
+static VOID drawDArb(INT, INT, char*) ;
+static VOID drawWArb(INT, INT, char*) ;
+static VOID drawDLine(INT, INT, INT, INT, INT, INT, char *) ;
+static VOID drawWLine(INT, INT, INT, INT, INT, INT, char *) ;
 static VOID initcolors( P2(char **desiredColorArray,INT  numC ) ) ;
 static void closeFrame(P1(void)) ;
 static VOID set_viewing_transformation() ;
@@ -315,7 +315,7 @@ static  BOOL frameOpenS ;     /* tells whether frame files are open */
 BOOL TWcheckServer()
 {
     char *hostmon ;
-    char *Ygetenv() ;
+    char *Ygetenv(char *) ;
 
     /* get host name from environment variable */
     if(!(hostmon = Ygetenv("DISPLAY"))) {
@@ -418,7 +418,7 @@ INT (*refresh_func)() ;
     XEvent event ;            /* describes event */
     char *font ;              /* user font request */
     char *hostmon ;           /* the host name of display */
-    char *Ygetenv() ;         /* get the environment variables */
+    char *Ygetenv(char *) ;         /* get the environment variables */
     char *reply ;             /* get xdefaults */
     INT depth;
     BOOL saveflag ;
diff --git a/src/Ylib/dset.c b/src/Ylib/dset.c
index 44681b3b..43f3abda 100644
--- a/src/Ylib/dset.c
+++ b/src/Ylib/dset.c
@@ -226,7 +226,7 @@ VOIDPTR data ;
   added level of indirection
   ---------------------------------------------------------------------*/
 YDSETPTR Ydset_init( compare_func )
-INT (*compare_func)() ;
+INT (*compare_func)(void*, void*) ;
 {
   YDSETPTR dset ; /* in reality this is a YTREEPTR not anymore! */
   
@@ -466,7 +466,7 @@ VOIDPTR data ;
   --------------------------------------------------------------*/
 VOID Ydset_free( dset , userDelete)
 YDSETPTR dset ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
   dsetS = dset ;
   dsetS->user_delete = userDelete ;
@@ -481,7 +481,7 @@ VOID (*userDelete)();
   -------------------------------------------------------------*/
 VOID Ydset_empty( dset , userDelete)
 YDSETPTR dset ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
   dsetS = dset ;
   dsetS->user_delete = userDelete ;
@@ -649,7 +649,7 @@ YDSETPTR dset ;
   ------------------------*/
 void Ydset_dump(dset,printFunc)
 YDSETPTR dset;
-VOID (*printFunc)();
+VOID (*printFunc)(void *);
 {
   VOIDPTR ptr ;
   INT count = 1;
@@ -735,7 +735,7 @@ BOOL startFlag;
   ------------------------*/
 void Ydset_dump_tree(dset,print_key)
 YDSETPTR dset;
-VOID (*print_key)();
+VOID (*print_key)(char *);
 {
   VOIDPTR ptr ;
   INT count = 1;
diff --git a/src/Ylib/edcolors.c b/src/Ylib/edcolors.c
index d116abd9..b4a5b580 100644
--- a/src/Ylib/edcolors.c
+++ b/src/Ylib/edcolors.c
@@ -133,13 +133,13 @@ void TWtoggleColors()
     /* initialization complete */
 
     if( answer = TWdialog( fieldS, "colors", NULL ) ){
-	if( answer[3].bool ){
+	if( answer[3].boolx ){
 	    TWarb_fill( TRUE ) ;
 	} else {
 	    TWarb_fill( FALSE ) ;
 	}
 	for( i = 7, color = 0; i < numfields; i +=3 ){
-	    if( answer[i].bool ){
+	    if( answer[i].boolx ){
     		colorOn[++color] = TRUE ;
 	    } else {
     		colorOn[++color] = FALSE ;
diff --git a/src/Ylib/graph.c b/src/Ylib/graph.c
index bbabd362..2ce44de5 100644
--- a/src/Ylib/graph.c
+++ b/src/Ylib/graph.c
@@ -88,9 +88,9 @@ typedef struct graph {
   YDECKPTR primeDeck;         /* Edges with which to prime steiner tree */
   int flags;
   INT size;                   /* any metric by which the graph is measured */
-  INT (*userEdgeWeight)();    /* user routine to get an edge's weight */
-  VOID (*userDrawEdge)();     /* user routine to draw edges */
-  VOID (*userDrawNode)();     /* user routine to draw edges */
+  INT (*userEdgeWeight)(void *);    /* user routine to get an edge's weight */
+  VOID (*userDrawEdge)(void *, INT);     /* user routine to draw edges */
+  VOID (*userDrawNode)(void *, INT);     /* user routine to draw edges */
 } YGRAPH, *YGRAPHPTR ;
 
 typedef struct graph_node {
@@ -133,8 +133,8 @@ typedef struct graph_edge {
 static INT dfs_timeS;  /* time variable used by depth first search */
 static YGRAPHPTR graphS;
 static INT bestSpanDistanceS;  /* span of last required path found */
-static VOID (*userNodeFreeS)();
-static VOID (*userEdgeFreeS)();
+static VOID (*userNodeFreeS)(void *);
+static VOID (*userEdgeFreeS)(void *);
 
 /*---------------------------------------------------------
   static prototypes
@@ -315,9 +315,9 @@ static VOID graph_node_free(nodePtr)
   -------------------------------------------------------------*/
 YGRAPHPTR Ygraph_init( user_compare_node, user_compare_edge,
                        user_edge_weight, flags )
-     INT (*user_compare_node)();
-     INT (*user_compare_edge)();
-     INT (*user_edge_weight)();
+     INT (*user_compare_node)(void *, void*);
+     INT (*user_compare_edge)(void *, void*);
+     INT (*user_edge_weight)(void *);
      INT flags ;             /* Directed edges, redundant edges, etc. */
 {
   YGRAPHPTR graph ;      /* the current tree being built */
@@ -356,14 +356,14 @@ YGRAPHPTR Ygraph_init( user_compare_node, user_compare_edge,
   --------------------------------------------------*/
 VOID Ygraph_empty(graph,userNodeDelete,userEdgeDelete)
      YGRAPHPTR graph;
-     VOID (*userNodeDelete)();  /* user function to free node data */
-     VOID (*userEdgeDelete)();  /* user function to free edge data */
+     VOID (*userNodeDelete)(void *);  /* user function to free node data */
+     VOID (*userEdgeDelete)(void *);  /* user function to free edge data */
 {
 
   userEdgeFreeS = userEdgeDelete;
   userNodeFreeS = userNodeDelete;
 
-  Yrbtree_empty( graph->edgeTree, graph_edge_free );
+  Yrbtree_empty( graph->edgeTree, (void *)graph_edge_free );
   Yrbtree_empty( graph->nodeTree, graph_node_free );
 }
 
@@ -372,8 +372,8 @@ VOID Ygraph_empty(graph,userNodeDelete,userEdgeDelete)
   --------------------------------------------------*/
 VOID Ygraph_free(graph,userNodeDelete,userEdgeDelete)
      YGRAPHPTR graph;
-     VOID (*userNodeDelete)();  /* user function to free node data */
-     VOID (*userEdgeDelete)();  /* user function to free edge data */
+     VOID (*userNodeDelete)(void *);  /* user function to free node data */
+     VOID (*userEdgeDelete)(void *);  /* user function to free edge data */
 {
   
   Ydset_free(graph->sourceSet,NULL);
@@ -661,8 +661,8 @@ YNODEPTR  Ygraph_nodeInsert( graph, nodeData)
 VOID Ygraph_nodeDelete(graph,node,userNodeFree,userEdgeFree)
      YGRAPHPTR graph;
      YNODEPTR node;
-     VOID (*userNodeFree)();
-     VOID (*userEdgeFree)();
+     VOID (*userNodeFree)(void *);
+     VOID (*userEdgeFree)(void *);
 {
   YEDGEPTR edge;
   YNODEPTR node2;
@@ -728,7 +728,7 @@ VOID Ygraph_nodeDelete(graph,node,userNodeFree,userEdgeFree)
 VOID Ygraph_edgeDelete(graph,edge,userEdgeFree)
      YGRAPHPTR graph;
      YEDGEPTR  edge;
-     VOID (*userEdgeFree)();
+     VOID (*userEdgeFree)(void *);
 {
   YEDGEPTR edge2;
 
@@ -1244,8 +1244,8 @@ YGRAPHPTR Ygraph_copy( graph )
   YGRAPHPTR    newGraph;
   YEDGEPTR edge;
   YNODEPTR node;
-  INT (*nodeComp)();
-  INT (*edgeComp)();
+  INT (*nodeComp)(void *, void *);
+  INT (*edgeComp)(void *, void *);
   
   edgeComp = Yrbtree_get_compare(graph->edgeTree);
   nodeComp = Yrbtree_get_compare(graph->nodeTree);
@@ -2419,8 +2419,8 @@ YGRAPHPTR Ygraph_steiner(graph,maxImproves)
   YDSETPTR dset;
   YDSETPTR saveSourceSet;
   YGRAPHPTR steinerGraph;
-  INT (*compareEdge)();
-  INT (*compareNode)();
+  INT (*compareEdge)(void *, void*);
+  INT (*compareNode)(void *, void*);
   int done = FALSE;
   
   /* first run a sanity on the graph */
@@ -3013,8 +3013,8 @@ int Ygraph_verify(graph)
   ---------------------------------------------------------*/
 VOID Ygraph_dump(graph,printNode,printEdge)
   YGRAPHPTR graph;
-  VOID (*printNode)();
-  VOID (*printEdge)();
+  VOID (*printNode)(void *);
+  VOID (*printEdge)(void *);
 {
   YEDGEPTR edge;
   YNODEPTR node;
@@ -3059,8 +3059,8 @@ VOID Ygraph_dump(graph,printNode,printEdge)
   ---------------------------------------------------------*/
 VOID Ygraph_drawFunctions(graph,userNodeDraw, userEdgeDraw)
      YGRAPHPTR graph;
-     VOID (*userNodeDraw)();
-     VOID (*userEdgeDraw)();
+     VOID (*userNodeDraw)(void *, INT);
+     VOID (*userEdgeDraw)(void *, INT);
 {
   graph->userDrawNode = userNodeDraw;
   graph->userDrawEdge = userEdgeDraw;
@@ -3069,7 +3069,7 @@ VOID Ygraph_drawFunctions(graph,userNodeDraw, userEdgeDraw)
 /*---------------------------------------------------------
   Get the current edge weight function
   ---------------------------------------------------------*/
-INT (*Ygraph_getEdgeWeightFunction(graph))()
+INT (*Ygraph_getEdgeWeightFunction(graph))(void *)
      YGRAPHPTR graph;
 {
   return( graph->userEdgeWeight );
@@ -3080,7 +3080,7 @@ INT (*Ygraph_getEdgeWeightFunction(graph))()
   ---------------------------------------------------------*/
 VOID Ygraph_setEdgeWeightFunction(graph,userEdgeWeight)
      YGRAPHPTR graph;
-     INT (*userEdgeWeight)();
+     INT (*userEdgeWeight)(void *);
 {
   graph->userEdgeWeight = userEdgeWeight;
 }
diff --git a/src/Ylib/hash.c b/src/Ylib/hash.c
index 2972e6ae..c138d754 100644
--- a/src/Ylib/hash.c
+++ b/src/Ylib/hash.c
@@ -78,7 +78,7 @@ YHASHPTR Yhash_table_create( numentries )
 INT numentries ;
 {
     YHASHPTR  hashtable ;
-    INT Yhash_table_size() ;
+    INT Yhash_table_size(INT) ;
 
     hashtable = YMALLOC( 1, YHASHBOX ) ;
     hashtable->size = tablesize = Yhash_table_size( numentries ) ;
@@ -97,7 +97,7 @@ YHASHPTR  hashtable ;
 
 void Yhash_table_delete(hashtable, userdelete )
 YHASHPTR  hashtable ;
-INT  (*userdelete)() ;
+INT  (*userdelete)(void *) ;
 {
     INT i ;
     YTABLEPTR hptr , zapptr ;
diff --git a/src/Ylib/heap.c b/src/Ylib/heap.c
index 028502c8..60e5fb54 100644
--- a/src/Ylib/heap.c
+++ b/src/Ylib/heap.c
@@ -112,8 +112,8 @@ typedef struct heap_el {
  *  									*
  ************************************************************************/
 static VOID free_all_els(P1(HEAP_EL));
-static HEAP_EL meld(P3(HEAP_EL, HEAP_EL, INT (*cmp)()));
-static HEAP_EL mesh(P3(HEAP_EL, HEAP_EL, INT (*cmp)()));
+static HEAP_EL meld(P3(HEAP_EL, HEAP_EL, INT (*cmp)(void *, void*)));
+static HEAP_EL mesh(P3(HEAP_EL, HEAP_EL, INT (*cmp)(void *, void*)));
 static YHEAPPTR allocate_heap();
 static HEAP_EL allocate_heap_el();
 static VOID free_heap(P1(YHEAPPTR));
@@ -155,7 +155,7 @@ static long heap_els_allocated = 0L;
   YHEAPPTR tmp;
   
   tmp = allocate_heap();
-  tmp->heap_cmp = Yheap_cmp_num;
+  tmp->heap_cmp = (void *)Yheap_cmp_num;
   return tmp;
 }   /*  heap_create  */
 
@@ -172,7 +172,7 @@ static long heap_els_allocated = 0L;
   *****************************************************************************/
 
 extern YHEAPPTR Yheap_init_with_parms(fn)
-     INT (*fn)();
+     INT (*fn)(void *, void *);
 {
   YHEAPPTR tmp;
   
@@ -347,7 +347,7 @@ static VOID free_all_els(el)
 static HEAP_EL meld(e1,e2,fn)
      HEAP_EL e1;
      HEAP_EL e2;
-     INT (*fn)();
+     INT (*fn)(void *, void*);
 {
   if ( ! e1)
     return e2;
@@ -371,7 +371,7 @@ static HEAP_EL meld(e1,e2,fn)
 static HEAP_EL mesh(e1,e2,fn)
      HEAP_EL e1;
      HEAP_EL e2;
-     INT (*fn)();
+     INT (*fn)(void *, void *);
 {
   HEAP_EL tmp;
   
diff --git a/src/Ylib/list.c b/src/Ylib/list.c
index 8daa626c..12d31274 100644
--- a/src/Ylib/list.c
+++ b/src/Ylib/list.c
@@ -143,7 +143,7 @@ YLIST Ylist_create()
 **************************************************************************/
 
 YLIST Ylist_create_with_parms(comp)
-INT (*comp)();
+INT (*comp)(void *, void*);
 {
   YLIST list = allocate_list();
 
@@ -398,7 +398,7 @@ YLIST list;
 VOID Ylist_delete(list, el, user_delete)
      YLIST list;
      YLIST_EL el;
-     INT (*user_delete)();
+     INT (*user_delete)(void *);
 {
   if (el->prev)
     el->prev->next = el->next;
@@ -433,7 +433,7 @@ VOID Ylist_delete(list, el, user_delete)
 BOOL Ylist_find_and_delete(list, data, user_delete )
      YLIST list;
      VOIDPTR data;
-     INT (*user_delete)();
+     INT (*user_delete)(void *);
 {
   YLIST_EL el;
   BOOL found_it = FALSE;
diff --git a/src/Ylib/log.c b/src/Ylib/log.c
index 88dd8dec..2ed56b1f 100644
--- a/src/Ylib/log.c
+++ b/src/Ylib/log.c
@@ -61,7 +61,7 @@ void Ylog_msg( message )
 char *message ;
 {
     INT timestamp ;           /* seconds since Jan 1, 1970 */
-    char *time, *YcurTime() ; /* YcurTime returns ASCII time string */
+    char *time, *YcurTime(INT *) ; /* YcurTime returns ASCII time string */
     char filename[LRECL] ;    /* log file name */
     FILE *fp ;                /* logfile */
 
@@ -77,7 +77,7 @@ char *design ;
 char *message ;
 {
     INT timestamp ;           /* seconds since Jan 1, 1970 */
-    char *time, *YcurTime() ; /* YcurTime returns ASCII time string */
+    char *time, *YcurTime(INT *) ; /* YcurTime returns ASCII time string */
     char filename[LRECL] ;    /* log file name */
     FILE *fp ;                /* logfile */
 
diff --git a/src/Ylib/path.c b/src/Ylib/path.c
index 778cf620..5b4c2be6 100644
--- a/src/Ylib/path.c
+++ b/src/Ylib/path.c
@@ -60,7 +60,7 @@ REVISIONS:  Sep 15, 1989 - replaced which with my own version.
 #undef  LRECL
 #define LRECL	BUFSIZ
 
-static char *getpath ();
+static char *getpath (char *);
 
 /* it is up to user to free memory */
 char *Yfixpath(given_path, fileNotDir ) /* fix a path to get rid of .. */
@@ -74,11 +74,11 @@ BOOL fileNotDir; /* tells whether path is file or directory */
     char cur_dir[LRECL] ;     /* current working directory */
     char temp[LRECL] ;        /* temporary buffer */
     char *usrpath ;           /* the users environment path */
-    char *getenv() ;          /* get the users environment path */
+    char *getenv(const char *name) ;          /* get the users environment path */
     char *result ;            /* the final result */
     char *rest ;              /* the rest of the string */
     char *user ;              /* the user */
-    char *Yrelpath() ;        /* get relative path */
+    char *Yrelpath(char *, char *) ;        /* get relative path */
     char **tokens ;           /* tokenizer */
 
     /* get the current working directory */
@@ -159,7 +159,7 @@ BOOL fileNotDir; /* tells whether path is file or directory */
 }
 
 #include <pwd.h>
-struct passwd *getpwnam();
+struct passwd *getpwnam(const char *);
 char *getlogin();
 
 static char *getpath(user)     /* get path of home directory */
diff --git a/src/Ylib/plot.c b/src/Ylib/plot.c
index 846d2d88..300744a7 100644
--- a/src/Ylib/plot.c
+++ b/src/Ylib/plot.c
@@ -69,7 +69,7 @@ static INT gfilenoS = 0 ;
 static BOOL graphFilesS = TRUE ;
 
 
-static INT findType();
+static INT findType(char **, INT);
 
 void Yplot_control( toggle )
 BOOL toggle ;
diff --git a/src/Ylib/quicksort.c b/src/Ylib/quicksort.c
index 68910565..f5eb6aa2 100644
--- a/src/Ylib/quicksort.c
+++ b/src/Ylib/quicksort.c
@@ -46,10 +46,10 @@
 static  INT	qsz;			/* size of each record */
 static  INT	thresh;			/* THRESHold in chars */
 static  INT	mthresh;		/* MTHRESHold in chars */
-static  INT	(*compare_fun)();	/* comparison function */
+static  INT	(*compare_fun)(char *, char*);	/* comparison function */
 
 
-static void qst();
+static void qst(char*, char*);
 
 
 #define         compar(a,b)  (  (*compare_fun)(a,b) )
@@ -60,7 +60,7 @@ VOID Yquicksort(base, n, size, compare )
 	char	*base;
 	INT	n;
 	INT	size;
-	INT     (*compare)() ;
+	INT     (*compare)(char *, char*) ;
 {
 
 	register char c, *i, *j, *lo, *hi;
diff --git a/src/Ylib/rbtree.c b/src/Ylib/rbtree.c
index b3ca8eff..8a6cbf4f 100644
--- a/src/Ylib/rbtree.c
+++ b/src/Ylib/rbtree.c
@@ -105,7 +105,7 @@ typedef struct bin_tree {
 
 typedef struct tree {
     BINTREEPTR root ;                 /* the root of the tree */
-    INT        (*compare_func)() ;    /* how to compare two keys */
+    INT        (*compare_func)(void*, void*) ;    /* how to compare two keys */
     INT        size;                  /* current size of tree */
     BINTREEPTR intervalPtr;           /* current position in interval search */
     BINTREEPTR searchPtr;             /* current position in search */
@@ -131,13 +131,13 @@ static BINTREEPTR tree_pred( P1(BINTREEPTR ptr) ) ;
 static void left_rotate( P2(YTREEPTR tree, BINTREEPTR x) ) ;
 static void right_rotate( P2(YTREEPTR tree, BINTREEPTR x) ) ;
 static void tree_free( P1(BINTREEPTR ptr) ) ;
-static void free_tree_and_data( P2(BINTREEPTR ptr, VOID (*userDelete)() ) ) ;
-static void tree_delete( P3(YTREEPTR tree, BINTREEPTR z, VOID (*userDelete)() ) ) ;
+static void free_tree_and_data( P2(BINTREEPTR ptr, VOID (*userDelete)(void *) ) ) ;
+static void tree_delete( P3(YTREEPTR tree, BINTREEPTR z, VOID (*userDelete)(void *) ) ) ;
 static void tree_dump( P4(YTREEPTR tree,BINTREEPTR ptr,
-    		    VOID (*print_key)(),INT printTab) ) ;
+    		    VOID (*print_key)(char *),INT printTab) ) ;
 
 YTREEPTR Yrbtree_init( compare_func )
-INT (*compare_func)() ;  /* user specifies key function */
+INT (*compare_func)(void*, void*) ;  /* user specifies key function */
 {
 
     YTREEPTR tree ;      /* the current tree being built */
@@ -169,7 +169,7 @@ static BINTREEPTR tree_search( tree, key )
 YTREEPTR tree ;
 char *key ;
 {
-    INT (*comp_func)() ;      /* current compare function */
+    INT (*comp_func)(void *, void*) ;      /* current compare function */
     BINTREEPTR ptr ;            /* current node in the tree */
     INT k ;                   /* test condition [-1,0,1] */
 
@@ -193,7 +193,7 @@ VOIDPTR Yrbtree_search( tree, key )
 YTREEPTR tree ;
 VOIDPTR key ;
 {
-    INT (*comp_func)() ;      /* current compare function */
+    INT (*comp_func)(void *, void*) ;      /* current compare function */
     BINTREEPTR ptr ;          /* current node in the tree */
     INT k ;
 
@@ -221,7 +221,7 @@ YTREEPTR tree ;
 VOIDPTR key ;
 INT func ;
 {
-    INT (*comp_func)() ;      /* current compare function */
+    INT (*comp_func)(void *, void*) ;      /* current compare function */
     BINTREEPTR ptr ;          /* current node in the tree */
     BINTREEPTR closest_ptr ;  /* current closest match in the tree */
     BINTREEPTR suc, pred ;    /* successor and predecessor for closest_ptr */
@@ -483,7 +483,7 @@ BINTREEPTR x ;
 static void tree_delete( tree, z, userDelete )
 YTREEPTR tree ;
 BINTREEPTR z ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
     BINTREEPTR w ;            /* a temporary pointer */
     BINTREEPTR x ;            /* a temporary pointer */
@@ -594,7 +594,7 @@ VOIDPTR data ;
     BINTREEPTR z ;          /* a temporary pointer */
     BINTREEPTR nil ;          /* a temporary pointer */
     BINTREEPTR ptr ;          /* a temporary pointer */
-    INT (*comp_func)() ;      /* current compare function */
+    INT (*comp_func)(void *, void*) ;      /* current compare function */
 
     if(!(data)){
 	M( ERRMSG, "Yrbtree_insert","No data given\n" ) ;
@@ -758,7 +758,7 @@ YTREEPTR tree;
 BOOL Yrbtree_delete( tree, key, userDelete )
 YTREEPTR tree ;
 VOIDPTR key ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
     BINTREEPTR z ;            /* a temporary pointer */
 
@@ -774,7 +774,7 @@ VOID (*userDelete)();
 
 BOOL Yrbtree_deleteCurrentInterval( tree, userDelete )
 YTREEPTR tree ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
     BINTREEPTR z ;            /* a temporary pointer */
     BINTREEPTR w ;            /* a temporary pointer */
@@ -805,7 +805,7 @@ VOID (*userDelete)();
 
 BOOL Yrbtree_deleteCurrentEnumerate( tree, userDelete )
 YTREEPTR tree ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
     BINTREEPTR z ;            /* a temporary pointer */
     BINTREEPTR w ;            /* a temporary pointer */
@@ -837,7 +837,7 @@ VOID (*userDelete)();
 static void tree_dump( tree, ptr, print_key, printTab )
 YTREEPTR tree ;
 BINTREEPTR ptr ;
-VOID (*print_key)() ;
+VOID (*print_key)(char *) ;
 INT printTab ;
 {
     INT  i ;
@@ -866,7 +866,7 @@ INT printTab ;
 
 VOID Yrbtree_dump( tree, print_key )
 YTREEPTR tree ;
-VOID (*print_key)() ;
+VOID (*print_key)(char *) ;
 {
     if( tree ){
         Yrbtree_verify(tree);
@@ -881,7 +881,7 @@ VOIDPTR low_key, high_key ;
 BOOL startFlag;
 {
     BINTREEPTR ptr ;                  /* remember where we are */
-    static INT (*comp_func)() ;       /* current compare function */
+    static INT (*comp_func)(void *, void*) ;       /* current compare function */
     BINTREEPTR y ;                    /* remember where we are */
 
     comp_func = tree->compare_func ;
@@ -934,7 +934,7 @@ INT Yrbtree_interval_size( tree, low_key, high_key )
 YTREEPTR tree ;
 VOIDPTR low_key, high_key ;
 {
-    static INT (*comp_func)() ;       /* current compare function */
+    static INT (*comp_func)(void *, void*) ;       /* current compare function */
     INT size ;			      /* number of element in interval */
     BINTREEPTR ptr ;                  /* remember where we are */
     BINTREEPTR y ;                    /* remember where we are */
@@ -1007,7 +1007,7 @@ YTREEPTR tree;
 VOID Yrbtree_interval_free( tree, low_key, high_key, userDelete )
 YTREEPTR tree ;
 VOIDPTR low_key, high_key ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
 
   VOIDPTR data ;
@@ -1036,7 +1036,7 @@ BINTREEPTR ptr ;
 
 static void free_tree_and_data( ptr, userDelete )
 BINTREEPTR ptr ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
 
     if( ptr->left != nilS ){
@@ -1053,7 +1053,7 @@ VOID (*userDelete)();
 
 VOID Yrbtree_free( tree, userDelete )
 YTREEPTR tree ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
     if( tree ){
 	Yrbtree_empty( tree,userDelete ) ;
@@ -1063,7 +1063,7 @@ VOID (*userDelete)();
 
 VOID Yrbtree_empty( tree, userDelete )
 YTREEPTR tree ;
-VOID (*userDelete)();
+VOID (*userDelete)(void *);
 {
   if( tree ){
     if (tree->root != nilS) {             /* does tree need to be emptied? */
@@ -1104,7 +1104,7 @@ YTREEPTR tree ;
     return (-1);
 } /* end Yrbtree_size */
 
-INT (*Yrbtree_get_compare( tree ))()
+INT (*Yrbtree_get_compare( tree ))(void *, void*)
 YTREEPTR tree;
 {
   return ( tree->compare_func );
@@ -1150,7 +1150,7 @@ INT Yrbtree_verify(tree)
 
 VOID Yrbtree_resort( tree, compare_func )
 YTREEPTR tree ;
-INT (*compare_func)() ;  /* user specifies key function */
+INT (*compare_func)(void*, void*) ;  /* user specifies key function */
 {
     BINTREEPTR ptr ;          /* remember where we are */
     YTREEPTR new_tree ;       /* the new tree being built */
@@ -1185,7 +1185,7 @@ INT (*compare_func)() ;  /* user specifies key function */
 
 YTREEPTR Yrbtree_copy( tree, compare_func )
 YTREEPTR tree ;
-INT (*compare_func)() ;  /* user specifies key function */
+INT (*compare_func)(void*, void*) ;  /* user specifies key function */
 {
     BINTREEPTR ptr ;          /* remember where we are */
     YTREEPTR new_tree ;       /* the new tree being built */
diff --git a/src/Ylib/relpath.c b/src/Ylib/relpath.c
index 826629d4..9893ae95 100644
--- a/src/Ylib/relpath.c
+++ b/src/Ylib/relpath.c
@@ -58,7 +58,7 @@ char *known_path, *rel_path ; /* known path and relative path to it */
     char known_fpath[LRECL] ; /* full path of known obj */
     char *ptr ;               /* used to replace obj with relative path */
     char *result ;            /* resulting path */
-    char *Yfixpath(), *strrchr(), *strcat() ;
+    char *Yfixpath(char *, BOOL), *strrchr(const char *s, int c), *strcat(char *, const char *) ;
     INT  up ;              /* keeps count of backtracking up dir tree */
 
     /* make a copy of path */
diff --git a/src/Ylib/stats.c b/src/Ylib/stats.c
index ec747e99..d720aa10 100644
--- a/src/Ylib/stats.c
+++ b/src/Ylib/stats.c
@@ -93,7 +93,7 @@ FILE *fout ;
     DOUBLE	scale		;
     DOUBLE	run_time	;
 
-    char *YcurTime();	/* Forward declaration */
+    char *YcurTime(INT *);	/* Forward declaration */
 
     struct rusage	rusage	;
     struct rlimit 	rlp	;
diff --git a/src/Ylib/system.c b/src/Ylib/system.c
index 074bf344..1b58cd15 100644
--- a/src/Ylib/system.c
+++ b/src/Ylib/system.c
@@ -99,7 +99,7 @@ char *files ;
 char *Ygetenv( env_var )
 char *env_var ;
 {
-    char *getenv() ;
+    char *getenv(const char*) ;
 
     return( (char *) getenv( env_var ) ) ;
 
diff --git a/src/Ylib/wgraphics.c b/src/Ylib/wgraphics.c
index 12def50b..18442614 100644
--- a/src/Ylib/wgraphics.c
+++ b/src/Ylib/wgraphics.c
@@ -103,8 +103,8 @@ INT  numC ;
 char **desiredColors ;
 {
 
-    char *Yfixpath() ;
-    char *Ygetenv() ;
+    char *Yfixpath(char *, BOOL) ;
+    char *Ygetenv(char *) ;
 
     if(!(dirNameS = Ygetenv( "DATADIR" ))){
 	/* find fullpathname of data directory */
diff --git a/src/Ylib/ydebug.c b/src/Ylib/ydebug.c
index 53d67873..1f58787a 100644
--- a/src/Ylib/ydebug.c
+++ b/src/Ylib/ydebug.c
@@ -170,7 +170,7 @@ BOOL flag ;
 
     if( flag ){
 	/* initialize tree of routine name */
-	YRBTREE_INIT( debug_treeS, compare_routine );
+	YRBTREE_INIT( debug_treeS, (void *)compare_routine );
 	line = 0 ;
 	if( fp = TWOPEN( DBGFILE, "r", NOABORT ) ){
 	    while( bufferptr=fgets(buffer,LRECL,fp )){
diff --git a/src/genrows/draw.c b/src/genrows/draw.c
index 31253c6c..36696cc7 100644
--- a/src/genrows/draw.c
+++ b/src/genrows/draw.c
@@ -122,24 +122,24 @@ static TWDIALOGPTR macro_dialogS ;
 
 #include <menus.h>
 
-static void draw_tile();
-static void draw_macro();
-static void draw_fs();
+static void draw_tile(TILE_BOX *);
+static void draw_macro(INT, INT);
+static void draw_fs(MACROPTR);
 static void last_chance();
 static void no_move_message();
-static void save_for_do();
+static void save_for_do(INT);
 static void update_macro();
 static void graphics_dump();
-static INT pick_macro();
-static TILE_BOX *pick_tile();
+static INT pick_macro(char *);
+static TILE_BOX *pick_tile(char *);
 static ROW_BOX *pick_row();
-static BOOL edit_tiles();
-static void edit_macro();
-static void update_vertices();
-static void rotate_vertices();
-static void find_nearest_corner();
-static void highlight_corner();
-static void outm();
+static BOOL edit_tiles(TILE_BOX *);
+static void edit_macro(int, int, int);
+static void update_vertices(INT, INT, INT);
+static void rotate_vertices(MACROPTR, INT);
+static void find_nearest_corner(INT, INT, INT, INT*, INT*);
+static void highlight_corner(INT, INT, INT);
+static void outm(INT, char *, char *);
 
 /* forward declarations */
 void edit_row(ROW_BOX* rowptr );
@@ -151,9 +151,6 @@ char *argv[] ;
 {
 
     char *host ;
-    char *Ygetenv() ;
-    void draw_the_data() ;
-
 
     if( !(graphicsG) ){
 	return ;
@@ -509,7 +506,7 @@ process_graphics()
     INT minlength ;     /* minimum length of a tile */
     DOUBLE tempf ;      /* user reply transformed to float */
     /* static INT pick_macro(); */ /* get macro from user */
-    INT pick_macro(); /* get macro from user */
+    INT pick_macro(char *); /* get macro from user */
     char *reply ;       /* user reply to a querry */
     char filename[LRECL];/* file name */
     BOOL ok ;           /* loop until this value is true */
@@ -517,7 +514,7 @@ process_graphics()
     FILE *fp ;          /* restore file */
     TILE_BOX *tile ;    /* traverse list of tiles */
     /* static TILE_BOX *pick_tile() ; */ /* used to pick a tile */
-    TILE_BOX *pick_tile() ; /* used to pick a tile */
+    TILE_BOX *pick_tile(char *) ; /* used to pick a tile */
     TILE_BOX *cur_tile ; /* currently lit up tile */
     /* static ROW_BOX *pick_row() ; */ /* used to pick a row */
     ROW_BOX *pick_row() ; /* used to pick a row */
@@ -1520,8 +1517,8 @@ INT field ;
     case NOFORCECASE:
 	sprintf( answer[STARTF].string, "%d", selected_tileS->llx + spacingG ) ;
 	sprintf( answer[MAXF].string, "%d", selected_tileS->urx - spacingG ) ;
-	answer[STARTF].bool = TRUE ;
-	answer[MAXF].bool = TRUE ;
+	answer[STARTF].boolx = TRUE ;
+	answer[MAXF].boolx = TRUE ;
 	break ;
     case ROWF:
 	row_height = get_row_height( answer ) ;
@@ -1688,20 +1685,20 @@ TILE_BOX *tile ;
 
     if( answer = TWdialog( dialogS, "genrows", update_tile_data ) ){
 	/* must be the number of the case field */
-	if( answer[LEGALCASE].bool ){
+	if( answer[LEGALCASE].boolx ){
 	    /* the tile is legal */
 	    tile->illegal = FALSE ;
-	} else if( answer[ILLEGALCASE].bool ){
+	} else if( answer[ILLEGALCASE].boolx ){
 	    tile->illegal = TRUE ;
 	}
-	if( answer[MIRRORCASE].bool ){
+	if( answer[MIRRORCASE].boolx ){
 	    tile->mirror = TRUE ;
-	} else if( answer[NOMIRRORCASE].bool ){
+	} else if( answer[NOMIRRORCASE].boolx ){
 	    tile->mirror = FALSE ;
 	}
-	if( answer[FORCECASE].bool ){
+	if( answer[FORCECASE].boolx ){
 	    tile->force = TRUE ;
-	} else if( answer[NOFORCECASE].bool ){
+	} else if( answer[NOFORCECASE].boolx ){
 	    tile->force = FALSE ;
 	    if( old_force != tile->force ){
 		/* only do this on a change */
@@ -1709,7 +1706,7 @@ TILE_BOX *tile ;
 		tile->max_length = tile->urx - tile->llx - 2 * spacingG ;
 	    }
 	}
-	if( answer[ROWF].bool ){
+	if( answer[ROWF].boolx ){
 	    /* means the user change the field */
 	    temp = get_row_height( answer ) ;
 	    if( temp <= 0 ){
@@ -1717,7 +1714,7 @@ TILE_BOX *tile ;
 	    }
 	    tile->actual_row_height = temp ;
 	}
-	if( answer[MAXROWF].bool ){
+	if( answer[MAXROWF].boolx ){
 	    /* means the user change the field */
 	    rows = atoi( answer[MAXROWF].string ) ;
 	    if( rows < 0 ){ 
@@ -1738,7 +1735,7 @@ TILE_BOX *tile ;
 	    tile->numrows = rows ;
 	    tile->channel_separation = sep ;
 	}
-	if( answer[NUMROWF].bool ){
+	if( answer[NUMROWF].boolx ){
 	    /* means the user change the field */
 	    rows = atoi( answer[NUMROWF].string ) ;
 	    if( rows < 0 ){ 
@@ -1759,7 +1756,7 @@ TILE_BOX *tile ;
 		tile->numrows = max_rows ;
 	    }
 	}
-	if( answer[MINF].bool ){
+	if( answer[MINF].boolx ){
 	    /* means the user change the field */
 	    temp = atoi( answer[MINF].string ) ;
 	    if( temp <= 0 ){
@@ -1769,7 +1766,7 @@ TILE_BOX *tile ;
 	    }
 	    tile->min_length = temp ;
 	}
-	if( answer[MAXF].bool ){
+	if( answer[MAXF].boolx ){
 	    /* means the user change the field */
 	    temp = atoi( answer[MAXF].string ) ;
 	    if( temp < tile->llx  ){
@@ -1784,7 +1781,7 @@ TILE_BOX *tile ;
 	    }
 	    tile->max_length = temp - tile->llx - tile->row_start ;
 	}
-	if( answer[STARTF].bool ){
+	if( answer[STARTF].boolx ){
 	    /* means the user change the field */
 	    temp = atoi( answer[STARTF].string ) ;
 	    if( temp < tile->llx ){
@@ -1807,11 +1804,11 @@ TILE_BOX *tile ;
 		"Note:resetting maximum length of row." ) ;
 	    }
 	}
-	if( answer[SEPF].bool ){
+	if( answer[SEPF].boolx ){
 	    /* means the user change the field */
 	    tile->channel_separation = get_row_sep( answer ) ;
 	}
-	if( answer[CLASSF].bool ){
+	if( answer[CLASSF].boolx ){
 	    /* means the user change the field */
 	    temp = atoi( answer[CLASSF].string ) ;
 	    if( temp <= 0 ){
@@ -1887,7 +1884,7 @@ ROW_BOX *rowptr ;
 
     /* Now call the dialog box */
     if( answer = TWdialog( row_dialogS, "row", NULL ) ){
-	if( answer[CLASS_F].bool ){
+	if( answer[CLASS_F].boolx ){
 	    /* means the user change the field */
 	    temp = atoi( answer[CLASS_F].string ) ;
 	    if( temp <= 0 ){
@@ -1896,9 +1893,9 @@ ROW_BOX *rowptr ;
 	    }
 	    rowptr->class = temp ;
 	}
-	if( answer[MIRRORCASE_F].bool ){
+	if( answer[MIRRORCASE_F].boolx ){
 	    rowptr->mirror = TRUE ;
-	} else if( answer[NOMIRRORCASE_F].bool ){
+	} else if( answer[NOMIRRORCASE_F].boolx ){
 	    rowptr->mirror = FALSE ;
 	}
     }
@@ -1957,14 +1954,14 @@ INT field ;
 	pos = atoi( answer[XPOSF].string ) ;
 	pos += deltax ;
 	sprintf( answer[XPOSF].string, "%d", pos ) ;
-	answer[XPOSF].bool = TRUE ;
+	answer[XPOSF].boolx = TRUE ;
 	sprintf( answer[DELTAXF].string, "0" ) ;
     }
     if( deltay != 0 ){
 	pos = atoi( answer[YPOSF].string ) ;
 	pos += deltay ;
 	sprintf( answer[YPOSF].string, "%d", pos ) ;
-	answer[YPOSF].bool = TRUE ;
+	answer[YPOSF].boolx = TRUE ;
 	sprintf( answer[DELTAYF].string, "0" ) ;
     }
 } /* end update_macro_data */
@@ -2008,7 +2005,7 @@ static void edit_macro(int macro,int xoff, int yoff )
     old_orient = macroArrayG[selectMacroS]->orient ;
 
     if( answer = TWdialog( macro_dialogS, "macro", update_macro_data )){
-	if( answer[XPOSF].bool ){
+	if( answer[XPOSF].boolx ){
 	    /* means the user change the field */
 	    pos = atoi( answer[XPOSF].string ) ;
 	    /* calculate the new center of the macro */
@@ -2016,7 +2013,7 @@ static void edit_macro(int macro,int xoff, int yoff )
 	} else {
 	    x = mptr->xcenter ;
 	}
-	if( answer[YPOSF].bool ){
+	if( answer[YPOSF].boolx ){
 	    /* means the user change the field */
 	    pos = atoi( answer[YPOSF].string ) ;
 	    /* calculate the new center of the macro */
diff --git a/src/genrows/genrows.c b/src/genrows/genrows.c
index 7477de4c..b2044a58 100644
--- a/src/genrows/genrows.c
+++ b/src/genrows/genrows.c
@@ -116,7 +116,7 @@ static INT feed_lengthS = 0 ;       /* length of feeds */
 
 static YTREEPTR tile_memoryG ;
 static void reset_tile_parameters();
-static INT compare_tiles();
+static INT compare_tiles(TILE_BOX *, TILE_BOX *);
 void grid_rows();
 void set_spacing();
 void init_vertex_list(INT left, INT bottom, INT right, INT top );
@@ -145,7 +145,7 @@ void init_data_structures()
     limitMergeG = FALSE;
     spacingG = 1 ;
     memoryG = TRUE ;
-    tile_memoryG = Yrbtree_init( compare_tiles ) ;
+    tile_memoryG = Yrbtree_init( (void *)compare_tiles ) ;
 } /* end init_data_structures */
 
 void set_feed_length( percent )
@@ -1808,8 +1808,8 @@ void check_overlap()
     INT match ;
     MACRO_TILE *tilea ;
     MACRO_TILE *tileb ;
-    INT projectX() ;
-    INT projectY() ;
+    INT projectX(INT,INT,INT,INT) ;
+    INT projectY(INT,INT,INT,INT) ;
 
     invalidG = FALSE ;
     for( macro = 1; macro <= num_macrosG; macro++ ){
diff --git a/src/genrows/globals.h b/src/genrows/globals.h
index da187a7c..64ad27b5 100644
--- a/src/genrows/globals.h
+++ b/src/genrows/globals.h
@@ -185,4 +185,7 @@ EXTERN  BOOL     memoryG ;        /* try to remember last state */
 EXTERN  BOOL     no_outputG ;     /* when TRUE no .blk file */
 /* ********************** end global variables ******************** */
 
+
+void draw_the_data();
+
 #endif /* GLOBALS_H */
diff --git a/src/genrows/merge.c b/src/genrows/merge.c
index 42c0aabc..15f61198 100644
--- a/src/genrows/merge.c
+++ b/src/genrows/merge.c
@@ -54,7 +54,7 @@ REVISIONS:  Fri Jan 25 17:50:54 PST 1991 - added mirror row feature.
 
 
 
-static void check_max_length();
+static void check_max_length(TILE_BOX *);
 static void merge_adjacent_tiles();
 void merge_downward( TILE_BOX *begin_tile );
 void merge_upward( TILE_BOX *begin_tile );
diff --git a/src/genrows/readpar.c b/src/genrows/readpar.c
index 73f2336d..fd608f6e 100644
--- a/src/genrows/readpar.c
+++ b/src/genrows/readpar.c
@@ -65,8 +65,8 @@ REVISIONS:  Sat Feb 23 00:35:01 EST 1991 - added wildcarding.
 static BOOL abortS = FALSE ;
 
 
-static void err_msg(); 
-static void get_defaults();
+static void err_msg(char *); 
+static void get_defaults(BOOL, BOOL);
 static int getnumRows();
 
 
diff --git a/src/mc_compact/cdraw.c b/src/mc_compact/cdraw.c
index 58d0edfa..aa32b807 100644
--- a/src/mc_compact/cdraw.c
+++ b/src/mc_compact/cdraw.c
@@ -59,6 +59,7 @@ REVISIONS:  Apr 25, 1989 - added graphics loop to program.
 #include <yalecad/message.h>
 #include <yalecad/draw.h>
 #include <yalecad/colors.h>
+#include <yalecad/system.h>
 #include <yalecad/debug.h>
 #include <compact.h>
 
@@ -90,14 +91,14 @@ static BOOL drawChanGraphS = TRUE ;
 static INT  zspanS ;
 
 void draw_changraph();
+void draw_the_data();
 
 void init_graphics( argc, argv, windowId )
 INT argc, windowId ;
 char *argv[] ;
 {
-    char *host, *Ygetenv() ;
+    char *host;
     int  xpandx, xpandy ;
-    void draw_the_data() ;
 
     /* we need to find host for display */
     if(!(host = Ygetenv("DISPLAY"))) {
@@ -393,7 +394,7 @@ void process_graphics()
     BOOL ok ;           /* loop until this value is true */
     BOOL movedCell ; /* lets us know whether we have to update cellbins */
     INFOPTR stretch_edge ; /* the edge to be ref. for stretch */
-    INFOPTR get_closest_edge() ;
+    INFOPTR get_closest_edge(INT, INT) ;
 
     /* data might have changed so show user current config */
     /* any function other that the draw controls need to worry about */
diff --git a/src/mc_compact/changraph.c b/src/mc_compact/changraph.c
index 9373cd1c..b48cfc34 100644
--- a/src/mc_compact/changraph.c
+++ b/src/mc_compact/changraph.c
@@ -114,7 +114,7 @@ INT cell_rt ; /* cell on right (top) for  vert (horz) channel */
     static int edgeCountS = 0 ;  /* current number of edges */
     ADJPTR newfE,  /* new forward edge */
            temp ;  /* temporary pointer to relink adjacency list */
-    ADJPTR findAdjPtr() ; /* returns an edge given two nodes */
+    ADJPTR findAdjPtr(INT,INT) ; /* returns an edge given two nodes */
     INFOPTR iptr ; /* store this only once for each edge */
 
     /* form an undirected graph */
diff --git a/src/mc_compact/compact.h b/src/mc_compact/compact.h
index d85b81aa..15ff65e1 100644
--- a/src/mc_compact/compact.h
+++ b/src/mc_compact/compact.h
@@ -339,4 +339,5 @@ EXTERN INT ygridG ;       /* force cells to given y grid */
 EXTERN INT xspaceG ;      /* xspacing between tiles of different cells */
 EXTERN INT yspaceG ;      /* yspacing between tiles of different cells */
 
+
 #endif /* COMPACT_H */
diff --git a/src/mc_compact/movestrat.c b/src/mc_compact/movestrat.c
index 71e7740d..76e13965 100644
--- a/src/mc_compact/movestrat.c
+++ b/src/mc_compact/movestrat.c
@@ -66,9 +66,9 @@ REVISIONS:  Oct 24, 1988 - fixed +1 error.  Now check for graph
     */
 
 
-static int find_bound();
-static int findxerror();
-static int findyerror();
+static int find_bound(COMPACTPTR, int,int);
+static int findxerror(COMPACTPTR *, COMPACTPTR *);
+static int findyerror(COMPACTPTR *, COMPACTPTR *);
 
 void update_cell_tiles(int cell, int deltax, int deltay );
 
diff --git a/src/mc_compact/movestrat2.c b/src/mc_compact/movestrat2.c
index a3ebe769..2cbc7cef 100644
--- a/src/mc_compact/movestrat2.c
+++ b/src/mc_compact/movestrat2.c
@@ -76,11 +76,12 @@ static DOUBLE best_areaS = 1.0E30 ;
 
 static void x_center();
 static void calc_xslacks( int cur_cell );
-static void update_xslacks();
+static void update_xslacks(COMPACTPTR);
 static void y_center();
 static void calc_yslacks( int cur_cell );
-static void update_yslacks();
-static INT sortby_xslack();
+static void update_yslacks(COMPACTPTR);
+static INT sortby_xslack(CELLBOXPTR*, CELLBOXPTR*);
+static INT sortby_yslack(CELLBOXPTR *cellA , CELLBOXPTR *cellB);
 
 
 #define HEURISTIC1
@@ -220,7 +221,6 @@ static void x_center()
 		   remainder,
 		   xmin,  xmax,
 		   min, max,
-    		   sortby_xslack(),
 		   delta_move ;
     INT            newpos ;
     COMPACTPTR     boxptr ;
@@ -548,7 +548,6 @@ static void y_center()
 		   min,   max,
 		   ymin,  ymax,
 		   delta_move ;
-    INT		   sortby_yslack();
     INT            newpos ;
     COMPACTPTR     boxptr ;
     NODEPTR        nptr ;
diff --git a/src/mc_compact/multi.c b/src/mc_compact/multi.c
index fdc741a3..4c7993bc 100644
--- a/src/mc_compact/multi.c
+++ b/src/mc_compact/multi.c
@@ -65,14 +65,14 @@ static ERRORPTR multiS = NULL ;  /* list of multiple tile adjacencies */
 static VERTEXPTR vertex_listS = NIL( VERTEX_BOX *) ;  /* head of the list */
 
 
-static void preprocess_multi();
-static BOOL fix_tiles();
-static void add_to_multi_list();
-static BOOL find_tile();
-static void init_vertex_list();
+static void preprocess_multi(BOOL);
+static BOOL fix_tiles(COMPACTPTR, COMPACTPTR);
+static void add_to_multi_list(COMPACTPTR, COMPACTPTR);
+static BOOL find_tile(INT *, INT *, INT *, INT *);
+static void init_vertex_list(INT,INT,INT,INT);
 static void add_extra_points();
-static void swap();
-static void add_pt();
+static void swap(INT *a, INT *b);
+static void add_pt( INT, INT, INT );
 static void free_vertex_list();
 
 
diff --git a/src/mc_compact/readcgraph.c b/src/mc_compact/readcgraph.c
index 76a9294c..a52f0365 100644
--- a/src/mc_compact/readcgraph.c
+++ b/src/mc_compact/readcgraph.c
@@ -299,7 +299,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/mc_compact/readcgraph_l.h b/src/mc_compact/readcgraph_l.h
index e842ea6a..2ffb1835 100644
--- a/src/mc_compact/readcgraph_l.h
+++ b/src/mc_compact/readcgraph_l.h
@@ -50,7 +50,7 @@ REVISIONS:  Oct 6, 1988 - fixed sign mistake in INTEGER & FLOAT
 #define PADTOKENOFFSET(v)  ( &(v[6]) )  /* 6 because 6 pad tokens */
 
 static INT screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
@@ -141,7 +141,6 @@ static struct rw_table {  /* reserved word table */
 static INT screen() 
 {
     INT c ;
-    char *Ystrclone() ;
     struct rw_table  *low = rwtable,        /* ptr to beginning */
 		     *mid ,  
 		     *high = END(rwtable) ;   /* ptr to end */
diff --git a/src/mc_compact/readtiles.c b/src/mc_compact/readtiles.c
index c8036cbf..5c2383a0 100644
--- a/src/mc_compact/readtiles.c
+++ b/src/mc_compact/readtiles.c
@@ -290,7 +290,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/mc_compact/readtiles_l.h b/src/mc_compact/readtiles_l.h
index dbfa39f6..84e39322 100644
--- a/src/mc_compact/readtiles_l.h
+++ b/src/mc_compact/readtiles_l.h
@@ -54,7 +54,7 @@ REVISIONS:  Oct 6, 1988 - fixed sign mistake in INTEGER & FLOAT
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static int screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
diff --git a/src/mc_compact/xcompact.c b/src/mc_compact/xcompact.c
index f2539d3a..382ecdb2 100644
--- a/src/mc_compact/xcompact.c
+++ b/src/mc_compact/xcompact.c
@@ -72,7 +72,7 @@ void buildXGraph()
     int i ;                    /* counter */
     int overlapx ;             /* overlap conditions in x direction */
     int overlapy ;             /* overlap conditions in y direction */
-    int sortbyXY() ;           /* sort the tiles X then Y */
+    int sortbyXY(COMPACTPTR *,COMPACTPTR *) ;           /* sort the tiles X then Y */
     int left, right ;          /* coordinates of tiles */
     int bottom, top ;          /* coordinates of tiles */
     BOOL firstPick ;           /* TRUE if first picket which matches */
diff --git a/src/mc_compact/ycompact.c b/src/mc_compact/ycompact.c
index d942c2fb..a1773930 100644
--- a/src/mc_compact/ycompact.c
+++ b/src/mc_compact/ycompact.c
@@ -71,7 +71,7 @@ ERRORPTR buildYGraph()
     int i ;                    /* counter */
     int overlapx ;             /* overlap conditions in x direction */
     int overlapy ;             /* overlap conditions in y direction */
-    int sortbyYX() ;           /* sort the tiles Y then X */
+    int sortbyYX(COMPACTPTR *,COMPACTPTR *) ;           /* sort the tiles Y then X */
     int left, right ;          /* coordinates of tiles */
     int bottom, top ;          /* coordinates of tiles */
     BOOL firstPick ;           /* TRUE if first picket which matches */
diff --git a/src/mincut/main.c b/src/mincut/main.c
index 166c2da7..1eccb70b 100644
--- a/src/mincut/main.c
+++ b/src/mincut/main.c
@@ -59,6 +59,8 @@ REVISIONS:  Dec  8, 1989 - now write temp file to be moved later so
 #include <yalecad/cleanup.h>
 #include <yalecad/file.h>
 #include <yalecad/message.h>
+#include <yalecad/program.h>
+#include <yalecad/string.h>
 #include <yalecad/debug.h>
 #include "globals.h"
 #include "output.h"
@@ -74,7 +76,6 @@ void syntax(void);
 int main(int argc, char **argv)
 {
 
-  char *YinitProgram(), *Ystrclone() ;
   char filename[LRECL] ;
   char command[LRECL] ;
   char *ptr ;
@@ -82,7 +83,7 @@ int main(int argc, char **argv)
   void yaleIntro() ;
   int  debug ;
   FILE *fp ;
-  char *twdir, *Ygetenv() ;
+  char *twdir;
 
   /* start up cleanup handler */
   YINITCLEANUP( argv[0], NULL, MAYBEDUMP ) ;
diff --git a/src/mincut/readcells.c b/src/mincut/readcells.c
index 0c583d20..64d6f3ee 100644
--- a/src/mincut/readcells.c
+++ b/src/mincut/readcells.c
@@ -833,7 +833,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/mincut/readcells_l.h b/src/mincut/readcells_l.h
index 1388c088..45ad613a 100644
--- a/src/mincut/readcells_l.h
+++ b/src/mincut/readcells_l.h
@@ -60,7 +60,7 @@ REVISIONS:  Oct 6, 1988 - fixed sign mistake in INTEGER & FLOAT
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static int screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
diff --git a/src/syntax/main.c b/src/syntax/main.c
index 0353ba34..cf0b01b0 100644
--- a/src/syntax/main.c
+++ b/src/syntax/main.c
@@ -58,6 +58,8 @@ REVISIONS:  Dec  8, 1989 - now write temp file to be moved later so
 #include <yalecad/file.h>
 #include <yalecad/message.h>
 #include <yalecad/debug.h>
+#include <yalecad/program.h>
+#include <yalecad/string.h>
 #include "globals.h"
 
 #define EXPECTEDMEMORY  (1024 * 1024)  /* 1M should be enough */
@@ -69,7 +71,6 @@ void syntax(void);
 int main(int argc, char ** argv)
 {
 
-  char *YinitProgram(), *Ystrclone() ;
   char filename[LRECL] ;
   char filename2[LRECL] ;
   char *ptr ;
diff --git a/src/syntax/readcells.c b/src/syntax/readcells.c
index b3aebbc7..f9318926 100644
--- a/src/syntax/readcells.c
+++ b/src/syntax/readcells.c
@@ -839,7 +839,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/syntax/readcells_l.h b/src/syntax/readcells_l.h
index 1e0857b8..3dffe8b9 100644
--- a/src/syntax/readcells_l.h
+++ b/src/syntax/readcells_l.h
@@ -60,7 +60,7 @@ REVISIONS:  Oct 6, 1988 - fixed sign mistake in INTEGER & FLOAT
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static int screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
diff --git a/src/twflow/autoflow.c b/src/twflow/autoflow.c
index 261d3e8a..af257e1d 100644
--- a/src/twflow/autoflow.c
+++ b/src/twflow/autoflow.c
@@ -77,7 +77,6 @@ void auto_flow()
 {
 
     ADJPTR     adjptr ;         /* current edge in graph */
-    ADJPTR     make_decision(); /* decides which way to travel */
     OBJECTPTR  o ;              /* current object */
 
     objectS = STARTOBJECT ;
@@ -129,8 +128,6 @@ void auto_flow()
 void exec_single_prog()
 {
     ADJPTR     adjptr ;         /* current edge in graph */
-    ADJPTR     get_edge_from_user(); /* decides which way to travel */
-    ADJPTR     findEdge() ;     /* find the edge for the given nodes */
     OBJECTPTR  o ;              /* current object */
     char       filename[LRECL] ;/* buffer for filename */
     FPTR       fdepend ;        /* current file in question */
@@ -200,7 +197,7 @@ ADJPTR adjptr ;
     INT        input_time ;     /* last input file which was modified */
     INT        output_time ;    /* first output file */
     INT        ftime ;          /* time file was modified */
-    INT        YgetFileTime() ; /* returns last time file was modified */
+    INT        YgetFileTime(char *) ; /* returns last time file was modified */
     char       filename[LRECL] ;/* buffer for filename */
     FPTR       fdepend ;        /* current file in question */
     BOOL       needtoExecute ;  /* TRUE if an output file doesnt exist */
diff --git a/src/twflow/globals.h b/src/twflow/globals.h
index f5a7502f..dd1da1c9 100644
--- a/src/twflow/globals.h
+++ b/src/twflow/globals.h
@@ -156,4 +156,12 @@ EXTERN BOOL autoflowG ;          /* whether autoflow is enabled */
 EXTERN BOOL problemsG ;          /* whether problems were encountered */
 EXTERN BOOL tomusG ;             /* TRUE if called from partitioning */
 
+
+ADJPTR findEdge(INT, INT, BOOL);
+ADJPTR get_edge_from_user( OBJECTPTR obj, BOOL direction );
+ADJPTR make_decision( OBJECTPTR obj, BOOL direction );
+FILE *find_flow_file( BOOL general_mode, BOOL debug, char * filename );
+char *Ygetenv(char *);
+char *Yfixpath(char *, BOOL);
+
 #endif /* GLOBALS_H */
diff --git a/src/twflow/graphics.c b/src/twflow/graphics.c
index 0feabe96..1992d496 100644
--- a/src/twflow/graphics.c
+++ b/src/twflow/graphics.c
@@ -291,7 +291,6 @@ ADJPTR get_edge_from_user( obj, direction )
 {
   ADJPTR adjptr ;
   ADJPTR start_edge ;
-  ADJPTR findEdge() ;
   INT edge_count ;
   char *answer ;
 
@@ -404,7 +403,6 @@ ADJPTR get_edge_from_user( obj, direction )
   BOOL direction ;
 {
   ADJPTR adjptr ;
-  ADJPTR findEdge() ;
   INT node1, node2 ;
   char reply[LRECL] ;
 
@@ -448,7 +446,6 @@ ADJPTR make_decision( obj, direction )
   BOOL direction ;
 {
   ADJPTR adjptr ;
-  ADJPTR get_edge_from_user() ;
 
   if( promptS ){
     adjptr = get_edge_from_user( obj, direction ) ;
diff --git a/src/twflow/main.c b/src/twflow/main.c
index daaa53b9..739da14e 100644
--- a/src/twflow/main.c
+++ b/src/twflow/main.c
@@ -92,9 +92,7 @@ int main(int argc, char ** argv )
 
   char        filename[LRECL] ;    /* buffer for filename */
   char        *ptr ;               /* argument pointer */
-  char        *Ygetenv() ;         /* get environment variable */
   FILE        *fp ;                /* file pointer */
-  FILE        *find_flow_file() ;  /* return pointer to flow file */
   BOOL        debug ;              /* TRUE if debug on */
   BOOL        general_mode ;       /* TRUE if top level user flow */
   BOOL        lock ;               /* whether to create a lock file */
diff --git a/src/twflow/program.c b/src/twflow/program.c
index a607cff7..9a303f86 100644
--- a/src/twflow/program.c
+++ b/src/twflow/program.c
@@ -69,7 +69,6 @@ REVISIONS:  Jun 19, 1989 - shortened designName to $ for substitution.
 BOOL executePgm( adjptr )
 ADJPTR adjptr ;
 {
-    char *Yfixpath() ;               /* get full pathname */
     char command[LRECL] ;
     char window_name[LRECL] ;        /* the window name */
     OBJECTPTR obj ;                  /* current object */
diff --git a/src/twflow/readobjects.c b/src/twflow/readobjects.c
index d5da93b5..58462531 100644
--- a/src/twflow/readobjects.c
+++ b/src/twflow/readobjects.c
@@ -345,7 +345,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/twflow/readobjects_l.h b/src/twflow/readobjects_l.h
index 0bdf144e..a00e3d87 100644
--- a/src/twflow/readobjects_l.h
+++ b/src/twflow/readobjects_l.h
@@ -50,7 +50,7 @@ REVISIONS:  Oct 6, 1988 - fixed sign mistake in INTEGER & FLOAT
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static INT screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
diff --git a/src/twmc/analyze.c b/src/twmc/analyze.c
index c97bcd55..13f28639 100644
--- a/src/twmc/analyze.c
+++ b/src/twmc/analyze.c
@@ -69,8 +69,8 @@ INT *count , different , cnum , c2num , *arraynet ;
 INT num_nets , tot_cels ;
 DOUBLE C , C1 , C2 , C3 , wireRatio ;
 PINBOXPTR pinptr ;
-INT comparex() ;
-DOUBLE weight_past_runs( /* wireRatio */ ) ;
+INT comparex(INT *, INT *) ;
+DOUBLE weight_past_runs( double wireRatio ) ;
 
 count  = (INT *) Ysafe_malloc( (1 + numcellsG) * sizeof( INT ) ) ;
 number = (INT **) Ysafe_malloc( (1 + numnetsG) * sizeof( INT *) ) ;
@@ -154,7 +154,7 @@ for( net = 1 ; net <= numnetsG ; net++ ) {
 }
 num = arraynet[0] ;
 arraynet[0] = arraynet[ arraynet[0] ] ;
-Yquicksort( (char *) arraynet ,  num , sizeof( INT ), comparex  ) ;
+Yquicksort( (char *) arraynet ,  num , sizeof( INT ), (void *)comparex  ) ;
 /*  sorted: most occurrences first  */
 
 num = 0 ;
diff --git a/src/twmc/compact.c b/src/twmc/compact.c
index 970f9386..10ff5b2a 100644
--- a/src/twmc/compact.c
+++ b/src/twmc/compact.c
@@ -94,10 +94,10 @@ REVISIONS:  Nov  5, 1988 - free violations and modified position of
 void compact( BOOL compactFlag )
 {
   char filename[LRECL] ;
-  char *Yrelpath() ;
+  char *Yrelpath(char *, char *) ;
   char *pathname ;
   char *twdir ;       /* path of TimberWolf directory */
-  char *getenv() ;    /* used to get TWDIR environment variable */
+  char *getenv(const char *) ;    /* used to get TWDIR environment variable */
   char buffer[LRECL], *bufferptr ;
   char **tokens ;     /* for parsing file */
   INT  numtokens, line ;
diff --git a/src/twmc/configpads.c b/src/twmc/configpads.c
index a63918ed..215816a1 100644
--- a/src/twmc/configpads.c
+++ b/src/twmc/configpads.c
@@ -196,7 +196,7 @@ BOOL retain_pad_groups ;
     INT moveable_ccw ;             /* size of pad to be moved ccw */
     INT side_open[5] ;             /* whether side has been processed */
     INT sort_overflow[5] ;         /* index for sorted overflow */
-    INT compare_overflow() ;       /* sort the sides for overflow */
+    INT compare_overflow(INT *, INT*) ;       /* sort the sides for overflow */
     PADBOXPTR padptr ;             /* current pad info */
 
     /* first accummulate the sum of all the pads on a given side */
@@ -243,7 +243,7 @@ BOOL retain_pad_groups ;
 	sort_overflow[i] = i ;
 	side_open[i] = TRUE ;
     }
-    Yquicksort( &(sort_overflow[1]), 4, sizeof(INT), compare_overflow );
+    Yquicksort( &(sort_overflow[1]), 4, sizeof(INT), (void*)compare_overflow );
     for( i = 1; i <= 4; i++ ){
 	side = sort_overflow[i] ;
 	side_open[side] = FALSE ;
diff --git a/src/twmc/gmain.c b/src/twmc/gmain.c
index 8ac0f630..2182ace9 100644
--- a/src/twmc/gmain.c
+++ b/src/twmc/gmain.c
@@ -87,10 +87,10 @@ void gmain( BOOL updateNotChan )
   /* if updateNotChan true update routing tiles otherwise normal */
 {
   char filename[LRECL] ;
-  char *Yrelpath() ;
+  char *Yrelpath(char *, char *) ;
   char *pathname ;
   char *twdir ;       /* path of TimberWolf directory */
-  char *getenv() ;    /* used to get TWDIR environment variable */
+  char *getenv(const char *) ;    /* used to get TWDIR environment variable */
   INT  windowId ;     /* windowId of current window */
   char buffer[LRECL], *bufferptr ;
   char **tokens ;     /* for parsing file */
diff --git a/src/twmc/graphics.c b/src/twmc/graphics.c
index 08582508..c688580f 100644
--- a/src/twmc/graphics.c
+++ b/src/twmc/graphics.c
@@ -167,12 +167,12 @@ static BOOL drawFS = FALSE ;
 /* Forward references */
 
 INT draw_the_data() ;
-static void draw_fs();
-static void edit_cell();
-static void edit_field_string();
-static void edit_field_case();
-static void fix_the_cell();
-static void fix_the_cell2();
+static void draw_fs(CELLBOXPTR);
+static void edit_cell(INT);
+static void edit_field_string(TWDIALOGPTR, INT, char *);
+static void edit_field_case(TWDIALOGPTR, INT, INT);
+static void fix_the_cell(INT);
+static void fix_the_cell2(INT);
 
 void set_graphics_wait_menu( TWMENUBOX menus[] );
 void twmc_draw_a_cell( int cell );
@@ -299,8 +299,8 @@ void process_graphics()
     char leftNotRight2[2]; /* reference to left or right side of core */
     char bottomNotTop2[2]; /* reference to bottom or top of core */
     DOUBLE scale ;      /* scale wireestimation */
-    DOUBLE eval_ratio() ;/* returns a double */
-    DOUBLE calc_core_factor() ; /* calculate new core */
+    DOUBLE eval_ratio(INT) ;/* returns a double */
+    DOUBLE calc_core_factor(DOUBLE) ; /* calculate new core */
 
     if(!(doGraphicsG)){
 	return ;
@@ -1194,12 +1194,12 @@ INT cell ;
     if( answer = TWdialog( dialogS, DIALOGNAME, NULL) ) {
 
 	/* if answer field has changed update position */
-	if( answer[XCENTERF].bool ){
+	if( answer[XCENTERF].boolx ){
 	    /* the xcenter has changed */
 	    ptr->xcenter = atoi( answer[XCENTERF].string ) ;
 	    movedCellS = TRUE ;
 	} 
-	if( answer[YCENTERF].bool ){
+	if( answer[YCENTERF].boolx ){
 	    /* the ycenter has changed */
 	    ptr->ycenter = atoi( answer[YCENTERF].string ) ;
 	    movedCellS = TRUE ;
@@ -1207,7 +1207,7 @@ INT cell ;
 #ifdef TI
 	/* check orientation fields */
 	for( i = 0; i <= 7; i++ ){
-	    if( answer[ORIENTBASE+i].bool ){
+	    if( answer[ORIENTBASE+i].boolx ){
 		ptr->orient = ice2tw(i+1) ;
 		break ;
 	    }
@@ -1215,7 +1215,7 @@ INT cell ;
 #else 
 	/* check orientation fields */
 	for( i = 0; i <= 7; i++ ){
-	    if( answer[ORIENTBASE+i].bool ){
+	    if( answer[ORIENTBASE+i].boolx ){
 		ptr->orient = i ;
 		break ;
 	    }
@@ -1224,7 +1224,7 @@ INT cell ;
 	/* check for valid orientation fields */
 	for( i = 0; i <= 7; i++ ){
 	    offset = VALIDSPACE * i ;
-	    if( answer[VALIDF+offset+1].bool ){
+	    if( answer[VALIDF+offset+1].boolx ){
 		ptr->orientList[i] = TRUE ;
 	    } else {
 		ptr->orientList[i] = FALSE ;
@@ -1247,13 +1247,13 @@ INT cell ;
 	    movedCellS = TRUE ;
 	}
 
-	if( answer[FIXEDF+1].bool ){
+	if( answer[FIXEDF+1].boolx ){
 	    /* this means fixed has been requested */
 	    if(!(ptr->fixed)){
 		fix_the_cell( cell ) ;
 		fix_the_cell2( cell ) ;
 	    }
-	} else if( answer[FIXEDF+2].bool ){
+	} else if( answer[FIXEDF+2].boolx ){
 	    /* this means fixed wants to be off */
 	    if( ptr->fixed ){
 		/* it is on turn it off */
diff --git a/src/twmc/initialize.c b/src/twmc/initialize.c
index b8999d73..b333ae2e 100644
--- a/src/twmc/initialize.c
+++ b/src/twmc/initialize.c
@@ -198,12 +198,12 @@ static PINBOXPTR pingroupS ;   /* current pin group record              */
 static ANALOGPTR analogS ;     /* current analog record                 */
 static SOFTBOXPTR spinptrS ;   /* current softpin record                */
 static INSTBOXPTR instS ;      /* pointer to current inst record        */
-PINBOXPTR findTerminal() ;
+PINBOXPTR findTerminal(char *, INT) ;
 /* ################## END STATIC definitions ########################## */
 
 
 
-static void check_pos();
+static void check_pos(char *, INT, INT);
 
 
 
diff --git a/src/twmc/main.c b/src/twmc/main.c
index 22e16e3c..c6b98054 100644
--- a/src/twmc/main.c
+++ b/src/twmc/main.c
@@ -133,7 +133,7 @@ int main(int argc, char ** argv)
   char    filename[LRECL],
   arguments[LRECL], /* pointer to argument options */
   *ptr,             /* pointer to argument options */
-  *Ystrclone() ;
+  *Ystrclone(char *) ;
   INT     yaleIntro(),
           attempts,
           arg_count ;       /* argument counter */
@@ -141,8 +141,8 @@ int main(int argc, char ** argv)
           rememberPenal,
           rememberRand ;
   BOOL    get_arg_string( P1(char *arguments) ) ;
-  DOUBLE  calc_init_lapFactor() ,
-          calc_init_timeFactor() ,
+  DOUBLE  calc_init_lapFactor(DOUBLE, DOUBLE) ,
+          calc_init_timeFactor(DOUBLE, DOUBLE) ,
           calc_init_coreFactor() ,
           analyze() ,
           totFunc,
diff --git a/src/twmc/outgeo.c b/src/twmc/outgeo.c
index 38063610..9cfd9b36 100644
--- a/src/twmc/outgeo.c
+++ b/src/twmc/outgeo.c
@@ -76,7 +76,7 @@ REVISIONS:  Jul 30, 1988 - made compile switch for blocking pads.
 
 
 
-static void store_pad_loc();
+static void store_pad_loc(CELLBOXPTR, INT, INT, INT, INT);
 
 
 
diff --git a/src/twmc/outpin.c b/src/twmc/outpin.c
index aa7cefcf..83b140eb 100644
--- a/src/twmc/outpin.c
+++ b/src/twmc/outpin.c
@@ -83,10 +83,9 @@ static INT  output_typeS ;      /* describe the type of circuit */
 
 
 
-static void output_pin();
-static INT find_cell();
-static void process_analog_net();
-static INT find_cell();
+static void output_pin(PINBOXPTR);
+static INT find_cell(INT);
+static void process_analog_net(NETBOXPTR);
 static void output_matches();
 
 
diff --git a/src/twmc/output.c b/src/twmc/output.c
index 3a7d6e12..fa70e373 100644
--- a/src/twmc/output.c
+++ b/src/twmc/output.c
@@ -101,14 +101,14 @@ static BOOL determine_sideS = TRUE ;   /* normally determine side */
 
 
 
-static void output_corners();
-static void output_class_orient();
-static void output_pins();
-static void output_side_n_space();
-static void output_pad_groups();
-static void output_fixed();
+static void output_corners(CELLBOXPTR);
+static void output_class_orient(CELLBOXPTR);
+static void output_pins(CELLBOXPTR);
+static void output_side_n_space(CELLBOXPTR);
+static void output_pad_groups(CELLBOXPTR);
+static void output_fixed(CELLBOXPTR);
 static void create_pl1();
-static void print_four_corners();
+static void print_four_corners(FILE *fp, CELLBOXPTR);
 static void create_pin();
 
 
diff --git a/src/twmc/overlap.c b/src/twmc/overlap.c
index d3fd648a..27a15045 100644
--- a/src/twmc/overlap.c
+++ b/src/twmc/overlap.c
@@ -92,8 +92,8 @@ static int xcS, ycS, orientS ;
 static INT minXS, maxXS, minYS, maxYS ;
 static INT newbinpenalS ;
 static INT xcostS, ycostS ;
-static void (*calc_Bins)() ;/* remember which bin function */
-static INT (*wire_est)() ; /* remember which wire estimation function */
+static void (*calc_Bins)(MOVEBOXPTR *) ;/* remember which bin function */
+static INT (*wire_est)(MOVEBOXPTR, INT, INT) ; /* remember which wire estimation function */
 
 /* global references */
 extern INT wireestxy( P3(MOVEBOXPTR pos,INT xc, INT yc) ) ;
diff --git a/src/twmc/partition.c b/src/twmc/partition.c
index 47e8e78e..9eba10bc 100644
--- a/src/twmc/partition.c
+++ b/src/twmc/partition.c
@@ -120,10 +120,10 @@ void config_rows()
 {
   DOUBLE read_par_file() ;     /* get default from user */
   INT left, right, bottom, top;/* core area */
-  char *Yrelpath() ;
+  char *Yrelpath(char *, char *) ;
   char *pathname ;
   char *twdir ;       /* path of TimberWolf directory */
-  char *getenv() ;    /* used to get TWDIR environment variable */
+  char *getenv(const char *) ;    /* used to get TWDIR environment variable */
   char filename[LRECL] ;
   BOOL stateSaved = FALSE ; /* whether need to restore state */
   BOOL get_batch_mode() ;   /* find out whether we are in batch mode */
diff --git a/src/twmc/paths.c b/src/twmc/paths.c
index 8ce4f946..57b97ee2 100644
--- a/src/twmc/paths.c
+++ b/src/twmc/paths.c
@@ -79,8 +79,8 @@ REVISIONS:  Dec  3, 1988 - completed timing driven code.
 
 /* Forward declarations */
 
-INT dcalc_min_path_len();
-INT dcalc_max_path_len();
+INT dcalc_min_path_len(INT);
+INT dcalc_max_path_len(INT);
 void add2path_set( INT path );
 void clear_path_set();
 
diff --git a/src/twmc/placepads.c b/src/twmc/placepads.c
index 294a0586..a25b9f54 100644
--- a/src/twmc/placepads.c
+++ b/src/twmc/placepads.c
@@ -817,13 +817,12 @@ void call_place_pads()
   INT line ;
   INT numnets ;
   INT numtokens ;
-  INT closegraphics() ;
   INT find_numnets() ;
   BOOL abort ;
   char **tokens ;
   char *bufferptr ;
-  char *pathname, *Yrelpath() ;
-  char *twdir, *Ygetenv() ;
+  char *pathname, *Yrelpath(char *, char *) ;
+  char *twdir;
   char filename[LRECL] ;
   char buffer[LRECL] ;
   CELLBOXPTR cellptr ;
diff --git a/src/twmc/readcells.c b/src/twmc/readcells.c
index 103d1559..ddf925a6 100644
--- a/src/twmc/readcells.c
+++ b/src/twmc/readcells.c
@@ -796,7 +796,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/twmc/readcells_l.h b/src/twmc/readcells_l.h
index 0f20f53e..fabee999 100644
--- a/src/twmc/readcells_l.h
+++ b/src/twmc/readcells_l.h
@@ -59,7 +59,7 @@ REVISIONS:  Oct 6, 1988 - fixed sign mistake in INTEGER & FLOAT
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static INT screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
diff --git a/src/twmc/readnets.c b/src/twmc/readnets.c
index b2d6d0b0..ee6da73a 100644
--- a/src/twmc/readnets.c
+++ b/src/twmc/readnets.c
@@ -379,7 +379,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/twmc/readnets_l.h b/src/twmc/readnets_l.h
index 51fb888a..5a762e44 100644
--- a/src/twmc/readnets_l.h
+++ b/src/twmc/readnets_l.h
@@ -55,7 +55,7 @@ REVISIONS:  Feb  9, 1990 - expanded ASCII character set.
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static INT screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
diff --git a/src/twmc/readpar.c b/src/twmc/readpar.c
index 2a4a4cee..f03a0cb7 100644
--- a/src/twmc/readpar.c
+++ b/src/twmc/readpar.c
@@ -101,9 +101,9 @@ static INT gridYS = INT_MIN ;
 
 
 static void init_read_par();
-static void readparam();
+static void readparam(INT);
 static void process_readpar();
-static void err_msg();
+static void err_msg(char *);
 
 
 
diff --git a/src/twmc/rmain.c b/src/twmc/rmain.c
index 915e48a1..4f17b3db 100644
--- a/src/twmc/rmain.c
+++ b/src/twmc/rmain.c
@@ -63,10 +63,10 @@ void rmain( BOOL constraint_flag )
 {
   INT closegraphics() ;
   char filename[LRECL] ;
-  char *Yrelpath() ;
+  char *Yrelpath(char *, char *) ;
   char *pathname ;
   char *twdir ;       /* path of TimberWolf directory */
-  char *getenv() ;    /* used to get TWDIR environment variable */
+  char *getenv(const char *) ;    /* used to get TWDIR environment variable */
   FILE *fp ;
 
   /* first build .gpar file for global router */
diff --git a/src/twmc/sortpad.c b/src/twmc/sortpad.c
index ec7fc8bf..632fbef4 100644
--- a/src/twmc/sortpad.c
+++ b/src/twmc/sortpad.c
@@ -57,8 +57,8 @@ REVISIONS:  Sun Jan 20 21:34:36 PST 1991 - ported to AIX.
 
 static INT compare_pads();
 static INT sort_by_pos();
-static void install_pad_groups();
-static void permute_pads();
+static void install_pad_groups(PADBOXPTR, INT*);
+static void permute_pads(PADBOXPTR);
 
 
 
diff --git a/src/twmc/uloop.c b/src/twmc/uloop.c
index 37b2e100..3ba9a0e8 100644
--- a/src/twmc/uloop.c
+++ b/src/twmc/uloop.c
@@ -115,7 +115,7 @@ REVISIONS:  July 21, 1988 - reversed order of softpin and aspect ratio
 #define TMIN      1E-6
 #define HOWMANY   0
 
-extern INT pick_position() ;
+extern INT pick_position(INT *, INT *, INT, INT) ;
 /* ----------------------------------------------------------------- 
    important global definitions - defined in custom.h 
    MOVEBOXPTR *old_aposG, *new_aposG, *old_bposG, *new_bposG ;
@@ -167,7 +167,7 @@ static DOUBLE avg_dfuncS ;  /* average random delta wirelength */
 
 
 
-static void output_move_table();
+static void output_move_table(INT *, INT *, DOUBLE *);
 
 
 
@@ -194,8 +194,8 @@ INT limit ;
 
 CELLBOXPTR acellptr , bcellptr ;
 DOUBLE range , newAspect ;
-DOUBLE calc_core_factor(), calc_lap_factor() ;
-DOUBLE calc_time_factor() ;
+DOUBLE calc_core_factor(DOUBLE), calc_lap_factor(DOUBLE) ;
+DOUBLE calc_time_factor(DOUBLE) ;
 DOUBLE percentDone ;
 DOUBLE coin_toss ;
 INT a , b ;
@@ -217,10 +217,10 @@ BOOL checkbinList() ;
 /* temperature control definitions */
 INT         m1 = 1, m2 = 1;
 DOUBLE      dCp = 0.0;
-DOUBLE      temp, eval_ratio() ;
+DOUBLE      temp, eval_ratio(INT) ;
 
 INT temp_timer, time_to_update ; /* keeps track of when to update T */
-DOUBLE iter_time, accept_deviation, calc_acceptance_ratio() ;
+DOUBLE iter_time, accept_deviation, calc_acceptance_ratio(DOUBLE) ;
 
 INT old_time, old_func ; /* keep track of previous value of penalties */
 INT delta_time, delta_func ; /* delta penalties */
diff --git a/src/twmc/unbust.c b/src/twmc/unbust.c
index 8ebac1de..8aca9c32 100644
--- a/src/twmc/unbust.c
+++ b/src/twmc/unbust.c
@@ -85,17 +85,15 @@ static BOOL addptS = FALSE ;  /* whether to add points to figures or not*/
 
 
 
-static INT find_next_state() ;
-static INT remove_redundant_points() ; 
-static INT find_next_state();
-static INT sortbyXY();
-static INT sortbyYX();
-static INT sortbyorder();
-static INT remove_redundant_points(); 
-static void add_vpts();
-static void chek_vpt();
-static void add_hpts();
-static void chek_hpt();
+static INT find_next_state(INT, POINTPTR, POINTPTR*) ;
+static INT remove_redundant_points(POINTPTR *) ; 
+static INT sortbyXY(POINTPTR *, POINTPTR *);
+static INT sortbyYX(POINTPTR *, POINTPTR *);
+static INT sortbyorder(POINTPTR *, POINTPTR *);
+static void add_vpts(INT);
+static void chek_vpt(POINTPTR,POINTPTR,POINTPTR,POINTPTR);
+static void add_hpts(INT);
+static void chek_hpt(POINTPTR,POINTPTR,POINTPTR,POINTPTR);
 
 void dump_pts( POINTPTR *pt );
 
@@ -147,9 +145,9 @@ YBUSTBOXPTR unbust()
 
      POINTPTR cur_pt ;  /* current point record */
      POINTPTR next_pt ; /* next point record */
-     INT sortbyXY() ;   /* sort horizontal points */
-     INT sortbyYX() ;   /* sort vertical points */
-     INT sortbyorder() ;/* final sort */
+     INT sortbyXY(POINTPTR *, POINTPTR *) ;   /* sort horizontal points */
+     INT sortbyYX(POINTPTR *, POINTPTR *) ;   /* sort vertical points */
+     INT sortbyorder(POINTPTR *, POINTPTR *) ;/* final sort */
      INT i ;            /* counter */
      INT count ;            /* counter */
      INT cur_state ;    /* current state */
diff --git a/src/twmc/unet.c b/src/twmc/unet.c
index 83da6c19..f08a73cc 100644
--- a/src/twmc/unet.c
+++ b/src/twmc/unet.c
@@ -44,7 +44,7 @@ CONTENTS:   INT unet( antrmptr )
 		PINBOXPTR antrmptr ;
 	    statice check_validbound( dimptr , termptr , nextptr )
 		DBOXPTR dimptr ;
-		TEBOXPTR termptr , nextptr ;
+		PINBOXPTR termptr , nextptr ;
 	    static wire_boundary1( netptr )
 		NETBOXPTR netptr ;
 	    static wire_boundary2( c , netptr )
@@ -71,9 +71,9 @@ static INT kS ;
 
 
 
-static void check_validbound();
-static void wire_boundary2();
-static void wire_boundary1();
+static void check_validbound(NETBOXPTR, PINBOXPTR, PINBOXPTR);
+static void wire_boundary2(INT, NETBOXPTR);
+static void wire_boundary1(NETBOXPTR);
 
 
 
diff --git a/src/twmc/wireest.c b/src/twmc/wireest.c
index 459400f6..02a5924e 100644
--- a/src/twmc/wireest.c
+++ b/src/twmc/wireest.c
@@ -85,7 +85,7 @@ static DOUBLE bdylengthS ;
 
 
 
-static void check_routing();
+static void check_routing(INT *);
 
 
 
diff --git a/src/twmc/wireratio.c b/src/twmc/wireratio.c
index 873e2339..b81d6718 100644
--- a/src/twmc/wireratio.c
+++ b/src/twmc/wireratio.c
@@ -122,7 +122,7 @@ void adapt_wire_estimator()
     INT *sidepins ;         /* array holding #pins for side */
     INT    l, r, b, t ;     /* the global position of the rtiles */
     INT solved ;	    /* status of gsl_linalg_SV_solve */
-    INT *find_pin_sides() ; /* find number of pins on all sides */
+    INT *find_pin_sides(INT) ; /* find number of pins on all sides */
     char filename[LRECL] ;  /* output the results of the SVD fit */
     FILE  *fp ;             /* write out the results */
     gsl_matrix *A ;              /* the matrix holding x y positions */
diff --git a/src/twsc/cell_width.c b/src/twsc/cell_width.c
index 3f470b52..fa75dc30 100644
--- a/src/twsc/cell_width.c
+++ b/src/twsc/cell_width.c
@@ -72,8 +72,8 @@ DATE:	    July 26, 1991
 
 extern INT extra_cellsG ;
 
-static INT compare_cell_length();
-static void read_pads(); 
+static INT compare_cell_length(CBOXPTR, CBOXPTR);
+static void read_pads(FILE *); 
 
 
 
@@ -134,7 +134,7 @@ TestTree    = (CBOXPTR) Ysafe_malloc( sizeof(CBOX) );
 
 
 /*------ Initialize and build the tree ------*/
-CellTree = Yrbtree_init(compare_cell_length);
+CellTree = Yrbtree_init((void *)compare_cell_length);
 for(cell = 1; cell <= numcellsG - extra_cellsG ; cell++){
 
    acellptr = carrayG[cell];                /*----Get the pointer----*/
diff --git a/src/twsc/configpads.c b/src/twsc/configpads.c
index 38918c88..2538d836 100644
--- a/src/twsc/configpads.c
+++ b/src/twsc/configpads.c
@@ -200,7 +200,6 @@ BOOL retain_pad_groups ;
     INT moveable_ccw ;             /* size of pad to be moved ccw */
     INT side_open[5] ;             /* whether side has been processed */
     INT sort_overflow[5] ;         /* index for sorted overflow */
-    INT compare_overflow() ;       /* sort the sides for overflow */
     PADBOXPTR padptr ;             /* current pad info */
 
     /* first accummulate the sum of all the pads on a given side */
diff --git a/src/twsc/findcost.c b/src/twsc/findcost.c
index 7f04f262..6a9bc834 100644
--- a/src/twsc/findcost.c
+++ b/src/twsc/findcost.c
@@ -116,7 +116,6 @@ INT pathcount , shortest_cell , count, length ;
 INT layer ;
 PATHPTR path ;
 GLISTPTR net_of_path ;
-extern char *find_layer() ;
 char *pinname ;
 
 blkleftG = INT_MAX ;
diff --git a/src/twsc/graphics.c b/src/twsc/graphics.c
index 5757b1d1..eafc99be 100644
--- a/src/twsc/graphics.c
+++ b/src/twsc/graphics.c
@@ -66,6 +66,7 @@ REVISIONS:  Jun 21, 1990 - added graphics abort macro.
 #include <yalecad/message.h>
 #include <yalecad/colors.h>
 #include <yalecad/draw.h>
+#include <yalecad/system.h>
 #include <yalecad/relpos.h>
 
 
@@ -112,7 +113,7 @@ static INT  drawNetS = 0 ; /* draw nets 0:none 1...n:net >numnets:all */
 static INT  pinsizeS ;     /* size of the pin */
 
 
-static void draw_fs();
+static void draw_fs(CBOXPTR);
 extern VOID draw_a_cell( INT );
 extern void draw_the_data() ;
 void graphics_dump();
@@ -128,7 +129,6 @@ INT windowId ;
 {
 
     char *host ;
-    char *Ygetenv() ;
     extern INT horizontal_track_pitchG ;
     extern INT vertical_track_pitchG ;
 
@@ -431,7 +431,7 @@ void draw_the_data()
     INT  layer ;
     INT last_cell ;     /* end of cells to be drawn */
     PINBOXPTR  curPin ;
-    char *pinname, *find_layer( /* pinname, layer */ ) ;
+    char *pinname;
 
     if( avoidDump || !(doGraphicsG) || !(initS) ){
 	return ;
diff --git a/src/twsc/groute.h b/src/twsc/groute.h
index d2554c58..b208681b 100644
--- a/src/twsc/groute.h
+++ b/src/twsc/groute.h
@@ -145,4 +145,6 @@ EXTERN IPBOXPTR *impFeedsG ;
 
 #undef EXTERN  
 
+SEGBOXPTR makeseg( PINBOXPTR lowptr , PINBOXPTR highptr );
+
 #endif /* GLOBE_H */
diff --git a/src/twsc/main.c b/src/twsc/main.c
index a5004093..73033016 100644
--- a/src/twsc/main.c
+++ b/src/twsc/main.c
@@ -97,6 +97,8 @@ REVISIONS:  Oct 20, 1990 - fixed problem with graphics close.
 #include <signal.h>
 #include <yalecad/cleanup.h>
 #include <yalecad/message.h>
+#include <yalecad/program.h>
+#include <yalecad/string.h>
 
 #include "config-build.h"
 
@@ -161,21 +163,18 @@ int main(int argc , char *argv[])
 
 
   FILE *fp ;
-  DOUBLE quality_value();
   char filename[LRECL] ;
   INT ll, rr, bb, tt ;
   INT bdxlen , bdylen ;
   INT block ;
-  INT yaleIntro() ;
+  VOID yaleIntro() ;
   INT cx, cy, cl, cr, cb, ct, cell ;
   char *ptr ;
-  char *Ystrclone() ;
   BOOL debug ;
   BOOL parasite ;
   BOOL windowId ;
   BOOL verbose ;
   INT arg_count ;
-  char *Ygetenv() ;
 
   /* ********************** start initialization *********************** */
   /* start up cleanup handler */
diff --git a/src/twsc/mergeseg.c b/src/twsc/mergeseg.c
index be84cb50..5a2281c4 100644
--- a/src/twsc/mergeseg.c
+++ b/src/twsc/mergeseg.c
@@ -73,8 +73,9 @@ extern INT *add_st_flagG ;
 
 /* external routines */
 extern INT cmpr_sx(), cmpr_lx(), cmpr_sy(), cmpr_ly() ;
-extern SEGBOX *makeseg() ;
-extern PINBOXPTR makeSTpt() , xmedianfun(), ymedianfun() ;
+extern PINBOXPTR makeSTpt(INT, PINBOXPTR, PINBOXPTR);
+PINBOXPTR xmedianfun( PINBOXPTR aptr, PINBOXPTR bptr, PINBOXPTR cptr );
+PINBOXPTR ymedianfun( PINBOXPTR aptr, PINBOXPTR bptr, PINBOXPTR cptr );
 
 /* static definitions */
 static PINBOXPTR nthptrS[30], sthptrS[30], wstptrS[30], estptrS[30] ;
diff --git a/src/twsc/outpins.c b/src/twsc/outpins.c
index e3a2df3e..d1b04edb 100644
--- a/src/twsc/outpins.c
+++ b/src/twsc/outpins.c
@@ -99,14 +99,14 @@ static INT *left_edgeS ;
 static FILE *fpS ;
 static BOOL old_formatS = FALSE ;
 
-char *find_layer( /* pinname, layer */ ) ;
+char *find_layer( char *pinname, INT *layer );
 
-static void do_outpins();
-static void do_macropins();
-static void do_left_vertical_channel();
-static void do_right_vertical_channel();
-static void do_bottom_channel();
-static void do_top_channel();
+static void do_outpins(PINBOXPTR, INT);
+static void do_macropins(PINBOXPTR);
+static void do_left_vertical_channel(PINBOXPTR);
+static void do_right_vertical_channel(PINBOXPTR);
+static void do_bottom_channel(PINBOXPTR);
+static void do_top_channel(PINBOXPTR);
 
 void outpins()
 {
@@ -118,7 +118,6 @@ PADBOXPTR pp1, pp2 ;
 char filename[64] ;
 INT i , a , b , net , row , padside ;
 INT upFlag , downFlag , groupS_index ;
-extern char *strtok() ;
 
 if( old_formatS ){
     old_outpins() ;
diff --git a/src/twsc/outpins1.c b/src/twsc/outpins1.c
index abae19bf..d45938d8 100644
--- a/src/twsc/outpins1.c
+++ b/src/twsc/outpins1.c
@@ -73,8 +73,6 @@ DATE:	    Mar 27, 1989
 
 /* #define NSC */
 
-char *strtok() ;
-
 /* global variables */
 extern INT *root_G ;
 extern INT *count_G ;
@@ -83,7 +81,6 @@ extern INT *father_G ;
 extern INT Max_numPinsG ;
 extern BOOL new_row_formatG ;
 extern PINBOXPTR *vertex_G ;
-extern char *find_layer() ;
 
 /* static definitions */
 static INT vtxS ;
@@ -94,12 +91,12 @@ static INT *rite_edgeS ;
 static INT *left_edgeS ;
 static FILE *fpS ;
 
-static void do_outpins();
-static void do_vertical_channel();
-static void do_left_vertical_channel();
-static void do_right_vertical_channel();
-static void do_bottom_channel();
-static void do_top_channel();
+static void do_outpins(PINBOXPTR, int);
+static void do_vertical_channel(PINBOXPTR);
+static void do_left_vertical_channel(PINBOXPTR);
+static void do_right_vertical_channel(PINBOXPTR);
+static void do_bottom_channel(PINBOXPTR);
+static void do_top_channel(PINBOXPTR);
 
 void old_outpins()
 {
@@ -282,7 +279,8 @@ int flag ;
 {
 
 
-int x , y , channel , pinloc , group_number , layer , i ;
+int x , y , channel , pinloc , group_number , i ;
+INT layer;
 CBOXPTR cellptr ;
 PADBOXPTR pptr ;
 char *pinname , *tmp_pinname ;
@@ -645,7 +643,8 @@ PINBOXPTR core_ptr ;
 SEGBOXPTR segptr ;
 ADJASEG *adj ;
 PADBOXPTR pptr ;
-int group_number , layer , i ;
+int group_number , i ;
+INT layer;
 int length ;
 char *tmp_pinname ;
 char master_name[128] , pin_id[128] , tmp_name[128] ;
@@ -711,7 +710,8 @@ PINBOXPTR core_ptr ;
 SEGBOXPTR segptr ;
 ADJASEG *adj ;
 PADBOXPTR pptr ;
-int a , group_number , layer , i ;
+int a , group_number , i ;
+INT layer;
 char *tmp_pinname ;
 int length ;
 char master_name[128] , pin_id[128] , tmp_name[128] ;
@@ -772,7 +772,8 @@ for( adj = ptr->adjptr->next ; adj ; adj = adj->next ) {
 static void do_bottom_channel( ptr )
 PINBOXPTR ptr ;
 {
-int x , y , group_number , layer , i ;
+int x , y , group_number , i ;
+INT layer;
 char *tmp_pinname ;
 ADJASEG *adj ;
 SEGBOXPTR segptr ;
@@ -854,7 +855,8 @@ for( adj = ptr->adjptr->next ; adj ; adj = adj->next ) {
 static void do_top_channel( ptr )
 PINBOXPTR ptr ;
 {
-int x , y , group_number , layer , i ;
+int x , y , group_number , i ;
+INT layer;
 char *tmp_pinname ;
 ADJASEG *adj ;
 SEGBOXPTR segptr ;
diff --git a/src/twsc/output.c b/src/twsc/output.c
index cf7201af..2eebb753 100644
--- a/src/twsc/output.c
+++ b/src/twsc/output.c
@@ -71,7 +71,6 @@ REVISIONS:  July 15, 1989
 #include <yalecad/message.h>
 
 /* external functions */
-char *strtok(); /* added 06/01/90 sury */
 INT comparex() ;
 
 /* global variables */
diff --git a/src/twsc/parser.c b/src/twsc/parser.c
index b3e21b8a..2465ab02 100644
--- a/src/twsc/parser.c
+++ b/src/twsc/parser.c
@@ -199,8 +199,8 @@ static INT transTableS[5][8] = {  /* translate from old pad format */
 } ;
 
 
-static void layer_test();
-static void check_pin();
+static void layer_test(INT);
+static void check_pin(INT, INT, char*);
 
 /* ###################### END STATIC definitions ############################ */
 static void get_stat_hints()
@@ -882,7 +882,6 @@ INT xpos, ypos ;
 char *pinname ;
 {
     INT layer ;
-    char *find_layer() ;
     TIBOXPTR tptr ;   /* current tileptr */
 
     ERRORABORT() ;
@@ -1798,7 +1797,7 @@ void cleanup_readcells()
     }
 
     if( swappable_gates_existG ) {
-	Yhash_table_delete( swap_hash_tableS, (INT  (*)()) free_swap_data ) ;
+	Yhash_table_delete( swap_hash_tableS, (INT  (*)(void *)) free_swap_data ) ;
     }
 
     return ;
diff --git a/src/twsc/readcell.c b/src/twsc/readcell.c
index 42673d4e..297f2d57 100644
--- a/src/twsc/readcell.c
+++ b/src/twsc/readcell.c
@@ -713,7 +713,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/twsc/readcell_l.h b/src/twsc/readcell_l.h
index dee351c6..1e1f1103 100644
--- a/src/twsc/readcell_l.h
+++ b/src/twsc/readcell_l.h
@@ -50,7 +50,7 @@ REVISIONS:  Dec  7, 1990 - add | for National.
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static INT screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 static INT line_countS = 0 ;
 
 static int yylook(void);
diff --git a/src/twsc/readnets.c b/src/twsc/readnets.c
index 8c849806..c7a6a971 100644
--- a/src/twsc/readnets.c
+++ b/src/twsc/readnets.c
@@ -268,8 +268,7 @@ YYSTYPE yyvs[YYSTACKSIZE];
 
 
 static void free_net_data();
-static void bad_net();
-char *Ystrclone();
+static void bad_net(char *, BOOL);
 void check_paths();
 void build_path_array();
 void add_paths_to_cells();
@@ -306,7 +305,7 @@ FILE *fp ;
     init_net_set() ;
     add_paths_to_cells() ;
     /* free hash table */
-    Yhash_table_delete( net_hash_tableS , (INT  (*)()) free_net_data ) ;
+    Yhash_table_delete( net_hash_tableS , (INT  (*)(void *)) free_net_data ) ;
 
 } /* end readnets */
 
@@ -555,7 +554,7 @@ yyparse()
     register int yym, yyn, yystate;
 #if YYDEBUG
     register char *yys;
-    extern char *getenv();
+    extern char *getenv(const char *);
 
     if (yys = getenv("YYDEBUG"))
     {
diff --git a/src/twsc/readnets_l.h b/src/twsc/readnets_l.h
index fa107992..a8917dce 100644
--- a/src/twsc/readnets_l.h
+++ b/src/twsc/readnets_l.h
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include "yalecad/string.h"
 # define U(x) ((x)&0377)
 # define NLSTATE yyprevious=YYNEWLINE
 # define BEGIN yybgin = yysvec + 1 +
@@ -52,7 +53,7 @@ REVISIONS:  Mar 29, 1989 - added to TimberWolfSC.
 #define END(v) (v-1 + sizeof(v) / sizeof( v[0] ) ) /* for table lookup */
 
 static INT screen() ;
-static void check_line_count() ;
+static void check_line_count(char *) ;
 
 static int yylook(void);
 static int yyback(int *p, int m);
@@ -137,7 +138,6 @@ static INT screen()
     struct rw_table  *low = rwtable,        /* ptr to beginning */
 		     *mid ,  
 		     *high = END(rwtable) ;   /* ptr to end */
-    char *Ystrclone() ;
 
     /* binary search to look thru table to find pattern match */
     while( low <= high){
diff --git a/src/twsc/readpar.c b/src/twsc/readpar.c
index 9593138e..2e80c272 100644
--- a/src/twsc/readpar.c
+++ b/src/twsc/readpar.c
@@ -135,9 +135,9 @@ static BOOL abortS = FALSE ;
 static BOOL readparamS = FALSE ;
 
 static void init_read_par();
-static void readparam();
+static void readparam(INT);
 static void process_readpar();
-static void err_msg();
+static void err_msg(char *);
 
 void readParFile()
 {
diff --git a/src/twsc/rmoverlap.c b/src/twsc/rmoverlap.c
index 0978eda7..431003d1 100644
--- a/src/twsc/rmoverlap.c
+++ b/src/twsc/rmoverlap.c
@@ -74,7 +74,7 @@ INT check_connectivity(INT net );
 
 /* global variable references */
 extern BOOL connectFlagG ;
-PINBOXPTR depth_first_search() ;
+PINBOXPTR depth_first_search(PINBOXPTR, PINBOXPTR, PINBOXPTR, SEGBOXPTR, SEGBOXPTR) ;
 
 /* static definitions */
 static INT *segcountS ;
diff --git a/src/twsc/sortpad.c b/src/twsc/sortpad.c
index 262ddd62..93fd92d1 100644
--- a/src/twsc/sortpad.c
+++ b/src/twsc/sortpad.c
@@ -60,8 +60,8 @@ REVISIONS:  Sun Jan 20 21:47:52 PST 1991 - ported to AIX.
 
 static INT compare_pads();
 static INT sort_by_pos();
-static void install_pad_groups();
-static void permute_pads();
+static void install_pad_groups(PADBOXPTR, INT*);
+static void permute_pads(PADBOXPTR);
 
 /******************************************************************************
 			   PAD SORTING ROUTINES
diff --git a/src/twsc/standard.h b/src/twsc/standard.h
index b95bdd37..3cd6c708 100644
--- a/src/twsc/standard.h
+++ b/src/twsc/standard.h
@@ -336,6 +336,7 @@ EXTERN DOUBLE timeFactorG ;
 extern void init_table( P1(void) ) ;
 extern BOOL acceptt( P3(INT d_wire,INT d_time,INT d_penal) ) ;
 extern BOOL accept_greedy( P3(INT d_wire,INT d_time,INT d_penal) ) ;
-
+extern char *find_layer(char *pinname, INT *layer);
+extern INT compute_attprcel(INT);
 
 #endif /* YSTANDARD_H */
diff --git a/src/twsc/steiner.c b/src/twsc/steiner.c
index 4b9eab0e..07b42840 100644
--- a/src/twsc/steiner.c
+++ b/src/twsc/steiner.c
@@ -62,7 +62,6 @@ INT enough_built_in_feedG ;
 /* global references */
 extern INT *rowfeed_penaltyG ;
 extern BOOL absolute_minimum_feedsG ;
-SEGBOXPTR makeseg() ;
 
 /* static definitions */
 static PINBOXPTR   *vertexS ;
diff --git a/src/twsc/uloop.c b/src/twsc/uloop.c
index c7e45773..4042d740 100644
--- a/src/twsc/uloop.c
+++ b/src/twsc/uloop.c
@@ -146,12 +146,12 @@ extern BOOL no_feed_estG ;
 extern BOOL good_initial_placementG ;
 
 /* function calls */
-DOUBLE expected_svalue() ;
-DOUBLE expected_value() ;
-DOUBLE partition() ;
-DOUBLE compute_and_combination() ;
-DOUBLE combination() ;
-INT eval_ratio() ;
+DOUBLE expected_svalue(INT, INT, INT, INT) ;
+DOUBLE expected_value(INT, INT, INT, INT) ;
+DOUBLE partition(INT, INT, INT, INT) ;
+DOUBLE compute_and_combination(INT C , INT k , INT p , INT R) ;
+DOUBLE combination(INT numerator, INT denominator) ;
+INT eval_ratio(DOUBLE *t) ;
 void rowcon();
 
 INT tw_frozen(INT cost );
@@ -212,7 +212,7 @@ INT m1,m2, trials ;
 INT num_accepts , gate_switches , gate_attempts ;
 INT last_flips , delta_func , delta_time ;
 INT temp_timer, time_to_update ; /* keeps track of when to update T */
-DOUBLE iter_time, accept_deviation, calc_acceptance_ratio() ;
+DOUBLE iter_time, accept_deviation, calc_acceptance_ratio(DOUBLE) ;
 DOUBLE num_time, num_func ;
 DOUBLE calc_time_factor() ; 
 /* 
diff --git a/src/twsc/utemp.c b/src/twsc/utemp.c
index 9517719e..7fc3216e 100644
--- a/src/twsc/utemp.c
+++ b/src/twsc/utemp.c
@@ -92,7 +92,6 @@ extern DOUBLE initialRowControlG ;
 extern DOUBLE ratioG;
 
 INT comparex() ;
-INT compute_attprcel() ;
 void from_middle();
 void from_beginning();
 void elim_nets(INT print_flag);
openSUSE Build Service is sponsored by