#define ATOOL 3
#define BSDTAR 4
#define LOCKER 5
-#define NLAUNCH 6
-#define UNKNOWN 7
+#define PIPES 6
+#define NLAUNCH 7
+#define UNKNOWN 8
/* Utilities to open files, run actions */
static char * const utils[] = {
#else
"vlock",
#endif
+ "pipes.sh",
"nlaunch",
"UNKNOWN"
};
return TRUE;
}
+static void lock_terminal(void)
+{
+ char *tmp = utils[LOCKER];
+ if (!getutil(tmp))
+ tmp = utils[PIPES];;
+
+ spawn(tmp, NULL, NULL, NULL, F_NORMAL);
+}
+
/*
* The help string tokens (each line) start with a HEX value
* which indicates the number of spaces to print before the
break;
}
default: /* SEL_LOCK */
- spawn(utils[LOCKER], NULL, NULL, NULL, F_NORMAL);
+ lock_terminal();
break;
}
/* Locker */
if (idletimeout && idle == idletimeout) {
idle = 0;
- tmp = utils[LOCKER];
- if (!getutil(tmp))
- tmp = "pipes.sh";
-
- spawn(tmp, NULL, NULL, NULL, F_NORMAL);
+ lock_terminal();
if (ndents)
copycurname();
goto begin;