- Syncronizes command line syntax warnings with manpage (bin/27010);
- silence gcc(1) warnings (sobomax). PR: 27010 Submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>, sobomax MFC after: 10 days
This commit is contained in:
parent
872825029c
commit
13edc2540c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77394
@ -109,7 +109,9 @@ int number;
|
||||
char letter;
|
||||
int token;
|
||||
|
||||
static void usage __P((void));
|
||||
int get_accent_definition_line __P((accentmap_t *));
|
||||
int get_key_definition_line __P((keymap_t *));
|
||||
void usage __P((void));
|
||||
|
||||
char *
|
||||
nextarg(int ac, char **av, int *indp, int oc)
|
||||
@ -130,11 +132,12 @@ mkfullname(const char *s1, const char *s2, const char *s3)
|
||||
int f;
|
||||
|
||||
f = strlen(s1) + strlen(s2) + strlen(s3) + 1;
|
||||
if (f > bufl)
|
||||
if (f > bufl) {
|
||||
if (buf)
|
||||
buf = (char *)realloc(buf, f);
|
||||
else
|
||||
buf = (char *)malloc(f);
|
||||
}
|
||||
if (!buf) {
|
||||
bufl = 0;
|
||||
return(NULL);
|
||||
@ -235,7 +238,7 @@ get_entry()
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
get_definition_line(FILE *fd, keymap_t *keymap, accentmap_t *accentmap)
|
||||
{
|
||||
int c;
|
||||
@ -902,7 +905,7 @@ set_bell_values(char *opt)
|
||||
pitch = strtol(opt, &v1, 0);
|
||||
if ((pitch < 0) || (*opt == '\0') || (*v1 != '\0')) {
|
||||
badopt:
|
||||
warnx("argument to -b must be DURATION.PITCH");
|
||||
warnx("argument to -b must be duration.pitch or [quiet.]visual|normal|off");
|
||||
return;
|
||||
}
|
||||
if (pitch != 0)
|
||||
@ -944,7 +947,7 @@ set_keyrates(char *opt)
|
||||
repeat = strtol(opt, &v1, 0);
|
||||
if ((repeat < 0) || (*opt == '\0') || (*v1 != '\0')) {
|
||||
badopt:
|
||||
warnx("argument to -r must be delay.repeat");
|
||||
warnx("argument to -r must be delay.repeat or slow|normal|fast");
|
||||
return;
|
||||
}
|
||||
for (n = 0; n < ndelays - 1; n++)
|
||||
@ -996,7 +999,7 @@ show_kbd_info(void)
|
||||
}
|
||||
printf("kbd%d:\n", info.kb_index);
|
||||
printf(" %.*s%d, type:%s (%d)\n",
|
||||
sizeof(info.kb_name), info.kb_name, info.kb_unit,
|
||||
(int)sizeof(info.kb_name), info.kb_name, info.kb_unit,
|
||||
get_kbd_type_name(info.kb_type), info.kb_type);
|
||||
}
|
||||
|
||||
@ -1027,7 +1030,7 @@ set_keyboard(char *device)
|
||||
#if 1
|
||||
printf("kbd%d\n", info.kb_index);
|
||||
printf(" %.*s%d, type:%s (%d)\n",
|
||||
sizeof(info.kb_name), info.kb_name, info.kb_unit,
|
||||
(int)sizeof(info.kb_name), info.kb_name, info.kb_unit,
|
||||
get_kbd_type_name(info.kb_type), info.kb_type);
|
||||
#endif
|
||||
|
||||
@ -1052,7 +1055,7 @@ release_keyboard(void)
|
||||
#if 1
|
||||
printf("kbd%d\n", info.kb_index);
|
||||
printf(" %.*s%d, type:%s (%d)\n",
|
||||
sizeof(info.kb_name), info.kb_name, info.kb_unit,
|
||||
(int)sizeof(info.kb_name), info.kb_name, info.kb_unit,
|
||||
get_kbd_type_name(info.kb_type), info.kb_type);
|
||||
#endif
|
||||
if (ioctl(0, CONS_RELKBD, 0) == -1)
|
||||
@ -1060,7 +1063,7 @@ release_keyboard(void)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
usage()
|
||||
{
|
||||
fprintf(stderr, "%s\n%s\n%s\n",
|
||||
|
@ -68,3 +68,5 @@
|
||||
extern int number;
|
||||
extern char letter;
|
||||
extern FILE *yyin;
|
||||
|
||||
extern int yylex __P((void));
|
||||
|
Loading…
Reference in New Issue
Block a user