]> git.mdlowis.com Git - archive/carl.git/commitdiff
Rename library from libc to carl to avoid interfering with the system's C standard lib
authorMike D. Lowis <mike.lowis@gentex.com>
Tue, 22 Sep 2015 13:18:37 +0000 (09:18 -0400)
committerMike D. Lowis <mike.lowis@gentex.com>
Tue, 22 Sep 2015 13:18:37 +0000 (09:18 -0400)
33 files changed:
source/carl.h [moved from source/libc.h with 99% similarity]
source/data/bstree.h
source/data/list.h
source/data/slist.h
source/data/vec.h
source/main.c
source/refcount.c
source/utf/alphas.c
source/utf/chartorune.c
source/utf/controls.c
source/utf/digits.c
source/utf/fullrune.c
source/utf/lowers.c
source/utf/marks.c
source/utf/numbers.c
source/utf/other.c
source/utf/otherletters.c
source/utf/punctuation.c
source/utf/runeinrange.c
source/utf/runelen.c
source/utf/runenlen.c
source/utf/runetochar.c
source/utf/runetype.c
source/utf/spaces.c
source/utf/symbols.c
source/utf/titles.c
source/utf/tolower.c
source/utf/totitle.c
source/utf/toupper.c
source/utf/uppers.c
tests/main.c
tests/refcount.c
tools/unicode.rb

similarity index 99%
rename from source/libc.h
rename to source/carl.h
index 6fc20cd1f1cc1d696760079c83e49e694248e758..a11621cf8c379ad27a2bea85fbb7a8e6cd7b8e79 100644 (file)
@@ -1,8 +1,8 @@
 /**
-  @file libc.h
+  @file carl.h
 */
-#ifndef LIBC_H
-#define LIBC_H
+#ifndef CARL_H
+#define CARL_H
 
 /*
  * Base Types and Definitions
@@ -423,4 +423,4 @@ Rune totitlerune(Rune ch);
 #endif
 int user_main(int, char**);
 
-#endif /* LIBC_H */
+#endif /* CARL_H */
index b44ac94b4673c187004e0d03c2ba9f86c88649f7..0c029ce004c5da58607831adccdb1fe9a284c501 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef BSTREE_H
 #define BSTREE_H
 
