Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: othersrc/external/bsd/file2c
Module Name: othersrc
Committed By: agc
Date: Mon Jan 21 07:32:09 UTC 2019
Added Files:
othersrc/external/bsd/file2c: 1.expected 1.in 2.expected 3.expected
Log Message:
Add a new utility called file2c(1) to othersrc, which converts its
input stream into individual bytes, suitable for inclusion as a C
source file. This kind of utility is occasionally useful for
embedding data in C-derived libraries and executables. The utility is
similar in function, and arguments, to the utility written in C, and
included in FreeBSD. This version of the utility just uses awk(1),
and so is written as a simple shell script.
Example usage:
% echo 'Hello world' | file2c -sx 'static const char *text = {\n' '};\n'
static const char *text = {
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c,
0x64, 0xa
};
%
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/file2c/1.expected \
othersrc/external/bsd/file2c/1.in othersrc/external/bsd/file2c/2.expected \
othersrc/external/bsd/file2c/3.expected
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index