diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2000-04-03 20:58:30 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2000-04-03 20:58:30 +0000 |
commit | d1a0c5a2fa387d9750229d6941e9bc9c1fa47738 (patch) | |
tree | e9a6c861ea2a1c99d56aa07012fab3f62a577765 /sys/dev/usb/ukbd.c | |
parent | 56ae0558f5ba0519e94a092249dc6f15954a5e16 (diff) | |
download | FreeBSD-src-d1a0c5a2fa387d9750229d6941e9bc9c1fa47738.zip FreeBSD-src-d1a0c5a2fa387d9750229d6941e9bc9c1fa47738.tar.gz |
OpenBSD has a broken debugger that does not grok static. Use a
#define Static static
that the OpenBSD folks can define it to be empty if they like.
Diffstat (limited to 'sys/dev/usb/ukbd.c')
-rw-r--r-- | sys/dev/usb/ukbd.c | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index 4c9c228..9fa6bfd 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -111,8 +111,8 @@ typedef struct ukbd_softc { typedef void usbd_intr_t(usbd_xfer_handle, usbd_private_handle, usbd_status); typedef void usbd_disco_t(void *); -static usbd_intr_t ukbd_intr; -static int ukbd_driver_load(module_t mod, int what, void *arg); +Static usbd_intr_t ukbd_intr; +Static int ukbd_driver_load(module_t mod, int what, void *arg); USB_DECLARE_DRIVER(ukbd); @@ -238,7 +238,7 @@ DRIVER_MODULE(ukbd, uhub, ukbd_driver, ukbd_devclass, ukbd_driver_load, 0); #define SCAN_CHAR(c) ((c) & 0x7f) #define NMOD 8 -static struct { +Static struct { int mask, key; } ukbd_mods[NMOD] = { { MOD_CONTROL_L, 0xe0 }, @@ -264,7 +264,7 @@ static struct { * 0x69: F14 * 0x6a: F15 */ -static u_int8_t ukbd_trtab[256] = { +Static u_int8_t ukbd_trtab[256] = { 0, 0, 0, 0, 30, 48, 46, 32, /* 00 - 07 */ 18, 33, 34, 35, 23, 36, 37, 38, /* 08 - 0F */ 50, 49, 24, 25, 16, 19, 31, 20, /* 10 - 17 */ @@ -335,24 +335,24 @@ typedef struct ukbd_state { } ukbd_state_t; /* keyboard driver declaration */ -static int ukbd_configure(int flags); -static kbd_probe_t ukbd_probe; -static kbd_init_t ukbd_init; -static kbd_term_t ukbd_term; -static kbd_intr_t ukbd_interrupt; -static kbd_test_if_t ukbd_test_if; -static kbd_enable_t ukbd_enable; -static kbd_disable_t ukbd_disable; -static kbd_read_t ukbd_read; -static kbd_check_t ukbd_check; -static kbd_read_char_t ukbd_read_char; -static kbd_check_char_t ukbd_check_char; -static kbd_ioctl_t ukbd_ioctl; -static kbd_lock_t ukbd_lock; -static kbd_clear_state_t ukbd_clear_state; -static kbd_get_state_t ukbd_get_state; -static kbd_set_state_t ukbd_set_state; -static kbd_poll_mode_t ukbd_poll; +Static int ukbd_configure(int flags); +Static kbd_probe_t ukbd_probe; +Static kbd_init_t ukbd_init; +Static kbd_term_t ukbd_term; +Static kbd_intr_t ukbd_interrupt; +Static kbd_test_if_t ukbd_test_if; +Static kbd_enable_t ukbd_enable; +Static kbd_disable_t ukbd_disable; +Static kbd_read_t ukbd_read; +Static kbd_check_t ukbd_check; +Static kbd_read_char_t ukbd_read_char; +Static kbd_check_char_t ukbd_check_char; +Static kbd_ioctl_t ukbd_ioctl; +Static kbd_lock_t ukbd_lock; +Static kbd_clear_state_t ukbd_clear_state; +Static kbd_get_state_t ukbd_get_state; +Static kbd_set_state_t ukbd_set_state; +Static kbd_poll_mode_t ukbd_poll; keyboard_switch_t ukbdsw = { ukbd_probe, @@ -379,18 +379,18 @@ keyboard_switch_t ukbdsw = { KEYBOARD_DRIVER(ukbd, ukbdsw, ukbd_configure); /* local functions */ -static int ukbd_enable_intr(keyboard_t *kbd, int on, +Static int ukbd_enable_intr(keyboard_t *kbd, int on, usbd_intr_t *func); -static timeout_t ukbd_timeout; +Static timeout_t ukbd_timeout; -static int ukbd_getc(ukbd_state_t *state); -static int probe_keyboard(struct usb_attach_arg *uaa, int flags); -static int init_keyboard(ukbd_state_t *state, int *type, +Static int ukbd_getc(ukbd_state_t *state); +Static int probe_keyboard(struct usb_attach_arg *uaa, int flags); +Static int init_keyboard(ukbd_state_t *state, int *type, int flags); -static void set_leds(ukbd_state_t *state, int leds); -static int set_typematic(keyboard_t *kbd, int code); +Static void set_leds(ukbd_state_t *state, int leds); +Static int set_typematic(keyboard_t *kbd, int code); #ifdef UKBD_EMULATE_ATSCANCODE -static int keycode2scancode(int keycode, int shift, int up); +Static int keycode2scancode(int keycode, int shift, int up); #endif /* local variables */ @@ -403,11 +403,11 @@ static int keycode2scancode(int keycode, int shift, int up); #include <dev/kbd/kbdtables.h> /* structures for the default keyboard */ -static keyboard_t default_kbd; -static ukbd_state_t default_kbd_state; -static keymap_t default_keymap; -static accentmap_t default_accentmap; -static fkeytab_t default_fkeytab[NUM_FKEYS]; +Static keyboard_t default_kbd; +Static ukbd_state_t default_kbd_state; +Static keymap_t default_keymap; +Static accentmap_t default_accentmap; +Static fkeytab_t default_fkeytab[NUM_FKEYS]; /* * The back door to the keyboard driver! @@ -418,7 +418,7 @@ static fkeytab_t default_fkeytab[NUM_FKEYS]; * NOTE: because of the way the low-level conole is initialized, this routine * may be called more than once!! */ -static int +Static int ukbd_configure(int flags) { return 0; @@ -453,7 +453,7 @@ ukbd_configure(int flags) /* low-level functions */ /* detect a keyboard */ -static int +Static int ukbd_probe(int unit, void *arg, int flags) { void **data; @@ -473,7 +473,7 @@ ukbd_probe(int unit, void *arg, int flags) } /* reset and initialize the device */ -static int +Static int ukbd_init(int unit, keyboard_t **kbdp, void *arg, int flags) { keyboard_t *kbd; @@ -575,7 +575,7 @@ ukbd_init(int unit, keyboard_t **kbdp, void *arg, int flags) return 0; } -static int +Static int ukbd_enable_intr(keyboard_t *kbd, int on, usbd_intr_t *func) { ukbd_state_t *state = (ukbd_state_t *)kbd->kb_data; @@ -607,7 +607,7 @@ ukbd_enable_intr(keyboard_t *kbd, int on, usbd_intr_t *func) } /* finish using this keyboard */ -static int +Static int ukbd_term(keyboard_t *kbd) { ukbd_state_t *state; @@ -650,7 +650,7 @@ ukbd_term(keyboard_t *kbd) /* keyboard interrupt routine */ -static void +Static void ukbd_timeout(void *arg) { keyboard_t *kbd; @@ -665,7 +665,7 @@ ukbd_timeout(void *arg) splx(s); } -static int +Static int ukbd_interrupt(keyboard_t *kbd, void *arg) { usbd_status status = (usbd_status)arg; @@ -787,7 +787,7 @@ ukbd_interrupt(keyboard_t *kbd, void *arg) return 0; } -static int +Static int ukbd_getc(ukbd_state_t *state) { int c; @@ -813,7 +813,7 @@ ukbd_getc(ukbd_state_t *state) } /* test the interface to the device */ -static int +Static int ukbd_test_if(keyboard_t *kbd) { return 0; @@ -823,7 +823,7 @@ ukbd_test_if(keyboard_t *kbd) * Enable the access to the device; until this function is called, * the client cannot read from the keyboard. */ -static int +Static int ukbd_enable(keyboard_t *kbd) { int s; @@ -835,7 +835,7 @@ ukbd_enable(keyboard_t *kbd) } /* disallow the access to the device */ -static int +Static int ukbd_disable(keyboard_t *kbd) { int s; @@ -847,7 +847,7 @@ ukbd_disable(keyboard_t *kbd) } /* read one byte from the keyboard if it's allowed */ -static int +Static int ukbd_read(keyboard_t *kbd, int wait) { ukbd_state_t *state; @@ -907,7 +907,7 @@ ukbd_read(keyboard_t *kbd, int wait) } /* check if data is waiting */ -static int +Static int ukbd_check(keyboard_t *kbd) { if (!KBD_IS_ACTIVE(kbd)) @@ -922,7 +922,7 @@ ukbd_check(keyboard_t *kbd) } /* read char from the keyboard */ -static u_int +Static u_int ukbd_read_char(keyboard_t *kbd, int wait) { ukbd_state_t *state; @@ -1108,7 +1108,7 @@ next_code: } /* check if char is waiting */ -static int +Static int ukbd_check_char(keyboard_t *kbd) { ukbd_state_t *state; @@ -1124,7 +1124,7 @@ ukbd_check_char(keyboard_t *kbd) } /* some useful control functions */ -static int +Static int ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) { /* trasnlate LED_XXX bits into the device specific bits */ @@ -1241,7 +1241,7 @@ ukbd_ioctl(keyboard_t *kbd, u_long cmd, caddr_t arg) } /* lock the access to the keyboard */ -static int +Static int ukbd_lock(keyboard_t *kbd, int lock) { /* XXX ? */ @@ -1249,7 +1249,7 @@ ukbd_lock(keyboard_t *kbd, int lock) } /* clear the internal state of the keyboard */ -static void +Static void ukbd_clear_state(keyboard_t *kbd) { ukbd_state_t *state; @@ -1271,7 +1271,7 @@ ukbd_clear_state(keyboard_t *kbd) } /* save the internal state */ -static int +Static int ukbd_get_state(keyboard_t *kbd, void *buf, size_t len) { if (len == 0) @@ -1283,7 +1283,7 @@ ukbd_get_state(keyboard_t *kbd, void *buf, size_t len) } /* set the internal state */ -static int +Static int ukbd_set_state(keyboard_t *kbd, void *buf, size_t len) { if (len < sizeof(ukbd_state_t)) @@ -1292,7 +1292,7 @@ ukbd_set_state(keyboard_t *kbd, void *buf, size_t len) return 0; } -static int +Static int ukbd_poll(keyboard_t *kbd, int on) { ukbd_state_t *state; @@ -1316,7 +1316,7 @@ ukbd_poll(keyboard_t *kbd, int on) /* local functions */ -static int +Static int probe_keyboard(struct usb_attach_arg *uaa, int flags) { usb_interface_descriptor_t *id; @@ -1335,7 +1335,7 @@ probe_keyboard(struct usb_attach_arg *uaa, int flags) return EINVAL; } -static int +Static int init_keyboard(ukbd_state_t *state, int *type, int flags) { usb_endpoint_descriptor_t *ed; @@ -1382,7 +1382,7 @@ bLength=%d bDescriptorType=%d bEndpointAddress=%d-%s bmAttributes=%d wMaxPacketS return 0; } -static void +Static void set_leds(ukbd_state_t *state, int leds) { u_int8_t res = leds; @@ -1392,7 +1392,7 @@ set_leds(ukbd_state_t *state, int leds) usbd_set_report_async(state->ks_iface, UHID_OUTPUT_REPORT, 0, &res, 1); } -static int +Static int set_typematic(keyboard_t *kbd, int code) { static int delays[] = { 250, 500, 750, 1000 }; @@ -1409,7 +1409,7 @@ set_typematic(keyboard_t *kbd, int code) } #ifdef UKBD_EMULATE_ATSCANCODE -static int +Static int keycode2scancode(int keycode, int shift, int up) { static int scan[] = { @@ -1434,7 +1434,7 @@ keycode2scancode(int keycode, int shift, int up) } #endif /* UKBD_EMULATE_ATSCANCODE */ -static int +Static int ukbd_driver_load(module_t mod, int what, void *arg) { switch (what) { |