/****************************************************************************
- * Copyright (c) 2015 Free Software Foundation, Inc. *
+ * Copyright 2020 Thomas E. Dickey *
+ * Copyright 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 *
/*
* Author: Thomas E. Dickey
*
- * $Id: test_setupterm.c,v 1.8 2015/06/28 00:53:46 tom Exp $
+ * $Id: test_setupterm.c,v 1.10 2020/02/02 23:34:34 tom Exp $
*
* A simple demo of setupterm/restartterm.
*/
int rc;
int err = -99;
- if (r_opt) {
+#if HAVE_RESTARTTERM
+ if (r_opt)
rc = restartterm(name, 0, f_opt ? NULL : &err);
- } else {
+ else
+#endif
rc = setupterm(name, 0, f_opt ? NULL : &err);
- }
test_rc(name, rc, err);
}
" -f treat errors as fatal",
" -n set environment to disable terminfo database, assuming",
" the compiled-in paths for database also fail",
+#if HAVE_RESTARTTERM
" -r test restartterm rather than setupterm",
+#endif
};
unsigned n;
for (n = 0; n < SIZEOF(msg); ++n) {
case 'n':
n_opt = TRUE;
break;
+#if HAVE_RESTARTTERM
case 'r':
r_opt = TRUE;
break;
+#endif
default:
usage();
break;