/****************************************************************************
- * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <ctype.h>
#include <tic.h>
-MODULE_ID("$Id: lib_tparm.c,v 1.92 2014/05/23 00:33:45 tom Exp $")
+MODULE_ID("$Id: lib_tparm.c,v 1.95 2016/05/28 23:22:52 tom Exp $")
/*
* char *
case 'x': /* FALLTHRU */
case 'X': /* FALLTHRU */
case 's':
+#ifdef EXP_XTERM_1005
+ case 'u':
+#endif
*format++ = *s;
done = TRUE;
break;
case 'x': /* FALLTHRU */
case 'X': /* FALLTHRU */
case 'c': /* FALLTHRU */
+#ifdef EXP_XTERM_1005
+ case 'u':
+#endif
if (lastpop <= 0)
number++;
lastpop = -1;
termcap_hack = FALSE;
if (popcount == 0) {
termcap_hack = TRUE;
- popcount = number;
for (i = number - 1; i >= 0; i--) {
if (p_is_s[i])
spush(p_is_s[i]);
save_char(npop());
break;
+#ifdef EXP_XTERM_1005
+ case 'u':
+ {
+ unsigned char target[10];
+ unsigned source = (unsigned) npop();
+ int rc = _nc_conv_to_utf8(target, source, (unsigned)
+ sizeof(target));
+ int n;
+ for (n = 0; n < rc; ++n) {
+ save_char(target[n]);
+ }
+ }
+ break;
+#endif
case 'l':
npush((int) strlen(spop()));
break;
break;
case 'A':
- npush(npop() && npop());
+ y = npop();
+ x = npop();
+ npush(y && x);
break;
case 'O':
- npush(npop() || npop());
+ y = npop();
+ x = npop();
+ npush(y || x);
break;
case '&':