Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | i18n changes (CVS 201) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8390f6521af0f1c5cd0298cc4a1dfa3f |
User & Date: | drh 2001-04-05 15:57:13.000 |
Context
2001-04-05
| ||
16:25 | :-) (CVS 202) (check-in: 04530e4516 user: drh tags: trunk) | |
15:57 | i18n changes (CVS 201) (check-in: 8390f6521a user: drh tags: trunk) | |
2001-04-04
| ||
21:30 | Version 1.0.28 (CVS 475) (check-in: 8b4c87e8cf user: drh tags: trunk) | |
Changes
Changes to Makefile.in.
︙ | ︙ | |||
135 136 137 138 139 140 141 | parse.h: parse.c parse.c: $(TOP)/src/parse.y lemon cp $(TOP)/src/parse.y . ./lemon parse.y sqlite.h: $(TOP)/src/sqlite.h.in | | > > | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | parse.h: parse.c parse.c: $(TOP)/src/parse.y lemon cp $(TOP)/src/parse.y . ./lemon parse.y sqlite.h: $(TOP)/src/sqlite.h.in sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ -e s/--ENCODING--/@ENCODING@/ \ $(TOP)/src/sqlite.h.in >sqlite.h tokenize.o: $(TOP)/src/tokenize.c $(HDR) $(TCC) $(GDBM_FLAGS) -c $(TOP)/src/tokenize.c util.o: $(TOP)/src/util.c $(HDR) $(TCC) $(GDBM_FLAGS) -c $(TOP)/src/util.c |
︙ | ︙ |
Changes to configure.
︙ | ︙ | |||
9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-hints=FILE Read configuration options from FILE" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE | > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-hints=FILE Read configuration options from FILE" ac_help="$ac_help --enable-utf8 Use UTF-8 encodings" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE |
︙ | ︙ | |||
521 522 523 524 525 526 527 | else ac_n= ac_c='\c' ac_t= fi # The following RCS revision string applies to configure.in | | | 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | else ac_n= ac_c='\c' ac_t= fi # The following RCS revision string applies to configure.in # $Revision: 1.9 $ ######### # Make sure we are not building in a subdirectory of the source tree. # temp=`echo $srcdir | grep '[^./]'` |
︙ | ︙ | |||
596 597 598 599 600 601 602 | # generate command-line programs that run on the build machine. # default_build_cflags="-g" if test "$config_BUILD_CC" = ""; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | | | 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 | # generate command-line programs that run on the build machine. # default_build_cflags="-g" if test "$config_BUILD_CC" = ""; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:606: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
︙ | ︙ | |||
626 627 628 629 630 631 632 | echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | | | 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 | echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:636: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
︙ | ︙ | |||
677 678 679 680 681 682 683 | if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | | | 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 | if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:687: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
︙ | ︙ | |||
709 710 711 712 713 714 715 | ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 | | | | | 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 | ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 730 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi |
︙ | ︙ | |||
751 752 753 754 755 756 757 | cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 | | | | | | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 | cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:766: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<EOF #ifdef __GNUC__ yes; #endif EOF if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:794: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else |
︙ | ︙ | |||
823 824 825 826 827 828 829 | { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; } fi BUILD_CC=$CC default_build_cflags=$CFLAGS else BUILD_CC=$config_BUILD_CC echo $ac_n "checking host compiler""... $ac_c" 1>&6 | | | | | | | | | 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 | { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; } fi BUILD_CC=$CC default_build_cflags=$CFLAGS else BUILD_CC=$config_BUILD_CC echo $ac_n "checking host compiler""... $ac_c" 1>&6 echo "configure:833: checking host compiler" >&5 CC=$BUILD_CC echo "$ac_t""$BUILD_CC" 1>&6 fi echo $ac_n "checking switches for the host compiler""... $ac_c" 1>&6 echo "configure:838: checking switches for the host compiler" >&5 if test "$config_BUILD_CFLAGS" != ""; then CFLAGS=$config_BUILD_CFLAGS BUILD_CFLAGS=$config_BUILD_CFLAGS else BUILD_CFLAGS=$default_build_cflags fi echo "$ac_t""$BUILD_CFLAGS" 1>&6 if test "$config_BUILD_LIBS" != ""; then BUILD_LIBS=$config_BUILD_LIBS fi ########## # Locate a compiler that converts C code into *.o files that run on # the target machine. # echo $ac_n "checking target compiler""... $ac_c" 1>&6 echo "configure:858: checking target compiler" >&5 if test "$config_TARGET_CC" != ""; then TARGET_CC=$config_TARGET_CC else TARGET_CC=$BUILD_CC fi echo "$ac_t""$TARGET_CC" 1>&6 echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6 echo "configure:866: checking switches on the target compiler" >&5 if test "$config_TARGET_CFLAGS" != ""; then TARGET_CFLAGS=$config_TARGET_CFLAGS else TARGET_CFLAGS=$BUILD_CFLAGS fi echo "$ac_t""$TARGET_CFLAGS" 1>&6 echo $ac_n "checking target linker""... $ac_c" 1>&6 echo "configure:874: checking target linker" >&5 if test "$config_TARGET_LINK" = ""; then TARGET_LINK=$TARGET_CC else TARGET_LINK=$config_TARGET_LINK fi echo "$ac_t""$TARGET_LINK" 1>&6 echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6 echo "configure:882: checking switches on the target compiler" >&5 if test "$config_TARGET_TFLAGS" != ""; then TARGET_TFLAGS=$config_TARGET_TFLAGS else TARGET_TFLAGS=$BUILD_CFLAGS fi if test "$config_TARGET_RANLIB" != ""; then TARGET_RANLIB=$config_TARGET_RANLIB else # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:894: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" |
︙ | ︙ | |||
930 931 932 933 934 935 936 | # Set the $cross variable if we are cross-compiling. Make # it 0 if we are not. # echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6 | | > > > > > > > > > > > > > > > > > > > > > > | | | | | 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 | # Set the $cross variable if we are cross-compiling. Make # it 0 if we are not. # echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6 echo "configure:940: checking if host and target compilers are the same" >&5 if test "$BUILD_CC" = "$TARGET_CC"; then cross=0 echo "$ac_t""yes" 1>&6 else cross=1 echo "$ac_t""no" 1>&6 fi ########## # Are we using UTF-8 or iso8859 encodings? # # Check whether --enable-utf8 or --disable-utf8 was given. if test "${enable_utf8+set}" = set; then enableval="$enable_utf8" : else enable_utf8=no fi echo $ac_n "checking character encoding""... $ac_c" 1>&6 echo "configure:961: checking character encoding" >&5 if test "$enable_utf8" = "no"; then ENCODING=ISO8859 echo "$ac_t""iso8859" 1>&6 else ENCODING=UTF8 echo "$ac_t""UTF-8" 1>&6 fi ########### # Lots of things are different if we are compiling for Windows using # the CYGWIN environment. So check for that special case and handle # things accordingly. # echo $ac_n "checking if executables have the .exe suffix""... $ac_c" 1>&6 echo "configure:977: checking if executables have the .exe suffix" >&5 if test "$config_BUILD_EXEEXT" = ".exe"; then CYGWIN=yes echo "$ac_t""yes" 1>&6 else echo "$ac_t""unknown" 1>&6 fi if test "$CYGWIN" != "yes"; then echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 echo "configure:986: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF #line 991 "configure" #include "confdefs.h" int main() { #ifndef __CYGWIN__ #define __CYGWIN__ __CYGWIN32__ #endif return __CYGWIN__; ; return 0; } EOF if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_cygwin=no |
︙ | ︙ | |||
1034 1035 1036 1037 1038 1039 1040 | TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS" else if test "$with_tcl" != ""; then extra=`echo $with_tcl/$tclsubdir/libtcl8*.a` fi CC=$TARGET_CC echo $ac_n "checking for sin""... $ac_c" 1>&6 | | | | 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 | TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS" else if test "$with_tcl" != ""; then extra=`echo $with_tcl/$tclsubdir/libtcl8*.a` fi CC=$TARGET_CC echo $ac_n "checking for sin""... $ac_c" 1>&6 echo "configure:1066: checking for sin" >&5 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF #line 1071 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char sin(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ |
︙ | ︙ | |||
1062 1063 1064 1065 1066 1067 1068 | choke me #else sin(); #endif ; return 0; } EOF | | | | | | 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 | choke me #else sin(); #endif ; return 0; } EOF if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_sin=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="" else echo "$ac_t""no" 1>&6 LIBS="-lm" fi echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo "configure:1115: checking for dlopen in -ldl" >&5 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF #line 1123 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen(); int main() { dlopen() ; return 0; } EOF if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" |
︙ | ︙ | |||
1136 1137 1138 1139 1140 1141 1142 | otherlibs=$LIBS if test "$extra" != ""; then LIBS=$extra else LIBS="" echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6 | | | | | | | 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 | otherlibs=$LIBS if test "$extra" != ""; then LIBS=$extra else LIBS="" echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6 echo "configure:1168: checking for library containing Tcl_Init" >&5 if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_Tcl_Init="no" cat > conftest.$ac_ext <<EOF #line 1175 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char Tcl_Init(); int main() { Tcl_Init() ; return 0; } EOF if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_Tcl_Init="none required" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* test "$ac_cv_search_Tcl_Init" = "no" && for i in tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl80 tcl; do LIBS="-l$i $otherlibs $ac_func_search_save_LIBS" cat > conftest.$ac_ext <<EOF #line 1197 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char Tcl_Init(); int main() { Tcl_Init() ; return 0; } EOF if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_Tcl_Init="-l$i" break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi |
︙ | ︙ | |||
1205 1206 1207 1208 1209 1210 1211 | fi ########## # Figure out where to get the TCL header files. # echo $ac_n "checking TCL header files""... $ac_c" 1>&6 | | | | | | | | | | 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 | fi ########## # Figure out where to get the TCL header files. # echo $ac_n "checking TCL header files""... $ac_c" 1>&6 echo "configure:1237: checking TCL header files" >&5 found=no if test "$config_TARGET_TCL_INC" != ""; then TARGET_TCL_INC=$config_TARGET_TCL_INC found=yes else if test "$with_tcl" != ""; then TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir" found=yes else TARGET_TCL_INC="" found=no fi fi if test "$found" = "yes"; then echo "$ac_t""$TARGET_TCL_INC" 1>&6 else echo "$ac_t""not specified: still searching..." 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1256: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF #line 1271 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF #line 1288 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF #line 1305 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 |
︙ | ︙ | |||
1305 1306 1307 1308 1309 1310 1311 | else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tcl.h""... $ac_c" 1>&6 | | | | | 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 | else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tcl.h""... $ac_c" 1>&6 echo "configure:1337: checking for tcl.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF #line 1342 "configure" #include "confdefs.h" #include <tcl.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 |
︙ | ︙ | |||
1342 1343 1344 1345 1346 1347 1348 | fi if test "$found" = "no"; then for dir in /usr/local /usr/X11 /usr/X11R6 /usr/pkg /usr/contrib /usr; do ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6 | | | 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 | fi if test "$found" = "no"; then for dir in /usr/local /usr/X11 /usr/X11R6 /usr/pkg /usr/contrib /usr; do ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6 echo "configure:1374: checking for $dir/include/tcl.h" >&5 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } else if test -r $dir/include/tcl.h; then |
︙ | ︙ | |||
1386 1387 1388 1389 1390 1391 1392 | if test "$config_TARGET_GDBM_LIBS" != ""; then TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS" else CC=$TARGET_CC LIBS="" echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6 | | | | | | | 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 | if test "$config_TARGET_GDBM_LIBS" != ""; then TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS" else CC=$TARGET_CC LIBS="" echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6 echo "configure:1418: checking for library containing gdbm_open" >&5 if eval "test \"`echo '$''{'ac_cv_search_gdbm_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_gdbm_open="no" cat > conftest.$ac_ext <<EOF #line 1425 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gdbm_open(); int main() { gdbm_open() ; return 0; } EOF if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_gdbm_open="none required" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* test "$ac_cv_search_gdbm_open" = "no" && for i in gdbm; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <<EOF #line 1447 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char gdbm_open(); int main() { gdbm_open() ; return 0; } EOF if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_gdbm_open="-l$i" break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi |
︙ | ︙ | |||
1454 1455 1456 1457 1458 1459 1460 | fi ########## # Figure out where to get the GDBM header files. # echo $ac_n "checking GDBM header files""... $ac_c" 1>&6 | | | | | | 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 | fi ########## # Figure out where to get the GDBM header files. # echo $ac_n "checking GDBM header files""... $ac_c" 1>&6 echo "configure:1486: checking GDBM header files" >&5 found=no if test "$config_TARGET_GDBM_INC" != ""; then TARGET_GDBM_INC=$config_TARGET_GDBM_INC found=yes fi if test "$found" = "yes"; then echo "$ac_t""$TARGET_GDBM_INC" 1>&6 else echo "$ac_t""not specified: still searching..." 1>&6 ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6 echo "configure:1498: checking for gdbm.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF #line 1503 "configure" #include "confdefs.h" #include <gdbm.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 |
︙ | ︙ | |||
1503 1504 1505 1506 1507 1508 1509 | fi if test "$found" = "no"; then for dir in /usr/local /usr/pkg /usr/contrib; do ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6 | | | 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 | fi if test "$found" = "no"; then for dir in /usr/local /usr/pkg /usr/contrib; do ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6 echo "configure:1535: checking for $dir/include/gdbm.h" >&5 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } else if test -r $dir/include/gdbm.h; then |
︙ | ︙ | |||
1544 1545 1546 1547 1548 1549 1550 | if test "$config_TARGET_READLINE_LIBS" != ""; then TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS" else CC=$TARGET_CC LIBS="" echo $ac_n "checking for library containing readline""... $ac_c" 1>&6 | | | | | | | 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 | if test "$config_TARGET_READLINE_LIBS" != ""; then TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS" else CC=$TARGET_CC LIBS="" echo $ac_n "checking for library containing readline""... $ac_c" 1>&6 echo "configure:1576: checking for library containing readline" >&5 if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_readline="no" cat > conftest.$ac_ext <<EOF #line 1583 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main() { readline() ; return 0; } EOF if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_readline="none required" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* test "$ac_cv_search_readline" = "no" && for i in readline; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <<EOF #line 1605 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char readline(); int main() { readline() ; return 0; } EOF if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_readline="-l$i" break else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 fi |
︙ | ︙ | |||
1612 1613 1614 1615 1616 1617 1618 | fi ########## # Figure out where to get the READLINE header files. # echo $ac_n "checking readline header files""... $ac_c" 1>&6 | | | | | | 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 | fi ########## # Figure out where to get the READLINE header files. # echo $ac_n "checking readline header files""... $ac_c" 1>&6 echo "configure:1644: checking readline header files" >&5 found=no if test "$config_TARGET_READLINE_INC" != ""; then TARGET_READLINE_INC=$config_TARGET_READLINE_INC found=yes fi if test "$found" = "yes"; then echo "$ac_t""$TARGET_READLINE_INC" 1>&6 else echo "$ac_t""not specified: still searching..." 1>&6 ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for readline.h""... $ac_c" 1>&6 echo "configure:1656: checking for readline.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF #line 1661 "configure" #include "confdefs.h" #include <readline.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 |
︙ | ︙ | |||
1661 1662 1663 1664 1665 1666 1667 | fi if test "$found" = "no"; then for dir in /usr /usr/local /usr/local/readline /usr/contrib; do ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6 | | | 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 | fi if test "$found" = "no"; then for dir in /usr /usr/local /usr/local/readline /usr/contrib; do ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6 echo "configure:1693: checking for $dir/include/readline.h" >&5 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } else if test -r $dir/include/readline.h; then |
︙ | ︙ | |||
1690 1691 1692 1693 1694 1695 1696 | if test "$found" = "yes"; then TARGET_READLINE_INC="-I$dir/include" break fi ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6 | | | 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 | if test "$found" = "yes"; then TARGET_READLINE_INC="-I$dir/include" break fi ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6 echo "configure:1722: checking for $dir/include/readline/readline.h" >&5 if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; } else if test -r $dir/include/readline/readline.h; then |
︙ | ︙ | |||
1734 1735 1736 1737 1738 1739 1740 | ######### # Figure out whether or not we have a "usleep()" function. # echo $ac_n "checking for usleep""... $ac_c" 1>&6 | | | | 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 | ######### # Figure out whether or not we have a "usleep()" function. # echo $ac_n "checking for usleep""... $ac_c" 1>&6 echo "configure:1766: checking for usleep" >&5 if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF #line 1771 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char usleep(); below. */ #include <assert.h> /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ |
︙ | ︙ | |||
1762 1763 1764 1765 1766 1767 1768 | choke me #else usleep(); #endif ; return 0; } EOF | | | 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 | choke me #else usleep(); #endif ; return 0; } EOF if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_usleep=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_usleep=no" |
︙ | ︙ | |||
1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 | s%@RANLIB@%$RANLIB%g s%@TARGET_CC@%$TARGET_CC%g s%@TARGET_CFLAGS@%$TARGET_CFLAGS%g s%@TARGET_LINK@%$TARGET_LINK%g s%@TARGET_LFLAGS@%$TARGET_LFLAGS%g s%@TARGET_RANLIB@%$TARGET_RANLIB%g s%@TARGET_AR@%$TARGET_AR%g s%@BUILD_EXEEXT@%$BUILD_EXEEXT%g s%@OS_UNIX@%$OS_UNIX%g s%@OS_WIN@%$OS_WIN%g s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g s%@TARGET_LIBS@%$TARGET_LIBS%g s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g s%@CPP@%$CPP%g | > | 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 | s%@RANLIB@%$RANLIB%g s%@TARGET_CC@%$TARGET_CC%g s%@TARGET_CFLAGS@%$TARGET_CFLAGS%g s%@TARGET_LINK@%$TARGET_LINK%g s%@TARGET_LFLAGS@%$TARGET_LFLAGS%g s%@TARGET_RANLIB@%$TARGET_RANLIB%g s%@TARGET_AR@%$TARGET_AR%g s%@ENCODING@%$ENCODING%g s%@BUILD_EXEEXT@%$BUILD_EXEEXT%g s%@OS_UNIX@%$OS_UNIX%g s%@OS_WIN@%$OS_WIN%g s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g s%@TARGET_LIBS@%$TARGET_LIBS%g s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g s%@CPP@%$CPP%g |
︙ | ︙ |
Changes to configure.in.
︙ | ︙ | |||
147 148 149 150 151 152 153 | # the corresponding code. # AC_INIT(src/sqlite.h.in) dnl Put the RCS revision string after AC_INIT so that it will also dnl show in in configure. # The following RCS revision string applies to configure.in | | | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | # the corresponding code. # AC_INIT(src/sqlite.h.in) dnl Put the RCS revision string after AC_INIT so that it will also dnl show in in configure. # The following RCS revision string applies to configure.in # $Revision: 1.9 $ ######### # Make sure we are not building in a subdirectory of the source tree. # changequote(<<<,>>>) temp=`echo $srcdir | grep '[^./]'` changequote([,]) |
︙ | ︙ | |||
305 306 307 308 309 310 311 312 313 314 315 316 317 318 | cross=0 AC_MSG_RESULT(yes) else cross=1 AC_MSG_RESULT(no) fi ########### # Lots of things are different if we are compiling for Windows using # the CYGWIN environment. So check for that special case and handle # things accordingly. # AC_MSG_CHECKING([if executables have the .exe suffix]) if test "$config_BUILD_EXEEXT" = ".exe"; then | > > > > > > > > > > > > > > > | 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | cross=0 AC_MSG_RESULT(yes) else cross=1 AC_MSG_RESULT(no) fi ########## # Are we using UTF-8 or iso8859 encodings? # AC_ARG_ENABLE(utf8, [ --enable-utf8 Use UTF-8 encodings],,enable_utf8=no) AC_MSG_CHECKING([character encoding]) if test "$enable_utf8" = "no"; then ENCODING=ISO8859 AC_MSG_RESULT([iso8859]) else ENCODING=UTF8 AC_MSG_RESULT([UTF-8]) fi AC_SUBST(ENCODING) ########### # Lots of things are different if we are compiling for Windows using # the CYGWIN environment. So check for that special case and handle # things accordingly. # AC_MSG_CHECKING([if executables have the .exe suffix]) if test "$config_BUILD_EXEEXT" = ".exe"; then |
︙ | ︙ |
Changes to src/main.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | ** ************************************************************************* ** Main file for the SQLite library. The routines in this file ** implement the programmer interface to the library. Routines in ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ** ************************************************************************* ** Main file for the SQLite library. The routines in this file ** implement the programmer interface to the library. Routines in ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** ** $Id: main.c,v 1.26 2001/04/05 15:57:13 drh Exp $ */ #include "sqliteInt.h" #include <unistd.h> /* ** This is the callback routine for the code that initializes the ** database. Each callback contains text of a CREATE TABLE or |
︙ | ︙ | |||
186 187 188 189 190 191 192 193 194 195 196 197 198 199 | } /* ** The version of the library */ const char sqlite_version[] = SQLITE_VERSION; /* ** Open a new SQLite database. Construct an "sqlite" structure to define ** the state of this database and return a pointer to that structure. ** ** An attempt is made to initialize the in-memory data structures that ** hold the database schema. But if this fails (because the schema file ** is locked) then that step is deferred until the first call to | > > > > > > > > > > | 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | } /* ** The version of the library */ const char sqlite_version[] = SQLITE_VERSION; /* ** Does the library expect data to be encoded as UTF-8 or iso8859? The ** following global constant always lets us know. */ #ifdef SQLITE_UTF8 char sqlite_encoding[] = "UTF-8"; #else char sqlite_encoding[] = "iso8859"; #endif /* ** Open a new SQLite database. Construct an "sqlite" structure to define ** the state of this database and return a pointer to that structure. ** ** An attempt is made to initialize the in-memory data structures that ** hold the database schema. But if this fails (because the schema file ** is locked) then that step is deferred until the first call to |
︙ | ︙ |
Changes to src/sqlite.h.in.
︙ | ︙ | |||
20 21 22 23 24 25 26 | ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ************************************************************************* ** This header file defines the interface that the sqlite library ** presents to client programs. ** | | > > > > > > > > > > > > > > > | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ************************************************************************* ** This header file defines the interface that the sqlite library ** presents to client programs. ** ** @(#) $Id: sqlite.h.in,v 1.11 2001/04/05 15:57:13 drh Exp $ */ #ifndef _SQLITE_H_ #define _SQLITE_H_ #include <stdarg.h> /* Needed for the definition of va_list */ /* ** The version of the SQLite library. */ #define SQLITE_VERSION "--VERS--" /* ** The version string is also compiled into the library so that a program ** can check to make sure that the lib*.a file and the *.h file are from ** the same version. */ extern const char sqlite_version[]; /* ** The SQLITE_UTF8 macro is defined if the library expects to see ** UTF-8 encoded data. The SQLITE_ISO8859 macro is defined if the ** iso8859 encoded should be used. */ #define SQLITE_--ENCODING-- 1 /* ** The following constant holds one of two strings, "UTF-8" or "iso8859", ** depending on which character encoding the SQLite library expects to ** see. The character encoding makes a difference for the LIKE and GLOB ** operators and for the LENGTH() and SUBSTR() functions. */ extern char sqlite_encoding[]; /* ** Each open sqlite database is represented by an instance of the ** following opaque structure. */ typedef struct sqlite sqlite; /* |
︙ | ︙ |
Changes to src/tclsqlite.c.
︙ | ︙ | |||
19 20 21 22 23 24 25 | ** Author contact information: ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ************************************************************************* ** A TCL Interface to SQLite ** | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ** Author contact information: ** drh@hwaci.com ** http://www.hwaci.com/drh/ ** ************************************************************************* ** A TCL Interface to SQLite ** ** $Id: tclsqlite.c,v 1.15 2001/04/05 15:57:13 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ #include "sqlite.h" #include "tcl.h" #include <stdlib.h> #include <string.h> |
︙ | ︙ | |||
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | Tcl_Interp *interp; /* The TCL interpreter */ char *zArray; /* The array into which data is written */ Tcl_Obj *pCode; /* The code to execute for each row */ int once; /* Set only for the first invocation of callback */ int tcl_rc; /* Return code from TCL script */ }; /* ** Called for each row of the result. */ static int DbEvalCallback( void *clientData, /* An instance of CallbackData */ int nCol, /* Number of columns in the result */ char ** azCol, /* Data for each column */ char ** azN /* Name for each column */ ){ CallbackData *cbData = (CallbackData*)clientData; int i, rc; if( cbData->zArray[0] ){ if( cbData->once ){ Tcl_SetVar2(cbData->interp, cbData->zArray, "*", "", 0); for(i=0; i<nCol; i++){ Tcl_SetVar2(cbData->interp, cbData->zArray, "*", azN[i], TCL_LIST_ELEMENT|TCL_APPEND_VALUE); } } for(i=0; i<nCol; i++){ char *z = azCol[i]; if( z==0 ) z = ""; Tcl_SetVar2(cbData->interp, cbData->zArray, azN[i], z, 0); } }else{ for(i=0; i<nCol; i++){ char *z = azCol[i]; if( z==0 ) z = ""; Tcl_SetVar(cbData->interp, azN[i], z, 0); } } cbData->once = 0; rc = Tcl_EvalObj(cbData->interp, cbData->pCode); if( rc==TCL_CONTINUE ) rc = TCL_OK; cbData->tcl_rc = rc; return rc!=TCL_OK; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | Tcl_Interp *interp; /* The TCL interpreter */ char *zArray; /* The array into which data is written */ Tcl_Obj *pCode; /* The code to execute for each row */ int once; /* Set only for the first invocation of callback */ int tcl_rc; /* Return code from TCL script */ }; /* ** If TCL uses UTF-8 and SQLite is configured to use iso8859, then we ** have to do a translation when going between the two. Set the ** UTF_TRANSLATION_NEEDED macro to indicate that we need to do ** this translation. */ #if defined(TCL_UTF_MAX) && !defined(SQLITE_UTF8) # define UTF_TRANSLATION_NEEDED 1 #endif /* ** Called for each row of the result. */ static int DbEvalCallback( void *clientData, /* An instance of CallbackData */ int nCol, /* Number of columns in the result */ char ** azCol, /* Data for each column */ char ** azN /* Name for each column */ ){ CallbackData *cbData = (CallbackData*)clientData; int i, rc; #ifdef UTF_TRANSLATION_NEEDED Tcl_DString dCol; #endif if( cbData->zArray[0] ){ if( cbData->once ){ Tcl_SetVar2(cbData->interp, cbData->zArray, "*", "", 0); for(i=0; i<nCol; i++){ Tcl_SetVar2(cbData->interp, cbData->zArray, "*", azN[i], TCL_LIST_ELEMENT|TCL_APPEND_VALUE); } } for(i=0; i<nCol; i++){ char *z = azCol[i]; if( z==0 ) z = ""; #ifdef UTF_TRANSLATION_NEEDED Tcl_DStringInit(&dCol); Tcl_ExternalToUtfDString(NULL, z, -1, &dCol); Tcl_SetVar2(cbData->interp, cbData->zArray, azN[i], Tcl_DStringValue(&dCol), 0); Tcl_DStringFree(&dCol); #else Tcl_SetVar2(cbData->interp, cbData->zArray, azN[i], z, 0); #endif } }else{ for(i=0; i<nCol; i++){ char *z = azCol[i]; if( z==0 ) z = ""; #ifdef UTF_TRANSLATION_NEEDED Tcl_DStringInit(&dCol); Tcl_ExternalToUtfDString(NULL, z, -1, &dCol); Tcl_SetVar(cbData->interp, azN[i], Tcl_DStringValue(&dCol), 0); Tcl_DStringFree(&dCol); #else Tcl_SetVar(cbData->interp, azN[i], z, 0); #endif } } cbData->once = 0; rc = Tcl_EvalObj(cbData->interp, cbData->pCode); if( rc==TCL_CONTINUE ) rc = TCL_OK; cbData->tcl_rc = rc; return rc!=TCL_OK; |
︙ | ︙ | |||
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | char ** azN /* Name for each column */ ){ Tcl_Obj *pList = (Tcl_Obj*)clientData; int i; for(i=0; i<nCol; i++){ Tcl_Obj *pElem; if( azCol[i] && *azCol[i] ){ pElem = Tcl_NewStringObj(azCol[i], -1); }else{ pElem = Tcl_NewObj(); } Tcl_ListObjAppendElement(0, pList, pElem); } return 0; } | > > > > > > > > | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | char ** azN /* Name for each column */ ){ Tcl_Obj *pList = (Tcl_Obj*)clientData; int i; for(i=0; i<nCol; i++){ Tcl_Obj *pElem; if( azCol[i] && *azCol[i] ){ #ifdef UTF_TRANSLATION_NEEDED Tcl_DString dCol; Tcl_DStringInit(&dCol); Tcl_ExternalToUtfDString(NULL, azCol[i], -1, &dCol); pElem = Tcl_NewStringObj(Tcl_DStringValue(&dCol), -1); Tcl_DStringFree(&dCol); #else pElem = Tcl_NewStringObj(azCol[i], -1); #endif }else{ pElem = Tcl_NewObj(); } Tcl_ListObjAppendElement(0, pList, pElem); } return 0; } |
︙ | ︙ | |||
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | ** that have the same name as the fields extracted by the query. */ case DB_EVAL: { CallbackData cbData; char *zErrMsg; char *zSql; int rc; if( objc!=5 && objc!=3 ){ Tcl_WrongNumArgs(interp, 2, objv, "SQL ?ARRAY-NAME CODE?"); return TCL_ERROR; } pDb->interp = interp; zSql = Tcl_GetStringFromObj(objv[2], 0); Tcl_IncrRefCount(objv[2]); if( objc==5 ){ cbData.interp = interp; cbData.once = 1; cbData.zArray = Tcl_GetStringFromObj(objv[3], 0); cbData.pCode = objv[4]; cbData.tcl_rc = TCL_OK; | > > > > > > > > | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | ** that have the same name as the fields extracted by the query. */ case DB_EVAL: { CallbackData cbData; char *zErrMsg; char *zSql; int rc; #ifdef UTF_TRANSLATION_NEEDED Tcl_DString dSql; #endif if( objc!=5 && objc!=3 ){ Tcl_WrongNumArgs(interp, 2, objv, "SQL ?ARRAY-NAME CODE?"); return TCL_ERROR; } pDb->interp = interp; zSql = Tcl_GetStringFromObj(objv[2], 0); #ifdef UTF_TRANSLATION_NEEDED Tcl_DStringInit(&dSql); Tcl_UtfToExternalDString(NULL, zSql, -1, &dSql); zSql = Tcl_DStringValue(&dSql); #endif Tcl_IncrRefCount(objv[2]); if( objc==5 ){ cbData.interp = interp; cbData.once = 1; cbData.zArray = Tcl_GetStringFromObj(objv[3], 0); cbData.pCode = objv[4]; cbData.tcl_rc = TCL_OK; |
︙ | ︙ | |||
299 300 301 302 303 304 305 306 307 308 309 310 311 312 | Tcl_SetResult(interp, zErrMsg, TCL_VOLATILE); free(zErrMsg); rc = TCL_ERROR; }else{ rc = cbData.tcl_rc; } Tcl_DecrRefCount(objv[2]); return rc; } /* ** $db timeout MILLESECONDS ** ** Delay for the number of milliseconds specified when a file is locked. | > > > | 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 | Tcl_SetResult(interp, zErrMsg, TCL_VOLATILE); free(zErrMsg); rc = TCL_ERROR; }else{ rc = cbData.tcl_rc; } Tcl_DecrRefCount(objv[2]); #ifdef UTF_TRANSLATION_NEEDED Tcl_DStringFree(&dSql); #endif return rc; } /* ** $db timeout MILLESECONDS ** ** Delay for the number of milliseconds specified when a file is locked. |
︙ | ︙ | |||
378 379 380 381 382 383 384 385 386 387 388 389 390 391 | ** (Hence there is no namespace. There is no point in using a namespace ** if the extension only supplies one new name!) The "sqlite" command is ** used to open a new SQLite database. See the DbMain() routine above ** for additional information. */ int Sqlite_Init(Tcl_Interp *interp){ Tcl_CreateCommand(interp, "sqlite", DbMain, 0, 0); Tcl_PkgProvide(interp, "sqlite", "1.0"); return TCL_OK; } int Sqlite_SafeInit(Tcl_Interp *interp){ return TCL_OK; } | > | 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | ** (Hence there is no namespace. There is no point in using a namespace ** if the extension only supplies one new name!) The "sqlite" command is ** used to open a new SQLite database. See the DbMain() routine above ** for additional information. */ int Sqlite_Init(Tcl_Interp *interp){ Tcl_CreateCommand(interp, "sqlite", DbMain, 0, 0); Tcl_SetVar(interp,"sqlite_encoding",sqlite_encoding,TCL_GLOBAL_ONLY); Tcl_PkgProvide(interp, "sqlite", "1.0"); return TCL_OK; } int Sqlite_SafeInit(Tcl_Interp *interp){ return TCL_OK; } |
︙ | ︙ | |||
426 427 428 429 430 431 432 433 434 435 436 437 438 439 | "}\n" "}\n" ; #define TCLSH_MAIN main /* Needed to fake out mktclapp */ int TCLSH_MAIN(int argc, char **argv){ Tcl_Interp *interp; interp = Tcl_CreateInterp(); Sqlite_Init(interp); if( argc>=2 ){ int i; Tcl_SetVar(interp,"argv0",argv[1],TCL_GLOBAL_ONLY); Tcl_SetVar(interp,"argv", "", TCL_GLOBAL_ONLY); for(i=2; i<argc; i++){ | > | 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | "}\n" "}\n" ; #define TCLSH_MAIN main /* Needed to fake out mktclapp */ int TCLSH_MAIN(int argc, char **argv){ Tcl_Interp *interp; Tcl_FindExecutable(argv[0]); interp = Tcl_CreateInterp(); Sqlite_Init(interp); if( argc>=2 ){ int i; Tcl_SetVar(interp,"argv0",argv[1],TCL_GLOBAL_ONLY); Tcl_SetVar(interp,"argv", "", TCL_GLOBAL_ONLY); for(i=2; i<argc; i++){ |
︙ | ︙ |
Changes to src/util.c.
︙ | ︙ | |||
22 23 24 25 26 27 28 | ** ************************************************************************* ** Utility functions used throughout sqlite. ** ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ** ************************************************************************* ** Utility functions used throughout sqlite. ** ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** ** $Id: util.c,v 1.20 2001/04/05 15:57:13 drh Exp $ */ #include "sqliteInt.h" #include <stdarg.h> #include <ctype.h> /* ** If MEMORY_DEBUG is defined, then use versions of malloc() and |
︙ | ︙ | |||
721 722 723 724 725 726 727 728 | b += len; } } if( *a=='-' ) res = -res; return res; } /* | > | < | | < > | < < < < < < < < < < < < < < < < < < > < | < < < < < < < > > | > | < < < < < < < < < < < < < < < < < < < < < < | < | > > | < > > > | < < < > > > > > > > > > > > > > > > > > > | < < | < | < < < | | > | 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 | b += len; } } if( *a=='-' ) res = -res; return res; } #ifdef SQLITE_UTF8 /* ** X is a pointer to the first byte of a UTF-8 character. Increment ** X so that it points to the next character. This only works right ** if X points to a well-formed UTF-8 string. */ #define sqliteNextChar(X) while( (0xc0&*++(X))==0x80 ){} #define sqliteCharVal(X) sqlite_utf8_to_int(X) #else /* !defined(SQLITE_UTF8) */ /* ** For iso8859 encoding, the next character is just the next byte. */ #define sqliteNextChar(X) (++(X)); #define sqliteCharVal(X) ((int)*(X)) #endif /* defined(SQLITE_UTF8) */ #ifdef SQLITE_UTF8 /* ** Convert the UTF-8 character to which z points into a 31-bit ** UCS character. This only works right if z points to a well-formed ** UTF-8 string. */ static int sqlite_utf8_to_int(const unsigned char *z){ int c; static const int initVal[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 254, 255, }; c = initVal[*(z++)]; while( (0xc0&*z)==0x80 ){ c = (c<<6) | (0x3f&*(z++)); } return c; } #endif /* ** Compare two UTF-8 strings for equality where the first string can ** potentially be a "glob" expression. Return true (1) if they ** are the same and false (0) if they are different. ** ** Globbing rules: |
︙ | ︙ | |||
848 849 850 851 852 853 854 | while( (c = *zPattern)!=0 ){ switch( c ){ case '*': while( (c=zPattern[1]) == '*' || c == '?' ){ if( c=='?' ){ if( *zString==0 ) return 0; | | | | | | | | | | | 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 | while( (c = *zPattern)!=0 ){ switch( c ){ case '*': while( (c=zPattern[1]) == '*' || c == '?' ){ if( c=='?' ){ if( *zString==0 ) return 0; sqliteNextChar(zString); } zPattern++; } if( c==0 ) return 1; c = UpperToLower[c]; if( c=='[' ){ while( *zString && sqliteGlobCompare(&zPattern[1],zString)==0 ){ sqliteNextChar(zString); } return *zString!=0; }else{ while( (c2 = *zString)!=0 ){ while( c2 != 0 && c2 != c ){ c2 = *++zString; } if( c2==0 ) return 0; if( sqliteGlobCompare(&zPattern[1],zString) ) return 1; sqliteNextChar(zString); } return 0; } case '?': { if( *zString==0 ) return 0; sqliteNextChar(zString); zPattern++; break; } case '[': { int prior_c = 0; seen = 0; invert = 0; c = sqliteCharVal(zString); if( c==0 ) return 0; c2 = *++zPattern; if( c2=='^' ){ invert = 1; c2 = *++zPattern; } if( c2==']' ){ if( c==']' ) seen = 1; c2 = *++zPattern; } while( (c2 = sqliteCharVal(zPattern))!=0 && c2!=']' ){ if( c2=='-' && zPattern[1]!=']' && zPattern[1]!=0 && prior_c>0 ){ zPattern++; c2 = sqliteCharVal(zPattern); if( c>=prior_c && c<=c2 ) seen = 1; prior_c = 0; }else if( c==c2 ){ seen = 1; prior_c = c2; }else{ prior_c = c2; } sqliteNextChar(zPattern); } if( c2==0 || (seen ^ invert)==0 ) return 0; sqliteNextChar(zString); zPattern++; break; } default: { if( c != *zString ) return 0; zPattern++; zString++; |
︙ | ︙ | |||
936 937 938 939 940 941 942 | while( (c = UpperToLower[*zPattern])!=0 ){ switch( c ){ case '%': { while( (c=zPattern[1]) == '%' || c == '_' ){ if( c=='_' ){ if( *zString==0 ) return 0; | | | | | 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | while( (c = UpperToLower[*zPattern])!=0 ){ switch( c ){ case '%': { while( (c=zPattern[1]) == '%' || c == '_' ){ if( c=='_' ){ if( *zString==0 ) return 0; sqliteNextChar(zString); } zPattern++; } if( c==0 ) return 1; c = UpperToLower[c]; while( (c2=UpperToLower[*zString])!=0 ){ while( c2 != 0 && c2 != c ){ c2 = UpperToLower[*++zString]; } if( c2==0 ) return 0; if( sqliteLikeCompare(&zPattern[1],zString) ) return 1; sqliteNextChar(zString); } return 0; } case '_': { if( *zString==0 ) return 0; sqliteNextChar(zString); zPattern++; break; } default: { if( c != UpperToLower[*zString] ) return 0; zPattern++; zString++; break; } } } return *zString==0; } |
Changes to src/vdbe.c.
︙ | ︙ | |||
37 38 39 40 41 42 43 | ** inplicit conversion from one type to the other occurs as necessary. ** ** Most of the code in this file is taken up by the sqliteVdbeExec() ** function which does the work of interpreting a VDBE program. ** But other routines are also provided to help in building up ** a program instruction by instruction. ** | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ** inplicit conversion from one type to the other occurs as necessary. ** ** Most of the code in this file is taken up by the sqliteVdbeExec() ** function which does the work of interpreting a VDBE program. ** But other routines are also provided to help in building up ** a program instruction by instruction. ** ** $Id: vdbe.c,v 1.56 2001/04/05 15:57:13 drh Exp $ */ #include "sqliteInt.h" #include <unistd.h> #include <ctype.h> /* ** SQL is translated into a sequence of instructions to be |
︙ | ︙ | |||
3280 3281 3282 3283 3284 3285 3286 | if(VERIFY( i>=0 && i<p->nSet &&) !SetTest(&p->aSet[i], zStack[tos])){ pc = pOp->p2 - 1; } POPSTACK; break; } | | > > > > > > > | 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 | if(VERIFY( i>=0 && i<p->nSet &&) !SetTest(&p->aSet[i], zStack[tos])){ pc = pOp->p2 - 1; } POPSTACK; break; } /* Opcode: Strlen * * * ** ** Interpret the top of the stack as a string. Replace the top of ** stack with an integer which is the length of the string. */ case OP_Strlen: { int tos = p->tos; int len; VERIFY( if( tos<0 ) goto not_enough_stack; ) Stringify(p, tos); #ifdef SQLITE_UTF8 { char *z = zStack[tos]; for(len=0; *z; z++){ if( (0xc0&*z)!=0x80 ) len++; } } #else len = aStack[tos].n-1; #endif POPSTACK; p->tos++; aStack[tos].i = len; aStack[tos].flags = STK_Int; break; } |
︙ | ︙ | |||
3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 | start = aStack[p->tos].i - 1; POPSTACK; }else{ start = pOp->p1 - 1; } VERIFY( if( p->tos<0 ) goto not_enough_stack; ) Stringify(p, p->tos); n = aStack[p->tos].n - 1; if( start<0 ){ start += n + 1; if( start<0 ){ cnt += start; start = 0; } } if( start>n ){ start = n; } if( cnt<0 ) cnt = 0; if( cnt > n ){ cnt = n; } z = sqliteMalloc( cnt+1 ); if( z==0 ) goto no_mem; strncpy(z, &zStack[p->tos][start], cnt); z[cnt] = 0; POPSTACK; p->tos++; zStack[p->tos] = z; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 | start = aStack[p->tos].i - 1; POPSTACK; }else{ start = pOp->p1 - 1; } VERIFY( if( p->tos<0 ) goto not_enough_stack; ) Stringify(p, p->tos); /* "n" will be the number of characters in the input string. ** For iso8859, the number of characters is the number of bytes. ** Buf for UTF-8, some characters can use multiple bytes and the ** situation is more complex. */ #ifdef SQLITE_UTF8 z = zStack[p->tos]; for(n=0; *z; z++){ if( (0xc0&*z)!=0x80 ) n++; } #else n = aStack[p->tos].n - 1; #endif if( start<0 ){ start += n + 1; if( start<0 ){ cnt += start; start = 0; } } if( start>n ){ start = n; } if( cnt<0 ) cnt = 0; if( cnt > n ){ cnt = n; } /* At this point, "start" is the index of the first character to ** extract and "cnt" is the number of characters to extract. We ** need to convert units on these variable from characters into ** bytes. For iso8859, the conversion is a no-op, but for UTF-8 ** we have to do a little work. */ #ifdef SQLITE_UTF8 { int c_start = start; int c_cnt = cnt; int i; z = zStack[p->tos]; for(start=i=0; i<c_start; i++){ while( (0xc0&z[++start])==0x80 ){} } for(cnt=i=0; i<c_cnt; i++){ while( (0xc0&z[(++cnt)+start])==0x80 ){} } } #endif z = sqliteMalloc( cnt+1 ); if( z==0 ) goto no_mem; strncpy(z, &zStack[p->tos][start], cnt); z[cnt] = 0; POPSTACK; p->tos++; zStack[p->tos] = z; |
︙ | ︙ |
Changes to test/expr.test.
︙ | ︙ | |||
19 20 21 22 23 24 25 | # drh@hwaci.com # http://www.hwaci.com/drh/ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing expressions. # | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # drh@hwaci.com # http://www.hwaci.com/drh/ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing expressions. # # $Id: expr.test,v 1.12 2001/04/05 15:57:14 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Create a table to work with. # execsql {CREATE TABLE test1(i1 int, i2 int, r1 real, r2 real, t1 text, t2 text)} |
︙ | ︙ | |||
156 157 158 159 160 161 162 | test_expr expr-5.9 {t1='abc', t2='A%_C'} {t1 LIKE t2} 1 test_expr expr-5.9b {t1='ac', t2='A%_C'} {t1 LIKE t2} 0 test_expr expr-5.10 {t1='abxyzzyc', t2='A%_C'} {t1 LIKE t2} 1 test_expr expr-5.11 {t1='abc', t2='xyz'} {t1 NOT LIKE t2} 1 test_expr expr-5.12 {t1='abc', t2='ABC'} {t1 NOT LIKE t2} 0 # The following tests only work on versions of TCL that support | | > | | | | | | | | | | | | > > > > > > > > > > > | 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | test_expr expr-5.9 {t1='abc', t2='A%_C'} {t1 LIKE t2} 1 test_expr expr-5.9b {t1='ac', t2='A%_C'} {t1 LIKE t2} 0 test_expr expr-5.10 {t1='abxyzzyc', t2='A%_C'} {t1 LIKE t2} 1 test_expr expr-5.11 {t1='abc', t2='xyz'} {t1 NOT LIKE t2} 1 test_expr expr-5.12 {t1='abc', t2='ABC'} {t1 NOT LIKE t2} 0 # The following tests only work on versions of TCL that support # Unicode and SQLite configured for UTF-8 support. # if {"\u1234"!="u1234" && $::sqlite_encoding=="UTF-8"} { test_expr expr-5.13 "t1='a\u0080c', t2='A_C'" {t1 LIKE t2} 1 test_expr expr-5.14 "t1='a\u07FFc', t2='A_C'" {t1 LIKE t2} 1 test_expr expr-5.15 "t1='a\u0800c', t2='A_C'" {t1 LIKE t2} 1 test_expr expr-5.16 "t1='a\uFFFFc', t2='A_C'" {t1 LIKE t2} 1 test_expr expr-5.17 "t1='a\u0080', t2='A__'" {t1 LIKE t2} 0 test_expr expr-5.18 "t1='a\u07FF', t2='A__'" {t1 LIKE t2} 0 test_expr expr-5.19 "t1='a\u0800', t2='A__'" {t1 LIKE t2} 0 test_expr expr-5.20 "t1='a\uFFFF', t2='A__'" {t1 LIKE t2} 0 test_expr expr-5.21 "t1='ax\uABCD', t2='A_\uABCD'" {t1 LIKE t2} 1 test_expr expr-5.22 "t1='ax\u1234', t2='A%\u1234'" {t1 LIKE t2} 1 test_expr expr-5.23 "t1='ax\uFEDC', t2='A_%'" {t1 LIKE t2} 1 test_expr expr-5.24 "t1='ax\uFEDCy\uFEDC', t2='A%\uFEDC'" {t1 LIKE t2} 1 } # Theses tests are for when SQLite assumes iso8859 characters. # if {$::sqlite_encoding=="iso8859"} { catch {encoding system iso8859-1} test_expr expr-5.50 "t1='a\266c', t2='A_C'" {t1 LIKE t2} 1 test_expr expr-5.51 "t1='a\347', t2='A_'" {t1 LIKE t2} 1 test_expr expr-5.52 "t1='ax\351', t2='A_\351'" {t1 LIKE t2} 1 test_expr expr-5.53 "t1='ax\241', t2='A_%'" {t1 LIKE t2} 1 } test_expr expr-6.1 {t1='abc', t2='xyz'} {t1 GLOB t2} 0 test_expr expr-6.2 {t1='abc', t2='ABC'} {t1 GLOB t2} 0 test_expr expr-6.3 {t1='abc', t2='A?C'} {t1 GLOB t2} 0 test_expr expr-6.4 {t1='abc', t2='a?c'} {t1 GLOB t2} 1 test_expr expr-6.5 {t1='abc', t2='abc?'} {t1 GLOB t2} 0 test_expr expr-6.6 {t1='abc', t2='A*C'} {t1 GLOB t2} 0 |
︙ | ︙ | |||
199 200 201 202 203 204 205 | test_expr expr-6.22 {t1='abcdefg', t2='a*[^de]g'} {t1 GLOB t2} 1 test_expr expr-6.23 {t1='abcdefg', t2='a*?g'} {t1 GLOB t2} 1 test_expr expr-6.24 {t1='ac', t2='a*c'} {t1 GLOB t2} 1 test_expr expr-6.25 {t1='ac', t2='a*?c'} {t1 GLOB t2} 0 # These tests only work on versions of TCL that support Unicode # | > | | | | | | | | | | | | | | | | | > > > > > > > > > > > > > > > > > > > | 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | test_expr expr-6.22 {t1='abcdefg', t2='a*[^de]g'} {t1 GLOB t2} 1 test_expr expr-6.23 {t1='abcdefg', t2='a*?g'} {t1 GLOB t2} 1 test_expr expr-6.24 {t1='ac', t2='a*c'} {t1 GLOB t2} 1 test_expr expr-6.25 {t1='ac', t2='a*?c'} {t1 GLOB t2} 0 # These tests only work on versions of TCL that support Unicode # if {"\u1234"!="u1234" && $::sqlite_encoding=="UTF-8"} { test_expr expr-6.26 "t1='a\u0080c', t2='a?c'" {t1 GLOB t2} 1 test_expr expr-6.27 "t1='a\u07ffc', t2='a?c'" {t1 GLOB t2} 1 test_expr expr-6.28 "t1='a\u0800c', t2='a?c'" {t1 GLOB t2} 1 test_expr expr-6.29 "t1='a\uffffc', t2='a?c'" {t1 GLOB t2} 1 test_expr expr-6.30 "t1='a\u1234', t2='a?'" {t1 GLOB t2} 1 test_expr expr-6.31 "t1='a\u1234', t2='a??'" {t1 GLOB t2} 0 test_expr expr-6.32 "t1='ax\u1234', t2='a?\u1234'" {t1 GLOB t2} 1 test_expr expr-6.33 "t1='ax\u1234', t2='a*\u1234'" {t1 GLOB t2} 1 test_expr expr-6.34 "t1='ax\u1234y\u1234', t2='a*\u1234'" {t1 GLOB t2} 1 test_expr expr-6.35 "t1='a\u1234b', t2='a\[x\u1234y\]b'" {t1 GLOB t2} 1 test_expr expr-6.36 "t1='a\u1234b', t2='a\[\u1233-\u1235\]b'" {t1 GLOB t2} 1 test_expr expr-6.37 "t1='a\u1234b', t2='a\[\u1234-\u124f\]b'" {t1 GLOB t2} 1 test_expr expr-6.38 "t1='a\u1234b', t2='a\[\u1235-\u124f\]b'" {t1 GLOB t2} 0 test_expr expr-6.39 "t1='a\u1234b', t2='a\[a-\u1235\]b'" {t1 GLOB t2} 1 test_expr expr-6.40 "t1='a\u1234b', t2='a\[a-\u1234\]b'" {t1 GLOB t2} 1 test_expr expr-6.41 "t1='a\u1234b', t2='a\[a-\u1233\]b'" {t1 GLOB t2} 0 } # Theses tests are for when SQLite assumes iso8859 characters. # if {$::sqlite_encoding=="iso8859"} { catch {encoding system iso8859-1} test_expr expr-6.50 "t1='a\266c', t2='a?c'" {t1 GLOB t2} 1 test_expr expr-6.51 "t1='a\266', t2='a?'" {t1 GLOB t2} 1 test_expr expr-6.52 "t1='a\266', t2='a??'" {t1 GLOB t2} 0 test_expr expr-6.53 "t1='ax\266', t2='a??'" {t1 GLOB t2} 1 test_expr expr-6.54 "t1='ax\266', t2='a?\266'" {t1 GLOB t2} 1 test_expr expr-6.55 "t1='ax\266y\266', t2='a*\266'" {t1 GLOB t2} 1 test_expr expr-6.56 "t1='a\266b', t2='a\[x\266y\]b'" {t1 GLOB t2} 1 test_expr expr-6.57 "t1='a\266b', t2='a\[\260-\270\]b'" {t1 GLOB t2} 1 test_expr expr-6.58 "t1='a\266b', t2='a\[\266-\270\]b'" {t1 GLOB t2} 1 test_expr expr-6.59 "t1='a\266b', t2='a\[\267-\270\]b'" {t1 GLOB t2} 0 test_expr expr-6.60 "t1='a\266b', t2='a\[x-\267\]b'" {t1 GLOB t2} 1 test_expr expr-6.61 "t1='a\266b', t2='a\[x-\266\]b'" {t1 GLOB t2} 1 test_expr expr-6.62 "t1='a\266b', t2='a\[x-\265\]b'" {t1 GLOB t2} 0 } # The sqliteExprIfFalse and sqliteExprIfTrue routines are only # executed as part of a WHERE clause. Create a table suitable # for testing these functions. # execsql {DROP TABLE test1} execsql {CREATE TABLE test1(a int, b int);} |
︙ | ︙ |
Changes to test/func.test.
︙ | ︙ | |||
19 20 21 22 23 24 25 | # drh@hwaci.com # http://www.hwaci.com/drh/ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing built-in functions. # | | > | | | | < < < < | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # drh@hwaci.com # http://www.hwaci.com/drh/ # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing built-in functions. # # $Id: func.test,v 1.2 2001/04/05 15:57:14 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Create a table to work with. # do_test func-0.0 { execsql {CREATE TABLE tbl1(t1 text)} foreach word {this program is free software} { execsql "INSERT INTO tbl1 VALUES('$word')" } execsql {SELECT t1 FROM tbl1 ORDER BY t1} } {free is program software this} # Check out the length() function # do_test func-1.0 { execsql {SELECT length(t1) FROM tbl1 ORDER BY t1} |
︙ | ︙ | |||
84 85 86 87 88 89 90 91 92 | } {ee is am re is} do_test func-2.7 { execsql {SELECT substr(t1,-4,2) FROM tbl1 ORDER BY t1} } {fr {} gr wa th} do_test func-2.8 { execsql {SELECT t1 FROM tbl1 ORDER BY substr(t1,2,20)} } {this software free program is} finish_test | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | } {ee is am re is} do_test func-2.7 { execsql {SELECT substr(t1,-4,2) FROM tbl1 ORDER BY t1} } {fr {} gr wa th} do_test func-2.8 { execsql {SELECT t1 FROM tbl1 ORDER BY substr(t1,2,20)} } {this software free program is} # Only do the following tests if TCL has UTF-8 capabilities and # the UTF-8 encoding is turned on in the SQLite library. # if {$::sqlite_encoding=="UTF-8" && "\u1234"!="u1234"} { # Put some UTF-8 characters in the database # do_test func-3.0 { execsql {DELETE FROM tbl1} foreach word "contains UTF-8 characters hi\u1234ho" { execsql "INSERT INTO tbl1 VALUES('$word')" } execsql {SELECT t1 FROM tbl1 ORDER BY t1} } "characters contains hi\u1234ho UTF-8" do_test func-3.1 { execsql {SELECT length(t1) FROM tbl1 ORDER BY t1} } {10 8 5 5} do_test func-3.2 { execsql {SELECT substr(t1,1,2) FROM tbl1 ORDER BY t1} } {ch co hi UT} do_test func-3.3 { execsql {SELECT substr(t1,1,3) FROM tbl1 ORDER BY t1} } "cha con hi\u1234 UTF" do_test func-3.4 { execsql {SELECT substr(t1,2,2) FROM tbl1 ORDER BY t1} } "ha on i\u1234 TF" do_test func-3.5 { execsql {SELECT substr(t1,2,3) FROM tbl1 ORDER BY t1} } "har ont i\u1234h TF-" do_test func-3.6 { execsql {SELECT substr(t1,3,2) FROM tbl1 ORDER BY t1} } "ar nt \u1234h F-" do_test func-3.7 { execsql {SELECT substr(t1,4,2) FROM tbl1 ORDER BY t1} } "ra ta ho -8" do_test func-3.8 { execsql {SELECT substr(t1,-1,1) FROM tbl1 ORDER BY t1} } "s s o 8" do_test func-3.9 { execsql {SELECT substr(t1,-3,2) FROM tbl1 ORDER BY t1} } "er in \u1234h F-" do_test func-3.10 { execsql {SELECT substr(t1,-4,3) FROM tbl1 ORDER BY t1} } "ter ain i\u1234h TF-" } ;# End sqlite_encoding==UTF-8 and \u1234!=u1234 finish_test |
Changes to www/changes.tcl.
︙ | ︙ | |||
15 16 17 18 19 20 21 | proc chng {date desc} { puts "<DT><B>$date</B></DT>" puts "<DD><P><UL>$desc</UL></P></DD>" } chng {2001 Apr 5 (1.0.29)} { <li>The LIKE and GLOB operators now assume both operands are | | | > | | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | proc chng {date desc} { puts "<DT><B>$date</B></DT>" puts "<DD><P><UL>$desc</UL></P></DD>" } chng {2001 Apr 5 (1.0.29)} { <li>The LIKE and GLOB operators now assume both operands are UTF-8 strings if the library is configured with the "--enable-utf8" option. If not configured for UTF-8 but using a version of TCL that supports UTF-8, then a conversion from UTF-8 to iso8859 and back again is done inside the TCL interface.</li> } chng {2001 Apr 4 (1.0.28)} { <li>Added limited support for transactions. At this point, transactions will do table locking on the GDBM backend. There is no support (yet) for rollback or atomic commit.</li> <li>Added special column names ROWID, OID, and _ROWID_ that refer to the |
︙ | ︙ |
Changes to www/index.tcl.
1 2 3 | # # Run this TCL script to generate HTML for the index.html file. # | | | 1 2 3 4 5 6 7 8 9 10 11 | # # Run this TCL script to generate HTML for the index.html file. # set rcsid {$Id: index.tcl,v 1.35 2001/04/05 15:57:14 drh Exp $} puts {<html> <head><title>SQLite: An SQL Database Library Built Atop GDBM</title></head> <body bgcolor=white> <h1 align=center>SQLite: An SQL Database Library Built Atop <a href="http://www.gnu.org/software/gdbm/gdbm.html">GDBM</a></h1> <p align=center>} |
︙ | ︙ | |||
58 59 60 61 62 63 64 | There are currently no <em>known</em> bugs or memory leaks in the library. <a href="http://gcc.gnu.org/onlinedocs/gcov_1.html">Gcov</a> is used to verify test coverage. The test suite currently exercises all code except for a few areas which are unreachable or which are only reached when <tt>malloc()</tt> fails. The code has been tested for memory leaks and is found to be clean.</p> | < < < < < < < | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | There are currently no <em>known</em> bugs or memory leaks in the library. <a href="http://gcc.gnu.org/onlinedocs/gcov_1.html">Gcov</a> is used to verify test coverage. The test suite currently exercises all code except for a few areas which are unreachable or which are only reached when <tt>malloc()</tt> fails. The code has been tested for memory leaks and is found to be clean.</p> <p><b>Important Note:</b> Serious bugs have been found in versions 1.0.22 on Unix and 1.0.26 on Windows. Users of these or earlier versions of SQLite should upgrade.</p> <h2>Documentation</h2> <p>The following documentation is currently available:</p> |
︙ | ︙ |