tcp: Fix 64 bit build with debugging features enabled.
[haiku.git] / src / bin / beep.cpp
blobd1d681d5e9cd9a18aca6c5bafcf0219b47599e67
1 /*
2 * Copyright 2002-2006, Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Mahmoud Al Gammal
7 */
10 #include <Beep.h>
12 #include <stdio.h>
15 int
16 main(int argc, char* argv[])
18 // "beep" can only take a single optional event name
19 if (argc > 2
20 || (argc == 2 && argv[1][0] == '-')) {
21 fprintf(stdout, "usage: beep [ eventname ]\n");
22 fprintf(stdout, "Event names are found in the "
23 "Sounds preferences panel.\n");
24 fflush(stdout);
25 return B_OK;
28 // if no event name is specified, play the default "Beep" event
29 if (argc == 1)
30 return beep();
31 else
32 return system_beep(argv[1]);