summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-03-25 21:03:01 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-03-25 21:03:01 +0000
commit55d8ed1e9b518c928e9797b1d274d6388de6d36f (patch)
tree41b81010d40fd7a0535fa93ffdd8357875a7eed1 /usr.bin
parent3392fd3119db5e6a9c63c934fed6faa4a1970f69 (diff)
Remove file2c. Nothing in the tree uses it and hexdump works as
well for most use cases. OK deraadt@, espie@, gsoares@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/Makefile4
-rw-r--r--usr.bin/file2c/Makefile6
-rw-r--r--usr.bin/file2c/file2c.152
-rw-r--r--usr.bin/file2c/file2c.c48
4 files changed, 2 insertions, 108 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index 7fbf0b1e60e..61503ff8071 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.136 2014/03/17 12:50:09 florian Exp $
+# $OpenBSD: Makefile,v 1.137 2014/03/25 21:02:59 millert Exp $
.include <bsd.own.mk>
@@ -7,7 +7,7 @@ SUBDIR= apply apropos arch asa at aucat audioctl awk banner \
biff cal calendar cap_mkdb cdio chpass cmp col colrm \
column comm compress cpp crontab csplit ctags cu cut \
dc deroff diff diff3 dirname du encrypt env expand false file \
- file2c find fgen finger fmt fold from fsplit fstat ftp gencat getcap \
+ find fgen finger fmt fold from fsplit fstat ftp gencat getcap \
getconf getent getopt gprof grep gzsig head hexdump htpasswd id indent \
infocmp ipcrm ipcs \
join jot kdump keynote ktrace lam last lastcomm leave less lex \
diff --git a/usr.bin/file2c/Makefile b/usr.bin/file2c/Makefile
deleted file mode 100644
index 2ab3e3836c7..00000000000
--- a/usr.bin/file2c/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 1997/09/21 11:49:01 deraadt Exp $
-
-PROG= file2c
-MAN1= file2c.1
-
-.include <bsd.prog.mk>
diff --git a/usr.bin/file2c/file2c.1 b/usr.bin/file2c/file2c.1
deleted file mode 100644
index 321ffe810de..00000000000
--- a/usr.bin/file2c/file2c.1
+++ /dev/null
@@ -1,52 +0,0 @@
-.\" $OpenBSD: file2c.1,v 1.10 2007/05/31 19:20:10 jmc Exp $
-.\"----------------------------------------------------------------------------
-.\" "THE BEER-WARE LICENSE" (Revision 42):
-.\" <phk@freebsd.org> wrote this file. As long as you retain this notice, you
-.\" can do whatever you want with this file. If we meet some day, and you think
-.\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
-.\" ---------------------------------------------------------------------------
-.\"
-.\"
-.Dd $Mdocdate: May 31 2007 $
-.Dt FILE2C 1
-.Os
-.Sh NAME
-.Nm file2c
-.Nd convert file to c-source
-.Sh SYNOPSIS
-.Nm file2c
-.Op Ar string
-.Op Ar string
-.Sh DESCRIPTION
-The
-.Nm
-utility reads a file from the standard input and writes it to the standard
-output, converting each
-byte to its decimal representation on the fly.
-.Pp
-If the first
-.Ar string
-is present, it is printed before the data.
-If the second
-.Ar string
-is present, it is printed after the data.
-.Pp
-This program is used to embed binary or other files into C source files,
-for instance as a
-.Li char[] .
-.Sh EXAMPLES
-The command:
-.Bd -literal -offset indent
-$ date | file2c 'const char date[] = {' ',0};'
-.Ed
-.Pp
-will produce:
-.Bd -literal -offset indent
-const char date[] = {
-83,97,116,32,74,97,110,32,50,56,32,49,54,58,50,56,58,48,53,
-32,80,83,84,32,49,57,57,53,10
-,0};
-.Ed
-.Sh SEE ALSO
-.Xr hexdump 1 ,
-.Xr od 1
diff --git a/usr.bin/file2c/file2c.c b/usr.bin/file2c/file2c.c
deleted file mode 100644
index 9f2b4e04c30..00000000000
--- a/usr.bin/file2c/file2c.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* $OpenBSD: file2c.c,v 1.3 2003/06/26 21:41:37 deraadt Exp $ */
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $FreeBSD: file2c.c,v 1.1 1995/01/29 00:49:57 phk Exp $
- *
- */
-
-#include <stdio.h>
-
-int
-main(int argc, char *argv[])
-{
- int i, j, k;
-
- if (argc > 1)
- printf("%s\n",argv[1]);
- k = 0;
- j = 0;
- while((i = getchar()) != EOF) {
- if(k++) {
- putchar(',');
- j++;
- }
- if (j > 70) {
- putchar('\n');
- j = 0;
- }
-
- printf("%d", i);
-
- if (i > 99)
- j += 3;
- else if (i > 9)
- j += 2;
- else
- j++;
- }
- putchar('\n');
- if (argc > 2)
- printf("%s\n", argv[2]);
- return 0;
-}