clp

command line syntax highlighter
git clone git://jeskin.net/clp.git
README | Log | Files | Refs | LICENSE

commit 4ceaf2d3673fc73934c000644681a87c3aaebeed
parent cadbad125db5e4f304f7fe57a637b277d7e50353
Author: Jon Eskin <eskinjp@gmail.com>
Date:   Wed, 13 Jul 2022 03:04:18 -0400

Add missing third party notices

Diffstat:
M.gitignore | 2++
MTHIRD-PARTY-NOTICE | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mconfigure | 28+++++++---------------------
Mlua/clp.lua | 1+
4 files changed, 70 insertions(+), 21 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -53,3 +53,5 @@ Mkfile.old dkms.conf tags .DS_Store +clp +config.mk diff --git a/THIRD-PARTY-NOTICE b/THIRD-PARTY-NOTICE @@ -7,6 +7,8 @@ please create an issue or contact me directly at eskinjp@gmail.com. 1. vis (https://github.com/martanne/vis) 2. musl (https://git.musl-libc.org/cgit/musl) 3. Scintillua (https://github.com/orbitalquark/scintillua) +4. optparse (https://github.com/skeeto/optparse) +5. lua-term (https://github.com/hoelzro/lua-term) %% vis NOTICES AND INFORMATION BEGIN HERE @@ -285,3 +287,61 @@ THE SOFTWARE. ========================================= END OF Scintillua NOTICES AND INFORMATION + +%% optparse NOTICES AND INFORMATION BEGIN HERE +========================================= + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +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 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. + +For more information, please refer to <http://unlicense.org/> + +========================================= +END OF optparse NOTICES AND INFORMATION + +%% lua-term NOTICES AND INFORMATION BEGIN HERE +========================================= + +Copyright (c) 2009 Rob Hoelz <rob@hoelzro.net> + +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. + +========================================= +END OF lua-term NOTICES AND INFORMATION + diff --git a/configure b/configure @@ -53,7 +53,6 @@ stripdir () { while eval "fnmatch '*/' \"\${$1}\"" ; do eval "$1=\${$1%/}" ; done } -# maybe delete tryflag () { printf "checking whether compiler accepts %s... " "$2" echo "typedef int x;" > "$tmpc" @@ -68,7 +67,6 @@ return 1 fi } -# maybe delete tryldflag () { printf "checking whether linker accepts %s... " "$2" echo "typedef int x;" > "$tmpc" @@ -83,8 +81,7 @@ return 1 fi } - -# start of configure +# start of script CFLAGS_AUTO= CFLAGS_TRY= @@ -119,19 +116,15 @@ LDFLAGS=*) LDFLAGS=${arg#*=} ;; esac done -# CC=cc - for i in SRCDIR PREFIX EXEC_PREFIX BINDIR SHAREDIR DOCDIR MANDIR ; do stripdir $i done - have_pkgconfig=no printf "checking for pkg-config... " cmdexists pkg-config && have_pkgconfig=yes printf "%s\n" "$have_pkgconfig" - # # Get the source dir for out-of-tree builds # @@ -179,17 +172,15 @@ exit 1 fi tryflag CFLAGS -pipe - -# Try flags to optimize binary size tryflag CFLAGS -Wall tryflag CFLAGS -O2 -tryflag CFLAGS -ffunction-sections -tryflag CFLAGS -fdata-sections -tryldflag LDFLAGS_AUTO -Wl,--gc-sections +#dead code elimination +tryflag CFLAGS -ffunction-sections +tryflag CFLAGS -fdata-sections +tryldflag LDFLAGS -Wl,--gc-sections printf "creating config.mk... " -printf "CC is now %s\n" "$CC" cmdline=$(quote "$0") for i ; do cmdline="$cmdline $(quote "$i")" ; done @@ -268,7 +259,7 @@ for liblua in luajit lua lua5.4 lua5.3 lua5.2 lua-5.3 lua-5.2 lua54 lua53 lua52; fi done -test have_lua = "yes" && fail "$0: cannot find liblua" +test have_lua = "yes" && fail "$0: No lua installation was found." # if $liblua = "luajit" # CFLAGS_LUA += -Wl,-E @@ -311,7 +302,7 @@ if test "$have_pkgconfig" = "yes" ; then fi fi -test have_lpeg = "yes" && fail "$0: cannot find lpeg" +test have_lpeg = "yes" && fail "$0: Lua dependency LPEG was not found." printf "completing config.mk... " @@ -322,15 +313,10 @@ CONFIG_HELP = $CONFIG_HELP CONFIG_LUA = $CONFIG_LUA CFLAGS_LUA = $CFLAGS_LUA LDFLAGS_LUA = $LDFLAGS_LUA -CONFIG_LPEG = $CONFIG_LPEG -CFLAGS_LPEG = $CFLAGS_LPEG -LDFLAGS_LPEG = $LDFLAGS_LPEG EOF exec 1>&3 3>&- test "$SRCDIR" = "." || ln -sf $SRCDIR/Makefile . -printf "CC is now %s\n" "$CC" - printf "done\n" diff --git a/lua/clp.lua b/lua/clp.lua @@ -6,6 +6,7 @@ local lexers = require('lexer') local default_theme = theme.default_theme local selected_theme = theme.selected_theme +-- https://github.com/martanne/vis/issues/601#issuecomment-327018674 function write(args) local filename = args.filename local filetype_override = args.filetype_override