From be839900419c7a74c4a46efd279d0ca16b35dc1f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 15 May 2008 23:28:07 +0000 Subject: Moved stuff into trunk. --- src/core/symbol.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/core/symbol.c (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c new file mode 100644 index 0000000..721603a --- /dev/null +++ b/src/core/symbol.c @@ -0,0 +1,66 @@ +/*:* + *: File: ./src/core/symbol.c + *: A simple interpreter + *: + *: WWW : http://fype.buetow.org + *: E-Mail : fype@dev.buetow.org + *: + *: Copyright (c) 2005 2006 2007 2008, Paul Buetow (http://www.pblabs.net) + *: All rights reserved. + *: + *: Redistribution and use in source and binary forms, with or without modi- + *: fication, are permitted provided that the following conditions are met: + *: * Redistributions of source code must retain the above copyright + *: notice, this list of conditions and the following disclaimer. + *: * Redistributions in binary form must reproduce the above copyright + *: notice, this list of conditions and the following disclaimer in the + *: documentation and/or other materials provided with the distribution. + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software + *: without specific prior written permission. + *: + *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: POSSIBILITY OF SUCH DAMAGE. + *:*/ + +#include "symbol.h" + +#include "../data/list.h" + +Symbol* +symbol_new(SymbolType sym, void *p_val) { + Symbol *p_symbol = malloc(sizeof(Symbol)); + + p_symbol->sym = sym; + p_symbol->p_val = p_val; + + return p_symbol; +} + +void +symbol_delete(Symbol *p_symbol) { + switch (symbol_get_sym(p_symbol)) { + case SYM_PROCEDURE: + { + List *p_list_token = symbol_get_val(p_symbol); + list_delete(p_list_token); + } + break; + NO_DEFAULT; + } + free(p_symbol); +} + +void +symbol_cleanup_hash_syms_cb(void *p_void) { + symbol_delete(p_void); +} -- cgit v1.2.3 From e4689bbb20dade47b98061d48ba73436c856f3ff Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 8 Aug 2008 09:31:58 +0000 Subject: changed header. --- src/core/symbol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 721603a..71e9012 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,13 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul Buetow (http://www.pblabs.net) + *: + *: Copyright (c) 2005 2006 2007 2008, Paul Buetow (http://www.pb-labs.com) *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +15,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3 From da52f90a73abd653cfe9726bcf5c96338db0b7a2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 23 Aug 2008 01:46:47 +0000 Subject: some enhancements --- src/core/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 71e9012..c6733f5 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -5,7 +5,7 @@ *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org *: - *: Copyright (c) 2005 2006 2007 2008, Paul Buetow (http://www.pb-labs.com) + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow (http://www.pb-labs.com) *: All rights reserved. *: *: Redistribution and use in source and binary forms, with or without modi- -- cgit v1.2.3 From e9a9ad33583c49df48ae99cab9ba0fd80f150a9e Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 23 Aug 2008 02:03:40 +0000 Subject: changed headers --- src/core/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index c6733f5..5bfca53 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -5,7 +5,7 @@ *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow (http://www.pb-labs.com) + *: Copyright (c) 2005 2006 2007 2008, Dipl.-Inf. (FH) Paul C. Buetow *: All rights reserved. *: *: Redistribution and use in source and binary forms, with or without modi- -- cgit v1.2.3 From 7f3055c1f4429a81de3715d5d4173353382e2de2 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 24 Aug 2008 19:30:11 +0000 Subject: some mods --- src/core/symbol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 5bfca53..2343cdb 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,13 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Dipl.-Inf. (FH) Paul C. Buetow + *: + *: Copyright (c) 2005 2006 2007 2008, Dipl.-Inf. (FH) Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +15,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3 From 71185ab0ab0b08b4d5bb2e750ff85e11f105a453 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 16 Sep 2008 17:05:51 +0000 Subject: array progress --- src/core/symbol.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 2343cdb..9a98e63 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -33,7 +33,9 @@ *:*/ #include "symbol.h" +#include "token.h" +#include "../data/array.h" #include "../data/list.h" Symbol* @@ -55,8 +57,20 @@ symbol_delete(Symbol *p_symbol) { list_delete(p_list_token); } break; + case SYM_VARIABLE: + { + Token *p_token = symbol_get_val(p_symbol); + switch (token_get_tt(p_token)) { + case TT_ARRAY: + array_iterate(p_token->p_array, token_delete_cb); + break; + NO_DEFAULT; + } + } + break; NO_DEFAULT; } + free(p_symbol); } -- cgit v1.2.3 From d527f50159f056dc165fa7eaf7bf80425a1e758d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 14 Oct 2008 20:38:27 +0000 Subject: GC removed, temporaly --- src/core/symbol.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 9a98e63..7c8a8f7 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -57,15 +57,15 @@ symbol_delete(Symbol *p_symbol) { list_delete(p_list_token); } break; - case SYM_VARIABLE: + case SYM_VARIABLE: { - Token *p_token = symbol_get_val(p_symbol); - switch (token_get_tt(p_token)) { - case TT_ARRAY: - array_iterate(p_token->p_array, token_delete_cb); - break; - NO_DEFAULT; - } + Token *p_token = symbol_get_val(p_symbol); + switch (token_get_tt(p_token)) { + case TT_ARRAY: + //array_iterate(p_token->p_array, token_delete_cb); + break; + NO_DEFAULT; + } } break; NO_DEFAULT; -- cgit v1.2.3 From cb1450b796eff3c8830616e2e9a3d83d4dfb4900 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 18 Oct 2008 22:47:31 +0000 Subject: backdowngrade --- src/core/symbol.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 7c8a8f7..2343cdb 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -33,9 +33,7 @@ *:*/ #include "symbol.h" -#include "token.h" -#include "../data/array.h" #include "../data/list.h" Symbol* @@ -57,20 +55,8 @@ symbol_delete(Symbol *p_symbol) { list_delete(p_list_token); } break; - case SYM_VARIABLE: - { - Token *p_token = symbol_get_val(p_symbol); - switch (token_get_tt(p_token)) { - case TT_ARRAY: - //array_iterate(p_token->p_array, token_delete_cb); - break; - NO_DEFAULT; - } - } - break; NO_DEFAULT; } - free(p_symbol); } -- cgit v1.2.3 From 982e35bd0bd9bc9b55c0f898556c3e1831141258 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 19 Oct 2008 00:12:57 +0000 Subject: synonyms work --- src/core/symbol.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 2343cdb..37a0cae 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -42,12 +42,14 @@ symbol_new(SymbolType sym, void *p_val) { p_symbol->sym = sym; p_symbol->p_val = p_val; + p_symbol->i_refs = 1; return p_symbol; } void symbol_delete(Symbol *p_symbol) { + if (--p_symbol->i_refs == 0) { switch (symbol_get_sym(p_symbol)) { case SYM_PROCEDURE: { @@ -58,6 +60,7 @@ symbol_delete(Symbol *p_symbol) { NO_DEFAULT; } free(p_symbol); + } } void -- cgit v1.2.3 From 1956010ec79fbab604efc2b60d0af325e91f67b8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 20 Oct 2008 18:36:28 +0000 Subject: Improved GC debugging. Debugging printings now labeled with DEBUG::$NAME::$ETC::..: --- src/core/symbol.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 37a0cae..b6fd2ed 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -49,18 +49,18 @@ symbol_new(SymbolType sym, void *p_val) { void symbol_delete(Symbol *p_symbol) { - if (--p_symbol->i_refs == 0) { - switch (symbol_get_sym(p_symbol)) { - case SYM_PROCEDURE: - { - List *p_list_token = symbol_get_val(p_symbol); - list_delete(p_list_token); + if (--p_symbol->i_refs == 0) { + switch (symbol_get_sym(p_symbol)) { + case SYM_PROCEDURE: + { + List *p_list_token = symbol_get_val(p_symbol); + list_delete(p_list_token); + } + break; + NO_DEFAULT; + } + free(p_symbol); } - break; - NO_DEFAULT; - } - free(p_symbol); - } } void -- cgit v1.2.3 From a5f564d59149de660c4832b8c6e8acd42770479c Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 25 Oct 2008 00:12:08 +0000 Subject: make headers --- src/core/symbol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index b6fd2ed..460ad40 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,13 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Dipl.-Inf. (FH) Paul C. Buetow + *: + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +15,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3 From 1c6dd17947050d2f70dd8df6f4ad527180581c68 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 25 Oct 2008 00:23:48 +0000 Subject: astyle. more BSD style in return (FOO); --- src/core/symbol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 460ad40..8c39f5c 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,13 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow + *: + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +15,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3 From a1c3f47491b98cd9026f8e853cc9e72630805c12 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 26 Oct 2008 12:51:57 +0000 Subject: added the "scope" function --- src/core/symbol.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 8c39f5c..ef5957b 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -35,6 +35,7 @@ #include "symbol.h" #include "../data/list.h" +#include "token.h" Symbol* symbol_new(SymbolType sym, void *p_val) { @@ -67,3 +68,48 @@ void symbol_cleanup_hash_syms_cb(void *p_void) { symbol_delete(p_void); } + +void +symbol_print(Symbol *p_symbol, char *c_key) { + printf("%s: %s", sym_get_name(p_symbol->sym), c_key); + + switch (p_symbol->sym) { + case SYM_BUILDIN: + case SYM_CONSTANT: + break; + case SYM_PROCEDURE: + case SYM_FUNCTION: + //list_iterate(symbol_get_val(p_symbol), token_print_cb); + break; + case SYM_VARIABLE: + printf(" "); + token_print(symbol_get_val(p_symbol)); + break; + } + + printf("\n"); +} + +void +symbol_print_cb(void *p_void, char *c_key) { + symbol_print(p_void, c_key); +} + +char* +sym_get_name(SymbolType sym) { + switch (sym) { + case SYM_CONSTANT: + return ("SYM_CONSTANT"); + case SYM_VARIABLE: + return ("SYM_VARIABLE"); + case SYM_BUILDIN: + return ("SYM_BUILDIN"); + case SYM_PROCEDURE: + return ("SYM_PROCEDURE"); + case SYM_FUNCTION: + return ("SYM_FUNCTION"); + } + + // Never reach this point + return ("NONE"); +} -- cgit v1.2.3 From 1c2c79c47719ca828ce0eb4365ea0327fe89f2d8 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 28 Oct 2008 22:23:40 +0000 Subject: initial references support. run "make headers" --- src/core/symbol.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index ef5957b..fca9ea2 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,13 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow + *: + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +15,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ @@ -81,6 +81,8 @@ symbol_print(Symbol *p_symbol, char *c_key) { case SYM_FUNCTION: //list_iterate(symbol_get_val(p_symbol), token_print_cb); break; + case SYM_REFERENCE: + break; case SYM_VARIABLE: printf(" "); token_print(symbol_get_val(p_symbol)); @@ -100,6 +102,8 @@ sym_get_name(SymbolType sym) { switch (sym) { case SYM_CONSTANT: return ("SYM_CONSTANT"); + case SYM_REFERENCE: + return ("SYM_REFERENCE"); case SYM_VARIABLE: return ("SYM_VARIABLE"); case SYM_BUILDIN: -- cgit v1.2.3 From eb2a3bdc387eb76908dcd59b165738adccc28786 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 1 Nov 2008 18:57:20 +0000 Subject: modified headers --- src/core/symbol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index fca9ea2..b9a8b24 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -19,10 +19,10 @@ *: be used to endorse or promote products derived from this software *: without specific prior written permission. *: - *: THIS SOFTWARE IS PROVIDED BY Paul Buetow AS IS'' AND ANY EXPRESS OR + *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL Paul Buetow BE LIABLE FOR ANY DIRECT, + *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -- cgit v1.2.3 From ff0828f06a1f317681c45402feda48bde592a076 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 4 Nov 2008 21:20:56 +0000 Subject: array_new_size array_new_copy implemented --- src/core/symbol.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index b9a8b24..19801a7 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -57,6 +57,8 @@ symbol_delete(Symbol *p_symbol) { List *p_list_token = symbol_get_val(p_symbol); list_delete(p_list_token); } + case SYM_ARRAY: + symbol_delete(symbol_get_val(p_symbol)); break; NO_DEFAULT; } @@ -81,7 +83,7 @@ symbol_print(Symbol *p_symbol, char *c_key) { case SYM_FUNCTION: //list_iterate(symbol_get_val(p_symbol), token_print_cb); break; - case SYM_REFERENCE: + case SYM_ARRAY: break; case SYM_VARIABLE: printf(" "); @@ -102,8 +104,8 @@ sym_get_name(SymbolType sym) { switch (sym) { case SYM_CONSTANT: return ("SYM_CONSTANT"); - case SYM_REFERENCE: - return ("SYM_REFERENCE"); + case SYM_ARRAY: + return ("SYM_ARRAY"); case SYM_VARIABLE: return ("SYM_VARIABLE"); case SYM_BUILDIN: -- cgit v1.2.3 From 87de8060633801d3793246967f43c6159b0f5351 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 4 Nov 2008 22:55:22 +0000 Subject: astyle --- src/core/symbol.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 19801a7..f949a11 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,13 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow + *: + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +15,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ @@ -57,10 +57,10 @@ symbol_delete(Symbol *p_symbol) { List *p_list_token = symbol_get_val(p_symbol); list_delete(p_list_token); } - case SYM_ARRAY: - symbol_delete(symbol_get_val(p_symbol)); - break; - NO_DEFAULT; + case SYM_ARRAY: + symbol_delete(symbol_get_val(p_symbol)); + break; + NO_DEFAULT; } free(p_symbol); } -- cgit v1.2.3 From 117201ad10df2859fb3510e8437d776f3a691f69 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 9 Nov 2008 13:23:58 +0000 Subject: changed the src headers. --- src/core/symbol.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index f949a11..3136722 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,13 +1,14 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org - *: E-Mail : fype@dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow + *: AUTHOR : http://paul.buetow.org + *: E-Mail : fype at dev.buetow.org + *: + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -15,20 +16,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3 From 44c97ead68a274e462460eef33d67e7442c2fa47 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 15 Dec 2008 20:57:29 +0000 Subject: say foo[1] works --- src/core/symbol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 3136722..831db32 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,14 +1,14 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: AUTHOR : http://paul.buetow.org *: E-Mail : fype at dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow + *: + *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -16,20 +16,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3 From 40ad7ffc7ebd91e90f0894badcc4132df9b3c45d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 15 Dec 2008 20:58:59 +0000 Subject: modified headers --- src/core/symbol.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/core/symbol.c') diff --git a/src/core/symbol.c b/src/core/symbol.c index 831db32..375ff84 100644 --- a/src/core/symbol.c +++ b/src/core/symbol.c @@ -1,14 +1,14 @@ /*:* *: File: ./src/core/symbol.c *: A simple interpreter - *: + *: *: WWW : http://fype.buetow.org *: AUTHOR : http://paul.buetow.org *: E-Mail : fype at dev.buetow.org - *: - *: Copyright (c) 2005 2006 2007 2008, Paul C. Buetow + *: + *: Copyright (c) 2005 - 2008, Paul Buetow *: All rights reserved. - *: + *: *: Redistribution and use in source and binary forms, with or without modi- *: fication, are permitted provided that the following conditions are met: *: * Redistributions of source code must retain the above copyright @@ -16,20 +16,20 @@ *: * Redistributions in binary form must reproduce the above copyright *: notice, this list of conditions and the following disclaimer in the *: documentation and/or other materials provided with the distribution. - *: * Neither the name of P. B. Labs nor the names of its contributors may - *: be used to endorse or promote products derived from this software + *: * Neither the name of P. B. Labs nor the names of its contributors may + *: be used to endorse or promote products derived from this software *: without specific prior written permission. - *: - *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR - *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + *: + *: THIS SOFTWARE IS PROVIDED BY PAUL C. BUETOW AS IS'' AND ANY EXPRESS OR + *: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED *: WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, - *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + *: DISCLAIMED. IN NO EVENT SHALL PAUL C. BUETOW BE LIABLE FOR ANY DIRECT, + *: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + *: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + *: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) *: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + *: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + *: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *: POSSIBILITY OF SUCH DAMAGE. *:*/ -- cgit v1.2.3