• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

mfiler4のgitリポジトリ


コミットメタ情報

リビジョンa087aa9929a1921713cbb66dd337fafc55928379 (tree)
日時2012-10-30 01:30:39
作者ab25cq <ab25cq@gmai...>
コミッターab25cq

ログメッセージ

made runnable cygwin

変更サマリ

差分

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,9 @@
11
2+2012 30th Octorber version 1.0.1
3+
4+ Made runnable on cygwin
5+
6+
27 2012 26th Octorber version 1.0.1
38
49 Check mfiler4 with migemo and fixed bug
--- a/configure
+++ b/configure
@@ -1,9 +1,11 @@
11 #! /bin/sh
22 # Guess values for system-dependent variables and create Makefiles.
3-# Generated by GNU Autoconf 2.69.
3+# Generated by GNU Autoconf 2.68.
44 #
55 #
6-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
6+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
8+# Foundation, Inc.
79 #
810 #
911 # This configure script is free software; the Free Software Foundation
@@ -132,31 +134,6 @@ export LANGUAGE
132134 # CDPATH.
133135 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134136
135-# Use a proper internal environment variable to ensure we don't fall
136- # into an infinite loop, continuously re-executing ourselves.
137- if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138- _as_can_reexec=no; export _as_can_reexec;
139- # We cannot yet assume a decent shell, so we have to provide a
140-# neutralization value for shells without unset; and this also
141-# works around shells that cannot unset nonexistent variables.
142-# Preserve -v and -x to the replacement shell.
143-BASH_ENV=/dev/null
144-ENV=/dev/null
145-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146-case $- in # ((((
147- *v*x* | *x*v* ) as_opts=-vx ;;
148- *v* ) as_opts=-v ;;
149- *x* ) as_opts=-x ;;
150- * ) as_opts= ;;
151-esac
152-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153-# Admittedly, this is quite paranoid, since all the known shells bail
154-# out after a failed `exec'.
155-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156-as_fn_exit 255
157- fi
158- # We don't want this to propagate to other subprocesses.
159- { _as_can_reexec=; unset _as_can_reexec;}
160137 if test "x$CONFIG_SHELL" = x; then
161138 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162139 emulate sh
@@ -190,8 +167,7 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190167 else
191168 exitcode=1; echo positional parameters were not saved.
192169 fi
193-test x\$exitcode = x0 || exit 1
194-test -x / || exit 1"
170+test x\$exitcode = x0 || exit 1"
195171 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196172 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197173 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -236,25 +212,21 @@ IFS=$as_save_IFS
236212
237213
238214 if test "x$CONFIG_SHELL" != x; then :
239- export CONFIG_SHELL
240- # We cannot yet assume a decent shell, so we have to provide a
241-# neutralization value for shells without unset; and this also
242-# works around shells that cannot unset nonexistent variables.
243-# Preserve -v and -x to the replacement shell.
244-BASH_ENV=/dev/null
245-ENV=/dev/null
246-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247-case $- in # ((((
248- *v*x* | *x*v* ) as_opts=-vx ;;
249- *v* ) as_opts=-v ;;
250- *x* ) as_opts=-x ;;
251- * ) as_opts= ;;
252-esac
253-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254-# Admittedly, this is quite paranoid, since all the known shells bail
255-# out after a failed `exec'.
256-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257-exit 255
215+ # We cannot yet assume a decent shell, so we have to provide a
216+ # neutralization value for shells without unset; and this also
217+ # works around shells that cannot unset nonexistent variables.
218+ # Preserve -v and -x to the replacement shell.
219+ BASH_ENV=/dev/null
220+ ENV=/dev/null
221+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222+ export CONFIG_SHELL
223+ case $- in # ((((
224+ *v*x* | *x*v* ) as_opts=-vx ;;
225+ *v* ) as_opts=-v ;;
226+ *x* ) as_opts=-x ;;
227+ * ) as_opts= ;;
228+ esac
229+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
258230 fi
259231
260232 if test x$as_have_required = xno; then :
@@ -356,14 +328,6 @@ $as_echo X"$as_dir" |
356328
357329
358330 } # as_fn_mkdir_p
359-
360-# as_fn_executable_p FILE
361-# -----------------------
362-# Test if FILE is an executable regular file.
363-as_fn_executable_p ()
364-{
365- test -f "$1" && test -x "$1"
366-} # as_fn_executable_p
367331 # as_fn_append VAR VALUE
368332 # ----------------------
369333 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -485,10 +449,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
485449 chmod +x "$as_me.lineno" ||
486450 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487451
488- # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489- # already done that, so ensure we don't try to do so again and fall
490- # in an infinite loop. This has already happened in practice.
491- _as_can_reexec=no; export _as_can_reexec
492452 # Don't try to exec as it changes $[0], causing all sort of problems
493453 # (the dirname of $[0] is not the place where we might find the
494454 # original and so on. Autoconf is especially sensitive to this).
@@ -523,16 +483,16 @@ if (echo >conf$$.file) 2>/dev/null; then
523483 # ... but there are two gotchas:
524484 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525485 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526- # In both cases, we have to default to `cp -pR'.
486+ # In both cases, we have to default to `cp -p'.
527487 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528- as_ln_s='cp -pR'
488+ as_ln_s='cp -p'
529489 elif ln conf$$.file conf$$ 2>/dev/null; then
530490 as_ln_s=ln
531491 else
532- as_ln_s='cp -pR'
492+ as_ln_s='cp -p'
533493 fi
534494 else
535- as_ln_s='cp -pR'
495+ as_ln_s='cp -p'
536496 fi
537497 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538498 rmdir conf$$.dir 2>/dev/null
@@ -544,8 +504,28 @@ else
544504 as_mkdir_p=false
545505 fi
546506
547-as_test_x='test -x'
548-as_executable_p=as_fn_executable_p
507+if test -x / >/dev/null 2>&1; then
508+ as_test_x='test -x'
509+else
510+ if ls -dL / >/dev/null 2>&1; then
511+ as_ls_L_option=L
512+ else
513+ as_ls_L_option=
514+ fi
515+ as_test_x='
516+ eval sh -c '\''
517+ if test -d "$1"; then
518+ test -d "$1/.";
519+ else
520+ case $1 in #(
521+ -*)set "./$1";;
522+ esac;
523+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
524+ ???[sx]*):;;*)false;;esac;fi
525+ '\'' sh
526+ '
527+fi
528+as_executable_p=$as_test_x
549529
550530 # Sed expression to map a string onto a valid CPP name.
551531 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -624,7 +604,6 @@ LIBOBJS
624604 EGREP
625605 GREP
626606 CPP
627-CYGWIN_DLL
628607 SYSTEM_MIGEMODIR
629608 INSTALL_DATA
630609 INSTALL_SCRIPT
@@ -679,7 +658,6 @@ ac_user_opts='
679658 enable_option_checking
680659 with_debug
681660 with_gprof_debug
682-with_socket
683661 with_optimize
684662 with_migemo
685663 with_migemo_dir
@@ -1151,6 +1129,8 @@ target=$target_alias
11511129 if test "x$host_alias" != x; then
11521130 if test "x$build_alias" = x; then
11531131 cross_compiling=maybe
1132+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1133+ If a cross compiler is detected then cross compile mode will be used" >&2
11541134 elif test "x$build_alias" != "x$host_alias"; then
11551135 cross_compiling=yes
11561136 fi
@@ -1304,7 +1284,6 @@ Optional Packages:
13041284 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
13051285 --with-debug include debug info
13061286 --with-gprof-debug include debug info
1307- --with-socket enable remote control
13081287 --with-optimize with optimize flag(-O2) CFLAGS
13091288 --with-migemo enable migemo
13101289 --with-migemo-dir=DIR set migemo directory
@@ -1389,9 +1368,9 @@ test -n "$ac_init_help" && exit $ac_status
13891368 if $ac_init_version; then
13901369 cat <<\_ACEOF
13911370 configure
1392-generated by GNU Autoconf 2.69
1371+generated by GNU Autoconf 2.68
13931372
1394-Copyright (C) 2012 Free Software Foundation, Inc.
1373+Copyright (C) 2010 Free Software Foundation, Inc.
13951374 This configure script is free software; the Free Software Foundation
13961375 gives unlimited permission to copy, distribute and modify it.
13971376 _ACEOF
@@ -1636,12 +1615,58 @@ $as_echo "$ac_res" >&6; }
16361615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
16371616
16381617 } # ac_fn_c_check_header_compile
1618+
1619+# ac_fn_c_try_link LINENO
1620+# -----------------------
1621+# Try to link conftest.$ac_ext, and return whether this succeeded.
1622+ac_fn_c_try_link ()
1623+{
1624+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625+ rm -f conftest.$ac_objext conftest$ac_exeext
1626+ if { { ac_try="$ac_link"
1627+case "(($ac_try" in
1628+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1629+ *) ac_try_echo=$ac_try;;
1630+esac
1631+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1632+$as_echo "$ac_try_echo"; } >&5
1633+ (eval "$ac_link") 2>conftest.err
1634+ ac_status=$?
1635+ if test -s conftest.err; then
1636+ grep -v '^ *+' conftest.err >conftest.er1
1637+ cat conftest.er1 >&5
1638+ mv -f conftest.er1 conftest.err
1639+ fi
1640+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1641+ test $ac_status = 0; } && {
1642+ test -z "$ac_c_werror_flag" ||
1643+ test ! -s conftest.err
1644+ } && test -s conftest$ac_exeext && {
1645+ test "$cross_compiling" = yes ||
1646+ $as_test_x conftest$ac_exeext
1647+ }; then :
1648+ ac_retval=0
1649+else
1650+ $as_echo "$as_me: failed program was:" >&5
1651+sed 's/^/| /' conftest.$ac_ext >&5
1652+
1653+ ac_retval=1
1654+fi
1655+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1656+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1657+ # interfere with the next link command; also delete a directory that is
1658+ # left behind by Apple's compiler. We do this before executing the actions.
1659+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1660+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1661+ as_fn_set_status $ac_retval
1662+
1663+} # ac_fn_c_try_link
16391664 cat >config.log <<_ACEOF
16401665 This file contains any messages produced by compilers while
16411666 running configure, to aid debugging if configure makes a mistake.
16421667
16431668 It was created by $as_me, which was
1644-generated by GNU Autoconf 2.69. Invocation command line was
1669+generated by GNU Autoconf 2.68. Invocation command line was
16451670
16461671 $ $0 $@
16471672
@@ -1899,7 +1924,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
18991924 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19001925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19011926 as_fn_error $? "failed to load site script $ac_site_file
1902-See \`config.log' for more details" "$LINENO" 5; }
1927+See \`config.log' for more details" "$LINENO" 5 ; }
19031928 fi
19041929 done
19051930
@@ -2014,7 +2039,7 @@ do
20142039 IFS=$as_save_IFS
20152040 test -z "$as_dir" && as_dir=.
20162041 for ac_exec_ext in '' $ac_executable_extensions; do
2017- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2042+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20182043 ac_cv_prog_CC="${ac_tool_prefix}gcc"
20192044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20202045 break 2
@@ -2054,7 +2079,7 @@ do
20542079 IFS=$as_save_IFS
20552080 test -z "$as_dir" && as_dir=.
20562081 for ac_exec_ext in '' $ac_executable_extensions; do
2057- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2082+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20582083 ac_cv_prog_ac_ct_CC="gcc"
20592084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20602085 break 2
@@ -2107,7 +2132,7 @@ do
21072132 IFS=$as_save_IFS
21082133 test -z "$as_dir" && as_dir=.
21092134 for ac_exec_ext in '' $ac_executable_extensions; do
2110- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2135+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21112136 ac_cv_prog_CC="${ac_tool_prefix}cc"
21122137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21132138 break 2
@@ -2148,7 +2173,7 @@ do
21482173 IFS=$as_save_IFS
21492174 test -z "$as_dir" && as_dir=.
21502175 for ac_exec_ext in '' $ac_executable_extensions; do
2151- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2176+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21522177 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
21532178 ac_prog_rejected=yes
21542179 continue
@@ -2206,7 +2231,7 @@ do
22062231 IFS=$as_save_IFS
22072232 test -z "$as_dir" && as_dir=.
22082233 for ac_exec_ext in '' $ac_executable_extensions; do
2209- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2234+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22102235 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
22112236 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22122237 break 2
@@ -2250,7 +2275,7 @@ do
22502275 IFS=$as_save_IFS
22512276 test -z "$as_dir" && as_dir=.
22522277 for ac_exec_ext in '' $ac_executable_extensions; do
2253- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2278+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22542279 ac_cv_prog_ac_ct_CC="$ac_prog"
22552280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22562281 break 2
@@ -2293,7 +2318,7 @@ fi
22932318 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22942319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22952320 as_fn_error $? "no acceptable C compiler found in \$PATH
2296-See \`config.log' for more details" "$LINENO" 5; }
2321+See \`config.log' for more details" "$LINENO" 5 ; }
22972322
22982323 # Provide some information about the compiler.
22992324 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -2408,7 +2433,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
24082433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24092434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24102435 as_fn_error 77 "C compiler cannot create executables
2411-See \`config.log' for more details" "$LINENO" 5; }
2436+See \`config.log' for more details" "$LINENO" 5 ; }
24122437 else
24132438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24142439 $as_echo "yes" >&6; }
@@ -2451,7 +2476,7 @@ else
24512476 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24522477 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24532478 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2454-See \`config.log' for more details" "$LINENO" 5; }
2479+See \`config.log' for more details" "$LINENO" 5 ; }
24552480 fi
24562481 rm -f conftest conftest$ac_cv_exeext
24572482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -2510,7 +2535,7 @@ $as_echo "$ac_try_echo"; } >&5
25102535 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25112536 as_fn_error $? "cannot run C compiled programs.
25122537 If you meant to cross compile, use \`--host'.
2513-See \`config.log' for more details" "$LINENO" 5; }
2538+See \`config.log' for more details" "$LINENO" 5 ; }
25142539 fi
25152540 fi
25162541 fi
@@ -2562,7 +2587,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
25622587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
25632588 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25642589 as_fn_error $? "cannot compute suffix of object files: cannot compile
2565-See \`config.log' for more details" "$LINENO" 5; }
2590+See \`config.log' for more details" "$LINENO" 5 ; }
25662591 fi
25672592 rm -f conftest.$ac_cv_objext conftest.$ac_ext
25682593 fi
@@ -2696,7 +2721,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26962721 /* end confdefs.h. */
26972722 #include <stdarg.h>
26982723 #include <stdio.h>
2699-struct stat;
2724+#include <sys/types.h>
2725+#include <sys/stat.h>
27002726 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
27012727 struct buf { int x; };
27022728 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2847,7 +2873,7 @@ case $as_dir/ in #((
28472873 # by default.
28482874 for ac_prog in ginstall scoinst install; do
28492875 for ac_exec_ext in '' $ac_executable_extensions; do
2850- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2876+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
28512877 if test $ac_prog = install &&
28522878 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
28532879 # AIX install. It has an incompatible calling convention.
@@ -2929,12 +2955,6 @@ if test "${with_gprof_debug+set}" = set; then :
29292955 fi
29302956
29312957
2932-# Check whether --with-socket was given.
2933-if test "${with_socket+set}" = set; then :
2934- withval=$with_socket; ENABLE_SOCKET=1;
2935-fi
2936-
2937-
29382958 # Check whether --with-optimize was given.
29392959 if test "${with_optimize+set}" = set; then :
29402960 withval=$with_optimize; ENABLE_OPTIMIZE=1
@@ -3047,11 +3067,6 @@ then
30473067 fi
30483068 fi
30493069
3050-if test -n "$ENABLE_SOCKET"
3051-then
3052- CFLAGS="$CFLAGS -DENABLE_SOCKET"
3053-fi
3054-
30553070 if test $ENABLE_OPTIMIZE = 1
30563071 then
30573072 CFLAGS="$CFLAGS -O2"
@@ -3063,37 +3078,38 @@ CFLAGS="-DSYSCONFDIR=\"\\\"$sysconfdir/mfiler4/\\\"\" -DDATAROOTDIR=\"\\\"$datar
30633078
30643079
30653080 #####################################################################
3066-# OSの判定 cygwinとLinuxのみ
3081+# Operating System
30673082 #####################################################################
30683083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Operating System" >&5
30693084 $as_echo_n "checking Operating System... " >&6; }
30703085
3071-if test `uname -s | sed -e 's/\(.*\)-\(.*\)/\1/'` = "CYGWIN_NT"; then
3072- echo "CYGWIN_NT"
3086+if uname -s | grep -q CYGWIN; then
3087+ echo "CYGWIN"
30733088 $as_echo "#define __CYGWIN__ 1" >>confdefs.h
30743089
3075-
3076- CYGWIN_DLL=xyzsh.dll
3077-
3090+ OS=CYGWIN
30783091 elif test `uname -s` = "Darwin"; then
30793092 echo "Darwin"
30803093
30813094 $as_echo "#define __DARWIN__ 1" >>confdefs.h
30823095
3096+ OS=DARWIN
30833097 elif test `uname -s` = "FreeBSD"; then
30843098 echo "FreeBSD"
30853099
30863100 $as_echo "#define __FREEBSD__ 1" >>confdefs.h
30873101
3102+ OS=FREEBSD
30883103 else
30893104 echo "Linux"
30903105
30913106 $as_echo "#define __LINUX__ 1" >>confdefs.h
30923107
3108+ OS=LINUX
30933109 fi
30943110
3095-###########################################################################
3096-# cursesのインストールの有無を調べる
3111+##########################################################################
3112+# libxyzsh
30973113 ###########################################################################
30983114
30993115 ac_ext=c
@@ -3224,7 +3240,7 @@ else
32243240 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32253241 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32263242 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3227-See \`config.log' for more details" "$LINENO" 5; }
3243+See \`config.log' for more details" "$LINENO" 5 ; }
32283244 fi
32293245
32303246 ac_ext=c
@@ -3250,7 +3266,7 @@ do
32503266 for ac_prog in grep ggrep; do
32513267 for ac_exec_ext in '' $ac_executable_extensions; do
32523268 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3253- as_fn_executable_p "$ac_path_GREP" || continue
3269+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
32543270 # Check for GNU ac_path_GREP and select it if it is found.
32553271 # Check for GNU $ac_path_GREP
32563272 case `"$ac_path_GREP" --version 2>&1` in
@@ -3316,7 +3332,7 @@ do
33163332 for ac_prog in egrep; do
33173333 for ac_exec_ext in '' $ac_executable_extensions; do
33183334 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3319- as_fn_executable_p "$ac_path_EGREP" || continue
3335+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
33203336 # Check for GNU ac_path_EGREP and select it if it is found.
33213337 # Check for GNU $ac_path_EGREP
33223338 case `"$ac_path_EGREP" --version 2>&1` in
@@ -3493,6 +3509,78 @@ fi
34933509 done
34943510
34953511
3512+ac_fn_c_check_header_mongrel "$LINENO" "xyzsh/xyzsh.h" "ac_cv_header_xyzsh_xyzsh_h" "$ac_includes_default"
3513+if test "x$ac_cv_header_xyzsh_xyzsh_h" = xyes; then :
3514+ LIBS="$LIBS -lxyzsh"; $as_echo "#define HAVE_XYZSH_H 1" >>confdefs.h
3515+
3516+else
3517+ exit
3518+fi
3519+
3520+
3521+
3522+######################################################################
3523+# readline settings
3524+######################################################################
3525+ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
3526+if test "x$ac_cv_header_readline_readline_h" = xyes; then :
3527+ $as_echo "#define HAVE_READLINE_H 1" >>confdefs.h
3528+
3529+else
3530+ exit
3531+fi
3532+
3533+
3534+ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
3535+if test "x$ac_cv_header_readline_history_h" = xyes; then :
3536+ $as_echo "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h
3537+
3538+else
3539+ exit
3540+fi
3541+
3542+
3543+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lreadline" >&5
3544+$as_echo_n "checking for main in -lreadline... " >&6; }
3545+if ${ac_cv_lib_readline_main+:} false; then :
3546+ $as_echo_n "(cached) " >&6
3547+else
3548+ ac_check_lib_save_LIBS=$LIBS
3549+LIBS="-lreadline $LIBS"
3550+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3551+/* end confdefs.h. */
3552+
3553+
3554+int
3555+main ()
3556+{
3557+return main ();
3558+ ;
3559+ return 0;
3560+}
3561+_ACEOF
3562+if ac_fn_c_try_link "$LINENO"; then :
3563+ ac_cv_lib_readline_main=yes
3564+else
3565+ ac_cv_lib_readline_main=no
3566+fi
3567+rm -f core conftest.err conftest.$ac_objext \
3568+ conftest$ac_exeext conftest.$ac_ext
3569+LIBS=$ac_check_lib_save_LIBS
3570+fi
3571+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_main" >&5
3572+$as_echo "$ac_cv_lib_readline_main" >&6; }
3573+if test "x$ac_cv_lib_readline_main" = xyes; then :
3574+ LIBS="$LIBS -lreadline"
3575+else
3576+ exit
3577+fi
3578+ac_cv_lib_readline=ac_cv_lib_readline_main
3579+
3580+
3581+###########################################################################
3582+# libcurses
3583+###########################################################################
34963584 ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default"
34973585 if test "x$ac_cv_header_ncurses_h" = xyes; then :
34983586 NCURSES_OK=1; LIBS="$LIBS -lncurses"; $as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h
@@ -3514,7 +3602,7 @@ then
35143602 fi
35153603
35163604 ###########################################################################
3517-# 数学ライブラリのインストールの有無を調べる
3605+# math library
35183606 ###########################################################################
35193607 ac_fn_c_check_header_mongrel "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
35203608 if test "x$ac_cv_header_math_h" = xyes; then :
@@ -3527,7 +3615,7 @@ fi
35273615
35283616
35293617 ##########################################################################
3530-# 鬼車のインストールの有無を調べる
3618+# oniguruma
35313619 ###########################################################################
35323620 ac_fn_c_check_header_mongrel "$LINENO" "oniguruma.h" "ac_cv_header_oniguruma_h" "$ac_includes_default"
35333621 if test "x$ac_cv_header_oniguruma_h" = xyes; then :
@@ -3539,21 +3627,8 @@ fi
35393627
35403628
35413629
3542-##########################################################################
3543-# xyzshのインストールの有無を調べる
3544-###########################################################################
3545-ac_fn_c_check_header_mongrel "$LINENO" "xyzsh/xyzsh.h" "ac_cv_header_xyzsh_xyzsh_h" "$ac_includes_default"
3546-if test "x$ac_cv_header_xyzsh_xyzsh_h" = xyes; then :
3547- LIBS="$LIBS -lxyzsh"; $as_echo "#define HAVE_XYZSH_H 1" >>confdefs.h
3548-
3549-else
3550- exit
3551-fi
3552-
3553-
3554-
35553630 ####################################################################
3556-# iconv(必須)
3631+# iconv settings
35573632 ####################################################################
35583633 ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
35593634 if test "x$ac_cv_header_iconv_h" = xyes; then :
@@ -3565,8 +3640,13 @@ fi
35653640
35663641
35673642
3643+if test "$OS" = CYGWIN|| test "$OS" = DARWIN || test "$OS" = FREEBSD
3644+then
3645+ LIBS="$LIBS -liconv"
3646+fi
3647+
35683648 ##########################################################################
3569-# migemoのインストールの有無を調べる
3649+# migemo
35703650 ###########################################################################
35713651 if test $ENABLE_MIGEMO = 1
35723652 then
@@ -3992,16 +4072,16 @@ if (echo >conf$$.file) 2>/dev/null; then
39924072 # ... but there are two gotchas:
39934073 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
39944074 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
3995- # In both cases, we have to default to `cp -pR'.
4075+ # In both cases, we have to default to `cp -p'.
39964076 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
3997- as_ln_s='cp -pR'
4077+ as_ln_s='cp -p'
39984078 elif ln conf$$.file conf$$ 2>/dev/null; then
39994079 as_ln_s=ln
40004080 else
4001- as_ln_s='cp -pR'
4081+ as_ln_s='cp -p'
40024082 fi
40034083 else
4004- as_ln_s='cp -pR'
4084+ as_ln_s='cp -p'
40054085 fi
40064086 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
40074087 rmdir conf$$.dir 2>/dev/null
@@ -4061,16 +4141,28 @@ else
40614141 as_mkdir_p=false
40624142 fi
40634143
4064-
4065-# as_fn_executable_p FILE
4066-# -----------------------
4067-# Test if FILE is an executable regular file.
4068-as_fn_executable_p ()
4069-{
4070- test -f "$1" && test -x "$1"
4071-} # as_fn_executable_p
4072-as_test_x='test -x'
4073-as_executable_p=as_fn_executable_p
4144+if test -x / >/dev/null 2>&1; then
4145+ as_test_x='test -x'
4146+else
4147+ if ls -dL / >/dev/null 2>&1; then
4148+ as_ls_L_option=L
4149+ else
4150+ as_ls_L_option=
4151+ fi
4152+ as_test_x='
4153+ eval sh -c '\''
4154+ if test -d "$1"; then
4155+ test -d "$1/.";
4156+ else
4157+ case $1 in #(
4158+ -*)set "./$1";;
4159+ esac;
4160+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
4161+ ???[sx]*):;;*)false;;esac;fi
4162+ '\'' sh
4163+ '
4164+fi
4165+as_executable_p=$as_test_x
40744166
40754167 # Sed expression to map a string onto a valid CPP name.
40764168 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -4092,7 +4184,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
40924184 # values after options handling.
40934185 ac_log="
40944186 This file was extended by $as_me, which was
4095-generated by GNU Autoconf 2.69. Invocation command line was
4187+generated by GNU Autoconf 2.68. Invocation command line was
40964188
40974189 CONFIG_FILES = $CONFIG_FILES
40984190 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -4154,10 +4246,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
41544246 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
41554247 ac_cs_version="\\
41564248 config.status
4157-configured by $0, generated by GNU Autoconf 2.69,
4249+configured by $0, generated by GNU Autoconf 2.68,
41584250 with options \\"\$ac_cs_config\\"
41594251
4160-Copyright (C) 2012 Free Software Foundation, Inc.
4252+Copyright (C) 2010 Free Software Foundation, Inc.
41614253 This config.status script is free software; the Free Software Foundation
41624254 gives unlimited permission to copy, distribute and modify it."
41634255
@@ -4246,7 +4338,7 @@ fi
42464338 _ACEOF
42474339 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
42484340 if \$ac_cs_recheck; then
4249- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
4341+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
42504342 shift
42514343 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
42524344 CONFIG_SHELL='$SHELL'
@@ -4278,7 +4370,7 @@ do
42784370 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;;
42794371 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
42804372
4281- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
4373+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
42824374 esac
42834375 done
42844376
@@ -4595,7 +4687,7 @@ do
45954687 esac
45964688 case $ac_mode$ac_tag in
45974689 :[FHL]*:*);;
4598- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
4690+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
45994691 :[FH]-) ac_tag=-:-;;
46004692 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
46014693 esac
@@ -4623,7 +4715,7 @@ do
46234715 [\\/$]*) false;;
46244716 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
46254717 esac ||
4626- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
4718+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
46274719 esac
46284720 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
46294721 as_fn_append ac_file_inputs " '$ac_f'"
@@ -4650,7 +4742,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
46504742
46514743 case $ac_tag in
46524744 *:-:* | *:-) cat >"$ac_tmp/stdin" \
4653- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
4745+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
46544746 esac
46554747 ;;
46564748 esac
--- a/configure.in
+++ b/configure.in
@@ -19,7 +19,6 @@ DEBUGGING=0
1919
2020 AC_ARG_WITH(debug, [ --with-debug include debug info ], [ DEBUGGING=1; ], [])
2121 AC_ARG_WITH(gprof-debug, [ --with-gprof-debug include debug info ], [ DEBUGGING=2; ], [])
22-AC_ARG_WITH(socket, [ --with-socket enable remote control ], [ ENABLE_SOCKET=1; ], [])
2322 AC_ARG_WITH(optimize, [ --with-optimize with optimize flag(-O2) CFLAGS ], [ ENABLE_OPTIMIZE=1 ], [ ENABLE_OPTIMIZE=0 ])
2423 AC_ARG_WITH(migemo, [ --with-migemo enable migemo ], [ ENABLE_MIGEMO=1 ], [ ENABLE_MIGEMO=0 ])
2524 AC_ARG_WITH(migemo-dir, [ --with-migemo-dir=DIR set migemo directory ], [ MIGEMO_DIR="$with_val" ], [ MIGEMO_DIR= ])
@@ -88,11 +87,6 @@ then
8887 fi
8988 fi
9089
91-if test -n "$ENABLE_SOCKET"
92-then
93- CFLAGS="$CFLAGS -DENABLE_SOCKET"
94-fi
95-
9690 if test $ENABLE_OPTIMIZE = 1
9791 then
9892 CFLAGS="$CFLAGS -O2"
@@ -104,32 +98,45 @@ AC_SUBST(CFLAGS)
10498 AC_SUBST(SYSTEM_MIGEMODIR)
10599
106100 #####################################################################
107-# OSの判定 cygwinとLinuxのみ
101+# Operating System
108102 #####################################################################
109103 AC_MSG_CHECKING(Operating System)
110104
111-if test `uname -s | sed -e 's/\(.*\)-\(.*\)/\1/'` = "CYGWIN_NT"; then
112- echo "CYGWIN_NT"
105+if uname -s | grep -q CYGWIN; then
106+ echo "CYGWIN"
113107 AC_DEFINE(__CYGWIN__, 1)
114-
115- CYGWIN_DLL=xyzsh.dll
116- AC_SUBST(CYGWIN_DLL)
108+ OS=CYGWIN
117109 elif test `uname -s` = "Darwin"; then
118110 echo "Darwin"
119111
120112 AC_DEFINE(__DARWIN__, 1)
113+ OS=DARWIN
121114 elif test `uname -s` = "FreeBSD"; then
122115 echo "FreeBSD"
123116
124117 AC_DEFINE(__FREEBSD__, 1)
118+ OS=FREEBSD
125119 else
126120 echo "Linux"
127121
128122 AC_DEFINE(__LINUX__, 1)
123+ OS=LINUX
129124 fi
130125
126+##########################################################################
127+# libxyzsh
128+###########################################################################
129+AC_CHECK_HEADER(xyzsh/xyzsh.h, [ LIBS="$LIBS -lxyzsh"; AC_DEFINE(HAVE_XYZSH_H, 1) ], [ exit ])
130+
131+######################################################################
132+# readline settings
133+######################################################################
134+AC_CHECK_HEADER(readline/readline.h, [AC_DEFINE(HAVE_READLINE_H, 1)], [ exit ])
135+AC_CHECK_HEADER(readline/history.h, [AC_DEFINE(HAVE_READLINE_HISTORY_H, 1)], [ exit ])
136+AC_HAVE_LIBRARY(readline, [ LIBS="$LIBS -lreadline" ], [ exit ])
137+
131138 ###########################################################################
132-# cursesのインストールの有無を調べる
139+# libcurses
133140 ###########################################################################
134141 AC_CHECK_HEADER(ncurses.h, [NCURSES_OK=1; LIBS="$LIBS -lncurses"; AC_DEFINE(HAVE_NCURSES_H, 1)])
135142 AC_CHECK_HEADER(ncurses/ncurses.h, [NCURSES_OK=1; LIBS="$LIBS -lncurses"; AC_DEFINE(HAVE_NCURSES_NCURSES_H, 1)])
@@ -140,27 +147,27 @@ then
140147 fi
141148
142149 ###########################################################################
143-# 数学ライブラリのインストールの有無を調べる
150+# math library
144151 ###########################################################################
145152 AC_CHECK_HEADER(math.h, [LIBS="$LIBS -lm"; AC_DEFINE(HAVE_MATH_H, 1)], [ exit ])
146153
147154 ##########################################################################
148-# 鬼車のインストールの有無を調べる
155+# oniguruma
149156 ###########################################################################
150157 AC_CHECK_HEADER(oniguruma.h, [LIBS="$LIBS -lonig"; AC_DEFINE(HAVE_ONIGURUMA_H, 1)], [ exit ])
151158
152-##########################################################################
153-# xyzshのインストールの有無を調べる
154-###########################################################################
155-AC_CHECK_HEADER(xyzsh/xyzsh.h, [ LIBS="$LIBS -lxyzsh"; AC_DEFINE(HAVE_XYZSH_H, 1) ], [ exit ])
156-
157159 ####################################################################
158-# iconv(必須)
160+# iconv settings
159161 ####################################################################
160162 AC_CHECK_HEADER(iconv.h, [AC_DEFINE(HAVE_ICONV_H, 1)], [ exit ])
161163
164+if test "$OS" = CYGWIN|| test "$OS" = DARWIN || test "$OS" = FREEBSD
165+then
166+ LIBS="$LIBS -liconv"
167+fi
168+
162169 ##########################################################################
163-# migemoのインストールの有無を調べる
170+# migemo
164171 ###########################################################################
165172 if test $ENABLE_MIGEMO = 1
166173 then
--- a/src/filer.c
+++ b/src/filer.c
@@ -1336,207 +1336,6 @@ BOOL filer_reset_marks(int dir)
13361336 ///////////////////////////////////////////////////
13371337 // ファイラ描写
13381338 ///////////////////////////////////////////////////
1339-#if defined(__CYGWIN__)
1340-int filer_make_size_str(char* result, __off64_t size)
1341-{
1342- char* file_size = getenv("VIEW_FILE_SIZE");
1343- if(strcmp(file_size, "Human") == 0) {
1344- char tmp[256];
1345- __off64_t size2;
1346- if(size < 1024) {
1347- size2 = size;
1348- snprintf(tmp, 256, "%ld", size2);
1349-
1350- char* end = tmp + strlen(tmp);
1351-
1352- char* p = tmp;
1353- char* p2 = result;
1354-
1355- while(*p) {
1356- if(end - p == 7) {
1357- *p2++ = *p++;
1358- *p2++ = ',';
1359- }
1360- else if(end - p == 4) {
1361- *p2++ = *p++;
1362- *p2++ = ',';
1363- }
1364- else {
1365- *p2++ = *p++;
1366- }
1367- }
1368-
1369- *p2 = 0;
1370- }
1371- else if(size < 1024*1024) {
1372- size2 = size / 1024;
1373- snprintf(tmp, 256, "%ld", size2);
1374-
1375- char* end = tmp + strlen(tmp);
1376-
1377- char* p = tmp;
1378- char* p2 = result;
1379-
1380- while(*p) {
1381- if(end - p == 9) {
1382- *p2++ = *p++;
1383- *p2++ = ',';
1384- }
1385- else if(end - p == 6) {
1386- *p2++ = *p++;
1387- *p2++ = ',';
1388- }
1389- else {
1390- *p2++ = *p++;
1391- }
1392- }
1393-
1394- *p2++ = 'k';
1395- *p2 = 0;
1396- }
1397- else if(size < 1024*1024*1024) {
1398- size2 = size / (1024*1024);
1399- snprintf(tmp, 256, "%ld", size2);
1400-
1401- char* end = tmp + strlen(tmp);
1402-
1403- char* p = tmp;
1404- char* p2 = result;
1405-
1406- while(*p) {
1407- if(end - p == 9) {
1408- *p2++ = *p++;
1409- *p2++ = ',';
1410- }
1411- else if(end - p == 6) {
1412- *p2++ = *p++;
1413- *p2++ = ',';
1414- }
1415- else {
1416- *p2++ = *p++;
1417- }
1418- }
1419-
1420- *p2++ = 'M';
1421- *p2 = 0;
1422- }
1423- else {
1424- size2 = size / (1024*1024*1024);
1425- snprintf(tmp, 256, "%ld", size2);
1426-
1427- char* end = tmp + strlen(tmp);
1428-
1429- char* p = tmp;
1430- char* p2 = result;
1431-
1432- while(*p) {
1433- if(end - p == 9) {
1434- *p2++ = *p++;
1435- *p2++ = ',';
1436- }
1437- else if(end - p == 6) {
1438- *p2++ = *p++;
1439- *p2++ = ',';
1440- }
1441- else {
1442- *p2++ = *p++;
1443- }
1444- }
1445-
1446- *p2++ = 'G';
1447- *p2 = 0;
1448- }
1449-
1450- return 7;
1451- }
1452- else if(strcmp(file_size, "Normal") == 0) {
1453- if(size < 1024*1024) {
1454- char tmp[256];
1455- snprintf(tmp, 256, "%ld", size);
1456- char* end = tmp + strlen(tmp);
1457-
1458- char* p = tmp;
1459- char* p2 = result;
1460-
1461- while(*p) {
1462- if(end - p == 7) {
1463- *p2++ = *p++;
1464- *p2++ = ',';
1465- }
1466- else if(end - p == 4) {
1467- *p2++ = *p++;
1468- *p2++ = ',';
1469- }
1470- else {
1471- *p2++ = *p++;
1472- }
1473- }
1474- *p2 = 0;
1475- }
1476- else {
1477- size = size / (1024*1024);
1478-
1479- char tmp[256];
1480- snprintf(tmp, 256, "%ld", size);
1481- char* end = tmp + strlen(tmp);
1482-
1483- char* p = tmp;
1484- char* p2 = result;
1485-
1486- while(*p) {
1487- if(end - p == 9) {
1488- *p2++ = *p++;
1489- *p2++ = ',';
1490- }
1491- else if(end - p == 6) {
1492- *p2++ = *p++;
1493- *p2++ = ',';
1494- }
1495- else {
1496- *p2++ = *p++;
1497- }
1498- }
1499- *p2++ = 'M';
1500- *p2 = 0;
1501- }
1502-
1503- return 9;
1504- }
1505- else if(strcmp(file_size, "Plane") == 0) {
1506- char tmp[256];
1507- snprintf(tmp, 256, "%ld", size);
1508- char* end = tmp + strlen(tmp);
1509-
1510- char* p = tmp;
1511- char* p2 = result;
1512-
1513- while(*p) {
1514- if(end - p == 10) {
1515- *p2++ = *p++;
1516- *p2++ = ',';
1517- }
1518- else if(end - p == 7) {
1519- *p2++ = *p++;
1520- *p2++ = ',';
1521- }
1522- else if(end - p == 4) {
1523- *p2++ = *p++;
1524- *p2++ = ',';
1525- }
1526- else {
1527- *p2++ = *p++;
1528- }
1529- }
1530- *p2 = 0;
1531-
1532- return 14;
1533- }
1534- else {
1535- fprintf(stderr, "VIEW_FILE_SIZE is Normal or Human or Plane.\n");
1536- exit(1);
1537- }
1538-}
1539-#else
15401339 int filer_make_size_str(char* result, __off64_t size)
15411340 {
15421341 char* file_size = getenv("VIEW_FILE_SIZE");
@@ -1736,16 +1535,11 @@ int filer_make_size_str(char* result, __off64_t size)
17361535 exit(1);
17371536 }
17381537 }
1739-#endif
17401538
17411539 static void make_size_str2(char* result, __off64_t size)
17421540 {
17431541 char tmp[256];
1744-#if defined(__CYGWIN__)
1745- snprintf(tmp, 256, "%ld", size);
1746-#else
17471542 snprintf(tmp, 256, "%lld", size);
1748-#endif
17491543 char* end = tmp + strlen(tmp);
17501544
17511545 char* p = tmp;