1
0
Fork 0

Adding upstream version 2:9.1.1230.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
This commit is contained in:
Daniel Baumann 2025-06-21 11:09:31 +02:00
parent 95f88d82e6
commit 0985b09abd
Signed by: daniel.baumann
GPG key ID: BCC918A2ABD66424
6270 changed files with 2000183 additions and 0 deletions

View file

@ -0,0 +1,31 @@
// C preprocessor - binary resource inclusion
// Source: https://en.cppreference.com/w/c/preprocessor/embed
#include <stdint.h>
#include <stdio.h>
const uint8_t image_data[] = {
#embed "image.png"
};
const char message[] = {
#embed "message.txt" if_empty('M', 'i', 's', 's', 'i', 'n', 'g', '\n')
,'\0' // null terminator
};
void dump(const uint8_t arr[], size_t size)
{
for (size_t i = 0; i != size; ++i)
printf("%02X%c", arr[i], (i + 1) % 16 ? ' ' : '\n');
puts("");
}
int main()
{
puts("image_data[]:");
dump(image_data, sizeof image_data);
puts("message[]:");
dump((const uint8_t*)message, sizeof message);
}