Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/usr.bin/audio/common Pull up following revision(s) (reque...
details: https://anonhg.NetBSD.org/src/rev/d3e90781f887
branches: netbsd-7
changeset: 798827:d3e90781f887
user: martin <martin%NetBSD.org@localhost>
date: Mon Jan 12 19:15:27 2015 +0000
description:
Pull up following revision(s) (requested by mrg in ticket #409):
usr.bin/audio/common/audio.c: revision 1.23
usr.bin/audio/common/libaudio.h: revision 1.19
add a decode_uint() function.
diffstat:
usr.bin/audio/common/audio.c | 19 +++++++++++++++++--
usr.bin/audio/common/libaudio.h | 3 ++-
2 files changed, 19 insertions(+), 3 deletions(-)
diffs (57 lines):
diff -r 673e3d610a9b -r d3e90781f887 usr.bin/audio/common/audio.c
--- a/usr.bin/audio/common/audio.c Mon Jan 12 10:27:57 2015 +0000
+++ b/usr.bin/audio/common/audio.c Mon Jan 12 19:15:27 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.22 2013/08/30 20:57:26 mrg Exp $ */
+/* $NetBSD: audio.c,v 1.22.4.1 2015/01/12 19:15:27 martin Exp $ */
/*
* Copyright (c) 1999 Matthew R. Green
@@ -32,7 +32,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: audio.c,v 1.22 2013/08/30 20:57:26 mrg Exp $");
+__RCSID("$NetBSD: audio.c,v 1.22.4.1 2015/01/12 19:15:27 martin Exp $");
#endif
@@ -155,6 +155,21 @@
}
void
+decode_uint(const char *arg, unsigned *intp)
+{
+ char *ep;
+ unsigned ret;
+
+ ret = (unsigned)strtoul(arg, &ep, 10);
+
+ if (ep[0] == '\0') {
+ *intp = ret;
+ return;
+ }
+ errx(1, "argument `%s' not a valid integer", arg);
+}
+
+void
decode_time(const char *arg, struct timeval *tvp)
{
char *s, *colon, *dot;
diff -r 673e3d610a9b -r d3e90781f887 usr.bin/audio/common/libaudio.h
--- a/usr.bin/audio/common/libaudio.h Mon Jan 12 10:27:57 2015 +0000
+++ b/usr.bin/audio/common/libaudio.h Mon Jan 12 19:15:27 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: libaudio.h,v 1.18 2013/08/30 20:57:26 mrg Exp $ */
+/* $NetBSD: libaudio.h,v 1.18.4.1 2015/01/12 19:15:27 martin Exp $ */
/*
* Copyright (c) 1999, 2009 Matthew R. Green
@@ -180,6 +180,7 @@
* generic routines?
*/
void decode_int (const char *, int *);
+void decode_uint (const char *, unsigned *);
void decode_time (const char *, struct timeval *);
void decode_encoding (const char *, int *);
Home |
Main Index |
Thread Index |
Old Index