aboutsummaryrefslogtreecommitdiff
path: root/nonstd.h
diff options
context:
space:
mode:
Diffstat (limited to 'nonstd.h')
-rw-r--r--nonstd.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/nonstd.h b/nonstd.h
index 3e39380..d001a4a 100644
--- a/nonstd.h
+++ b/nonstd.h
@@ -1,3 +1,12 @@
1// nonstd.h
2// A collection of useful functions and macros.
3// This library is licensed under the BSD 2-Clause License.
4//
5// This file provides both the interface and the implementation.
6// To instantiate the implementation,
7// #define NONSTD_IMPLEMENTATION
8// before including this file.
9
1#ifdef NONSTD_IMPLEMENTATION 10#ifdef NONSTD_IMPLEMENTATION
2#ifndef _POSIX_C_SOURCE 11#ifndef _POSIX_C_SOURCE
3#define _POSIX_C_SOURCE 200809L 12#define _POSIX_C_SOURCE 200809L
@@ -795,4 +804,31 @@ NONSTD_DEF void ppm_draw_triangle(Canvas *canvas, i32 x0, i32 y0, i32 x1, i32 y1
795 ppm_draw_line(canvas, x2, y2, x0, y0, color); 804 ppm_draw_line(canvas, x2, y2, x0, y0, color);
796} 805}
797 806
798#endif // NONSTD_IMPLEMENTATION \ No newline at end of file 807#endif // NONSTD_IMPLEMENTATION
808
809/*
810BSD 2-Clause License
811
812Copyright (c) 2026, Mitja Felicijan <mitja.felicijan@gmail.com>
813
814Redistribution and use in source and binary forms, with or without
815modification, are permitted provided that the following conditions are met:
816
8171. Redistributions of source code must retain the above copyright notice, this
818 list of conditions and the following disclaimer.
819
8202. Redistributions in binary form must reproduce the above copyright notice,
821 this list of conditions and the following disclaimer in the documentation
822 and/or other materials provided with the distribution.
823
824THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
825AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
826IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
827DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
828FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
829DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
830SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
831CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
832OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
833OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
834*/ \ No newline at end of file