summaryrefslogtreecommitdiff
path: root/lib/libusb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libusb')
-rw-r--r--lib/libusb/data.c8
-rw-r--r--lib/libusb/usage.c12
-rw-r--r--lib/libusb/usb.h12
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/libusb/data.c b/lib/libusb/data.c
index b52fa7fa357..e113d75088f 100644
--- a/lib/libusb/data.c
+++ b/lib/libusb/data.c
@@ -1,4 +1,4 @@
-/* $NetBSD: data.c,v 1.7 2000/04/02 11:02:21 augustss Exp $ */
+/* $NetBSD: data.c,v 1.8 2000/04/02 11:10:53 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -31,9 +31,9 @@
#include "usb.h"
int
-hid_get_data(void *p, hid_item_t *h)
+hid_get_data(const void *p, const hid_item_t *h)
{
- unsigned char *buf;
+ const unsigned char *buf;
unsigned int hpos;
unsigned int hsize;
int data;
@@ -64,7 +64,7 @@ hid_get_data(void *p, hid_item_t *h)
}
void
-hid_set_data(void *p, hid_item_t *h, int data)
+hid_set_data(void *p, const hid_item_t *h, int data)
{
unsigned char *buf;
unsigned int hpos;
diff --git a/lib/libusb/usage.c b/lib/libusb/usage.c
index a60cb2cf85e..cb3c0e5dfd4 100644
--- a/lib/libusb/usage.c
+++ b/lib/libusb/usage.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usage.c,v 1.4 1999/07/02 15:46:53 simonb Exp $ */
+/* $NetBSD: usage.c,v 1.5 2000/04/02 11:10:53 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -37,12 +37,12 @@
#define _PATH_HIDTABLE "/usr/share/misc/usb_hid_usages"
struct usage_in_page {
- char *name;
+ const char *name;
int usage;
};
static struct usage_page {
- char *name;
+ const char *name;
int usage;
struct usage_in_page *page_contents;
int pagesize, pagesizemax;
@@ -66,7 +66,7 @@ dump_hid_table(void)
#endif
void
-hid_init(char *hidname)
+hid_init(const char *hidname)
{
FILE *f;
char line[100], name[100], *p, *n;
@@ -150,7 +150,7 @@ hid_init(char *hidname)
#endif
}
-char *
+const char *
hid_usage_page(int i)
{
static char b[10];
@@ -166,7 +166,7 @@ hid_usage_page(int i)
return b;
}
-char *
+const char *
hid_usage_in_page(unsigned int u)
{
int page = HID_PAGE(u);
diff --git a/lib/libusb/usb.h b/lib/libusb/usb.h
index 5dbd68f38a7..fee9a949e86 100644
--- a/lib/libusb/usb.h
+++ b/lib/libusb/usb.h
@@ -1,4 +1,4 @@
-/* $NetBSD: usb.h,v 1.6 2000/02/22 12:39:22 augustss Exp $ */
+/* $NetBSD: usb.h,v 1.7 2000/04/02 11:10:53 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@@ -84,10 +84,10 @@ int hid_report_size __P((report_desc_t d, enum hid_kind k, int *idp));
int hid_locate __P((report_desc_t d, unsigned int usage, enum hid_kind k, hid_item_t *h));
/* Conversion to/from usage names, usage.c: */
-char *hid_usage_page __P((int i));
-char *hid_usage_in_page __P((unsigned int u));
-void hid_init __P((char *file));
+const char *hid_usage_page __P((int i));
+const char *hid_usage_in_page __P((unsigned int u));
+void hid_init __P((const char *file));
/* Extracting/insertion of data, data.c: */
-int hid_get_data __P((void *p, hid_item_t *h));
-void hid_set_data __P((void *p, hid_item_t *h, int data));
+int hid_get_data __P((const void *p, const hid_item_t *h));
+void hid_set_data __P((void *p, const hid_item_t *h, int data));
>2003-10-27Overhaul how `build.sh tools' are used:lukem * Rename "config.h" to "nbtool_config.h" and HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H. This makes in more obvious in the source when we're using tools/compat/config.h versus "standard autoconf" config.h * Consistently move the inclusion of nbtool_config.h to before <sys/cdefs.h> so that the former can provide __RCSID() (et al), and there's no need to protect those macros any more. These changes should make it easier to "tool-ify" a program by adding: #if HAVE_NBTOOL_CONFIG_H #include "nbtool_config.h" #endif to the top of the source files (for the general case). 2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc Patches provided by Joel Baker in PR 22365, verified by myself. 2003-07-14use bounded string opitojun 2003-05-18Now that <bsd.prog.mk> DTRT if HOSTPROG is defined (i.e, it is a no-op),lukem there's no need to special-case .include-ing it. 2003-02-25.Nm does not need a dummy argument ("") before punctuation orwiz for correct formatting of the SYNOPSIS any longer. 2002-10-12`;' as macro arguments also need quoting.wiz 2002-09-30New sentence, new line. Some mdoc cleanup.grant 2002-02-08Generate <>& symbolically. I'm avoiding .../dist/... directories for now.ross 2002-01-31Roll in fixes to permit cross-compiling from non-NetBSD hosts. Thistv round has been tested on Solaris/x86 and Linux hosts. * Add host tools cap_mkdb, ctags, m4, uudecode. * Protect __RCSID() and __COPYRIGHT() better. * Reduce the number of places that need to include "config.h", to keep sources closer to their "vanilla" versions. * Add more compat #defines and autoconf-checked functions. 2002-01-31Make this compilable as a host tool.tv 2001-12-01Sort sections.wiz 2001-12-01Whitespace cleanup.wiz