From f3011ac047adb1b3e627eb2b6ad7875a1fdacb4b Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 22 Dec 2006 08:19:00 +0000 Subject: [PATCH] applied style patch by Vasilis Kaoutsis git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19602 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/beep.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/bin/beep.cpp b/src/bin/beep.cpp index 426f969f49..9c4386657c 100644 --- a/src/bin/beep.cpp +++ b/src/bin/beep.cpp @@ -1,27 +1,24 @@ -// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -// -// Copyright (c) 2001-2002, OpenBeOS -// -// This software is part of the OpenBeOS distribution and is covered -// by the OpenBeOS license. -// -// -// File: beep.cpp -// Author: Mahmoud Al Gammal -// Description: BeOS' command line "beep" command -// Created : Monday, September 23, 2002 -// -// ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ +/* + * Copyright 2002-2006, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Authors: + * Mahmoud Al Gammal + */ + #include + #include + int -main( int argc, char* argv[] ) +main(int argc, char* argv[]) { // "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,"Event names are found in the Sounds preferences panel.\n"); fflush(stdout); @@ -29,11 +26,8 @@ main( int argc, char* argv[] ) } // if no event name is specified, play the default "Beep" event - if (argc == 1) { + if (argc == 1) return beep(); - } else { + else return system_beep(argv[1]); - } } - -// beep.c