applied style patch by Vasilis Kaoutsis
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19602 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
422f8ec3ee
commit
f3011ac047
|
@ -1,27 +1,24 @@
|
||||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
/*
|
||||||
//
|
* Copyright 2002-2006, Haiku Inc. All rights reserved.
|
||||||
// Copyright (c) 2001-2002, OpenBeOS
|
* Distributed under the terms of the MIT License.
|
||||||
//
|
*
|
||||||
// This software is part of the OpenBeOS distribution and is covered
|
* Authors:
|
||||||
// by the OpenBeOS license.
|
* Mahmoud Al Gammal
|
||||||
//
|
*/
|
||||||
//
|
|
||||||
// File: beep.cpp
|
|
||||||
// Author: Mahmoud Al Gammal
|
|
||||||
// Description: BeOS' command line "beep" command
|
|
||||||
// Created : Monday, September 23, 2002
|
|
||||||
//
|
|
||||||
// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
|
|
||||||
|
|
||||||
#include <Beep.h>
|
#include <Beep.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main( int argc, char* argv[] )
|
main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
// "beep" can only take a single optional event name
|
// "beep" can only take a single optional event name
|
||||||
if (argc > 2) {
|
if (argc > 2
|
||||||
|
|| (argc == 2 && argv[1][0] == '-')) {
|
||||||
fprintf(stdout,"usage: beep [ eventname ]\n");
|
fprintf(stdout,"usage: beep [ eventname ]\n");
|
||||||
fprintf(stdout,"Event names are found in the Sounds preferences panel.\n");
|
fprintf(stdout,"Event names are found in the Sounds preferences panel.\n");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
@ -29,11 +26,8 @@ main( int argc, char* argv[] )
|
||||||
}
|
}
|
||||||
|
|
||||||
// if no event name is specified, play the default "Beep" event
|
// if no event name is specified, play the default "Beep" event
|
||||||
if (argc == 1) {
|
if (argc == 1)
|
||||||
return beep();
|
return beep();
|
||||||
} else {
|
else
|
||||||
return system_beep(argv[1]);
|
return system_beep(argv[1]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// beep.c
|
|
||||||
|
|
Loading…
Reference in New Issue