Rename a few more functions so that all are prefixed by hid.

This commit is contained in:
augustss 1999-05-12 00:37:43 +00:00
parent 33c7bc4b2d
commit 18969028a2
5 changed files with 23 additions and 22 deletions

View File

@ -1,13 +1,14 @@
# $NetBSD: Makefile,v 1.2 1999/05/12 00:14:58 augustss Exp $
# $NetBSD: Makefile,v 1.3 1999/05/12 00:37:43 augustss Exp $
LIB= usb
MAN= usb.3
MLINKS= usb.3 libusb.3 usb.3 get_report_desc.3 usb.3 dispose_report_desc.3 \
MLINKS= usb.3 libusb.3 usb.3 hid_get_report_desc.3 \
usb.3 hid_dispose_report_desc.3 \
usb.3 hid_start_parse.3 usb.3 hid_end_parse.3 \
usb.3 hid_get_item.3 usb.3 hid_report_size.3 usb.3 hid_locate.3 \
usb.3 usage_page.3 usb.3 usage_in_page.3 usb.3 init_hid.3 \
usb.3 get_data.3 usb.3 set_data.3
usb.3 hid_usage_page.3 usb.3 hid_usage_in_page.3 usb.3 hid_init.3 \
usb.3 hid_get_data.3 usb.3 hid_set_data.3
SRCS= descr.c parse.c usage.c data.c

View File

@ -1,4 +1,4 @@
/* $NetBSD: data.c,v 1.3 1999/05/12 00:04:49 augustss Exp $ */
/* $NetBSD: data.c,v 1.4 1999/05/12 00:37:43 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@ -30,7 +30,7 @@
#include "usb.h"
int
get_data(void *p, hid_item_t *h)
hid_get_data(void *p, hid_item_t *h)
{
unsigned char *buf = p;
unsigned int hpos = h->pos; /* bit position of data */
@ -56,7 +56,7 @@ get_data(void *p, hid_item_t *h)
}
void
set_data(void *p, hid_item_t *h, int data)
hid_set_data(void *p, hid_item_t *h, int data)
{
unsigned char *buf = p;
unsigned int hpos = h->pos; /* bit position of data */

View File

@ -1,4 +1,4 @@
/* $NetBSD: descr.c,v 1.2 1999/05/11 21:15:46 augustss Exp $ */
/* $NetBSD: descr.c,v 1.3 1999/05/12 00:37:43 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@ -37,7 +37,7 @@
#include "usbvar.h"
report_desc_t
get_report_desc(fd)
hid_get_report_desc(fd)
int fd;
{
struct usb_ctl_report_desc rep;
@ -56,7 +56,7 @@ get_report_desc(fd)
return (r);
}
void dispose_report_desc(r)
void hid_dispose_report_desc(r)
report_desc_t r;
{
free(r);

View File

@ -1,4 +1,4 @@
/* $NetBSD: usage.c,v 1.2 1999/05/11 21:15:46 augustss Exp $ */
/* $NetBSD: usage.c,v 1.3 1999/05/12 00:37:43 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@ -66,7 +66,7 @@ dump_hid_table(void)
#endif
void
init_hid(char *hidname)
hid_init(char *hidname)
{
FILE *f;
char line[100], name[100], *p, *n;
@ -151,7 +151,7 @@ init_hid(char *hidname)
}
char *
usage_page(int i)
hid_usage_page(int i)
{
static char b[10];
int k;
@ -167,7 +167,7 @@ usage_page(int i)
}
char *
usage_in_page(unsigned int u)
hid_usage_in_page(unsigned int u)
{
int page = HID_PAGE(u);
int i = HID_USAGE(u);

View File

@ -1,4 +1,4 @@
/* $NetBSD: usb.h,v 1.3 1999/05/12 00:04:49 augustss Exp $ */
/* $NetBSD: usb.h,v 1.4 1999/05/12 00:37:44 augustss Exp $ */
/*
* Copyright (c) 1999 Lennart Augustsson <augustss@netbsd.org>
@ -72,8 +72,8 @@ typedef struct hid_item {
#define HID_USAGE(u) ((u) & 0xffff)
/* Obtaining a report descriptor, descr.c: */
report_desc_t get_report_desc __P((int file));
void dispose_report_desc __P((report_desc_t));
report_desc_t hid_get_report_desc __P((int file));
void hid_dispose_report_desc __P((report_desc_t));
/* Parsing of a HID report descriptor, parse.c: */
hid_data_t hid_start_parse __P((report_desc_t d, int kindset));
@ -83,10 +83,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 *usage_page __P((int i));
char *usage_in_page __P((unsigned int u));
void init_hid __P((char *file));
char *hid_usage_page __P((int i));
char *hid_usage_in_page __P((unsigned int u));
void hid_init __P((char *file));
/* Extracting/insertion of data, data.c: */
int get_data __P((void *p, hid_item_t *h));
void set_data __P((void *p, hid_item_t *h, int data));
int hid_get_data __P((void *p, hid_item_t *h));
void hid_set_data __P((void *p, hid_item_t *h, int data));