diff options
Diffstat (limited to 'lib/libusb')
| -rw-r--r-- | lib/libusb/data.c | 8 | ||||
| -rw-r--r-- | lib/libusb/usage.c | 12 | ||||
| -rw-r--r-- | lib/libusb/usb.h | 12 |
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)); |
