aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-10-22 23:02:56 +0200
committerUlrich Sibiller <uli42@gmx.de>2020-01-05 22:37:35 +0100
commit838572f7b3cbd0005486dc076ba0df6ec8fab50a (patch)
tree21a0d0b0fe296a7454d4d7c9a2c629df0f2c8f83
parent5067b1695fa38596526e72781bdd5391f4b316cf (diff)
downloadnx-libs-838572f7b3cbd0005486dc076ba0df6ec8fab50a.tar.gz
nx-libs-838572f7b3cbd0005486dc076ba0df6ec8fab50a.tar.bz2
nx-libs-838572f7b3cbd0005486dc076ba0df6ec8fab50a.zip
Dialog.c: save some lines
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Dialog.c37
1 files changed, 4 insertions, 33 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
index 0dcdda5a4..ccea93a92 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c
@@ -198,7 +198,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_KILL_SESSION_TYPE;
local = DIALOG_KILL_SESSION_LOCAL;
pid = &nxagentKillDialogPid;
-
break;
}
case DIALOG_SUSPEND_SESSION:
@@ -207,7 +206,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_SUSPEND_SESSION_TYPE;
local = DIALOG_SUSPEND_SESSION_LOCAL;
pid = &nxagentSuspendDialogPid;
-
break;
}
case DIALOG_ROOTLESS:
@@ -216,7 +214,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_ROOTLESS_TYPE;
local = DIALOG_ROOTLESS_LOCAL;
pid = &nxagentRootlessDialogPid;
-
break;
}
case DIALOG_PULLDOWN:
@@ -226,7 +223,6 @@ void nxagentLaunchDialog(DialogType dialogType)
local = DIALOG_PULLDOWN_LOCAL;
pid = &nxagentPulldownDialogPid;
window = nxagentPulldownWindow;
-
break;
}
case DIALOG_FONT_REPLACEMENT:
@@ -235,7 +231,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_FONT_REPLACEMENT_TYPE;
local = DIALOG_FONT_REPLACEMENT_LOCAL;
pid = &nxagentFontsReplacementDialogPid;
-
break;
}
case DIALOG_FAILED_RECONNECTION:
@@ -244,7 +239,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_FAILED_RECONNECTION_TYPE;
local = DIALOG_FAILED_RECONNECTION_LOCAL;
pid = &nxagentFailedReconnectionDialogPid;
-
break;
}
case DIALOG_ENABLE_DESKTOP_RESIZE_MODE:
@@ -253,7 +247,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_ENABLE_DESKTOP_RESIZE_MODE_TYPE;
local = DIALOG_ENABLE_DESKTOP_RESIZE_MODE_LOCAL;
pid = &nxagentEnableRandRModeDialogPid;
-
break;
}
case DIALOG_DISABLE_DESKTOP_RESIZE_MODE:
@@ -262,7 +255,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_DISABLE_DESKTOP_RESIZE_MODE_TYPE;
local = DIALOG_DISABLE_DESKTOP_RESIZE_MODE_LOCAL;
pid = &nxagentDisableRandRModeDialogPid;
-
break;
}
case DIALOG_ENABLE_DEFER_MODE:
@@ -271,7 +263,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_ENABLE_DEFER_MODE_TYPE;
local = DIALOG_ENABLE_DEFER_MODE_LOCAL;
pid = &nxagentEnableDeferModePid;
-
break;
}
case DIALOG_DISABLE_DEFER_MODE:
@@ -280,7 +271,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_DISABLE_DEFER_MODE_TYPE;
local = DIALOG_DISABLE_DEFER_MODE_LOCAL;
pid = &nxagentDisableDeferModePid;
-
break;
}
case DIALOG_ENABLE_AUTOGRAB_MODE:
@@ -289,7 +279,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_ENABLE_AUTOGRAB_MODE_TYPE;
local = DIALOG_ENABLE_AUTOGRAB_MODE_LOCAL;
pid = &nxagentEnableAutograbModePid;
-
break;
}
case DIALOG_DISABLE_AUTOGRAB_MODE:
@@ -298,7 +287,6 @@ void nxagentLaunchDialog(DialogType dialogType)
type = DIALOG_DISABLE_AUTOGRAB_MODE_TYPE;
local = DIALOG_DISABLE_AUTOGRAB_MODE_LOCAL;
pid = &nxagentDisableAutograbModePid;
-
break;
}
default:
@@ -325,8 +313,7 @@ void nxagentLaunchDialog(DialogType dialogType)
}
/*
- * We don't want to receive SIGCHLD
- * before we store the child pid.
+ * We don't want to receive SIGCHLD before we store the child pid.
*/
sigemptyset(&set);
@@ -346,8 +333,7 @@ void nxagentLaunchDialog(DialogType dialogType)
dialogDisplay[0] = '\0';
/*
- * Restore the previous set of
- * blocked signal.
+ * Restore the previous set of blocked signal.
*/
sigprocmask(SIG_SETMASK, &oldSet, NULL);
@@ -385,8 +371,7 @@ void nxagentFailedReconnectionDialog(int alert, char *error)
NXTransAlert(alert, NX_ALERT_REMOTE);
/*
- * Make it possible to interrupt the
- * loop with a signal.
+ * Make it possible to interrupt the loop with a signal.
*/
while (NXDisplayError(nxagentDisplay) == 0 &&
@@ -477,73 +462,61 @@ void nxagentTerminateDialog(DialogType type)
case DIALOG_KILL_SESSION:
{
pid = nxagentKillDialogPid;
-
break;
}
case DIALOG_SUSPEND_SESSION:
{
pid = nxagentSuspendDialogPid;
-
break;
}
case DIALOG_ROOTLESS:
{
pid = nxagentRootlessDialogPid;
-
break;
}
case DIALOG_PULLDOWN:
{
pid = nxagentPulldownDialogPid;
-
break;
}
case DIALOG_FONT_REPLACEMENT:
{
pid = nxagentFontsReplacementDialogPid;
-
break;
}
case DIALOG_FAILED_RECONNECTION:
{
pid = nxagentFailedReconnectionDialogPid;
-
break;
}
case DIALOG_ENABLE_DESKTOP_RESIZE_MODE:
{
pid = nxagentEnableRandRModeDialogPid;
-
break;
}
case DIALOG_DISABLE_DESKTOP_RESIZE_MODE:
{
pid = nxagentDisableRandRModeDialogPid;
-
break;
}
case DIALOG_ENABLE_DEFER_MODE:
{
pid = nxagentEnableDeferModePid;
-
break;
}
case DIALOG_DISABLE_DEFER_MODE:
{
pid = nxagentDisableDeferModePid;
-
break;
}
case DIALOG_ENABLE_AUTOGRAB_MODE:
{
pid = nxagentEnableAutograbModePid;
-
break;
}
case DIALOG_DISABLE_AUTOGRAB_MODE:
{
pid = nxagentDisableAutograbModePid;
-
break;
}
default:
@@ -577,13 +550,11 @@ void nxagentTerminateDialog(DialogType type)
void nxagentTerminateDialogs(void)
{
- DialogType type;
-
#ifdef DEBUG
fprintf(stderr, "nxagentTerminateDialogs: Terminating all the running dialogs.\n");
#endif
- for (type = DIALOG_FIRST_TAG; type < DIALOG_LAST_TAG; type++)
+ for (DialogType type = DIALOG_FIRST_TAG; type < DIALOG_LAST_TAG; type++)
{
nxagentTerminateDialog(type);
}