+
+ /*
+ * 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 &&
+ (!*chUL) && (ULenter = tgetstr("so", &clearptr)) == NULL)
+ ULenter = "";
+ if ((ULexit = tgetstr("ue", &clearptr)) == NULL &&
+ (!*chUL) && (ULexit = tgetstr("se", &clearptr)) == NULL)
+ ULexit = "";
+