aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2016-10-25 22:59:35 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-11-08 07:33:48 +0100
commit718c5b9f1d16732773e60bb688a76beea7cb1253 (patch)
tree23507785b0bc3f0b99972b105e00ef4d6457601d /nx-X11/programs
parentb5cc3c94ed0de2d657edc2e5a95fd10e9db3c0a7 (diff)
downloadnx-libs-718c5b9f1d16732773e60bb688a76beea7cb1253.tar.gz
nx-libs-718c5b9f1d16732773e60bb688a76beea7cb1253.tar.bz2
nx-libs-718c5b9f1d16732773e60bb688a76beea7cb1253.zip
Keyboard.c: more whitespace/formatting fixes
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 1eca33665..3dd8b0668 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -542,7 +542,7 @@ static char *nxagentXkbGetRules()
sizeDflt = strlen(XKB_DFLT_RULES_FILE);
sizeAlt = strlen(XKB_ALTS_RULES_FILE);
size = strlen(XkbBaseDirectory) + strlen("/rules/");
- size += (sizeDflt > sizeAlt) ? sizeDflt: sizeAlt;
+ size += (sizeDflt > sizeAlt) ? sizeDflt : sizeAlt;
if ((path = malloc((size + 1) * sizeof(char))) == NULL)
{
@@ -888,13 +888,13 @@ XkbError:
rules = nxagentXkbGetRules();
- if ((nxagentKeyboard != NULL) && (strcmp(nxagentKeyboard, "query") !=0))
+ if ((nxagentKeyboard != NULL) && (strcmp(nxagentKeyboard, "query") != 0))
{
for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != 0; i++);
if(nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0)
{
- ErrorF("Warning: Wrong keyboard type: %s.\n",nxagentKeyboard);
+ ErrorF("Warning: Wrong keyboard type: %s.\n", nxagentKeyboard);
goto XkbError;
}
@@ -951,7 +951,7 @@ XkbError:
options = XKB_DFLT_KB_OPTIONS;
#ifdef TEST
- fprintf(stderr, "nxagentKeyboardProc: XkbInitialMap [%s]\n", XkbInitialMap ? XkbInitialMap: "NULL");
+ fprintf(stderr, "nxagentKeyboardProc: XkbInitialMap [%s]\n", XkbInitialMap ? XkbInitialMap : "NULL");
#endif
if (XkbInitialMap) {
@@ -1829,7 +1829,8 @@ void nxagentKeycodeConversionSetup(void)
if (drulesLen != 0)
{
char *sessionpath = nxagentGetSessionPath();
- if (sessionpath != NULL){
+ if (sessionpath != NULL)
+ {
int keyboard_file_path_size = strlen(sessionpath) + strlen("/keyboard");
char *keyboard_file_path = malloc((keyboard_file_path_size + 1) * sizeof(char));
FILE *keyboard_file;
@@ -1840,26 +1841,28 @@ void nxagentKeycodeConversionSetup(void)
strcpy(keyboard_file_path, sessionpath);
strcat(keyboard_file_path, "/keyboard");
if ((keyboard_file = fopen(keyboard_file_path, "w")) != NULL) {
- if ( drules != NULL )
+ if (drules != NULL)
fprintf(keyboard_file, "rules=\"%s\"\n", drules[0] == '\0' ? "," : drules);
- if ( dmodel != NULL )
+ if (dmodel != NULL)
fprintf(keyboard_file, "model=\"%s\"\n", dmodel[0] == '\0' ? "," : dmodel);
- if ( dlayout != NULL )
+ if (dlayout != NULL)
fprintf(keyboard_file, "layout=\"%s\"\n", dlayout[0] == '\0' ? "," : dlayout);
- if ( dvariant != NULL )
+ if (dvariant != NULL)
fprintf(keyboard_file, "variant=\"%s\"\n", dvariant[0] == '\0' ? "," : dvariant);
- if ( doptions != NULL )
+ if (doptions != NULL)
fprintf(keyboard_file, "options=\"%s\"\n", doptions[0] == '\0' ? "," : doptions);
fclose(keyboard_file);
fprintf(stderr, "keyboard file created\n");
}
- else {
+ else
+ {
int save_err = errno;
fprintf(stderr, "keyboard file not created: %s\n", strerror(save_err));
}
free(keyboard_file_path);
}
- else {
+ else
+ {
fprintf(stderr, "SessionPath not defined\n");
}
}