Skip to content

A small utility for embedding files in a C header

License

Notifications You must be signed in to change notification settings

OetkenPurveyorOfCode/cembed

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cembed

A small utility for embedding files in a C header

$ cat test.txt
hello world

$ cat test2.txt
goodbye world

$ cembed -t my_files test.txt test2.txt
static unsigned char test_txt[] = {
104,101,108,108,111,32,119,111,114,108,100,10
};

static unsigned char test2_txt[] = {
103,111,111,100,98,121,101,32,119,111,114,108,100,10
};

static struct { char *filename; unsigned char *data; int size; } my_files[] = {
{ "test.txt", test_txt, (int) sizeof(test_txt) },
{ "test2.txt", test2_txt, (int) sizeof(test2_txt) },
{ 0 }
};

License

This project is free software; you can redistribute it and/or modify it under the terms of the MIT license. See LICENSE for details.

About

A small utility for embedding files in a C header

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.0%
  • Shell 3.0%