summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>1999-08-18 01:12:47 +0000
committerMichael Jennings <mej@kainx.org>1999-08-18 01:12:47 +0000
commit661b1b9448308e0f50a4a6d131f2b3fb66c63dd4 (patch)
tree828b240bf3a9b9eb44499de1a99300ef956f0a1e /utils
parente64e1663de917283ea3c05ab928398d37ca656c7 (diff)
downloadeterm-661b1b9448308e0f50a4a6d131f2b3fb66c63dd4.tar.gz
Tue Aug 17 18:06:01 PDT 1999 Michael Jennings <mej@eterm.org>
Now that we have a fixed CVS server.... This includes the old 0.8.10 code, but it's now 0.9. It also includes a timer subsystem. SVN revision: 52
Diffstat (limited to 'utils')
-rw-r--r--utils/.cvsignore4
-rw-r--r--utils/Esetroot.c2
-rw-r--r--utils/Etbg.c13
-rwxr-xr-xutils/Etcolors (renamed from utils/Etcolors.sh)0
-rw-r--r--utils/Ettable.c55
-rw-r--r--[-rwxr-xr-x]utils/Etwinop (renamed from utils/Etmenu.sh)20
-rw-r--r--utils/Makefile.am7
7 files changed, 78 insertions, 23 deletions
diff --git a/utils/.cvsignore b/utils/.cvsignore
index 0b1f47e..f22683f 100644
--- a/utils/.cvsignore
+++ b/utils/.cvsignore
@@ -4,6 +4,4 @@ Makefile.in
.libs
Esetroot
Etbg
-Etcolors.sh
-Etmenu.sh
-
+Ettable
diff --git a/utils/Esetroot.c b/utils/Esetroot.c
index d361dda..a71514f 100644
--- a/utils/Esetroot.c
+++ b/utils/Esetroot.c
@@ -4,7 +4,7 @@
* users to use Eterm's support for pseudotransparency.
*
* Written by Nat Friedman <ndf@mit.edu> with modifications by Gerald Britton
- * <gbritton@mit.edu> and Michael Jennings <mej@tcserv.com>
+ * <gbritton@mit.edu> and Michael Jennings <mej@eterm.org>
*
*/
diff --git a/utils/Etbg.c b/utils/Etbg.c
index de78d10..704fa18 100644
--- a/utils/Etbg.c
+++ b/utils/Etbg.c
@@ -26,12 +26,17 @@
#include <stdio.h>
#include <string.h>
-int
+#ifndef FALSE
+# define FALSE (0)
+#endif
+#ifndef TRUE
+# define TRUE (!FALSE)
+#endif
+
+int
main(int argc, char **argv)
{
- enum {
- FALSE, TRUE
- } scale = FALSE, trans = FALSE;
+ int scale = FALSE, trans = FALSE;
unsigned int i, pic = 0, tint = 0, shade = 0;
for (i = 1; i < argc; i++) {
diff --git a/utils/Etcolors.sh b/utils/Etcolors
index 80ee58d..80ee58d 100755
--- a/utils/Etcolors.sh
+++ b/utils/Etcolors
diff --git a/utils/Ettable.c b/utils/Ettable.c
new file mode 100644
index 0000000..9520e28
--- /dev/null
+++ b/utils/Ettable.c
@@ -0,0 +1,55 @@
+/* Ettable -- Eterm ASCII Table Display Utility
+
+ * This file is original work by Michael Jennings <mej@eterm.org>.
+ * This program is distributed under the GNU Public License (GPL) as
+ * outlined in the COPYING file.
+ *
+ * Copyright (C) 1999, Michael Jennings
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+static const char cvs_ident[] = "$Id$";
+
+#include <stdio.h>
+
+const char *lookup[] =
+{
+ "NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL", /* 0-7 */
+ "BS", "HT", "LF", "VT", "FF", "CR", "SO", "SI", /* 8-15 */
+ "DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB", /* 16-23 */
+ "CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US" /* 24-31 */
+};
+
+int
+main(void)
+{
+
+ unsigned short i;
+
+ printf("+-----------+---------+-------------+--------+\n");
+ printf("| Character | Decimal | Hexadecimal | Octal |\n");
+ printf("+-----------+---------+-------------+--------+\n");
+
+ for (i = 0; i < 32; i++) {
+ printf("| %3s ^%c | %3d | 0x%02x | %03o |\n", lookup[i], ('@' + i), i, i, i);
+ }
+ for (; i < 256; i++) {
+ printf("| '%c' | %3d | 0x%02x | %c%03o |\n", (i == 127 ? ' ' : i), i, i, (i > '\077' ? '0' : ' '), i);
+ }
+ printf("+-----------+---------+-------------+--------+\n");
+ return 0;
+}
diff --git a/utils/Etmenu.sh b/utils/Etwinop
index 4e2153e..d9d5331 100755..100644
--- a/utils/Etmenu.sh
+++ b/utils/Etwinop
@@ -1,13 +1,12 @@
#!/bin/sh
#
-# Eterm Menu Command Utility
+# Eterm Window Operation Aid
#
# $Id$
if [ $# -eq 0 ]; then
- echo "Syntax: Etmenu.sh { <command(s)> | <file(s)> }"
+ echo "Syntax: Etwinop { raise | lower | map | unmap | iconify | kill } [windowid]"
echo
- echo "See the Eterm Technical Reference for valid menu commands."
exit 0
fi
@@ -24,13 +23,10 @@ else
ac_n= ac_c='\c'
fi
-while [ "X$1" != "X" ]; do
- case $1 in
- # Send commands to Eterm
- +* | -* | '<'* | '['*) echo $ac_n "]10;$1$ac_c" ;;
+if [ "X$2" = "X" ]; then
+ winop="$1"
+else
+ winop="$1 $2"
+fi
- # Read in a menubar file
- *) echo $ac_n "]10;[read:$1]$ac_c" ;;
- esac
- shift
-done
+echo $ac_n "]7;winop:$winop$ac_c"
diff --git a/utils/Makefile.am b/utils/Makefile.am
index aed8efa..c081028 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -2,14 +2,15 @@
INCLUDES = -I. -I../libmej -I.. -I$(includedir) -I$(prefix)/include $(X_CFLAGS)
-bin_PROGRAMS = Esetroot Etbg
-bin_SCRIPTS = Etcolors.sh Etmenu.sh
+bin_PROGRAMS = Esetroot Etbg Ettable
+bin_SCRIPTS = Etcolors Etwinop
Esetroot_SOURCES = Esetroot.c
Esetroot_LDFLAGS = -rpath $(libdir):$(pkglibdir)
Esetroot_LDADD = -L$(DIST_ROOT)/libmej -L$(libdir) -L$(prefix)/lib $(LIBS) $(GRLIBS) $(X_LIBS)
Etbg_SOURCES = Etbg.c
+Ettable_SOURCES = Ettable.c
-EXTRA_DIST = Etbg.c Esetroot.c Makefile.am Makefile.in Etcolors.sh Etmenu.sh
+EXTRA_DIST = Etbg.c Esetroot.c Ettable.c Makefile.am Makefile.in Etcolors Etwinop