From 95b591a4515c4b15e35d04d2dc24266e4b4ba59b Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 7 Aug 2022 08:04:42 +0000 Subject: fix indentation style and space/tab --- app/xterm/main.c | 136 +++++++++++++++++++++++++++---------------------------- 1 file changed, 68 insertions(+), 68 deletions(-) (limited to 'app') diff --git a/app/xterm/main.c b/app/xterm/main.c index 0c1bf23bc..39ee30924 100644 --- a/app/xterm/main.c +++ b/app/xterm/main.c @@ -2912,84 +2912,84 @@ main(int argc, char *argv[]ENVP_ARG) { #if OPT_EXEC_XTERM - String data = NULL; - getKeymapResources(SHELL_OF(term), "vt100", "VT100", XtRString, &data, sizeof(data)); - if (data && - (strstr(data, "exec-formatted") || strstr(data, "exec-selectable"))) { - - if (pledge("stdio rpath wpath id proc exec tty", NULL) == -1) { - xtermWarning("pledge\n"); - exit(1); - } - } else + String data = NULL; + getKeymapResources(SHELL_OF(term), "vt100", "VT100", XtRString, &data, sizeof(data)); + if (data && + (strstr(data, "exec-formatted") || strstr(data, "exec-selectable"))) { + + if (pledge("stdio rpath wpath id proc exec tty", NULL) == -1) { + xtermWarning("pledge\n"); + exit(1); + } + } else #endif /* OPT_EXEC_XTERM */ - { - char *env; + { + char *env; - if ((env = getenv("HOME"))) { - char homefile[PATH_MAX]; - if (snprintf(homefile, sizeof homefile, "%s/.fonts", - env) <= sizeof(homefile)) + if ((env = getenv("HOME"))) { + char homefile[PATH_MAX]; + if (snprintf(homefile, sizeof homefile, "%s/.fonts", + env) <= sizeof(homefile)) if (unveil(homefile, "r") == -1) - xtermPerror("unveil %s", homefile); - if (snprintf(homefile, sizeof homefile, "%s/.cache/fontconfig", - env) <= sizeof(homefile)) - if (unveil(homefile, "r") == 1) - xtermPerror("unveil %s", homefile); - if (snprintf(homefile, sizeof homefile, "%s/.icons", - env) <= sizeof(homefile)) - if (unveil(homefile, "r") == -1) - xtermPerror("unveil %s", homefile); - } - if ((env = getenv("XDG_CONFIG_HOME"))) { - char xdgfile[PATH_MAX]; - - if (snprintf(xdgfile, sizeof xdgfile, "%s/fontconfig", - env) <= sizeof(xdgfile)) - if (unveil(xdgfile, "r") == -1) - xtermPerror("unveil %s", xdgfile); - if (snprintf(xdgfile, sizeof xdgfile, "%s/icons", - env) <= sizeof(xdgfile)) - if (unveil(xdgfile, "r") == -1) - xtermPerror("unveil %s", xdgfile); - } - if ((env = getenv("XDG_DATA_HOME"))) { - char xdgfile[PATH_MAX]; - - if (snprintf(xdgfile, sizeof xdgfile, "%s/fontconfig", - env) <= sizeof(xdgfile)) - if (unveil(xdgfile, "r") == -1) - xtermPerror("unveil %s", xdgfile); - if (snprintf(xdgfile, sizeof xdgfile, "%s/icons", - env) <= sizeof(xdgfile)) - if (unveil(xdgfile, "r") == -1) - xtermPerror("unveil %s", xdgfile); - } - if ((env = getenv("XDG_CACHE_HOME"))) { - char xdgfile[PATH_MAX]; - - if (snprintf(xdgfile, sizeof xdgfile, "%s/fontconfig", - env) <= sizeof(xdgfile)) - if (unveil(xdgfile, "r") == -1) - xtermPerror("unveil %s", xdgfile); + xtermPerror("unveil %s", homefile); + if (snprintf(homefile, sizeof homefile, "%s/.cache/fontconfig", + env) <= sizeof(homefile)) + if (unveil(homefile, "r") == 1) + xtermPerror("unveil %s", homefile); + if (snprintf(homefile, sizeof homefile, "%s/.icons", + env) <= sizeof(homefile)) + if (unveil(homefile, "r") == -1) + xtermPerror("unveil %s", homefile); + } + if ((env = getenv("XDG_CONFIG_HOME"))) { + char xdgfile[PATH_MAX]; + + if (snprintf(xdgfile, sizeof xdgfile, "%s/fontconfig", + env) <= sizeof(xdgfile)) + if (unveil(xdgfile, "r") == -1) + xtermPerror("unveil %s", xdgfile); + if (snprintf(xdgfile, sizeof xdgfile, "%s/icons", + env) <= sizeof(xdgfile)) + if (unveil(xdgfile, "r") == -1) + xtermPerror("unveil %s", xdgfile); + } + if ((env = getenv("XDG_DATA_HOME"))) { + char xdgfile[PATH_MAX]; + + if (snprintf(xdgfile, sizeof xdgfile, "%s/fontconfig", + env) <= sizeof(xdgfile)) + if (unveil(xdgfile, "r") == -1) + xtermPerror("unveil %s", xdgfile); + if (snprintf(xdgfile, sizeof xdgfile, "%s/icons", + env) <= sizeof(xdgfile)) + if (unveil(xdgfile, "r") == -1) + xtermPerror("unveil %s", xdgfile); + } + if ((env = getenv("XDG_CACHE_HOME"))) { + char xdgfile[PATH_MAX]; + + if (snprintf(xdgfile, sizeof xdgfile, "%s/fontconfig", + env) <= sizeof(xdgfile)) + if (unveil(xdgfile, "r") == -1) + xtermPerror("unveil %s", xdgfile); } if (unveil("/usr/X11R6", "r") == -1) - xtermPerror("unveil /usr/X11R6"); - if (unveil("/usr/local/share/fonts", "r") == -1) - xtermPerror("unveil /usr/local/share/fonts"); + xtermPerror("unveil /usr/X11R6"); + if (unveil("/usr/local/share/fonts", "r") == -1) + xtermPerror("unveil /usr/local/share/fonts"); if (unveil("/var/cache/fontconfig", "r") == -1) - xtermPerror("unveil /var/cache/fontconfig"); + xtermPerror("unveil /var/cache/fontconfig"); if (unveil("/usr/local/share/icons", "r") == -1) - xtermPerror("unveil /usr/local/share/icons"); + xtermPerror("unveil /usr/local/share/icons"); if (unveil("/usr/local/lib/X11/icons", "r") == -1) - xtermPerror("unveil /usr/local/lib/X11/icons"); + xtermPerror("unveil /usr/local/lib/X11/icons"); - if (pledge("stdio rpath proc tty", NULL) == -1) { - xtermWarning("pledge\n"); - exit(1); - } - } + if (pledge("stdio rpath proc tty", NULL) == -1) { + xtermWarning("pledge\n"); + exit(1); + } + } } for (;;) { -- cgit v1.2.3