Skip to content

Commit 19d6af5

Browse files
committed
Merge branch 'master' of github.com:mulle-nat/mulle-c-string-escape
2 parents 084c4b4 + 677886e commit 19d6af5

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# mulle-c-string-escape
22

3-
#### ➿ mulle-c-string-escape turns data into C-strings
3+
#### ➿ mulle-c-string-escape turns data into C strings
44

5-
Non-ASCII characters will be escaped to hex or octal. C-escapes are used for
6-
known C escapes like '\b'. The output is separated into lines of approximately
5+
Non-ASCII characters will be escaped to hex or octal. C escape sequences are used
6+
for the predefined sequences like '\b'. The output is separated into lines of approximately
77
even length and does not exceed the chosen line length. An example of a
88
conversion is [usage.txt](src/usage.txt) being turned into [usage.inc](src/usage.inc).
99
You can feed it binary or text files.
1010

11-
You can `#include` the output as string contents, or copy/paste it into your C
12-
program like so:
11+
You can copy/paste the output as string contents into your C source or `#include`
12+
the output like so:
1313

14-
```
14+
``` c
1515
static char data[] =
1616
#include "data.inc"
1717
;
@@ -29,21 +29,21 @@ See [usage.txt](src/usage.txt) for options.
2929
## Example
3030

3131
Let's use **mulle-c-string-escape** to create a C string representation of
32-
itself. We use `cmake` here, instead of `mulle-sde craft --release`, to ease
32+
itself into a file "x.inc". We use `cmake` here, instead of `mulle-sde craft --release`, to ease
3333
the developer's fear of the unknown:
3434

35-
```
35+
``` sh
3636
mkdir -p kitchen/Release
3737
cmake -B kitchen/Release -DCMAKE_BUILD_TYPE=Release
38-
cmake --build kitchen/Release
38+
cmake --build kitchen/Release --config Release
3939
./kitchen/Release/mulle-c-string-escape \
4040
./kitchen/Release/mulle-c-string-escape \
4141
x.inc
4242
```
4343

4444
To verify that this has actually worked:
4545

46-
```
46+
``` sh
4747
cat <<EOF > x.c
4848
#include <stdio.h>
4949
@@ -74,7 +74,7 @@ This is a [mulle-sde](https://mulle-sde.github.io/) project.
7474
It comes with its own virtual environment and list of dependencies.
7575
To fetch and build everything say:
7676

77-
```
77+
``` sh
7878
mulle-sde craft
7979
```
8080

0 commit comments

Comments
 (0)