+ if ((soglitch = tgetnum("sg")) < 0)
+ soglitch = 0;
+
+ /*
+ * Set up for underlining: some terminals don't need it;
+ * others have start/stop sequences, still others have an
+ * underline char sequence which is assumed to move the
+ * cursor forward one character. If underline sequence
+ * isn't available, settle for standout sequence.
+ */
+
+ if (tgetflag("ul") || tgetflag("os"))
+ ul_opt = 0;
+ if ((chUL = tgetstr("uc", &clearptr)) == NULL )
+ chUL = "";
+ if (((ULenter = tgetstr("us", &clearptr)) == NULL ||
+ (ULexit = tgetstr("ue", &clearptr)) == NULL) && !*chUL) {
+ if ((ULenter = Senter) == NULL || (ULexit = Sexit) == NULL) {
+ ULenter = "";
+ ULexit = "";
+ } else
+ ulglitch = soglitch;
+ } else {
+ if ((ulglitch = tgetnum("ug")) < 0)
+ ulglitch = 0;
+ }
+