From 0afb0992eef469356d0675cc928777f3d8bb80d7 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 19 Aug 2008 19:02:44 +0200 Subject: Fix some warnings Move BarTransformIfShared to ui_act.c and add unistd.h needed by read () --- src/ui_act.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/ui_act.c') diff --git a/src/ui_act.c b/src/ui_act.c index 41b1356..f027594 100644 --- a/src/ui_act.c +++ b/src/ui_act.c @@ -23,6 +23,7 @@ THE SOFTWARE. /* functions responding to user's keystrokes */ #include +#include /* needed by readline */ #include #include @@ -38,6 +39,23 @@ THE SOFTWARE. BarUiMsg ("No song playing.\n"); \ return; } +/* transform station if necessary to allow changes like rename, rate, ... + * @param piano handle + * @param transform this station + * @return 0 = error, 1 = everything went well + */ +int BarTransformIfShared (PianoHandle_t *ph, PianoStation_t *station) { + /* shared stations must be transformed */ + if (!station->isCreator) { + BarUiMsg ("Transforming station... "); + if (BarUiPrintPianoStatus (PianoTransformShared (ph, station)) != + PIANO_RET_OK) { + return 0; + } + } + return 1; +} + /* print current shortcut configuration */ void BarUiActHelp (BAR_KS_ARGS) { -- cgit v1.2.3