diff --git a/src/apps/bin/beep.cpp b/src/apps/bin/beep.cpp new file mode 100644 index 0000000000..a18bb776f9 --- /dev/null +++ b/src/apps/bin/beep.cpp @@ -0,0 +1,51 @@ +//=========================================================================== +// ABOUT //////////////////////////////////////////////////////////////////// +//=========================================================================== + +// DESCRIPTION: BeOS' command line "beep" command +// AUTHOR: Mahmoud Al Gammal +// STARTED: MON, SPT 23th, 2002 +// LAST MODIFIED: MON, SPT 23th, 2002 + +//=========================================================================== +// END ABOUT //////////////////////////////////////////////////////////////// +//=========================================================================== + +//====================// + +//=========================================================================== +// INCLUDE ////////////////////////////////////////////////////////////////// +//=========================================================================== + +#include +#include + +//=========================================================================== +// END INCLUDE ////////////////////////////////////////////////////////////// +//=========================================================================== + +//====================// + +//=========================================================================== +// MAIN ///////////////////////////////////////////////////////////////////// +//=========================================================================== + +int main( int argc, char* argv[] ) { + + // "beep" can only take a single optional event name + if( argc > 2 ) { + cout << "usage: beep [ eventname ]\n" + "Event names are found in the Sounds preferences panel." + << std::endl; + + return B_OK; + } + + // if no event name is specified, play the default "Beep" event + if( argc == 1 ) return beep(); + else return system_beep( argv[1] ); +} + +//=========================================================================== +// END MAIN ///////////////////////////////////////////////////////////////// +//===========================================================================