relicense to 0BSD
[pforth] / csrc / pf_clib.h
index da3dc5f..71d846d 100644 (file)
@@ -1,63 +1,66 @@
-/* @(#) pf_clib.h 96/12/18 1.10 */\r
-#ifndef _pf_clib_h\r
-#define _pf_clib_h\r
-\r
-/***************************************************************\r
-** Include file for PForth tools\r
-**\r
-** Author: Phil Burk\r
-** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom\r
-**\r
-** The pForth software code is dedicated to the public domain,\r
-** and any third party may reproduce, distribute and modify\r
-** the pForth software code or any derivative works thereof\r
-** without any compensation or license.  The pForth software\r
-** code is provided on an "as is" basis without any warranty\r
-** of any kind, including, without limitation, the implied\r
-** warranties of merchantability and fitness for a particular\r
-** purpose and their equivalents under the laws of any jurisdiction.\r
-**\r
-***************************************************************/\r
-\r
-#ifdef  PF_NO_CLIB\r
-\r
-       #ifdef __cplusplus\r
-       extern "C" {\r
-       #endif\r
-\r
-       cell_t pfCStringLength( const char *s );\r
-       void *pfSetMemory( void *s, cell_t c, cell_t n );\r
-       void *pfCopyMemory( void *s1, const void *s2, cell_t n);\r
-       #define EXIT(n)  {while(1);}\r
-       \r
-       #ifdef __cplusplus\r
-       }   \r
-       #endif\r
-\r
-#else   /* PF_NO_CLIB */\r
-\r
-       #ifdef PF_USER_CLIB\r
-               #include PF_USER_CLIB\r
-       #else\r
-/* Use stdlib functions if available because they are probably faster. */\r
-               #define pfCStringLength strlen\r
-               #define pfSetMemory     memset\r
-               #define pfCopyMemory    memcpy\r
-               #define EXIT(n)  exit(n)\r
-       #endif /* PF_USER_CLIB */\r
-       \r
-#endif  /* !PF_NO_CLIB */\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-/* Always use my own functions to avoid macro expansion problems with tolower(*s++) */\r
-char pfCharToUpper( char c );\r
-char pfCharToLower( char c );\r
-\r
-#ifdef __cplusplus\r
-}   \r
-#endif\r
-\r
-#endif /* _pf_clib_h */\r
+/* @(#) pf_clib.h 96/12/18 1.10 */
+#ifndef _pf_clib_h
+#define _pf_clib_h
+
+/***************************************************************
+** Include file for PForth tools
+**
+** Author: Phil Burk
+** Copyright 1994 3DO, Phil Burk, Larry Polansky, David Rosenboom
+**
+** Permission to use, copy, modify, and/or distribute this
+** software for any purpose with or without fee is hereby granted.
+**
+** THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+** WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+** WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
+** THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
+** CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+** FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
+** CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+** OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+**
+***************************************************************/
+
+#ifdef  PF_NO_CLIB
+
+    #ifdef __cplusplus
+    extern "C" {
+    #endif
+
+    cell_t pfCStringLength( const char *s );
+    void *pfSetMemory( void *s, cell_t c, cell_t n );
+    void *pfCopyMemory( void *s1, const void *s2, cell_t n);
+    #define EXIT(n)  {while(1);}
+
+    #ifdef __cplusplus
+    }
+    #endif
+
+#else   /* PF_NO_CLIB */
+
+    #ifdef PF_USER_CLIB
+        #include PF_USER_CLIB
+    #else
+/* Use stdlib functions if available because they are probably faster. */
+        #define pfCStringLength strlen
+        #define pfSetMemory     memset
+        #define pfCopyMemory    memcpy
+        #define EXIT(n)  exit(n)
+    #endif /* PF_USER_CLIB */
+
+#endif  /* !PF_NO_CLIB */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Always use my own functions to avoid macro expansion problems with tolower(*s++) */
+char pfCharToUpper( char c );
+char pfCharToLower( char c );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _pf_clib_h */