shithub: m8c

Download patch

ref: ca996b789ec1afec012d24ebc1c3bcdbb31c77f1
parent: f9b795f75f56dd27392a03ac3afc7970ea06248d
author: Jonne Kokkonen <jonne.kokkonen@gmail.com>
date: Mon May 3 06:02:43 EDT 2021

add license information

--- /dev/null
+++ b/LICENSE
@@ -1,0 +1,59 @@
+MIT License
+
+Copyright (c) 2021 Jonne Kokkonen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-----------
+
+The software contains a SLIP command processing routine by Marcin Borowicz (slip.c, slip.h):
+
+MIT License
+
+Copyright (c) 2018 Marcin Borowicz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+-----------
+
+The software contains a bitmap font rendered from Trash80's original work, https://fontstruct.com/fontstructions/show/413734/stealth57.
+The font (embedded in inline_font.h) is originally licensed under CC-BY-SA 3.0, https://creativecommons.org/licenses/by-sa/3.0/.
+The font is used in this program with the permission of the original author.
+
+-----------
+
+The software contains portions of public domain code:
+Bitmap font routine by driedfruit, https://github.com/driedfruit/SDL_inprint (SDL2_inprint.h, inprint2.c)
+Serial port code from libserialport's examples (serial.c, serial.h)
--- a/SDL2_inprint.h
+++ b/SDL2_inprint.h
@@ -1,3 +1,7 @@
+// Bitmap font routine by driedfruit, https://github.com/driedfruit/SDL_inprint
+// Released into public domain.
+// Modified to support adding a background to text.
+
 #ifndef SDL2_inprint_h
 #define SDL2_inprint_h
 
--- a/command.c
+++ b/command.c
@@ -1,3 +1,5 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
 
 #include <stdio.h>
 #include <string.h>
@@ -4,8 +6,6 @@
 
 #include "command.h"
 #include "render.h"
-
-#define DEBUG 1
 
 // Convert 2 little-endian 8bit bytes to a 16bit integer
 static uint16_t decodeInt16(uint8_t *data, uint8_t start) {
--- a/command.h
+++ b/command.h
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #ifndef COMMAND_H_
 #define COMMAND_H_
 
--- a/inline_font.h
+++ b/inline_font.h
@@ -1,3 +1,11 @@
+/* 
+This file contains a bitmap render of the font stealth57.ttf by Trash80.
+Original font available at https://fontstruct.com/fontstructions/show/413734/stealth57 
+Originally licensed under a Creative Commons Attribution Share Alike license, https://creativecommons.org/licenses/by-sa/3.0/ 
+
+Used with a permission from the author. 
+*/
+
 #define inline_font_width 128
 #define inline_font_height 64
 static unsigned char inline_font_bits[] = {
--- a/inprint2.c
+++ b/inprint2.c
@@ -1,3 +1,7 @@
+// Bitmap font routine originally by driedfruit, https://github.com/driedfruit/SDL_inprint
+// Released into public domain.
+// Modified to support adding a background to text.
+
 #include <SDL2/SDL.h>
 
 #include "inline_font.h" /* Actual font data */
--- a/input.c
+++ b/input.c
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #include <SDL2/SDL.h>
 #include <stdio.h>
 
--- a/input.h
+++ b/input.h
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #ifndef INPUT_H_
 #define INPUT_H_
 
--- a/main.c
+++ b/main.c
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #include <SDL2/SDL.h>
 #include <libserialport.h>
 #include <signal.h>
--- a/render.c
+++ b/render.c
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #include "render.h"
 
 #include <SDL2/SDL.h>
--- a/render.h
+++ b/render.h
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #ifndef RENDER_H_
 #define RENDER_H_
 
--- a/serial.c
+++ b/serial.c
@@ -1,3 +1,8 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
+// Contains portions of code from libserialport's examples released to the public domain
+
 #include <libserialport.h>
 #include <stdio.h>
 #include <stdlib.h>
--- a/serial.h
+++ b/serial.h
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #ifndef _SERIAL_H_
 #define _SERIAL_H_
 
--- a/slip.c
+++ b/slip.c
@@ -1,12 +1,36 @@
-#include "slip.h"
-#include "command.h"
+/*
+MIT License
 
-#include <assert.h>
-#include <stddef.h>
+Copyright (c) 2018 Marcin Borowicz
 
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
 /* This code is originally by marcinbor85, https://github.com/marcinbor85/slip
 It has been simplified a bit as CRC checking etc. is not required in this
 program. */
+
+#include "slip.h"
+#include "command.h"
+
+#include <assert.h>
+#include <stddef.h>
 
 static void reset_rx(slip_handler_s *slip) {
   assert(slip != NULL);
--- a/slip.h
+++ b/slip.h
@@ -1,3 +1,31 @@
+/*
+MIT License
+
+Copyright (c) 2018 Marcin Borowicz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+*/
+
+/* This code is originally by marcinbor85, https://github.com/marcinbor85/slip
+It has been simplified a bit as CRC checking etc. is not required in this
+program. */
+
 #ifndef SLIP_H_
 #define SLIP_H_
 
--- a/write.c
+++ b/write.c
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #include <libserialport.h>
 #include <stdint.h>
 #include <stdio.h>
--- a/write.h
+++ b/write.h
@@ -1,3 +1,6 @@
+// Copyright 2021 Jonne Kokkonen
+// Released under the MIT licence, https://opensource.org/licenses/MIT
+
 #ifndef WRITE_H_
 #define WRITE_H_
 
--