OSDN Git Service

fixed some typos.
authormaqiyuan <maqiyuan@users.sourceforge.jp>
Tue, 22 Jul 2014 07:21:15 +0000 (15:21 +0800)
committermaqiyuan <maqiyuan@users.sourceforge.jp>
Tue, 22 Jul 2014 07:21:15 +0000 (15:21 +0800)
src/texsourc/Makefile.linux.android.static [new file with mode: 0644]
src/texsourc/Makefile.linux.clang
src/texsourc/Makefile.linux.gcc
src/texsourc/local.c
src/texsourc/yandytex.c

diff --git a/src/texsourc/Makefile.linux.android.static b/src/texsourc/Makefile.linux.android.static
new file mode 100644 (file)
index 0000000..091224c
--- /dev/null
@@ -0,0 +1,82 @@
+#
+# Copyright (c) 2014 Clerk Ma
+#
+# You may freely use, modify and/or distribute this file.
+#
+# makefile for linux (tested in ubuntu 14.04: gcc 4.8).
+# linked libkpathsea.a and libz.a
+# ./configure --prefix=/home/clerk/dev --host=arm-linux-androideabi
+#
+
+CC = arm-linux-androideabi-gcc
+CFLAGS = -c -O2 -Wno-unused-result -Ilibmd5 -I/home/clerk/android/include
+LDFLAGS = /home/clerk/android/lib/libkpathsea.a -lz
+
+objects = yandytex.o itex.o openinou.o subroute.o local.o \
+       tex0.o tex1.o tex2.o tex3.o tex4.o \
+       tex5.o tex6.o tex7.o tex8.o tex9.o \
+       pool.o md5.o utils.o
+
+headers = yandytex.h texd.h coerce.h macros.h memory.h
+
+yandytex: $(objects)
+       $(CC) -s -o yandytex $(objects) $(LDFLAGS)
+
+yandytex.o: yandytex.c $(headers)
+       $(CC) $(CFLAGS) yandytex.c
+itex.o: itex.c $(headers)
+       $(CC) $(CFLAGS) itex.c
+
+openinou.o: openinou.c $(headers)
+       $(CC) $(CFLAGS) openinou.c
+
+subroute.o: subroute.c $(headers)
+       $(CC) $(CFLAGS) subroute.c
+
+local.o: local.c $(headers)
+       $(CC) $(CFLAGS) local.c
+
+tex0.o: tex0.c $(headers)
+       $(CC) $(CFLAGS) tex0.c
+
+tex1.o: tex1.c $(headers)
+       $(CC) $(CFLAGS) tex1.c
+
+tex2.o: tex2.c $(headers)
+       $(CC) $(CFLAGS) tex2.c
+
+tex3.o: tex3.c $(headers)
+       $(CC) $(CFLAGS) tex3.c
+
+tex4.o: tex4.c $(headers)
+       $(CC) $(CFLAGS) tex4.c
+
+tex5.o: tex5.c $(headers)
+       $(CC) $(CFLAGS) tex5.c
+
+tex6.o: tex6.c $(headers)
+       $(CC) $(CFLAGS) tex6.c
+
+tex7.o: tex7.c $(headers)
+       $(CC) $(CFLAGS) tex7.c
+
+tex8.o: tex8.c $(headers)
+       $(CC) $(CFLAGS) tex8.c
+
+tex9.o: tex9.c $(headers)
+       $(CC) $(CFLAGS) tex9.c
+
+pool.o: pool.c $(headers)
+       $(CC) $(CFLAGS) pool.c
+
+md5.o: libmd5/md5.c $(headers)
+       $(CC) $(CFLAGS) libmd5/md5.c
+
+utils.o: utils.c $(headers)
+       $(CC) $(CFLAGS) utils.c
+
+.PHONY: clean
+
+clean:
+       rm yandytex *.o
index 6824f93..597a1ac 100644 (file)
@@ -3,7 +3,7 @@
 #
 # You may freely use, modify and/or distribute this file.
 #
-# makefle for linux (tested in ubuntu 14.04: clang/LLVM 4.3).
+# makefile for linux (tested in ubuntu 14.04: clang/LLVM 4.3).
 #
 # apt-get install libkpathsea6 libkpathsea-dev
 # apt-get install zlib1g zlib1g-dev
index b2968ba..70d86e3 100644 (file)
@@ -3,7 +3,7 @@
 #
 # You may freely use, modify and/or distribute this file.
 #
-# makefle for linux (tested in ubuntu 14.04: gcc 4.8).
+# makefile for linux (tested in ubuntu 14.04: gcc 4.8).
 #
 # apt-get install libkpathsea6 libkpathsea-dev
 # apt-get install zlib1g zlib1g-dev
index d23494c..4fa5547 100644 (file)
   #define REALLOC realloc
 #endif
 
-#if defined(__clang__)
+#ifdef __ANDROID__
+  #define malloc_usable_size dlmalloc_usable_size
+#endif
+
+#if   defined (__clang__)
 const char * compiler = "Clang/LLVM";
-#elif defined(__GNUC__) || defined(__GNUG__)
+#elif defined (__GNUC__) || defined(__GNUG__)
 const char * compiler = "GCC";
-#elif defined(_MSC_VER)
+#elif defined (_MSC_VER)
 const char * compiler = "MSVC";
 #endif
 
+#if   defined (_WIN64)
+const char * dist = "Win64";
+#elif defined (_WIN32)
+const char * dist = "Win32";
+#elif defined (__ANDROID__)
+const char * dist = "Android";
+#elif defined (__APPLE__)
+const char * dist = "Darwin";
+#elif defined (__gnu_linux__)
+const char * dist = "Linux";
+#else
+const char * dist = "Unknown";
+#endif
+
 const char * compiletime  = __TIME__;
 const char * compiledate  = __DATE__;
 const char * yandyversion = "2.3.0";
@@ -46,15 +64,7 @@ const char * banner       = "This is TeX, Version 3.14159265";
 void print_banner (void)
 {
   char dist_ver[256];
-#ifdef _WIN32
-#ifdef _WIN64
-  sprintf(dist_ver, "%s (%s %s/Win64)", banner, application, yandyversion);
-#else
-  sprintf(dist_ver, "%s (%s %s/Win32)", banner, application, yandyversion);
-#endif
-#else
-  sprintf(dist_ver, "%s (%s %s/Linux)", banner, application, yandyversion);
-#endif
+  sprintf(dist_ver, "%s (%s %s/%s)", banner, application, yandyversion, dist);
   prints(dist_ver);
 }
 
@@ -98,7 +108,7 @@ unsigned char wintodos[128] =
 void show_usage (void)
 {
   printf("\n"
-      "Useage: yanytex [OPTION]... [+format_file] [tex_file]\n\n"
+      "Useage: yandytex [OPTION]... [+format_file] [tex_file]\n\n"
       "--help       -?  show this usage summary\n"
       "--initex     -i  start up as initex (create format file)\n"
       "--verbose    -v  be verbose (show implementation version number)\n"
index e84830a..133b50d 100644 (file)
@@ -464,12 +464,9 @@ boolean input_line (FILE * f)
   return input_line_finish();
 }
 
-/* This string specifies what the `e' option does in response to an
-   error message.  */
-
 static char * edit_value = "c:\\yandy\\WinEdt\\WinEdt.exe [Open('%s');SelLine(%d,7)]";
 
-static int Isspace (char c)
+static inline int Isspace (char c)
 {
   return (c == ' ' || c == '\t');
 }