New header files, some of which are undocumented i.e. buggy
authorMartin Read <mpread@chiark.greenend.org.uk>
Wed, 6 Apr 2011 18:14:58 +0000 (19:14 +0100)
committerMartin Read <mpread@chiark.greenend.org.uk>
Wed, 6 Apr 2011 18:14:58 +0000 (19:14 +0100)
13 files changed:
include/libmormegil/Appcfg.hh [new file with mode: 0644]
include/libmormegil/Coord.hh
include/libmormegil/Hci.hh [new file with mode: 0644]
include/libmormegil/Phones.hh [new file with mode: 0644]
include/libmormegil/Points.hh
include/libmormegil/S20prng.hh
include/libmormegil/abs.hh
include/libmormegil/dice.h
include/libmormegil/divup.hh
include/libmormegil/isotime.h [new file with mode: 0644]
include/libmormegil/serial.hh
include/libmormegil/stlfgets.hh
include/libmormegil/stlprintf.hh

diff --git a/include/libmormegil/Appcfg.hh b/include/libmormegil/Appcfg.hh
new file mode 100644 (file)
index 0000000..784d999
--- /dev/null
@@ -0,0 +1,65 @@
+// libmormegil/Appcfg.hh
+//
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0)
+
+#ifndef libmormegil_Appcfg_hh
+#define libmormegil_Appcfg_hh
+
+#include <stdint.h>
+#include <map>
+#include <string>
+#include <list>
+
+namespace libmormegil
+{
+    // Registration functions
+    class Appcfg
+    {
+    public:
+        enum Type
+        {
+            Appcfg_boolean,
+            Appcfg_string,
+            Appcfg_integer
+        };
+        struct Entry
+        {
+            Type t;
+            bool bval;
+            int64_t ival;
+            std::string sval;
+        };
+    private:
+        std::map<std::string, Entry> data;
+        typedef std::map<std::string, Entry>::iterator data_iterator;
+    public:
+        // registration functions
+        bool register_bool(const std::string& name, bool defval = false);
+        bool register_integer(const std::string& name, int64_t defval = 0);
+        bool register_string(const std::string& name, const char *defval = "");
+        bool register_string(const std::string& name, const std::string& defval);
+
+        // set functions
+        bool set(const std::string& name, bool val);
+        bool set(const std::string& name, int64_t val);
+        bool set(const std::string& name, const char* val);
+        bool set(const std::string& name, const std::string& val);
+
+        // get functions
+        bool get(const std::string& name, bool& dest);
+        bool get(const std::string& name, int64_t& dest);
+        // for code hygeine reasons, we don't support
+        bool get(const std::string& name, std::string& dest);
+
+        // dumper function
+        int dump(std::list<Entry>& dest);
+
+        // filler function
+        void fill(const std::list<Entry>& src);
+    };
+}
+#endif // libmormegil_Appcfg_hh
+
+// vim:ts=8:sw=4:expandtab:fo=c
index 052323e..952512e 100644 (file)
@@ -1,33 +1,13 @@
 // libmormegil/Coord.hh
 //
