OSDN Git Service

code clean.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Mon, 8 Sep 2014 14:48:30 +0000 (22:48 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Mon, 8 Sep 2014 14:48:30 +0000 (22:48 +0800)
src/texsourc/Makefile.android [moved from src/texsourc/Makefile.linux.android.static with 100% similarity]
src/texsourc/Makefile.linux.clang [deleted file]
src/texsourc/Makefile.linux.gcc
src/texsourc/Makefile.linux.gcc.static [deleted file]
src/texsourc/Makefile.macosx.clang [moved from src/texsourc/Makefile.macosx.clang.static with 93% similarity]
src/texsourc/coerce.h
src/texsourc/itex.c
src/texsourc/tex1.c
src/texsourc/zen-cls.bat [deleted file]

diff --git a/src/texsourc/Makefile.linux.clang b/src/texsourc/Makefile.linux.clang
deleted file mode 100644 (file)
index 457ca3a..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#\r
-# Copyright (c) 2014 Clerk Ma\r
-#\r
-# You may freely use, modify and/or distribute this file.\r
-#\r
-# makefile for linux (tested in ubuntu 14.04: clang/LLVM 4.3).\r
-#\r
-#\r
-\r
-CC = clang\r
-CFLAGS = -c -O2 -Ilibmd5\r
-LDFLAGS = -lkpathsea -lz\r
-\r
-objects = yandytex.o itex.o openinou.o subroute.o local.o \\r
-       tex0.o tex1.o tex2.o tex3.o tex4.o \\r
-       tex5.o tex6.o tex7.o tex8.o tex9.o \\r
-       pool.o utils.o dpx.o\r
-\r
-headers = yandytex.h texd.h coerce.h macros.h memory.h\r
-\r
-yandytex: $(objects)\r
-       $(CC) -s -o yandytex $(objects) $(LDFLAGS)\r
-\r
-yandytex.o: yandytex.c $(headers)\r
-       $(CC) $(CFLAGS) yandytex.c\r
\r
-itex.o: itex.c $(headers)\r
-       $(CC) $(CFLAGS) itex.c\r
-\r
-openinou.o: openinou.c $(headers)\r
-       $(CC) $(CFLAGS) openinou.c\r
-\r
-subroute.o: subroute.c $(headers)\r
-       $(CC) $(CFLAGS) subroute.c\r
-\r
-local.o: local.c $(headers)\r
-       $(CC) $(CFLAGS) local.c\r
-\r
-tex0.o: tex0.c $(headers)\r
-       $(CC) $(CFLAGS) tex0.c\r
-\r
-tex1.o: tex1.c $(headers)\r
-       $(CC) $(CFLAGS) tex1.c\r
-\r
-tex2.o: tex2.c $(headers)\r
-       $(CC) $(CFLAGS) tex2.c\r
-\r
-tex3.o: tex3.c $(headers)\r
-       $(CC) $(CFLAGS) tex3.c\r
-\r
-tex4.o: tex4.c $(headers)\r
-       $(CC) $(CFLAGS) tex4.c\r
-\r
-tex5.o: tex5.c $(headers)\r
-       $(CC) $(CFLAGS) tex5.c\r
-\r
-tex6.o: tex6.c $(headers)\r
-       $(CC) $(CFLAGS) tex6.c\r
-\r
-tex7.o: tex7.c $(headers)\r
-       $(CC) $(CFLAGS) tex7.c\r
-\r
-tex8.o: tex8.c $(headers)\r
-       $(CC) $(CFLAGS) tex8.c\r
-\r
-tex9.o: tex9.c $(headers)\r
-       $(CC) $(CFLAGS) tex9.c\r
-\r
-pool.o: pool.c $(headers)\r
-       $(CC) $(CFLAGS) pool.c\r
-\r
-utils.o: utils.c $(headers)\r
-       $(CC) $(CFLAGS) utils.c\r
-\r
-.PHONY: clean\r
-\r
-clean:\r
-       rm yandytex *.o\r
index b50f0fc..92c4529 100644 (file)
@@ -3,29 +3,30 @@
 #\r
 # You may freely use, modify and/or distribute this file.\r
 #\r
-# makefile for linux (tested in ubuntu 14.04: gcc 4.8).\r
-#\r
-# apt-get install libkpathsea6 libkpathsea-dev\r
-# apt-get install zlib1g zlib1g-dev\r
+# makefle for linux (tested in ubuntu 14.04: gcc 4.8).\r
+# linked libkpathsea.a and libz.a\r
 #\r
 \r
 CC = gcc\r
-CFLAGS = -c -O2 -Wno-unused-result\r
-LDFLAGS = -lkpathsea -lz\r
+CFLAGS = -g -c -O2 -Wno-unused-result\r
+LDFLAGS = libdpx.a libpng.a libz.a /home/clerk/dev/extra/lib/libkpathsea.a -lm\r
 \r
 objects = yandytex.o itex.o openinou.o subroute.o local.o \\r
        tex0.o tex1.o tex2.o tex3.o tex4.o \\r
        tex5.o tex6.o tex7.o tex8.o tex9.o \\r
-       pool.o utils.o\r
+       pool.o utils.o dpx.o\r
 \r
 headers = yandytex.h texd.h coerce.h macros.h memory.h\r
 \r
 yandytex: $(objects)\r
-       $(CC) -s -o yandytex $(objects) $(LDFLAGS)\r
+       $(CC) -o yandytex $(objects) $(LDFLAGS)\r
 \r
 yandytex.o: yandytex.c $(headers)\r
        $(CC) $(CFLAGS) yandytex.c\r
\r
+\r
+dpx.o: dpx.c $(headers)\r
+       $(CC) $(CFLAGS) dpx.c\r
+\r
 itex.o: itex.c $(headers)\r
        $(CC) $(CFLAGS) itex.c\r
 \r
diff --git a/src/texsourc/Makefile.linux.gcc.static b/src/texsourc/Makefile.linux.gcc.static
deleted file mode 100644 (file)
index 87b8f66..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#\r
-# Copyright (c) 2014 Clerk Ma\r
-#\r
-# You may freely use, modify and/or distribute this file.\r
-#\r
-# makefle for linux (tested in ubuntu 14.04: gcc 4.8).\r
-# linked libkpathsea.a and libz.a\r
-#\r
-\r
-CC = gcc\r
-CFLAGS = -g -c -O2 -Wno-unused-result\r
-LDFLAGS = /home/clerk/dev/android/lib/libkpathsea.a libdpx.a libpng.a libpaper.a /home/clerk/dev/android/lib/libz.a /home/clerk/dev/android/lib/libkpathsea.a -lm\r
-\r
-objects = yandytex.o itex.o openinou.o subroute.o local.o \\r
-       tex0.o tex1.o tex2.o tex3.o tex4.o \\r
-       tex5.o tex6.o tex7.o tex8.o tex9.o \\r
-       pool.o utils.o dpx.o\r
-\r
-headers = yandytex.h texd.h coerce.h macros.h memory.h\r
-\r
-yandytex: $(objects)\r
-       $(CC) -o yandytex $(objects) $(LDFLAGS)\r
-\r
-yandytex.o: yandytex.c $(headers)\r
-       $(CC) $(CFLAGS) yandytex.c\r
-\r
-dpx.o: dpx.c $(headers)\r
-       $(CC) $(CFLAGS) dpx.c\r
-\r
-itex.o: itex.c $(headers)\r
-       $(CC) $(CFLAGS) itex.c\r
-\r
-openinou.o: openinou.c $(headers)\r
-       $(CC) $(CFLAGS) openinou.c\r
-\r
-subroute.o: subroute.c $(headers)\r
-       $(CC) $(CFLAGS) subroute.c\r
-\r
-local.o: local.c $(headers)\r
-       $(CC) $(CFLAGS) local.c\r
-\r
-tex0.o: tex0.c $(headers)\r
-       $(CC) $(CFLAGS) tex0.c\r
-\r
-tex1.o: tex1.c $(headers)\r
-       $(CC) $(CFLAGS) tex1.c\r
-\r
-tex2.o: tex2.c $(headers)\r
-       $(CC) $(CFLAGS) tex2.c\r
-\r
-tex3.o: tex3.c $(headers)\r
-       $(CC) $(CFLAGS) tex3.c\r
-\r
-tex4.o: tex4.c $(headers)\r
-       $(CC) $(CFLAGS) tex4.c\r
-\r
-tex5.o: tex5.c $(headers)\r
-       $(CC) $(CFLAGS) tex5.c\r
-\r
-tex6.o: tex6.c $(headers)\r
-       $(CC) $(CFLAGS) tex6.c\r
-\r
-tex7.o: tex7.c $(headers)\r
-       $(CC) $(CFLAGS) tex7.c\r
-\r
-tex8.o: tex8.c $(headers)\r
-       $(CC) $(CFLAGS) tex8.c\r
-\r
-tex9.o: tex9.c $(headers)\r
-       $(CC) $(CFLAGS) tex9.c\r
-\r
-pool.o: pool.c $(headers)\r
-       $(CC) $(CFLAGS) pool.c\r
-\r
-utils.o: utils.c $(headers)\r
-       $(CC) $(CFLAGS) utils.c\r
-\r
-.PHONY: clean\r
-\r
-clean:\r
-       rm yandytex *.o\r
similarity index 93%
rename from src/texsourc/Makefile.macosx.clang.static
rename to src/texsourc/Makefile.macosx.clang
index c75a4e8..3c44789 100644 (file)
@@ -8,7 +8,7 @@
 \r
 CC = clang\r
 CFLAGS = -g -c -O2 -Wno-unused-result -Wno-dangling-else -I/Users/maqiyuan/dev/extra/include\r
-LDFLAGS = /Users/maqiyuan/dev/extra/lib/libkpathsea.a libdpx.a libpng.a libpaper.a libz.a -lm\r
+LDFLAGS = /Users/maqiyuan/dev/extra/lib/libkpathsea.a libdpx.a libpng.a libz.a -lm\r
 \r
 objects = yandytex.o itex.o openinou.o subroute.o local.o \\r
        tex0.o tex1.o tex2.o tex3.o tex4.o \\r
index 43bcc63..2efec95 100644 (file)
@@ -137,7 +137,8 @@ void show_box_(pointer p);
 void delete_token_ref_(pointer p);\r
 #define delete_token_ref(p) delete_token_ref_((pointer) (p))\r
 void delete_glue_ref_(pointer p);\r
-#define delete_glue_ref(p) delete_glue_ref_((pointer) (p))\r
+#define delete_glue_ref(p)      delete_glue_ref_((pointer) (p))\r
+#define fast_delete_glue_ref(p) delete_glue_ref_((pointer) (p))\r
 void flush_node_list_(pointer p);\r
 #define flush_node_list(p) flush_node_list_((pointer) (p))\r
 pointer copy_node_list_(pointer p);\r
index 6887b49..50b0b52 100644 (file)
@@ -84,7 +84,7 @@ void initialize (void)
     xord[chr(i)] = invalid_code;\r
 \r
 #ifdef JOKE\r
-  for (i = 128; i <= 255 ; i++)\r
+  for (i = 128; i <= 255; i++)\r
     xord[xchr[i]] = i;\r
 \r
   for (i = 0; i <= 126; i++)\r
index 1d79f0b..124948f 100644 (file)
@@ -127,35 +127,48 @@ void flush_node_list_(pointer p)
             goto done;\r
           }\r
           break;\r
