Command Line Beep. Coded by Mahmoud Al Gammal
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1156 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -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 <Beep.h>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
// 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 /////////////////////////////////////////////////////////////////
|
||||||
|
//===========================================================================
|
||||||
Reference in New Issue
Block a user