-// Copyright 2010 Martin Read. All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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.
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 // We need std::max<> and std::min<>. The thing called std::abs<> is in
-// <complex> and is intended for use on complex numbers; dude what the fuck?
+// <complex> and is intended for use on complex numbers only; did I mention I
+// hate the standards committee sometimes?
 
 #ifndef libmormegil_Coord_hh
 #define libmormegil_Coord_hh
 
 namespace libmormegil
 {
-    /* Yes, the basic_offset and basic_coord templates do indeed look very
-       similar. They are kept distinct, however, as what one might choose
-       to call an "insurance policy" - you can't add basic_coord objects
-       together. */
+    // Yes, the basic_offset and basic_coord templates do indeed look very
+    // similar. They are kept distinct, however, as what one might choose
+    // to call an "insurance policy" - you can't add two basic_coord objects
+    // together.
     template<typename T> struct basic_offset
     {
         typedef basic_offset<T>& ref;
@@ -169,4 +149,4 @@ namespace libmormegil
 }
 #endif // libmormegil_Coord_hh
 
-// vim:ts=8:sw=4:expandtab:fo=c
+// vim:ts=8:sw=4:expandtab:fo=croq
diff --git a/include/libmormegil/Hci.hh b/include/libmormegil/Hci.hh
new file mode 100644 (file)
index 0000000..f92ca0b
--- /dev/null
@@ -0,0 +1,16 @@
+// libmormegil/Hci.hh
+//
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
+
+#ifndef libmormegil_Hci_hh
+#define libmormegil_Hci_hh
+
+namespace libmormegil
+{
+}
+#endif // libmormegil_Hci_hh
+
+// vim:ts=8:sw=4:expandtab:fo=croq
diff --git a/include/libmormegil/Phones.hh b/include/libmormegil/Phones.hh
new file mode 100644 (file)
index 0000000..8929f50
--- /dev/null
@@ -0,0 +1,113 @@
+// libmormegil/Phones.hh - representation of speech sounds
+//
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
+
+#ifndef libmormegil_Phones_hh
+#define libmormegil_Phones_hh
+
+namespace libmormegil
+{
+    struct Phone
+    {
+        enum Sound_class {
+            Vowel,
+            Consonant,
+            Pitch_accent,
+            Stress_accent,
+            Contour_tone
+        };
+
+        enum Vowel_heights {
+            Vow_open,
+            Vow_near_open,
+            Vow_open_mid,
+            Vow_mid,
+            Vow_close_mid,
+            Vow_near_close,
+            Vow_close
+        };
+
+        enum Vowel_backness {
+            Vow_unspecified,
+            Vow_front,
+            Vow_near_front,
+            Vow_central,
+            Vow_near_back,
+            Vow_back
+        };
+
+        enum Vowel_roundness {
+            Vow_rounding_unspecified,
+            Vow_unrounded,
+            Vow_endolabial,
+            Vow_exolabial,
+            Vow_compressed
+        };
+
+        enum Voicings {
+            Voice_unspecified,
+            Voice_aspirated,
+            Voice_tenuis,
+            Voice_breathy,
+            Voice_modal,
+            Voice_faucalized
+        };
+
+        enum Consonant_modes {
+            Conson_nasal,
+            Conson_plosive,
+            Conson_affricate,
+            Conson_fricative,
+            Conson_approximant,
+            Conson_tap,
+            Conson_trill
+        };
+#define Conson_flap Conson_tap
+
+        enum Conson_lat {
+            Conson_nonlateral,
+            Conson_unspec_lateral,
+            Conson_lateral
+        }
+
+        enum Consonant_places {
+            Conson_bilabial,
+            Conson_labiodental,
+            Conson_interdental,
+            Conson_dental,
+            Conson_alveolar,
+            Conson_retroflex,
+            Conson_palatoalveolar,
+            Conson_alveolopalatal,
+            Conson_palatal,
+            Conson_velar,
+            Conson_uvular,
+            Conson_pharyngeal,
+            Conson_epiglottal,
+            Conson_glottal
+        };
+
+        enum Consonant_secondary {
+            Conson_no_secondary,
+            Conson_palatalized,
+            Conson_velarized,
+            Conson_glottalized
+        };
+
+        enum Stress_level {
+            Stress_primary,
+            Stress_secondary
+        };
+
+        Sound_class category;
+        int qualification[10];
+    };
+}
+
+#endif
+
+// vim:ts=8:sw=4:expandtab:fo=c
+// libmormegil/Phones.hh
index 89f828a..26f5c90 100644 (file)
@@ -1,30 +1,9 @@
 // libmormegil/Points.hh
 //
-// Copyright 2010 Martin Read. All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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.
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #ifndef libmormegil_Points_hh
 #define libmormegil_Points_hh
index a53269b..dd954f5 100644 (file)
@@ -1,31 +1,9 @@
 // libmormegil/s20prng.cc - PRNG using Salsa20 stream cipher
-// 
-// Copyright 2010 Martin Read. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
 //
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #ifndef libmormegil_S20prng_hh
 #define libmormegil_S20prng_hh
index 05a0e66..dc520a9 100644 (file)
@@ -1,30 +1,9 @@
 // libmormegil/abs.hh
 //
-// Copyright 2010 Martin Read. All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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.
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #ifndef libmormegil_abs_hh
 #define libmormegil_abs_hh
index 2c77528..282d42b 100644 (file)
@@ -1,30 +1,9 @@
 // libmormegil/dice.h
 //
-// Copyright 2010 Martin Read. All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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.
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #ifndef libmormegil_dice_h
 #define libmormegil_dice_h
index 207b159..ae7c687 100644 (file)
@@ -1,30 +1,9 @@
 // libmormegil/divup.hh
 //
-// Copyright 2010 Martin Read. All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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.
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #ifndef libmormegil_divup_hh
 #define libmormegil_divup_hh
diff --git a/include/libmormegil/isotime.h b/include/libmormegil/isotime.h
new file mode 100644 (file)
index 0000000..8b25ae6
--- /dev/null
@@ -0,0 +1,23 @@
+// isotime.h
+//
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
+
+#include <time.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+    int get_iso_8601_time(char *buf, int bufsz);
+#ifdef __cplusplus
+};
+
+#include <string>
+namespace libmormegil
+{
+    void get_iso_8601_time(std::string& dest);
+}
+#endif
+
+// isotime.h
index 0d1b0ea..e0fcd3c 100644 (file)
@@ -1,31 +1,8 @@
 // libmormegil/serial.hh - serialization primitives
 // 
-// Copyright 2010 Martin Read. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
-//
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
 
 #ifndef libmormegil_serial_hh
 #define libmormegil_serial_hh
index ce6d7ab..a80b909 100644 (file)
@@ -1,30 +1,9 @@
 // libmormegil/stlfgets.hh
 //
-// Copyright 2011 Martin Read. All rights reserved.
-// 
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-// 1. Redistributions of source code must retain the above copyright
-//    notice, this list of conditions and the following disclaimer.
-// 2. 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.
-// 3. Neither the name of the author nor the names of any other contributors
-//    may be used to endorse or promote products derived from this software
-//    without their specific prior written permission.
-// 
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``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 THE AUTHOR OR CONTRIBUTORS 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.
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #include <stdio.h>
 #include <string>
index 90d99f8..f8b330c 100644 (file)
@@ -1,28 +1,9 @@
-/* stlprintf.hh - (v)sprintf-for-STL-strings for Martin's Dungeon Bash
- * 
- * Copyright 2009 Martin Read and Stefan O'Rear
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. 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.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR 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.
- */
+// stlprintf.hh - (v)sprintf-for-STL-strings for Martin's Dungeon Bash
+//
+// In jurisdictions where this file would be adjuged to contain copyrightable
+// material, it is copyright 2011 Martin Read, and released to the public
+// under the terms of the Creative Commons Public Domain Dedication (cc-0).
+// It is provided without any warranty, express or implied.
 
 #ifndef STLPRINTF_HH
 #define STLPRINTF_HH