From 55ddc63ea209ef8729c32979594fab2724e39dbe Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Fri, 23 Oct 2015 15:43:12 +0200 Subject: add license --- lr.c | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'lr.c') diff --git a/lr.c b/lr.c index 2f8e0d3..b4a0305 100644 --- a/lr.c +++ b/lr.c @@ -1,13 +1,32 @@ -// lr - a better recursive ls/find +/* lr - a better recursive ls/find */ + /* -##% gcc -Os -Wall -g -o $STEM $FILE -Wno-switch -Wextra -Wwrite-strings -*/ + * Copyright (C) 2015 Christian Neukirchen + * Parts of code derived from musl libc, which is + * Copyright (C) 2005-2014 Rich Felker, et al. + * + * 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. + */ /* -TODO: -- %NNx formatting strings -- error handling? keep going -- avoid stat in recurse +##% gcc -Os -Wall -g -o $STEM $FILE -Wno-switch -Wextra -Wwrite-strings */ #define _GNU_SOURCE @@ -70,20 +89,6 @@ struct fileinfo { struct stat sb; }; -/* ->> (false && true) || true -=> true ->> false && true || true -=> true - - - expr && expr - - expr || expr - - (expr) - - value > < >= <= == != - - !expr - - prune? -*/ - enum op { EXPR_OR = 1, EXPR_AND, -- cgit 1.4.1