aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/tack
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/tack')
-rw-r--r--contrib/ncurses/tack/Makefile.in21
-rw-r--r--contrib/ncurses/tack/ansi.c25
-rw-r--r--contrib/ncurses/tack/charset.c6
-rw-r--r--contrib/ncurses/tack/edit.c12
-rw-r--r--contrib/ncurses/tack/output.c12
-rw-r--r--contrib/ncurses/tack/tack.h10
6 files changed, 47 insertions, 39 deletions
diff --git a/contrib/ncurses/tack/Makefile.in b/contrib/ncurses/tack/Makefile.in
index f3f3c21b6d61..be0e90d5c69c 100644
--- a/contrib/ncurses/tack/Makefile.in
+++ b/contrib/ncurses/tack/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.22 2000/08/26 21:51:23 tom Exp $
+# $Id: Makefile.in,v 1.25 2001/03/24 19:49:06 tom Exp $
# Makefile for tack
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
@@ -28,6 +28,8 @@ mandir = @mandir@/man1
includedir = @includedir@
datadir = @datadir@
+LIBTOOL = @LIBTOOL@
+
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
@@ -44,6 +46,7 @@ CPPFLAGS = -DHAVE_CONFIG_H -I../tack -I$(srcdir) @CPPFLAGS@
CCFLAGS = $(CPPFLAGS) $(CFLAGS)
+CFLAGS_LIBTOOL = $(CCFLAGS)
CFLAGS_NORMAL = $(CCFLAGS)
CFLAGS_DEBUG = $(CCFLAGS) @CC_G_OPT@ -DTRACE
CFLAGS_PROFILE = $(CCFLAGS) -pg
@@ -52,10 +55,11 @@ CFLAGS_SHARED = $(CCFLAGS) @CC_SHARED_OPTS@
CFLAGS_DEFAULT = $(CFLAGS_@DFT_UPR_MODEL@)
LD = @LD@
-LINK = @LINK_PROGS@ $(CC)
+LINK = @LINK_PROGS@ $(LIBTOOL) $(CC)
LDFLAGS = @EXTRA_LDFLAGS@ \
@PROG_ARGS@ @LDFLAGS@ @LD_MODEL@ @LIBS@ @EXTRA_LIBS@
+LDFLAGS_LIBTOOL = $(LDFLAGS)
LDFLAGS_NORMAL = $(LDFLAGS)
LDFLAGS_DEBUG = $(LDFLAGS) @CC_G_OPT@
LDFLAGS_PROFILE = $(LDFLAGS) -pg
@@ -88,11 +92,11 @@ uninstall.libs:
install.tack: $(PROGS) \
$(DESTDIR)$(bindir) \
$(DESTDIR)$(mandir)
- $(INSTALL_PROGRAM) tack$x $(DESTDIR)$(bindir)/tack$x
+ $(LIBTOOL) $(INSTALL_PROGRAM) tack$x $(DESTDIR)$(bindir)/tack$x
$(INSTALL_DATA) $(srcdir)/tack.1 $(DESTDIR)$(mandir)/tack.1
uninstall.tack:
- -@rm -f $(DESTDIR)$(bindir)/tack$x
+ -@$(LIBTOOL) rm -f $(DESTDIR)$(bindir)/tack$x
-@rm -f $(DESTDIR)$(mandir)/tack.1
$(DESTDIR)$(bindir) \
@@ -134,15 +138,16 @@ tags:
@MAKE_UPPER_TAGS@TAGS:
@MAKE_UPPER_TAGS@ etags *.[ch]
-clean ::
- -rm -f tags TAGS do.tic *~
+mostlyclean ::
+ -rm -f tags TAGS *.i do.tic *~
+
+clean :: mostlyclean
-rm -f $(PROGS)
+ -rm -rf .libs
distclean :: clean
-rm -f Makefile
-mostlyclean :: clean
-
realclean :: distclean
tack.tar: Makefile.in modules *.[ch] tack.1 HISTORY COPYING
diff --git a/contrib/ncurses/tack/ansi.c b/contrib/ncurses/tack/ansi.c
index df7b39f31e2b..4e81f223954e 100644
--- a/contrib/ncurses/tack/ansi.c
+++ b/contrib/ncurses/tack/ansi.c
@@ -21,7 +21,7 @@
#include <tack.h>
-MODULE_ID("$Id: ansi.c,v 1.5 2000/04/22 21:06:57 tom Exp $")
+MODULE_ID("$Id: ansi.c,v 1.8 2001/03/24 22:00:27 tom Exp $")
/*
* Standalone tests for ANSI terminals. Three entry points:
@@ -135,7 +135,7 @@ read_ansi(void)
int ch, i, j, last_escape;
fflush(stdout);
- read_key(ansi_buf, sizeof(ansi_buf));
+ read_key((char *)ansi_buf, sizeof(ansi_buf));
/* Throw away control characters inside CSI sequences.
Convert two character 7-bit sequences into 8-bit sequences. */
for (i = j = last_escape = 0; (ch = ansi_buf[i]) != 0; i++) {
@@ -174,13 +174,13 @@ read_ansi(void)
static int
valid_mode(int expected)
{
- char *s;
+ unsigned char *s;
int ch, terminator;
read_ansi();
ape = 0;
- ch = pack_buf[0] & 0xff;
+ ch = CharOf(pack_buf[0]);
ansi_value[0] = 0;
if (ch != A_CSI && ch != A_DCS)
return FALSE;
@@ -216,6 +216,7 @@ read_reports(void)
{
int i, j, k, tc, vcr, lc;
char *s;
+ const char *t;
lc = 5;
terminal_class = tc = 0;
@@ -254,15 +255,15 @@ read_reports(void)
vcr = TRUE;
break;
}
- j = pack_buf[0] & 0xff;
+ j = CharOf(pack_buf[0]);
if (j != A_CSI && j != A_DCS) {
put_crlf();
- s = "*** The above request gives illegal response ***";
- ptext(s);
- for (j = strlen(s); j < 49; j++)
+ t = "*** The above request gives illegal response ***";
+ ptext(t);
+ for (j = strlen(t); j < 49; j++)
putchp(' ');
}
- s = expand(ansi_buf);
+ s = expand((const char *)ansi_buf);
if (char_count + expand_chars >= columns) {
put_str("\r\n ");
lc++;
@@ -322,14 +323,14 @@ request_cfss(void)
putchp(' ');
for (j = 0; ansi_buf[j]; j++) {
if (ansi_buf[j] == 'r') {
- for (k = j++; (ch = (ansi_buf[k] & 0xff)); k++)
+ for (k = j++; (ch = CharOf(ansi_buf[k])) != 0; k++)
if (ch == A_ESC) {
break;
} else if (ch == A_ST) {
break;
}
ansi_buf[k] = '\0';
- s = expand(&ansi_buf[j]);
+ s = expand((const char *)&ansi_buf[j]);
if (char_count + expand_chars >= columns)
put_str("\r\n ");
put_str(s);
@@ -432,7 +433,7 @@ terminal_state(void)
tc_putp(temp);
if (!valid_mode(('$' << 8) | 'y')) {
/* not valid, save terminating value */
- s = expand(ansi_buf);
+ s = expand((const char *)ansi_buf);
sprintf(tms, "%s%s%d %s ", tms,
puc[i], j, s);
break;
diff --git a/contrib/ncurses/tack/charset.c b/contrib/ncurses/tack/charset.c
index ca0ac6ff20d6..a5cac9423daa 100644
--- a/contrib/ncurses/tack/charset.c
+++ b/contrib/ncurses/tack/charset.c
@@ -21,7 +21,7 @@
#include <tack.h>
-MODULE_ID("$Id: charset.c,v 1.4 2000/03/04 20:30:52 tom Exp $")
+MODULE_ID("$Id: charset.c,v 1.6 2000/11/05 00:22:00 tom Exp $")
/*
Menu definitions for alternate character set and SGR tests.
@@ -433,12 +433,12 @@ test_acs(
break;
}
if (glyph[j].name[0] == '\0') {
- if (isgraph(acs_chars[i])) {
+ if (isgraph(CharOf(acs_chars[i]))) {
sprintf(temp, " %c",
acs_chars[i]);
} else {
sprintf(temp, " 0x%02x",
- (acs_chars[i] & 0xff));
+ CharOf(acs_chars[i]));
}
strcpy(&temp[5], " *** has no mapping ***");
putln(temp);
diff --git a/contrib/ncurses/tack/edit.c b/contrib/ncurses/tack/edit.c
index a62810367d45..f6574fbda10e 100644
--- a/contrib/ncurses/tack/edit.c
+++ b/contrib/ncurses/tack/edit.c
@@ -23,7 +23,7 @@
#include <time.h>
#include <tic.h>
-MODULE_ID("$Id: edit.c,v 1.5 2000/03/25 17:26:12 tom Exp $")
+MODULE_ID("$Id: edit.c,v 1.7 2001/02/24 22:10:40 tom Exp $")
/*
* Terminfo edit features
@@ -563,11 +563,11 @@ can_test(
const char *s,
int flags)
{
- int ch, i, j;
+ int ch, j;
char name[32];
if (s) {
- for (i = j = 0; (name[j] = ch = *s); s++) {
+ for (j = 0; (name[j] = ch = *s); s++) {
if (ch == ' ' || ch == ')' || ch == '(') {
if (j) {
name[j] = '\0';
@@ -597,11 +597,11 @@ cap_index(
int *inx)
{
struct name_table_entry const *nt;
- int ch, i, j;
+ int ch, j;
char name[32];
if (s) {
- for (i = j = 0; ; s++) {
+ for (j = 0; ; s++) {
name[j] = ch = *s;
if (ch == ' ' || ch == ')' || ch == '(' || ch == 0) {
if (j) {
@@ -876,7 +876,7 @@ change_one_entry(
putln(buf);
ptextln("Enter new pad. 0 for no pad. CR for no change.");
read_string(buf, 32);
- if (buf[0] == '\0' || (buf[1] == '\0' && isalpha(buf[0]))) {
+ if (buf[0] == '\0' || (buf[1] == '\0' && isalpha(CharOf(buf[0])))) {
*chp = buf[0];
return;
}
diff --git a/contrib/ncurses/tack/output.c b/contrib/ncurses/tack/output.c
index fac566e3b8a0..e1e4b4f7b28c 100644
--- a/contrib/ncurses/tack/output.c
+++ b/contrib/ncurses/tack/output.c
@@ -23,7 +23,7 @@
#include <tack.h>
#include <time.h>
-MODULE_ID("$Id: output.c,v 1.5 2000/03/04 21:06:57 tom Exp $")
+MODULE_ID("$Id: output.c,v 1.6 2000/11/05 00:21:58 tom Exp $")
/* globals */
long char_sent; /* number of characters sent */
@@ -122,7 +122,7 @@ tc_putch(int c)
}
if (log_fp) {
/* terminal output logging */
- c &= 0xff;
+ c = CharOf(c);
if (c < 32) {
fprintf(log_fp, "<%s>", c0[c]);
log_count += 5;
@@ -561,7 +561,7 @@ hex_expand_to(char *s, int l)
char *t;
for (t = buf; *s; s++) {
- sprintf(t, "%02X ", *s & 0xff);
+ sprintf(t, "%02X ", CharOf(*s));
t += 3;
if (t - buf > (int) sizeof(buf) - 4) {
break;
@@ -584,13 +584,13 @@ expand_command(const char *c)
char *s;
s = buf;
- for (i = FALSE; (ch = (*c & 0xff)); c++) {
+ for (i = FALSE; (ch = CharOf(*c)) != 0; c++) {
if (i) {
*s++ = ' ';
}
i = TRUE;
if (ch < 32) {
- j = c[1] & 0xff;
+ j = CharOf(c[1]);
if (ch == '\033' && j >= '@' && j <= '_') {
ch = j - '@';
c++;
@@ -599,7 +599,7 @@ expand_command(const char *c)
for (j = 0; (*s = c0[ch][j++]); s++);
} else {
*s++ = ch;
- j = c[1] & 0xff;
+ j = CharOf(c[1]);
if (ch >= '0' && ch <= '9' &&
j >= '0' && j <= '9') {
i = FALSE;
diff --git a/contrib/ncurses/tack/tack.h b/contrib/ncurses/tack/tack.h
index 52464d3e2a34..3a81b4d978f7 100644
--- a/contrib/ncurses/tack/tack.h
+++ b/contrib/ncurses/tack/tack.h
@@ -19,10 +19,10 @@
** Boston, MA 02111-1307, USA.
*/
-/* $Id: tack.h,v 1.6 2000/03/04 21:10:07 tom Exp $ */
+/* $Id: tack.h,v 1.8 2001/03/24 21:53:35 tom Exp $ */
-#ifndef _TACK_H
-#define _TACK_H 1
+#ifndef NCURSES_TACK_H_incl
+#define NCURSES_TACK_H_incl 1
/* terminfo action checker include file */
@@ -60,6 +60,8 @@ extern char *_nc_strstr(const char *, const char *);
#define strstr(h,n) _nc_strstr(h,n)
#endif
+#define CharOf(c) ((unsigned char)(c))
+
extern FILE *log_fp;
extern FILE *debug_fp;
extern int debug_level;
@@ -400,4 +402,4 @@ extern void menu_clear_screen(struct test_list *, int *, int *);
extern void menu_reset_init(struct test_list *, int *, int *);
extern int subtest_menu(struct test_list *, int *, int *);
-#endif /* _TACK_H */
+#endif /* NCURSES_TACK_H_incl */