changeset 859:d32dff865575

ctracedec compiles
author Space Falcon <falcon@ivan.Harhan.ORG>
date Sat, 02 May 2015 08:21:21 +0000
parents 4c6e7ada647b
children cbc49d533b7d
files .hgignore rvinterf/Makefile rvinterf/ctracedec/Makefile rvinterf/ctracedec/doprnt.c rvinterf/ctracedec/main.c
diffstat 5 files changed, 47 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Sat May 02 08:08:26 2015 +0000
+++ b/.hgignore	Sat May 02 08:21:21 2015 +0000
@@ -24,6 +24,7 @@
 ^miscutil/fc-serterm$
 ^miscutil/imei-luhn$
 
+^rvinterf/ctracedec/ctracedec$
 ^rvinterf/etmsync/fc-fsio$
 ^rvinterf/g23sh/g23sh$
 ^rvinterf/lowlevel/rvinterf$
--- a/rvinterf/Makefile	Sat May 02 08:08:26 2015 +0000
+++ b/rvinterf/Makefile	Sat May 02 08:21:21 2015 +0000
@@ -1,4 +1,4 @@
-PROGDIR=etmsync g23sh lowlevel misc tmsh
+PROGDIR=ctracedec etmsync g23sh lowlevel misc tmsh
 LIBDIR=	libasync libg23
 SUBDIR=	${PROGDIR} ${LIBDIR}
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rvinterf/ctracedec/Makefile	Sat May 02 08:21:21 2015 +0000
@@ -0,0 +1,17 @@
+CC=	gcc
+CFLAGS=	-O2
+PROG=	ctracedec
+OBJS=	decode.o doprnt.o main.o processlog.o readtab.o
+INSTBIN=/usr/local/bin
+
+all:	${PROG}
+
+${PROG}: ${OBJS}
+	${CC} ${CFLAGS} -o $@ ${OBJS}
+
+install:	${PROG}
+	mkdir -p ${INSTBIN}
+	install -c ${PROG} ${INSTBIN}
+
+clean:
+	rm -f *.o *.out *errs ${PROG}
--- a/rvinterf/ctracedec/doprnt.c	Sat May 02 08:08:26 2015 +0000
+++ b/rvinterf/ctracedec/doprnt.c	Sat May 02 08:21:21 2015 +0000
@@ -8,6 +8,8 @@
 
 #include <sys/types.h>
 #include <ctype.h>
+#include <string.h>
+#include <strings.h>
 
 static void
 safe_out_char(c, pp)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rvinterf/ctracedec/main.c	Sat May 02 08:21:21 2015 +0000
@@ -0,0 +1,26 @@
+/*
+ * This module contains the main() function for ctracedec
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+char *str2ind_tab_filename;
+
+main(argc, argv)
+	char **argv;
+{
+	int i;
+
+	if (argc < 3) {
+		fprintf(stderr,
+			"usage: %s str2ind.tab logfile [more log files]\n",
+			argv[0]);
+		exit(1);
+	}
+	str2ind_tab_filename = argv[1];
+	read_str2ind_tab();
+	for (i = 2; i < argc; i++)
+		process_log_file(argv[i]);
+	exit(0);
+}