Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maulingmonkey/libmmkformat
MaulingMonKey's Format Macros.
https://github.com/maulingmonkey/libmmkformat
library native nuget snprintf
Last synced: 19 days ago
JSON representation
MaulingMonKey's Format Macros.
- Host: GitHub
- URL: https://github.com/maulingmonkey/libmmkformat
- Owner: MaulingMonkey
- License: apache-2.0
- Created: 2017-03-22T10:23:35.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-22T11:17:22.000Z (almost 8 years ago)
- Last Synced: 2025-01-06T16:44:10.240Z (about 1 month ago)
- Topics: library, native, nuget, snprintf
- Language: C
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# libMmkFormat
MaulingMonKey's Format Macros.
Currently just provides MMK_FORMAT_TRUNC(name, length, format, ...) shorthand with all the warnings turned up.
License: [Apache 2.0](LICENSE.txt)
# Example
```c
#include // MMK_FORMAT_TRUNC
#include // putsint main() {
const char* const name = "World";MMK_FORMAT_TRUNC(hello_world, 1024, "Hello, %s!", name);
// Roughly equivalent to: char hello_world[1024] = "Hello, World!";puts(hello_world);
}```
# Installation
Add [libMmkFormat](https://www.nuget.org/packages/libMmkFormat/) to your project via nuget. Done!
Alternatively, clone and add [libMmkFormat/include/](libMmkFormat/include/) to your #include paths.
There is currently no source/.lib/.dll/.a/.so component to worry about.
There are no configuration options.# Compatability
Supported compilers:
- MSVC 2005+
- GCC 3.0+
- ClangRequirements:
- Variadic macro support (via C99, C++11, or compiler extension)Other compilers likely work, although they may not generate appropriate warnings.
# TODO
- Public CI
- Support ICC
- 'nix friendly packaging?# Why?
- Proof of concept for publishing native nuget packages via my local build chain.
- Need a C-friendly, non-error-prone formatting shorthand option for all my impending debug library shenannigans.
- Josh Wittner says "Always be Shipped", which is even better than "Always be Shipping"