1*17049c45SAxel Dörfler // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2*17049c45SAxel Dörfler // 3*17049c45SAxel Dörfler // Copyright (c) 2001-2002, OpenBeOS 4*17049c45SAxel Dörfler // 5*17049c45SAxel Dörfler // This software is part of the OpenBeOS distribution and is covered 6*17049c45SAxel Dörfler // by the OpenBeOS license. 7*17049c45SAxel Dörfler // 8*17049c45SAxel Dörfler // 9*17049c45SAxel Dörfler // File: beep.cpp 10*17049c45SAxel Dörfler // Author: Mahmoud Al Gammal 11*17049c45SAxel Dörfler // Description: BeOS' command line "beep" command 12*17049c45SAxel Dörfler // Created : Monday, September 23, 2002 13*17049c45SAxel Dörfler // 14*17049c45SAxel Dörfler // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 15*17049c45SAxel Dörfler 16*17049c45SAxel Dörfler #include <Beep.h> 17*17049c45SAxel Dörfler #include <stdio.h> 18*17049c45SAxel Dörfler 19*17049c45SAxel Dörfler int 20*17049c45SAxel Dörfler main( int argc, char* argv[] ) 21*17049c45SAxel Dörfler { 22*17049c45SAxel Dörfler 23*17049c45SAxel Dörfler // "beep" can only take a single optional event name 24*17049c45SAxel Dörfler if (argc > 2) { 25*17049c45SAxel Dörfler fprintf(stdout,"usage: beep [ eventname ]\n"); 26*17049c45SAxel Dörfler fprintf(stdout,"Event names are found in the Sounds preferences panel.\n"); 27*17049c45SAxel Dörfler fflush(stdout); 28*17049c45SAxel Dörfler return B_OK; 29*17049c45SAxel Dörfler } 30*17049c45SAxel Dörfler 31*17049c45SAxel Dörfler // if no event name is specified, play the default "Beep" event 32*17049c45SAxel Dörfler if (argc == 1) { 33*17049c45SAxel Dörfler return beep(); 34*17049c45SAxel Dörfler } else { 35*17049c45SAxel Dörfler return system_beep(argv[1]); 36*17049c45SAxel Dörfler } 37*17049c45SAxel Dörfler } 38*17049c45SAxel Dörfler 39*17049c45SAxel Dörfler // beep.c 40