+\r
         case glue_node:\r
-          delete_glue_ref(p);\r
+          {\r
+            fast_delete_glue_ref(p);\r
 \r
-          if (leader_ptr(p) != 0)\r
-            flush_node_list(leader_ptr(p));\r
+            if (leader_ptr(p) != 0)\r
+              flush_node_list(leader_ptr(p));\r
+          }\r
           break;\r
+\r
         case kern_node:\r
         case math_node:\r
         case penalty_node:\r
+          do_nothing();\r
           break;\r
+\r
         case ligature_node:\r
           flush_node_list(lig_ptr(p));\r
           break;\r
+\r
         case mark_node:\r
           delete_token_ref(mark_ptr(p));\r
           break;\r
+\r
         case disc_node:\r
-          flush_node_list(pre_break(p));\r
-          flush_node_list(post_break(p));\r
+          {\r
+            flush_node_list(pre_break(p));\r
+            flush_node_list(post_break(p));\r
+          }\r
           break;\r
+\r
         case adjust_node:\r
           flush_node_list(adjust_ptr(p));\r
           break;\r
+\r
         case style_node:\r
           {\r
             free_node(p, style_node_size);\r
             goto done;\r
           }\r
           break;\r
+\r
         case choice_node:\r
           {\r
             flush_node_list(display_mlist(p));\r
@@ -166,6 +179,7 @@ void flush_node_list_(pointer p)
             goto done;\r
           }\r
           break;\r
+\r
         case ord_noad:\r
         case op_noad:\r
         case bin_noad:\r
diff --git a/src/texsourc/zen-cls.bat b/src/texsourc/zen-cls.bat
deleted file mode 100644 (file)
index 5e5f1f3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-del *.exe\r
-del *.map\r
-del *.obj\r
-del *.res\r
-del *.exp\r
-del *.lib\r
-del *~\r