2005-05-06 Paul Jakma <paul@dishone.st>

	* (general) extern and static'ification of functions in code and
	  header.
	  Cleanup any definitions with unspecified arguments.
	  Add casts for callback assignments where the callback is defined,
	  typically, as passing void *, but the function being assigned has
	  some other pointer type defined as its argument, as gcc complains
	  about casts from void * to X* via function arguments.
	  Fix some old K&R style function argument definitions.
	  Add noreturn gcc attribute to some functions, as appropriate.
	  Add unused gcc attribute to some functions (eg ones meant to help
	  while debugging)
	  Add guard defines to headers which were missing them.
	* command.c: (install_node) add const qualifier, still doesnt shut
	  up the warning though, because of the double pointer.
	  (cmp_node) ditto
	* keychain.c: (key_str2time) Add GET_LONG_RANGE() macro, derived
	  fromn vty.h ones to fix some of the (long) < 0 warnings.
	* thread.c: (various) use thread_empty
	  (cpu_record_hash_key) should cast to uintptr_t, a stdint.h type
	* vty.h: Add VTY_GET_IPV4_ADDRESS and VTY_GET_IPV4_PREFIX so they
	  removed from ospfd/ospf_vty.h
	* zebra.h: Move definition of ZEBRA_PORT to here, to remove
	  dependence of lib on zebra/zserv.h
diff --git a/lib/routemap.c b/lib/routemap.c
index cd1abbc..c52b050 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -159,7 +159,7 @@
 
 /* Lookup route map.  If there isn't route map create one and return
    it. */
-struct route_map *
+static struct route_map *
 route_map_get (const char *name)
 {
   struct route_map *map;
@@ -171,7 +171,7 @@
 }
 
 /* Return route map's type string. */
-const static char *
+static const char *
 route_map_type_str (enum route_map_type type)
 {
   switch (type)
@@ -188,7 +188,7 @@
     }
 }
 
-int
+static int
 route_map_empty (struct route_map *map)
 {
   if (map->head == NULL && map->tail == NULL)
@@ -245,7 +245,7 @@
     }
 }
 
-int
+static int
 vty_show_route_map (struct vty *vty, const char *name)
 {
   struct route_map *map;
@@ -271,8 +271,8 @@
 
 /* New route map allocation. Please note route map's name must be
    specified. */
-struct route_map_index *
-route_map_index_new ()
+static struct route_map_index *
+route_map_index_new (void)
 {
   struct route_map_index *new;
 
@@ -319,7 +319,7 @@
 }
 
 /* Lookup index from route map. */
-struct route_map_index *
+static struct route_map_index *
 route_map_index_lookup (struct route_map *map, enum route_map_type type,
 			int pref)
 {
@@ -333,7 +333,7 @@
 }
 
 /* Add new index to route map. */
-struct route_map_index *
+static struct route_map_index *
 route_map_index_add (struct route_map *map, enum route_map_type type,
 		     int pref)
 {
@@ -385,7 +385,7 @@
 }
 
 /* Get route map index. */
-struct route_map_index *
+static struct route_map_index *
 route_map_index_get (struct route_map *map, enum route_map_type type, 
 		     int pref)
 {
@@ -404,8 +404,8 @@
 }
 
 /* New route map rule */
-struct route_map_rule *
-route_map_rule_new ()
+static struct route_map_rule *
+route_map_rule_new (void)
 {
   struct route_map_rule *new;
 
@@ -428,7 +428,7 @@
 }
 
 /* Lookup rule command from match list. */
-struct route_map_rule_cmd *
+static struct route_map_rule_cmd *
 route_map_lookup_match (const char *name)
 {
   unsigned int i;
@@ -442,7 +442,7 @@
 }
 
 /* Lookup rule command from set list. */
-struct route_map_rule_cmd *
+static struct route_map_rule_cmd *
 route_map_lookup_set (const char *name)
 {
   unsigned int i;
@@ -493,7 +493,7 @@
 }
 
 /* strcmp wrapper function which don't crush even argument is NULL. */
-int
+static int
 rulecmp (const char *dst, const char *src)
 {
   if (dst == NULL)
@@ -731,7 +731,7 @@
    We need to make sure our route-map processing matches the above
 */
 
-route_map_result_t
+static route_map_result_t
 route_map_apply_match (struct route_map_rule_list *match_list,
                        struct prefix *prefix, route_map_object_t type,
                        void *object)
@@ -875,7 +875,7 @@
 }
 
 void
-route_map_init ()
+route_map_init (void)
 {
   /* Make vector for match and set. */
   route_match_vec = vector_init (1);
@@ -1230,7 +1230,7 @@
 }
 
 /* Configuration write function. */
-int
+static int
 route_map_config_write (struct vty *vty)
 {
   struct route_map *map;
@@ -1286,7 +1286,7 @@
 
 /* Initialization of route map vector. */
 void
-route_map_init_vty ()
+route_map_init_vty (void)
 {
   /* Install route map top node. */
   install_node (&rmap_node, route_map_config_write);