-#include <libc.h>
+#include <carl.h>
 
 typedef struct bstree_node_t {
     struct bstree_node_t* left;
index b6b413f5ac1580a5e4fe91af6c36e91fc94b4cd5..6615891146cdf8b056f4e91933e1438001c77f31 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef LIST_H
 #define LIST_H
 
-#include <libc.h>
+#include <carl.h>
 
 typedef struct list_node_t {
     struct list_node_t* next;
index 28c6a31488f709b5b942410c450230663cb4954d..19cbfd32e899669bbf47483d47e5b65267777681 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef SLIST_H
 #define SLIST_H
 
-#include <libc.h>
+#include <carl.h>
 
 typedef struct slist_node_t {
     struct slist_node_t* next;
index ed92515dc61107f079d56504578af9a39a26b279..ce4a123c6b789843c73cc903307188b918b167e3 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef VEC_H
 #define VEC_H
 
-#include <libc.h>
+#include <carl.h>
 
 typedef struct {
     size_t   elem_count;
index bf53ea5ea9f017b83f0d46afaacdbcf8e7482e64..a2f35df3e9ca14079847861496889b41605f1537 100644 (file)
@@ -1,5 +1,5 @@
 #define NO_MAIN_WRAPPER
-#include "libc.h"
+#include <carl.h>
 
 int main(int argc, char** argv) {
     return user_main(argc, argv);
index d665600607e9e3b22f0cd4f3fa65b18e2a5e0ad5..80ec27f8e303dbf43b5b63644e5777756954fc92 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 typedef struct obj_t {
     uintptr_t refcount;
index 052f72fb746b0ef780fa06f3eef0646d858678a6..2befd89ae6d58b34f982af21fa300b2862bdf5cb 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[128] = {
     0xaa,
index db0ea93ebe49e4e81efac8d99d8bd373105da0dd..38fd7e7350350ca7bf120380ffbff06b7fad80cb 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 int chartorune(Rune* r, char* s)
 {
index c13c3cdfdc5b951843c4072f2972bc2dca919c6b..33fae2dd23cb00b1f3b8264b84b6e41e1f2218f2 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune ranges[4][2] = {
     { 0x0, 0x8 },
index 0c3c59426f9acdf93754e8153dec927fc19ab29d..ea1df48ec0fb7135e6e5ea03ff9beeced85494de 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune ranges[51][2] = {
     { 0x30, 0x39 },
index f3b80635d6550ba8c4b630a77ba32d7732aaa79c..36bab125ab6c2a26d08d72d0929982a1a74e1638 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 bool fullrune(char* s, int n)
 {
index 2763173baa17295c86ebb49863c45f2e7bce70f3..00cf736c0ad68365077807c568701f97347a3e6d 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[532] = {
     0xb5,
index 83dcc2eda19da2ac29a50560de4446451b5dd316..3101b7d1f015aabfbf1791886199e7c3d4170bb7 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[45] = {
     0x5bf,
index 707924e411a595f6ed2121bea155d11a82944454..1f02213e6d66f4786c29e126dc8b5ec6e433ba12 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[6] = {
     0xb9,
index e6de8bf154252a5c79666285ab53ec15ce07bbab..483b46c094f446817fa1b9214f87406b470b46d4 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[14] = {
     0xad,
index f46e9a71fd6025d1d68a7b2e658788149db2577c..3f65ac24b03d3b4705717b6c33e8f5a521966891 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[116] = {
     0xaa,
index c6c601f993b0099b100b5a1770e811852f6be8ae..e74a5466aab79e01176b7624a087495d43af54ad 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[55] = {
     0x5f,
index 7309a3ca78ec045ba1b5a64b7a2825ae8088da00..afef8fc4d68915e40e7032083b5c47e95e1cbfd2 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 /* Used by rune type checking functions to find the rune in the type tables */
 int runeinrange(const void* a, const void* b) {
index 1e0c102bb51bac1603c8df7fd899e0fbf400955b..30daf49a832e95607868e194ccfbaa8de9874fcd 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 int runelen(long r)
 {
index 326d3295ab052228e4afa00669f0dbbe455267c5..ad95673b1b27413dd5638548f7046a51a7064594 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 int runenlen(Rune* r, int num)
 {
index faca3f2a2a2ab9e8434298bb09e1f9bc34ac7e98..2219ebe7864efd1f885a2dc96a9f8dfa993311fe 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 int runetochar(char* s, Rune* r)
 {
index 56dd4ee8832f4df605c142a181f182addde7722e..16bfb71c390cdf2e7959396e483da2f9117c3b2e 100644 (file)
@@ -1,4 +1,4 @@
-#include "libc.h"
+#include <carl.h>
 
 bool isalnumrune(Rune ch)
 {
index 37a95390b5231d375e77c7520ab0be0f1128212e..ef76084beee2b6b6e5c52f85ffc0af0b19af2714 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[6] = {
     0x85,
index e994b78017bf15e2dcb58cf02314a78573ad6ac5..91e244b150c84deac04e0c1b9e7c9cab4910784e 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[70] = {
     0x24,
index 50d5582f0e1104b9f75a6d9969c276c779234f20..ed43eff3a0038bbb33f9e434ad3a54adc222d83e 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[7] = {
     0x1c5,
index 767294b1d7892e8df5f619a5990e39d0493a11f3..d2052a077351a982f99789b20241a431a72e2d59 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune mappings[1233][2] = {
     { 0x41, 0x61 },
index 023dc7f93fac7f358b19a3e25a486e9704433464..d6831d5fa16ae8dadfc8142731645e57463ed7b4 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune mappings[1245][2] = {
     { 0x61, 0x41 },
index 39dec2091e46e4a41ad49b93a278ae844c93dc0f..e785b40b099f9cd735efd34c63a8e66f9ebbbe49 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune mappings[1241][2] = {
     { 0x61, 0x41 },
index d1aa75d147c2758ee4bc63ea9cc4d74daadafb35..66fae3333ace087d6f141f71ded7f106e54aecf0 100644 (file)
@@ -1,4 +1,4 @@
-#include <libc.h>
+#include <carl.h>
 
 static Rune singles[539] = {
     0x100,
index 13a9fb000c24f10d77a18033f4bcbb62391acdc6..15ae8f2dfb694f67ed472384542b4877027ac149 100644 (file)
@@ -1,5 +1,5 @@
 #include "atf.h"
-#include "libc.h"
+#include <carl.h>
 
 int main(int argc, char** argv)
 {
index 9d82c4f5f67f778952525e7b5bffea33d4708417..3eb6e41b52f678c6b676466a631265a5dffb62cb 100644 (file)
@@ -2,7 +2,7 @@
 #include "atf.h"
 
 // File To Test
-#include "libc.h"
+#include <carl.h>
 
 //-----------------------------------------------------------------------------
 // Begin Unit Tests
index 5aea81c2f55ec4883565cbbfd8f7313ca34d68e4..4ddfb593fbd4c38ee1c42ce1812854067d3697e3 100755 (executable)
@@ -112,7 +112,7 @@ def generate_type_tables(type)
   ranges, singles = $types[type].partition {|e| e.kind_of? Array }
   puts "Generating #{ARGV[1]}/#{type.to_s}.c"
   File.open("#{ARGV[1]}/#{type.to_s}.c", "w") do |f|
-    f.puts("#include <libc.h>\n\n")
+    f.puts("#include <carl.h>\n\n")
     table = singles.map{|e| "0x#{e.value.to_s(16)}" }.join(",\n    ")
     f.print("static Rune singles[#{singles.length}] = {\n    #{table}\n};\n\n") if singles.length > 0
     table = ranges.map{|r| "{ 0x#{r.first.value.to_s(16)}, 0x#{r.last.value.to_s(16)} }" }.join(",\n    ")
@@ -135,7 +135,7 @@ def generate_to_table(type)
   mappings = $types[:all].select{|e| e[type] > 0 }
   puts "Generating #{ARGV[1]}/#{type.to_s}.c"
   File.open("#{ARGV[1]}/#{type.to_s}.c", "w") do |f|
-    f.print "#include <libc.h>\n\n"
+    f.print "#include <carl.h>\n\n"
     f.print "static Rune mappings[#{mappings.length}][2] = {\n"
     mappings.each do |e|
       f.print "    { 0x#{e.value.to_s(16)}, 0x#{e[type].to_s(16)} },\n"