Lines Matching full:c
4 Copyright (c) 2005-2023 Lode Vandevenne
30 extern "C" {
90 /*Compile the default allocators (C's free, malloc and realloc). If you disable this,
103 in a comment in the lodepng.c(pp) file in the 'else' case of the searchable LODEPNG_COMPILE_CRC sec…
110 /*compile the C++ version (you can disable the C++ wrapper here even when compiling for C++)*/
113 … /*pass -DLODEPNG_NO_COMPILE_CPP to the compiler to disable C++ (not needed if a C-only compiler),
1101 /* The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers. */
1195 [ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error …
1198 [X] provide alternatives for C library functions not present on some platforms (memcpy, ...)
1204 } /* extern "C" */
1219 2. C and C++ version
1232 10.1. decoder C++ example
1233 10.2. decoder C example
1260 LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds
1264 -lodepng.h: the header file for both C and C++
1265 -lodepng.c(pp): give it the name lodepng.c or lodepng.cpp (or .cc) depending on your usage
1330 2. C and C++ version
1333 The C version uses buffers allocated with alloc that you need to free()
1335 using a struct from the C version to avoid exploits and memory leaks.
1337 The C++ version has extra functions with std::vectors in the interface and the
1340 These files work without modification for both C and C++ compilers because all
1341 the additional C++ code is in "#ifdef __cplusplus" blocks that make C-compilers
1342 ignore it, and the C code is made to compile both with strict ISO C90 and C++.
1344 To use the C++ version, you need to rename the source file to lodepng.cpp
1345 (instead of lodepng.c), and compile it with a C++ compiler.
1347 To use the C version, you need to rename the source file to lodepng.c (instead
1348 of lodepng.cpp), and compile it with a C compiler.
1357 When using LodePNG, care has to be taken with the C version of LodePNG, as well
1358 as the C-style structs when working with C++. The following conventions are used
1359 for all C-style structs:
1373 above. For C, simple decoding can be done with functions such as
1375 LodePNGState and lodepng_decode. For C++, all decoding can be done with the
1424 above. For C, simple encoding can be done with functions such as
1426 LodePNGState and lodepng_encode. For C++, all encoding can be done with the
1767 No libraries other than the current standard C library are needed to compile
1768 LodePNG. For the C++ version, only the standard C++ library is needed on top.
1769 Add the files lodepng.c(pp) and lodepng.h to your project, include
1772 It is compatible with C90 and up, and C++03 and up.
1779 std::vectors and std::strings in C++ can be incompatible.
1798 *) Visual Studio and Visual C++ Express Edition
1802 where it wants to use a non-standard function fopen_s instead of the standard C
1807 This is not standard C++ and will not be added to the stock LodePNG. You can
1808 disable it for lodepng.cpp only by right clicking it, Properties, C/C++,
1817 C and C++.
1834 10.1. decoder C++ example
1854 10.2. decoder C example
1984 redundant C++ codec classes. Reduced amount of structs. Everything changed,
1996 *) 17 aug 2011: (!) changed some C zlib related function names.
2006 *) 26 okt 2010: (!) changed some C function and struct names (more consistent).
2024 *) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A
2025 C++ wrapper around this provides an interface almost identical to before.
2026 Having LodePNG be pure ISO C90 makes it more portable. The C and C++ code
2027 are together in these files but it works both for C and C++ compilers.
2029 *) 30 aug 2007: bug fixed which makes this Borland C++ compatible
2089 *) 12 aug 2005: Initial release (C++, decoder only)
2104 Copyright (c) 2005-2022 Lode Vandevenne