0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-28 00:14:07 +01:00

Merge pull request #176 from staticfox/morecleanups

More cleanups
This commit is contained in:
William Pitcock 2016-03-23 19:14:46 -05:00
commit c604800a68
43 changed files with 24 additions and 64 deletions

View file

@ -31,8 +31,6 @@
#include <rb_lib.h> #include <rb_lib.h>
#include "getaddrinfo.h" #include "getaddrinfo.h"
/* $Id$ */
static const char in_addrany[] = { 0, 0, 0, 0 }; static const char in_addrany[] = { 0, 0, 0, 0 };
static const char in_loopback[] = { 127, 0, 0, 1 }; static const char in_loopback[] = { 127, 0, 0, 1 };
static const char in6_addrany[] = { static const char in6_addrany[] = {
@ -94,7 +92,7 @@ static const struct explore explore[] = {
#define PTON_MAX 16 #define PTON_MAX 16
static int str_isnumber(const char *); static bool str_isnumber(const char *);
static int explore_null(const struct rb_addrinfo *, static int explore_null(const struct rb_addrinfo *,
const char *, struct rb_addrinfo **); const char *, struct rb_addrinfo **);
static int explore_numeric(const struct rb_addrinfo *, const char *, static int explore_numeric(const struct rb_addrinfo *, const char *,
@ -183,7 +181,7 @@ rb_freeaddrinfo(struct rb_addrinfo *ai)
} while (ai); } while (ai);
} }
static int static bool
str_isnumber(const char *p) str_isnumber(const char *p)
{ {
char *ep; char *ep;
@ -194,9 +192,9 @@ str_isnumber(const char *p)
errno = 0; errno = 0;
(void)strtoul(p, &ep, 10); (void)strtoul(p, &ep, 10);
if (errno == 0 && ep && *ep == '\0') if (errno == 0 && ep && *ep == '\0')
return YES; return true;
else else
return NO; return false;
} }
int int

View file

@ -26,7 +26,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id$
*/ */
struct rb_addrinfo { struct rb_addrinfo {
@ -94,8 +93,6 @@ void rb_freeaddrinfo(struct rb_addrinfo *ai);
#define SUCCESS 0 #define SUCCESS 0
#define ANY 0 #define ANY 0
#define YES 1
#define NO 0
#undef EAI_ADDRFAMILY #undef EAI_ADDRFAMILY
#undef EAI_AGAIN #undef EAI_AGAIN

View file

@ -46,8 +46,6 @@
#include "getaddrinfo.h" #include "getaddrinfo.h"
#include "getnameinfo.h" #include "getnameinfo.h"
/* $Id$ */
static const struct afd { static const struct afd {
int a_af; int a_af;
int a_addrlen; int a_addrlen;

View file

@ -26,7 +26,6 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
* $Id$
*/ */
int rb_getnameinfo(const struct sockaddr *sa, rb_socklen_t salen, char *host, int rb_getnameinfo(const struct sockaddr *sa, rb_socklen_t salen, char *host,

View file

@ -1,4 +1,3 @@
# $Id: acinclude.m4 23020 2006-09-01 18:20:19Z androsyn $ - aclocal.m4 - Autoconf fun...
AC_DEFUN([AC_DEFINE_DIR], [ AC_DEFUN([AC_DEFINE_DIR], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: commio.h 24059 2007-07-24 17:25:41Z androsyn $
*/ */
#ifndef _COMMIO_INT_H #ifndef _COMMIO_INT_H

View file

@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: commio-ssl.h 26280 2008-12-10 20:25:29Z androsyn $
*/ */
#ifndef _COMMIO_SSL_H #ifndef _COMMIO_SSL_H

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: event-int.h 26272 2008-12-10 05:55:10Z androsyn $
*/ */
struct ev_entry struct ev_entry

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_balloc.h 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_commio.h 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_event.h 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -19,7 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_helper.h 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_linebuf.h 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_memory.h 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -1,5 +1,4 @@
/* /*
* $Id: patricia.h 23020 2006-09-01 18:20:19Z androsyn $
* Dave Plonka <plonka@doit.wisc.edu> * Dave Plonka <plonka@doit.wisc.edu>
* *
* This product includes software developed by the University of Michigan, * This product includes software developed by the University of Michigan,

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id$
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_tools.h 26170 2008-10-26 20:59:07Z androsyn $
*/ */
#ifndef RB_LIB_H #ifndef RB_LIB_H

View file

@ -1,4 +1,3 @@
# $Id: Makefile.am 26046 2008-09-09 16:37:30Z androsyn $
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign

View file

@ -1,4 +1,3 @@
/* $Id: arc4random.c 26092 2008-09-19 15:13:52Z androsyn $ */
/* $$$: arc4random.c 2005/02/08 robert */ /* $$$: arc4random.c 2005/02/08 robert */
/* $NetBSD: arc4random.c,v 1.5.2.1 2004/03/26 22:52:50 jmc Exp $ */ /* $NetBSD: arc4random.c,v 1.5.2.1 2004/03/26 22:52:50 jmc Exp $ */
/* $OpenBSD: arc4random.c,v 1.6 2001/06/05 05:05:38 pvalchev Exp $ */ /* $OpenBSD: arc4random.c,v 1.6 2001/06/05 05:05:38 pvalchev Exp $ */

View file

@ -28,7 +28,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: balloc.c 26100 2008-09-20 01:27:19Z androsyn $
*/ */
/* /*

View file

@ -21,8 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: commio.c 26254 2008-12-10 04:04:38Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>
#include <commio-int.h> #include <commio-int.h>

View file

@ -22,8 +22,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: devpoll.c 26254 2008-12-10 04:04:38Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>
#include <commio-int.h> #include <commio-int.h>

View file

@ -23,8 +23,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: epoll.c 26294 2008-12-13 03:01:19Z androsyn $
*/ */
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
#include <librb_config.h> #include <librb_config.h>

View file

@ -39,7 +39,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: event.c 26272 2008-12-10 05:55:10Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: gnutls.c 26296 2008-12-13 03:36:00Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -19,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: helper.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>
#include <commio-int.h> #include <commio-int.h>

View file

@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: kqueue.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: linebuf.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id$
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: commio.c 24808 2008-01-02 08:17:05Z androsyn $
*/ */

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: commio.c 24808 2008-01-02 08:17:05Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -4,7 +4,6 @@
* This was then yanked out of the ratbox/devel/src tree and stuffed into * This was then yanked out of the ratbox/devel/src tree and stuffed into
* librb and had function names changed, but otherwise not really altered. * librb and had function names changed, but otherwise not really altered.
* *
* $Id: patricia.c 24244 2007-08-22 19:04:55Z androsyn $
* Dave Plonka <plonka@doit.wisc.edu> * Dave Plonka <plonka@doit.wisc.edu>
* *
* This product includes software developed by the University of Michigan, * This product includes software developed by the University of Michigan,

View file

@ -22,7 +22,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: poll.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>

View file

@ -23,7 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: ports.c 26286 2008-12-10 23:28:53Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id$
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_lib.c 26282 2008-12-10 20:33:21Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>

View file

@ -21,7 +21,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: rb_memory.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>

View file

@ -22,8 +22,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: select.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#define FD_SETSIZE 65535 #define FD_SETSIZE 65535
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>

View file

@ -23,7 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: sigio.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#ifndef _GNU_SOURCE #ifndef _GNU_SOURCE

View file

@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: tools.c 26170 2008-10-26 20:59:07Z androsyn $
* *
* Here is the original header: * Here is the original header:
* *
@ -32,6 +31,7 @@
* defined, tools.h will build inlined versions of the functions * defined, tools.h will build inlined versions of the functions
* on supported compilers * on supported compilers
*/ */
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>

View file

@ -21,8 +21,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: unix.c 26180 2008-11-11 00:00:12Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>
#include <rb_lib.h> #include <rb_lib.h>

View file

@ -1,6 +1,5 @@
#!/bin/sh #!/bin/sh
# $Id: version.c.SH 24870 2008-01-10 16:51:01Z androsyn $
spitshell=cat spitshell=cat
package=librb package=librb

View file

@ -23,7 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
* USA * USA
* *
* $Id: win32.c 26092 2008-09-19 15:13:52Z androsyn $
*/ */
#include <librb_config.h> #include <librb_config.h>