mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 08:38:14 +01:00
Ship as a "single file C library"
This commit is contained in:
1 parent
85c4de47b9
commit
a0bafff465
45 files changed
+9655
-16510
No files matched your search
@@ -16,8 +16,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef WUFFS_INCLUDE_GUARD__BASE_PUBLIC
|
||||
#error "Wuffs' .c or .h files need to be included before this file"
|
||||
#ifndef WUFFS_INCLUDE_GUARD
|
||||
#error "Wuffs' .h files need to be included before this file"
|
||||
#endif
|
||||
|
||||
volatile int* intentional_segfault_ptr = NULL;
|
||||
|
||||
@@ -32,12 +32,18 @@ It should print "PASS", amongst other information, and exit(0).
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
// Wuffs ships as a "single file C library" or "header file library" as per
|
||||
// https://github.com/nothings/stb/blob/master/docs/stb_howto.txt
|
||||
//
|
||||
// To use that single file as a "foo.c"-like implementation, instead of a
|
||||
// "foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or
|
||||
// compiling it.
|
||||
#define WUFFS_IMPLEMENTATION
|
||||
|
||||
// If building this program in an environment that doesn't easily accomodate
|
||||
// relative includes, you can use the script/inline-c-relative-includes.go
|
||||
// program to generate a stand-alone C file.
|
||||
#include "../../../gen/c/base.c"
|
||||
#include "../../../gen/c/std/gif.c"
|
||||
#include "../../../gen/c/std/lzw.c"
|
||||
#include "../../../release/c/unsupported-snapshot.h"
|
||||
#include "../fuzzlib/fuzzlib.c"
|
||||
|
||||
const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
|
||||
|
||||
@@ -32,13 +32,18 @@ It should print "PASS", amongst other information, and exit(0).
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
// Wuffs ships as a "single file C library" or "header file library" as per
|
||||
// https://github.com/nothings/stb/blob/master/docs/stb_howto.txt
|
||||
//
|
||||
// To use that single file as a "foo.c"-like implementation, instead of a
|
||||
// "foo.h"-like header, #define WUFFS_IMPLEMENTATION before #include'ing or
|
||||
// compiling it.
|
||||
#define WUFFS_IMPLEMENTATION
|
||||
|
||||
// If building this program in an environment that doesn't easily accomodate
|
||||
// relative includes, you can use the script/inline-c-relative-includes.go
|
||||
// program to generate a stand-alone C file.
|
||||
#include "../../../gen/c/base.c"
|
||||
#include "../../../gen/c/std/adler32.c"
|
||||
#include "../../../gen/c/std/deflate.c"
|
||||
#include "../../../gen/c/std/zlib.c"
|
||||
#include "../../../release/c/unsupported-snapshot.h"
|
||||
#include "../fuzzlib/fuzzlib.c"
|
||||
|
||||
const char* fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
|
||||
|
||||
Reference in new issue
Block a user