char *copyright =
"Copyright (C) Johnathan Nightingale, 2002. "
"Use and Distribution subject to GPL. "
char *copyright =
"Copyright (C) Johnathan Nightingale, 2002. "
"Use and Distribution subject to GPL. "
/* If we get interrupted, it would be nice to not leave the speaker beeping in
perpetuity. */
void handle_signal(int signum) {
/* If we get interrupted, it would be nice to not leave the speaker beeping in
perpetuity. */
void handle_signal(int signum) {
/* print usage and exit */
void usage_bail(const char *executable_name) {
printf("Usage:\n%s [-f freq] [-l length] [-r reps] [-d delay] "
/* print usage and exit */
void usage_bail(const char *executable_name) {
printf("Usage:\n%s [-f freq] [-l length] [-r reps] [-d delay] "
executable_name);
printf("%s [Options...] [-n] [--new] [Options...] ... \n", executable_name);
printf("%s [-h] [--help]\n", executable_name);
executable_name);
printf("%s [Options...] [-n] [--new] [Options...] ... \n", executable_name);
printf("%s [-h] [--help]\n", executable_name);
else
if((console_fd = open("/dev/tty0", O_WRONLY)) == -1)
console_fd = open("/dev/vc/0", O_WRONLY);
else
if((console_fd = open("/dev/tty0", O_WRONLY)) == -1)
console_fd = open("/dev/vc/0", O_WRONLY);
if(console_fd == -1) {
fprintf(stderr, "Could not open %s for writing\n",
console_device != NULL ? console_device : "/dev/tty0 or /dev/vc/0");
if(console_fd == -1) {
fprintf(stderr, "Could not open %s for writing\n",
console_device != NULL ? console_device : "/dev/tty0 or /dev/vc/0");
do_beep(parms.freq);
/* Look ma, I'm not ansi C compatible! */
usleep(1000*parms.length); /* wait... */
do_beep(parms.freq);
/* Look ma, I'm not ansi C compatible! */
usleep(1000*parms.length); /* wait... */