[Midnightbsd-cvs] src [11747] trunk/usr.bin/whereis/whereis.c: make functions static

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Jul 11 07:45:40 EDT 2018


Revision: 11747
          http://svnweb.midnightbsd.org/src/?rev=11747
Author:   laffer1
Date:     2018-07-11 07:45:37 -0400 (Wed, 11 Jul 2018)
Log Message:
-----------
make functions static

Modified Paths:
--------------
    trunk/usr.bin/whereis/whereis.c

Modified: trunk/usr.bin/whereis/whereis.c
===================================================================
--- trunk/usr.bin/whereis/whereis.c	2018-07-10 23:33:19 UTC (rev 11746)
+++ trunk/usr.bin/whereis/whereis.c	2018-07-11 11:45:37 UTC (rev 11747)
@@ -1,5 +1,5 @@
 /*
- * Copyright \xA9 2002, J\xF6rg Wunsch
+ * Copyright © 2002, Jörg Wunsch
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -32,7 +32,7 @@
 
 #include <sys/types.h>
 
-__MBSDID("$MidnightBSD: src/usr.bin/whereis/whereis.c,v 1.3 2012/11/23 01:59:03 laffer1 Exp $");
+__MBSDID("$MidnightBSD$");
 
 #include <sys/stat.h>
 #include <sys/sysctl.h>
@@ -56,18 +56,18 @@
 
 typedef const char *ccharp;
 
-int opt_a, opt_b, opt_m, opt_q, opt_s, opt_u, opt_x;
-ccharp *bindirs, *mandirs, *sourcedirs;
-char **query;
+static int opt_a, opt_b, opt_m, opt_q, opt_s, opt_u, opt_x;
+static ccharp *bindirs, *mandirs, *sourcedirs;
+static char **query;
 
-const char *sourcepath = PATH_SOURCES;
+static const char *sourcepath = PATH_SOURCES;
 
-char	*colonify(ccharp *);
-int	 contains(ccharp *, const char *);
-void	 decolonify(char *, ccharp **, int *);
-void	 defaults(void);
-void	 scanopts(int, char **);
-void	 usage(void);
+static char	*colonify(ccharp *);
+static int	 contains(ccharp *, const char *);
+static void	 decolonify(char *, ccharp **, int *);
+static void	 defaults(void);
+static void	 scanopts(int, char **);
+static void	 usage(void);
 
 /*
  * Throughout this program, a number of strings are dynamically
@@ -85,7 +85,7 @@
  * abort(3) in case of an allocation failure.
  */
 
-void
+static void
 usage(void)
 {
 	(void)fprintf(stderr,
@@ -99,7 +99,7 @@
  * Note that the -B/-M/-S options expect a list of directory
  * names that must be terminated with -f.
  */
-void
+static void
 scanopts(int argc, char **argv)
 {
 	int c, i;
@@ -174,7 +174,7 @@
 /*
  * Find out whether string `s' is contained in list `cpp'.
  */
-int
+static int
 contains(ccharp *cpp, const char *s)
 {
 	ccharp cp;
@@ -197,7 +197,7 @@
  * partial string is only added if it has a length greater than 0, and
  * if it's not already contained in the string list.
  */
-void
+static void
 decolonify(char *s, ccharp **cppp, int *ip)
 {
 	char *cp;
@@ -223,7 +223,7 @@
 /*
  * Join string list `cpp' into a colon-separated string.
  */
-char *
+static char *
 colonify(ccharp *cpp)
 {
 	size_t s;
@@ -249,7 +249,7 @@
 /*
  * Provide defaults for all options and directory lists.
  */
-void
+static void
 defaults(void)
 {
 	size_t s;



More information about the Midnightbsd-cvs mailing list