Imported Upstream version 3.0.1~rc1
Axel Beckert
12 years ago
0 | 0 | ============================================================================= |
1 | 1 | Dillo project |
2 | 2 | ============================================================================= |
3 | ||
4 | dillo-3.0.1 [September 21, 2011] | |
5 | ||
6 | +- Add preference for UI theme. | |
7 | - Allow key bindings for paging left/right. | |
8 | - Privacy -- never send cookies when making third-party requests, and | |
9 | never accept cookies in the responses to these requests. | |
10 | Patches: corvid | |
11 | +- Add show_quit_dialog dillorc option. | |
12 | Patch: Johannes Hofmann | |
13 | ||
14 | ----------------------------------------------------------------------------- | |
3 | 15 | |
4 | 16 | dillo-3.0 [September 06, 2011] |
5 | 17 |
35 | 35 | |
36 | 36 | dillo-3.0, the first of the 3.x series is released. |
37 | 37 | |
38 | dillo-3.0.1, a bugfix release for the new 3.x series is out. | |
39 | ||
38 | 40 | |
39 | 41 | Jorge.- |
40 | 42 | jcid@dillo.org |
58 | 58 | |
59 | 59 | 2.- Then dillo3: |
60 | 60 | |
61 | tar jxvf dillo-3.0.tar.bz2 | |
62 | cd dillo-3.0 | |
61 | tar jxvf dillo-3.0.1.tar.bz2 | |
62 | cd dillo-3.0.1 | |
63 | 63 | ./configure; make |
64 | 64 | sudo make install-strip |
65 | 65 |
0 | 0 | #! /bin/sh |
1 | 1 | # Attempt to guess a canonical system name. |
2 | 2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | |
4 | # 2011 Free Software Foundation, Inc. | |
5 | ||
6 | timestamp='2011-05-11' | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | |
4 | # Free Software Foundation, Inc. | |
5 | ||
6 | timestamp='2009-12-30' | |
7 | 7 | |
8 | 8 | # This file is free software; you can redistribute it and/or modify it |
9 | 9 | # under the terms of the GNU General Public License as published by |
56 | 56 | |
57 | 57 | Originally written by Per Bothner. |
58 | 58 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
59 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free | |
59 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free | |
60 | 60 | Software Foundation, Inc. |
61 | 61 | |
62 | 62 | This is free software; see the source for copying conditions. There is NO |
180 | 180 | fi |
181 | 181 | ;; |
182 | 182 | *) |
183 | os=netbsd | |
183 | os=netbsd | |
184 | 184 | ;; |
185 | 185 | esac |
186 | 186 | # The OS release |
223 | 223 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` |
224 | 224 | ;; |
225 | 225 | *5.*) |
226 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
226 | UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` | |
227 | 227 | ;; |
228 | 228 | esac |
229 | 229 | # According to Compaq, /usr/sbin/psrinfo has been available on |
269 | 269 | # A Xn.n version is an unreleased experimental baselevel. |
270 | 270 | # 1.2 uses "1.2" for uname -r. |
271 | 271 | echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
272 | # Reset EXIT trap before exiting to avoid spurious non-zero exit code. | |
273 | exitcode=$? | |
274 | trap '' 0 | |
275 | exit $exitcode ;; | |
272 | exit ;; | |
276 | 273 | Alpha\ *:Windows_NT*:*) |
277 | 274 | # How do we know it's Interix rather than the generic POSIX subsystem? |
278 | 275 | # Should we change UNAME_MACHINE based on the output of uname instead |
298 | 295 | echo s390-ibm-zvmoe |
299 | 296 | exit ;; |
300 | 297 | *:OS400:*:*) |
301 | echo powerpc-ibm-os400 | |
298 | echo powerpc-ibm-os400 | |
302 | 299 | exit ;; |
303 | 300 | arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
304 | 301 | echo arm-acorn-riscix${UNAME_RELEASE} |
397 | 394 | # MiNT. But MiNT is downward compatible to TOS, so this should |
398 | 395 | # be no problem. |
399 | 396 | atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) |
400 | echo m68k-atari-mint${UNAME_RELEASE} | |
397 | echo m68k-atari-mint${UNAME_RELEASE} | |
401 | 398 | exit ;; |
402 | 399 | atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) |
403 | 400 | echo m68k-atari-mint${UNAME_RELEASE} |
404 | exit ;; | |
401 | exit ;; | |
405 | 402 | *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) |
406 | echo m68k-atari-mint${UNAME_RELEASE} | |
403 | echo m68k-atari-mint${UNAME_RELEASE} | |
407 | 404 | exit ;; |
408 | 405 | milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) |
409 | echo m68k-milan-mint${UNAME_RELEASE} | |
410 | exit ;; | |
406 | echo m68k-milan-mint${UNAME_RELEASE} | |
407 | exit ;; | |
411 | 408 | hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) |
412 | echo m68k-hades-mint${UNAME_RELEASE} | |
413 | exit ;; | |
409 | echo m68k-hades-mint${UNAME_RELEASE} | |
410 | exit ;; | |
414 | 411 | *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) |
415 | echo m68k-unknown-mint${UNAME_RELEASE} | |
416 | exit ;; | |
412 | echo m68k-unknown-mint${UNAME_RELEASE} | |
413 | exit ;; | |
417 | 414 | m68k:machten:*:*) |
418 | 415 | echo m68k-apple-machten${UNAME_RELEASE} |
419 | 416 | exit ;; |
483 | 480 | echo m88k-motorola-sysv3 |
484 | 481 | exit ;; |
485 | 482 | AViiON:dgux:*:*) |
486 | # DG/UX returns AViiON for all architectures | |
487 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
483 | # DG/UX returns AViiON for all architectures | |
484 | UNAME_PROCESSOR=`/usr/bin/uname -p` | |
488 | 485 | if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] |
489 | 486 | then |
490 | 487 | if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ |
497 | 494 | else |
498 | 495 | echo i586-dg-dgux${UNAME_RELEASE} |
499 | 496 | fi |
500 | exit ;; | |
497 | exit ;; | |
501 | 498 | M88*:DolphinOS:*:*) # DolphinOS (SVR3) |
502 | 499 | echo m88k-dolphin-sysv3 |
503 | 500 | exit ;; |
554 | 551 | echo rs6000-ibm-aix3.2 |
555 | 552 | fi |
556 | 553 | exit ;; |
557 | *:AIX:*:[4567]) | |
554 | *:AIX:*:[456]) | |
558 | 555 | IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` |
559 | 556 | if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then |
560 | 557 | IBM_ARCH=rs6000 |
597 | 594 | 9000/[678][0-9][0-9]) |
598 | 595 | if [ -x /usr/bin/getconf ]; then |
599 | 596 | sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` |
600 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
601 | case "${sc_cpu_version}" in | |
602 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
603 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
604 | 532) # CPU_PA_RISC2_0 | |
605 | case "${sc_kernel_bits}" in | |
606 | 32) HP_ARCH="hppa2.0n" ;; | |
607 | 64) HP_ARCH="hppa2.0w" ;; | |
597 | sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` | |
598 | case "${sc_cpu_version}" in | |
599 | 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 | |
600 | 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 | |
601 | 532) # CPU_PA_RISC2_0 | |
602 | case "${sc_kernel_bits}" in | |
603 | 32) HP_ARCH="hppa2.0n" ;; | |
604 | 64) HP_ARCH="hppa2.0w" ;; | |
608 | 605 | '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 |
609 | esac ;; | |
610 | esac | |
606 | esac ;; | |
607 | esac | |
611 | 608 | fi |
612 | 609 | if [ "${HP_ARCH}" = "" ]; then |
613 | 610 | eval $set_cc_for_build |
614 | sed 's/^ //' << EOF >$dummy.c | |
615 | ||
616 | #define _HPUX_SOURCE | |
617 | #include <stdlib.h> | |
618 | #include <unistd.h> | |
619 | ||
620 | int main () | |
621 | { | |
622 | #if defined(_SC_KERNEL_BITS) | |
623 | long bits = sysconf(_SC_KERNEL_BITS); | |
624 | #endif | |
625 | long cpu = sysconf (_SC_CPU_VERSION); | |
626 | ||
627 | switch (cpu) | |
628 | { | |
629 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
630 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
631 | case CPU_PA_RISC2_0: | |
632 | #if defined(_SC_KERNEL_BITS) | |
633 | switch (bits) | |
634 | { | |
635 | case 64: puts ("hppa2.0w"); break; | |
636 | case 32: puts ("hppa2.0n"); break; | |
637 | default: puts ("hppa2.0"); break; | |
638 | } break; | |
639 | #else /* !defined(_SC_KERNEL_BITS) */ | |
640 | puts ("hppa2.0"); break; | |
641 | #endif | |
642 | default: puts ("hppa1.0"); break; | |
643 | } | |
644 | exit (0); | |
645 | } | |
611 | sed 's/^ //' << EOF >$dummy.c | |
612 | ||
613 | #define _HPUX_SOURCE | |
614 | #include <stdlib.h> | |
615 | #include <unistd.h> | |
616 | ||
617 | int main () | |
618 | { | |
619 | #if defined(_SC_KERNEL_BITS) | |
620 | long bits = sysconf(_SC_KERNEL_BITS); | |
621 | #endif | |
622 | long cpu = sysconf (_SC_CPU_VERSION); | |
623 | ||
624 | switch (cpu) | |
625 | { | |
626 | case CPU_PA_RISC1_0: puts ("hppa1.0"); break; | |
627 | case CPU_PA_RISC1_1: puts ("hppa1.1"); break; | |
628 | case CPU_PA_RISC2_0: | |
629 | #if defined(_SC_KERNEL_BITS) | |
630 | switch (bits) | |
631 | { | |
632 | case 64: puts ("hppa2.0w"); break; | |
633 | case 32: puts ("hppa2.0n"); break; | |
634 | default: puts ("hppa2.0"); break; | |
635 | } break; | |
636 | #else /* !defined(_SC_KERNEL_BITS) */ | |
637 | puts ("hppa2.0"); break; | |
638 | #endif | |
639 | default: puts ("hppa1.0"); break; | |
640 | } | |
641 | exit (0); | |
642 | } | |
646 | 643 | EOF |
647 | 644 | (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` |
648 | 645 | test -z "$HP_ARCH" && HP_ARCH=hppa |
733 | 730 | exit ;; |
734 | 731 | C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) |
735 | 732 | echo c1-convex-bsd |
736 | exit ;; | |
733 | exit ;; | |
737 | 734 | C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) |
738 | 735 | if getsysinfo -f scalar_acc |
739 | 736 | then echo c32-convex-bsd |
740 | 737 | else echo c2-convex-bsd |
741 | 738 | fi |
742 | exit ;; | |
739 | exit ;; | |
743 | 740 | C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) |
744 | 741 | echo c34-convex-bsd |
745 | exit ;; | |
742 | exit ;; | |
746 | 743 | C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) |
747 | 744 | echo c38-convex-bsd |
748 | exit ;; | |
745 | exit ;; | |
749 | 746 | C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) |
750 | 747 | echo c4-convex-bsd |
751 | exit ;; | |
748 | exit ;; | |
752 | 749 | CRAY*Y-MP:*:*:*) |
753 | 750 | echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' |
754 | 751 | exit ;; |
772 | 769 | exit ;; |
773 | 770 | F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) |
774 | 771 | FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` |
775 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
776 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
777 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
778 | exit ;; | |
772 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
773 | FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` | |
774 | echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
775 | exit ;; | |
779 | 776 | 5000:UNIX_System_V:4.*:*) |
780 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
781 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
782 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
777 | FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` | |
778 | FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` | |
779 | echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" | |
783 | 780 | exit ;; |
784 | 781 | i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) |
785 | 782 | echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} |
807 | 804 | echo ${UNAME_MACHINE}-pc-mingw32 |
808 | 805 | exit ;; |
809 | 806 | i*:windows32*:*) |
810 | # uname -m includes "-pc" on this system. | |
811 | echo ${UNAME_MACHINE}-mingw32 | |
807 | # uname -m includes "-pc" on this system. | |
808 | echo ${UNAME_MACHINE}-mingw32 | |
812 | 809 | exit ;; |
813 | 810 | i*:PW*:*) |
814 | 811 | echo ${UNAME_MACHINE}-pc-pw32 |
815 | 812 | exit ;; |
816 | 813 | *:Interix*:*) |
817 | case ${UNAME_MACHINE} in | |
814 | case ${UNAME_MACHINE} in | |
818 | 815 | x86) |
819 | 816 | echo i586-pc-interix${UNAME_RELEASE} |
820 | 817 | exit ;; |
869 | 866 | EV6) UNAME_MACHINE=alphaev6 ;; |
870 | 867 | EV67) UNAME_MACHINE=alphaev67 ;; |
871 | 868 | EV68*) UNAME_MACHINE=alphaev68 ;; |
872 | esac | |
869 | esac | |
873 | 870 | objdump --private-headers /bin/sh | grep -q ld.so.1 |
874 | 871 | if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi |
875 | 872 | echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} |
881 | 878 | then |
882 | 879 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
883 | 880 | else |
884 | if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | |
885 | | grep -q __ARM_PCS_VFP | |
886 | then | |
887 | echo ${UNAME_MACHINE}-unknown-linux-gnueabi | |
888 | else | |
889 | echo ${UNAME_MACHINE}-unknown-linux-gnueabihf | |
890 | fi | |
881 | echo ${UNAME_MACHINE}-unknown-linux-gnueabi | |
891 | 882 | fi |
892 | 883 | exit ;; |
893 | 884 | avr32*:Linux:*:*) |
900 | 891 | echo crisv32-axis-linux-gnu |
901 | 892 | exit ;; |
902 | 893 | frv:Linux:*:*) |
903 | echo frv-unknown-linux-gnu | |
894 | echo frv-unknown-linux-gnu | |
904 | 895 | exit ;; |
905 | 896 | i*86:Linux:*:*) |
906 | 897 | LIBC=gnu |
968 | 959 | echo ${UNAME_MACHINE}-ibm-linux |
969 | 960 | exit ;; |
970 | 961 | sh64*:Linux:*:*) |
971 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
962 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
972 | 963 | exit ;; |
973 | 964 | sh*:Linux:*:*) |
974 | 965 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
976 | 967 | sparc:Linux:*:* | sparc64:Linux:*:*) |
977 | 968 | echo ${UNAME_MACHINE}-unknown-linux-gnu |
978 | 969 | exit ;; |
979 | tile*:Linux:*:*) | |
980 | echo ${UNAME_MACHINE}-tilera-linux-gnu | |
981 | exit ;; | |
982 | 970 | vax:Linux:*:*) |
983 | 971 | echo ${UNAME_MACHINE}-dec-linux-gnu |
984 | 972 | exit ;; |
986 | 974 | echo x86_64-unknown-linux-gnu |
987 | 975 | exit ;; |
988 | 976 | xtensa*:Linux:*:*) |
989 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
977 | echo ${UNAME_MACHINE}-unknown-linux-gnu | |
990 | 978 | exit ;; |
991 | 979 | i*86:DYNIX/ptx:4*:*) |
992 | 980 | # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. |
995 | 983 | echo i386-sequent-sysv4 |
996 | 984 | exit ;; |
997 | 985 | i*86:UNIX_SV:4.2MP:2.*) |
998 | # Unixware is an offshoot of SVR4, but it has its own version | |
999 | # number series starting with 2... | |
1000 | # I am not positive that other SVR4 systems won't match this, | |
986 | # Unixware is an offshoot of SVR4, but it has its own version | |
987 | # number series starting with 2... | |
988 | # I am not positive that other SVR4 systems won't match this, | |
1001 | 989 | # I just have to hope. -- rms. |
1002 | # Use sysv4.2uw... so that sysv4* matches it. | |
990 | # Use sysv4.2uw... so that sysv4* matches it. | |
1003 | 991 | echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} |
1004 | 992 | exit ;; |
1005 | 993 | i*86:OS/2:*:*) |
1031 | 1019 | fi |
1032 | 1020 | exit ;; |
1033 | 1021 | i*86:*:5:[678]*) |
1034 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1022 | # UnixWare 7.x, OpenUNIX and OpenServer 6. | |
1035 | 1023 | case `/bin/uname -X | grep "^Machine"` in |
1036 | 1024 | *486*) UNAME_MACHINE=i486 ;; |
1037 | 1025 | *Pentium) UNAME_MACHINE=i586 ;; |
1059 | 1047 | exit ;; |
1060 | 1048 | pc:*:*:*) |
1061 | 1049 | # Left here for compatibility: |
1062 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1063 | # the processor, so we play safe by assuming i586. | |
1050 | # uname -m prints for DJGPP always 'pc', but it prints nothing about | |
1051 | # the processor, so we play safe by assuming i586. | |
1064 | 1052 | # Note: whatever this is, it MUST be the same as what config.sub |
1065 | 1053 | # prints for the "djgpp" host, or else GDB configury will decide that |
1066 | 1054 | # this is a cross-build. |
1067 | 1055 | echo i586-pc-msdosdjgpp |
1068 | exit ;; | |
1056 | exit ;; | |
1069 | 1057 | Intel:Mach:3*:*) |
1070 | 1058 | echo i386-pc-mach3 |
1071 | 1059 | exit ;; |
1100 | 1088 | /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ |
1101 | 1089 | && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; |
1102 | 1090 | 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) |
1103 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1104 | && { echo i486-ncr-sysv4; exit; } ;; | |
1091 | /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ | |
1092 | && { echo i486-ncr-sysv4; exit; } ;; | |
1105 | 1093 | NCR*:*:4.2:* | MPRAS*:*:4.2:*) |
1106 | 1094 | OS_REL='.3' |
1107 | 1095 | test -r /etc/.relid \ |
1144 | 1132 | echo ns32k-sni-sysv |
1145 | 1133 | fi |
1146 | 1134 | exit ;; |
1147 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1148 | # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1149 | echo i586-unisys-sysv4 | |
1150 | exit ;; | |
1135 | PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort | |
1136 | # says <Richard.M.Bartel@ccMail.Census.GOV> | |
1137 | echo i586-unisys-sysv4 | |
1138 | exit ;; | |
1151 | 1139 | *:UNIX_System_V:4*:FTX*) |
1152 | 1140 | # From Gerald Hewes <hewes@openmarket.com>. |
1153 | 1141 | # How about differentiating between stratus architectures? -djm |
1173 | 1161 | exit ;; |
1174 | 1162 | R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) |
1175 | 1163 | if [ -d /usr/nec ]; then |
1176 | echo mips-nec-sysv${UNAME_RELEASE} | |
1164 | echo mips-nec-sysv${UNAME_RELEASE} | |
1177 | 1165 | else |
1178 | echo mips-unknown-sysv${UNAME_RELEASE} | |
1179 | fi | |
1180 | exit ;; | |
1166 | echo mips-unknown-sysv${UNAME_RELEASE} | |
1167 | fi | |
1168 | exit ;; | |
1181 | 1169 | BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. |
1182 | 1170 | echo powerpc-be-beos |
1183 | 1171 | exit ;; |
1242 | 1230 | *:QNX:*:4*) |
1243 | 1231 | echo i386-pc-qnx |
1244 | 1232 | exit ;; |
1245 | NEO-?:NONSTOP_KERNEL:*:*) | |
1246 | echo neo-tandem-nsk${UNAME_RELEASE} | |
1247 | exit ;; | |
1248 | 1233 | NSE-?:NONSTOP_KERNEL:*:*) |
1249 | 1234 | echo nse-tandem-nsk${UNAME_RELEASE} |
1250 | 1235 | exit ;; |
1290 | 1275 | echo pdp10-unknown-its |
1291 | 1276 | exit ;; |
1292 | 1277 | SEI:*:*:SEIUX) |
1293 | echo mips-sei-seiux${UNAME_RELEASE} | |
1278 | echo mips-sei-seiux${UNAME_RELEASE} | |
1294 | 1279 | exit ;; |
1295 | 1280 | *:DragonFly:*:*) |
1296 | 1281 | echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` |
1297 | 1282 | exit ;; |
1298 | 1283 | *:*VMS:*:*) |
1299 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1284 | UNAME_MACHINE=`(uname -p) 2>/dev/null` | |
1300 | 1285 | case "${UNAME_MACHINE}" in |
1301 | 1286 | A*) echo alpha-dec-vms ; exit ;; |
1302 | 1287 | I*) echo ia64-dec-vms ; exit ;; |
1336 | 1321 | #include <sys/param.h> |
1337 | 1322 | printf ("m68k-sony-newsos%s\n", |
1338 | 1323 | #ifdef NEWSOS4 |
1339 | "4" | |
1324 | "4" | |
1340 | 1325 | #else |
1341 | "" | |
1342 | #endif | |
1343 | ); exit (0); | |
1326 | "" | |
1327 | #endif | |
1328 | ); exit (0); | |
1344 | 1329 | #endif |
1345 | 1330 | #endif |
1346 | 1331 |
0 | 0 | #! /bin/sh |
1 | 1 | # Configuration validation subroutine script. |
2 | 2 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, | |
4 | # 2011 Free Software Foundation, Inc. | |
5 | ||
6 | timestamp='2011-03-23' | |
3 | # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 | |
4 | # Free Software Foundation, Inc. | |
5 | ||
6 | timestamp='2009-12-31' | |
7 | 7 | |
8 | 8 | # This file is (in principle) common to ALL GNU software. |
9 | 9 | # The presence of a machine in this file suggests that SOME GNU software |
75 | 75 | GNU config.sub ($timestamp) |
76 | 76 | |
77 | 77 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, |
78 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free | |
78 | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free | |
79 | 79 | Software Foundation, Inc. |
80 | 80 | |
81 | 81 | This is free software; see the source for copying conditions. There is NO |
123 | 123 | # Here we must recognize all the valid KERNEL-OS combinations. |
124 | 124 | maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` |
125 | 125 | case $maybe_os in |
126 | nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ | |
127 | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ | |
128 | knetbsd*-gnu* | netbsd*-gnu* | \ | |
126 | nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ | |
127 | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ | |
129 | 128 | kopensolaris*-gnu* | \ |
130 | 129 | storm-chaos* | os2-emx* | rtmk-nova*) |
131 | 130 | os=-$maybe_os |
157 | 156 | os= |
158 | 157 | basic_machine=$1 |
159 | 158 | ;; |
160 | -bluegene*) | |
161 | os=-cnk | |
159 | -bluegene*) | |
160 | os=-cnk | |
162 | 161 | ;; |
163 | 162 | -sim | -cisco | -oki | -wec | -winbond) |
164 | 163 | os= |
174 | 173 | os=-chorusos |
175 | 174 | basic_machine=$1 |
176 | 175 | ;; |
177 | -chorusrdb) | |
178 | os=-chorusrdb | |
176 | -chorusrdb) | |
177 | os=-chorusrdb | |
179 | 178 | basic_machine=$1 |
180 | ;; | |
179 | ;; | |
181 | 180 | -hiux*) |
182 | 181 | os=-hiuxwe2 |
183 | 182 | ;; |
282 | 281 | | moxie \ |
283 | 282 | | mt \ |
284 | 283 | | msp430 \ |
285 | | nds32 | nds32le | nds32be \ | |
286 | 284 | | nios | nios2 \ |
287 | 285 | | ns16k | ns32k \ |
288 | | open8 \ | |
289 | 286 | | or32 \ |
290 | 287 | | pdp10 | pdp11 | pj | pjl \ |
291 | | powerpc | powerpc64 | powerpc64le | powerpcle \ | |
288 | | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | |
292 | 289 | | pyramid \ |
293 | 290 | | rx \ |
294 | 291 | | score \ |
296 | 293 | | sh64 | sh64le \ |
297 | 294 | | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ |
298 | 295 | | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ |
299 | | spu \ | |
300 | | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | |
296 | | spu | strongarm \ | |
297 | | tahoe | thumb | tic4x | tic80 | tron \ | |
301 | 298 | | ubicom32 \ |
302 | 299 | | v850 | v850e \ |
303 | 300 | | we32k \ |
304 | | x86 | xc16x | xstormy16 | xtensa \ | |
301 | | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | |
305 | 302 | | z8k | z80) |
306 | 303 | basic_machine=$basic_machine-unknown |
307 | ;; | |
308 | c54x) | |
309 | basic_machine=tic54x-unknown | |
310 | ;; | |
311 | c55x) | |
312 | basic_machine=tic55x-unknown | |
313 | ;; | |
314 | c6x) | |
315 | basic_machine=tic6x-unknown | |
316 | 304 | ;; |
317 | 305 | m6811 | m68hc11 | m6812 | m68hc12 | picochip) |
318 | 306 | # Motorola 68HC11/12. |
323 | 311 | ;; |
324 | 312 | ms1) |
325 | 313 | basic_machine=mt-unknown |
326 | ;; | |
327 | ||
328 | strongarm | thumb | xscale) | |
329 | basic_machine=arm-unknown | |
330 | ;; | |
331 | ||
332 | xscaleeb) | |
333 | basic_machine=armeb-unknown | |
334 | ;; | |
335 | ||
336 | xscaleel) | |
337 | basic_machine=armel-unknown | |
338 | 314 | ;; |
339 | 315 | |
340 | 316 | # We use `pc' rather than `unknown' |
357 | 333 | | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ |
358 | 334 | | avr-* | avr32-* \ |
359 | 335 | | bfin-* | bs2000-* \ |
360 | | c[123]* | c30-* | [cjt]90-* | c4x-* \ | |
336 | | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | |
361 | 337 | | clipper-* | craynv-* | cydra-* \ |
362 | 338 | | d10v-* | d30v-* | dlx-* \ |
363 | 339 | | elxsi-* \ |
391 | 367 | | mmix-* \ |
392 | 368 | | mt-* \ |
393 | 369 | | msp430-* \ |
394 | | nds32-* | nds32le-* | nds32be-* \ | |
395 | 370 | | nios-* | nios2-* \ |
396 | 371 | | none-* | np1-* | ns16k-* | ns32k-* \ |
397 | | open8-* \ | |
398 | 372 | | orion-* \ |
399 | 373 | | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ |
400 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | |
374 | | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | |
401 | 375 | | pyramid-* \ |
402 | 376 | | romp-* | rs6000-* | rx-* \ |
403 | 377 | | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ |
404 | 378 | | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ |
405 | 379 | | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ |
406 | 380 | | sparclite-* \ |
407 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | |
408 | | tahoe-* \ | |
409 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | |
410 | | tile-* | tilegx-* \ | |
381 | | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | |
382 | | tahoe-* | thumb-* \ | |
383 | | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ | |
411 | 384 | | tron-* \ |
412 | 385 | | ubicom32-* \ |
413 | 386 | | v850-* | v850e-* | vax-* \ |
414 | 387 | | we32k-* \ |
415 | | x86-* | x86_64-* | xc16x-* | xps100-* \ | |
388 | | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | |
416 | 389 | | xstormy16-* | xtensa*-* \ |
417 | 390 | | ymp-* \ |
418 | 391 | | z8k-* | z80-*) |
437 | 410 | basic_machine=a29k-amd |
438 | 411 | os=-udi |
439 | 412 | ;; |
440 | abacus) | |
413 | abacus) | |
441 | 414 | basic_machine=abacus-unknown |
442 | 415 | ;; |
443 | 416 | adobe68k) |
507 | 480 | basic_machine=powerpc-ibm |
508 | 481 | os=-cnk |
509 | 482 | ;; |
510 | c54x-*) | |
511 | basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
512 | ;; | |
513 | c55x-*) | |
514 | basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
515 | ;; | |
516 | c6x-*) | |
517 | basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` | |
518 | ;; | |
519 | 483 | c90) |
520 | 484 | basic_machine=c90-cray |
521 | 485 | os=-unicos |
522 | 486 | ;; |
523 | cegcc) | |
487 | cegcc) | |
524 | 488 | basic_machine=arm-unknown |
525 | 489 | os=-cegcc |
526 | 490 | ;; |
552 | 516 | basic_machine=craynv-cray |
553 | 517 | os=-unicosmp |
554 | 518 | ;; |
555 | cr16 | cr16-*) | |
519 | cr16) | |
556 | 520 | basic_machine=cr16-unknown |
557 | 521 | os=-elf |
558 | 522 | ;; |
768 | 732 | basic_machine=ns32k-utek |
769 | 733 | os=-sysv |
770 | 734 | ;; |
771 | microblaze) | |
735 | microblaze) | |
772 | 736 | basic_machine=microblaze-xilinx |
773 | 737 | ;; |
774 | 738 | mingw32) |
875 | 839 | np1) |
876 | 840 | basic_machine=np1-gould |
877 | 841 | ;; |
878 | neo-tandem) | |
879 | basic_machine=neo-tandem | |
880 | ;; | |
881 | nse-tandem) | |
882 | basic_machine=nse-tandem | |
883 | ;; | |
884 | 842 | nsr-tandem) |
885 | 843 | basic_machine=nsr-tandem |
886 | 844 | ;; |
963 | 921 | ;; |
964 | 922 | power) basic_machine=power-ibm |
965 | 923 | ;; |
966 | ppc | ppcbe) basic_machine=powerpc-unknown | |
967 | ;; | |
968 | ppc-* | ppcbe-*) | |
969 | basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
924 | ppc) basic_machine=powerpc-unknown | |
925 | ;; | |
926 | ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` | |
970 | 927 | ;; |
971 | 928 | ppcle | powerpclittle | ppc-le | powerpc-little) |
972 | 929 | basic_machine=powerpcle-unknown |
1060 | 1017 | basic_machine=i860-stratus |
1061 | 1018 | os=-sysv4 |
1062 | 1019 | ;; |
1063 | strongarm-* | thumb-*) | |
1064 | basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` | |
1065 | ;; | |
1066 | 1020 | sun2) |
1067 | 1021 | basic_machine=m68000-sun |
1068 | 1022 | ;; |
1119 | 1073 | basic_machine=t90-cray |
1120 | 1074 | os=-unicos |
1121 | 1075 | ;; |
1122 | # This must be matched before tile*. | |
1123 | tilegx*) | |
1124 | basic_machine=tilegx-unknown | |
1125 | os=-linux-gnu | |
1076 | tic54x | c54x*) | |
1077 | basic_machine=tic54x-unknown | |
1078 | os=-coff | |
1079 | ;; | |
1080 | tic55x | c55x*) | |
1081 | basic_machine=tic55x-unknown | |
1082 | os=-coff | |
1083 | ;; | |
1084 | tic6x | c6x*) | |
1085 | basic_machine=tic6x-unknown | |
1086 | os=-coff | |
1126 | 1087 | ;; |
1127 | 1088 | tile*) |
1128 | 1089 | basic_machine=tile-unknown |
1194 | 1155 | ;; |
1195 | 1156 | xps | xps100) |
1196 | 1157 | basic_machine=xps100-honeywell |
1197 | ;; | |
1198 | xscale-* | xscalee[bl]-*) | |
1199 | basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` | |
1200 | 1158 | ;; |
1201 | 1159 | ymp) |
1202 | 1160 | basic_machine=ymp-cray |
1295 | 1253 | if [ x"$os" != x"" ] |
1296 | 1254 | then |
1297 | 1255 | case $os in |
1298 | # First match some system type aliases | |
1299 | # that might get confused with valid system types. | |
1256 | # First match some system type aliases | |
1257 | # that might get confused with valid system types. | |
1300 | 1258 | # -solaris* is a basic system type, with this one exception. |
1301 | -auroraux) | |
1302 | os=-auroraux | |
1259 | -auroraux) | |
1260 | os=-auroraux | |
1303 | 1261 | ;; |
1304 | 1262 | -solaris1 | -solaris1.*) |
1305 | 1263 | os=`echo $os | sed -e 's|solaris1|sunos4|'` |
1336 | 1294 | | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ |
1337 | 1295 | | -chorusos* | -chorusrdb* | -cegcc* \ |
1338 | 1296 | | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ |
1339 | | -mingw32* | -linux-gnu* | -linux-android* \ | |
1340 | | -linux-newlib* | -linux-uclibc* \ | |
1297 | | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | |
1341 | 1298 | | -uxpv* | -beos* | -mpeix* | -udk* \ |
1342 | 1299 | | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ |
1343 | 1300 | | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ |
1384 | 1341 | -opened*) |
1385 | 1342 | os=-openedition |
1386 | 1343 | ;; |
1387 | -os400*) | |
1344 | -os400*) | |
1388 | 1345 | os=-os400 |
1389 | 1346 | ;; |
1390 | 1347 | -wince*) |
1433 | 1390 | -sinix*) |
1434 | 1391 | os=-sysv4 |
1435 | 1392 | ;; |
1436 | -tpf*) | |
1393 | -tpf*) | |
1437 | 1394 | os=-tpf |
1438 | 1395 | ;; |
1439 | 1396 | -triton*) |
1478 | 1435 | -dicos*) |
1479 | 1436 | os=-dicos |
1480 | 1437 | ;; |
1481 | -nacl*) | |
1482 | ;; | |
1438 | -nacl*) | |
1439 | ;; | |
1483 | 1440 | -none) |
1484 | 1441 | ;; |
1485 | 1442 | *) |
1502 | 1459 | # system, and we'll never get to this point. |
1503 | 1460 | |
1504 | 1461 | case $basic_machine in |
1505 | score-*) | |
1462 | score-*) | |
1506 | 1463 | os=-elf |
1507 | 1464 | ;; |
1508 | spu-*) | |
1465 | spu-*) | |
1509 | 1466 | os=-elf |
1510 | 1467 | ;; |
1511 | 1468 | *-acorn) |
1517 | 1474 | arm*-semi) |
1518 | 1475 | os=-aout |
1519 | 1476 | ;; |
1520 | c4x-* | tic4x-*) | |
1521 | os=-coff | |
1522 | ;; | |
1523 | tic54x-*) | |
1524 | os=-coff | |
1525 | ;; | |
1526 | tic55x-*) | |
1527 | os=-coff | |
1528 | ;; | |
1529 | tic6x-*) | |
1530 | os=-coff | |
1477 | c4x-* | tic4x-*) | |
1478 | os=-coff | |
1531 | 1479 | ;; |
1532 | 1480 | # This must come before the *-dec entry. |
1533 | 1481 | pdp10-*) |
1554 | 1502 | m68*-cisco) |
1555 | 1503 | os=-aout |
1556 | 1504 | ;; |
1557 | mep-*) | |
1505 | mep-*) | |
1558 | 1506 | os=-elf |
1559 | 1507 | ;; |
1560 | 1508 | mips*-cisco) |
1581 | 1529 | *-ibm) |
1582 | 1530 | os=-aix |
1583 | 1531 | ;; |
1584 | *-knuth) | |
1532 | *-knuth) | |
1585 | 1533 | os=-mmixware |
1586 | 1534 | ;; |
1587 | 1535 | *-wec) |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.68 for dillo 3.0. | |
2 | # Generated by GNU Autoconf 2.68 for dillo 3.0.1. | |
3 | 3 | # |
4 | 4 | # |
5 | 5 | # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
556 | 556 | # Identity of this package. |
557 | 557 | PACKAGE_NAME='dillo' |
558 | 558 | PACKAGE_TARNAME='dillo' |
559 | PACKAGE_VERSION='3.0' | |
560 | PACKAGE_STRING='dillo 3.0' | |
559 | PACKAGE_VERSION='3.0.1' | |
560 | PACKAGE_STRING='dillo 3.0.1' | |
561 | 561 | PACKAGE_BUGREPORT='' |
562 | 562 | PACKAGE_URL='' |
563 | 563 | |
1286 | 1286 | # Omit some internal or obsolete options to make the list less imposing. |
1287 | 1287 | # This message is too long to be a string in the A/UX 3.1 sh. |
1288 | 1288 | cat <<_ACEOF |
1289 | \`configure' configures dillo 3.0 to adapt to many kinds of systems. | |
1289 | \`configure' configures dillo 3.0.1 to adapt to many kinds of systems. | |
1290 | 1290 | |
1291 | 1291 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1292 | 1292 | |
1357 | 1357 | |
1358 | 1358 | if test -n "$ac_init_help"; then |
1359 | 1359 | case $ac_init_help in |
1360 | short | recursive ) echo "Configuration of dillo 3.0:";; | |
1360 | short | recursive ) echo "Configuration of dillo 3.0.1:";; | |
1361 | 1361 | esac |
1362 | 1362 | cat <<\_ACEOF |
1363 | 1363 | |
1463 | 1463 | test -n "$ac_init_help" && exit $ac_status |
1464 | 1464 | if $ac_init_version; then |
1465 | 1465 | cat <<\_ACEOF |
1466 | dillo configure 3.0 | |
1466 | dillo configure 3.0.1 | |
1467 | 1467 | generated by GNU Autoconf 2.68 |
1468 | 1468 | |
1469 | 1469 | Copyright (C) 2010 Free Software Foundation, Inc. |
2171 | 2171 | This file contains any messages produced by compilers while |
2172 | 2172 | running configure, to aid debugging if configure makes a mistake. |
2173 | 2173 | |
2174 | It was created by dillo $as_me 3.0, which was | |
2174 | It was created by dillo $as_me 3.0.1, which was | |
2175 | 2175 | generated by GNU Autoconf 2.68. Invocation command line was |
2176 | 2176 | |
2177 | 2177 | $ $0 $@ |
3098 | 3098 | |
3099 | 3099 | # Define the identity of the package. |
3100 | 3100 | PACKAGE='dillo' |
3101 | VERSION='3.0' | |
3101 | VERSION='3.0.1' | |
3102 | 3102 | |
3103 | 3103 | |
3104 | 3104 | cat >>confdefs.h <<_ACEOF |
6983 | 6983 | # report actual input values of CONFIG_FILES etc. instead of their |
6984 | 6984 | # values after options handling. |
6985 | 6985 | ac_log=" |
6986 | This file was extended by dillo $as_me 3.0, which was | |
6986 | This file was extended by dillo $as_me 3.0.1, which was | |
6987 | 6987 | generated by GNU Autoconf 2.68. Invocation command line was |
6988 | 6988 | |
6989 | 6989 | CONFIG_FILES = $CONFIG_FILES |
7049 | 7049 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
7050 | 7050 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
7051 | 7051 | ac_cs_version="\\ |
7052 | dillo config.status 3.0 | |
7052 | dillo config.status 3.0.1 | |
7053 | 7053 | configured by $0, generated by GNU Autoconf 2.68, |
7054 | 7054 | with options \\"\$ac_cs_config\\" |
7055 | 7055 |
0 | 0 | dnl Process this file with aclocal, autoconf and automake. |
1 | 1 | |
2 | AC_INIT([dillo], [3.0]) | |
2 | AC_INIT([dillo], [3.0.1]) | |
3 | 3 | |
4 | 4 | dnl Detect the canonical target build environment |
5 | 5 | AC_CANONICAL_TARGET |
188 | 188 | #------------------------------------------------------------------------- |
189 | 189 | # USER INTERFACE SECTION |
190 | 190 | #------------------------------------------------------------------------- |
191 | ||
192 | # UI theme | |
193 | # "none" is the default FLTK appearance, which "resembles old Windows...and | |
194 | # old GTK/KDE". | |
195 | # "plastic" "is inspired by the Aqua user interface on Mac OS X". | |
196 | # "gtk+" "is inspired by the Red Hat Bluecurve theme". | |
197 | #theme=none | |
198 | # theme=gtk+ | |
199 | # theme=plastic | |
191 | 200 | |
192 | 201 | # Size of dillo panel |
193 | 202 | # tiny : buttons, location, and progress boxes in one row |
241 | 250 | # You can hold SHIFT to temporarily revert this behaviour. |
242 | 251 | #focus_new_tab=YES |
243 | 252 | |
253 | # Ask before quitting Dillo with more than one window or tab open. | |
254 | #show_quit_dialog=YES | |
244 | 255 | |
245 | 256 | #------------------------------------------------------------------------- |
246 | 257 | # DEBUG MESSAGES SECTION |
0 | 0 | README: Last update Jul 2009 |
1 | 1 | |
2 | 2 | These documents cover dillo's internals. |
3 | For user help, see http://www.dillo.org/dillo2-help.html | |
3 | For user help, see http://www.dillo.org/dillo3-help.html | |
4 | 4 | |
5 | 5 | -------------------------------------------------------------------------- |
6 | 6 |
1036 | 1036 | |
1037 | 1037 | if (tld_len > 0) { |
1038 | 1038 | /* These TLDs were chosen by examining the current publicsuffix list |
1039 | * in January 2010 and picking out those where it was simplest for | |
1039 | * in September 2011 and picking out those where it was simplest for | |
1040 | 1040 | * them to describe the situation by beginning with a "*.[tld]" rule. |
1041 | 1041 | */ |
1042 | const char *const tlds[] = {"ar","au","bd","bn","bt","ck","cy","do", | |
1043 | "eg","er","et","fj","fk","gt","gu","id", | |
1042 | const char *const tlds[] = {"ar","au","bd","bn","bt","ck","cy", | |
1043 | "er","et","fj","fk","gt","gu","id", | |
1044 | 1044 | "il","jm","ke","kh","kw","ml","mm","mt", |
1045 | 1045 | "mz","ni","np","nz","om","pg","py","qa", |
1046 | 1046 | "sv","tr","uk","uy","ve","ye","yu","za", |
1281 | 1281 | str = cookie_dstring->str; |
1282 | 1282 | dStr_free(cookie_dstring, FALSE); |
1283 | 1283 | |
1284 | if (*str) | |
1284 | if (*str) { | |
1285 | MSG("%s GETTING: %s", url_host, str); | |
1285 | 1286 | cookies_use_counter++; |
1286 | ||
1287 | MSG("%s GETTING: %s\n", url_host, str); | |
1287 | } | |
1288 | 1288 | return str; |
1289 | 1289 | } |
1290 | 1290 |
508 | 508 | // Make room... |
509 | 509 | if (log_len + esc_len >= log_max) { |
510 | 510 | log_max = log_len + esc_len + 1024; |
511 | log_text = (char *) realloc (log_text, log_max); | |
511 | log_text = (char *) dRealloc (log_text, log_max); | |
512 | 512 | log_text[log_len] = 0; |
513 | 513 | prTitle->tooltip(log_text); |
514 | 514 | } |
1156 | 1156 | // Disable '@' and '&' interpretation in normal labels. |
1157 | 1157 | Fl::set_labeltype(FL_NORMAL_LABEL, custLabelDraw, custLabelMeasure); |
1158 | 1158 | |
1159 | Fl::scheme(NULL); | |
1160 | ||
1159 | 1161 | // Create the download window |
1160 | 1162 | dl_win = new DLWin(ww, wh); |
1161 | 1163 |
231 | 231 | { |
232 | 232 | this->color = color; |
233 | 233 | |
234 | colors[SHADING_NORMAL] = shadeColor (color, SHADING_NORMAL) << 8; | |
235 | colors[SHADING_INVERSE] = shadeColor (color, SHADING_INVERSE) << 8; | |
236 | colors[SHADING_DARK] = shadeColor (color, SHADING_DARK) << 8; | |
237 | colors[SHADING_LIGHT] = shadeColor (color, SHADING_LIGHT) << 8; | |
234 | if (!(colors[SHADING_NORMAL] = shadeColor (color, SHADING_NORMAL) << 8)) | |
235 | colors[SHADING_NORMAL] = FL_BLACK; | |
236 | if (!(colors[SHADING_INVERSE] = shadeColor (color, SHADING_INVERSE) << 8)) | |
237 | colors[SHADING_INVERSE] = FL_BLACK; | |
238 | if (!(colors[SHADING_DARK] = shadeColor (color, SHADING_DARK) << 8)) | |
239 | colors[SHADING_DARK] = FL_BLACK; | |
240 | if (!(colors[SHADING_LIGHT] = shadeColor (color, SHADING_LIGHT) << 8)) | |
241 | colors[SHADING_LIGHT] = FL_BLACK; | |
238 | 242 | } |
239 | 243 | |
240 | 244 | FltkColor::~FltkColor () |
300 | 304 | Fl_Box *b = new Fl_Box(0,0,100,24); |
301 | 305 | b->box(FL_BORDER_BOX); |
302 | 306 | b->color(fl_color_cube(FL_NUM_RED-1, FL_NUM_GREEN-1, FL_NUM_BLUE-2)); |
307 | b->labelcolor(FL_BLACK); | |
303 | 308 | b->labelfont(FL_HELVETICA); |
304 | 309 | b->labelsize(14); |
305 | 310 | b->align(FL_ALIGN_WRAP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE); |
405 | 405 | scroll (0, -h () + vscrollbar->linesize ()); |
406 | 406 | } else if (cmd == core::SCREEN_DOWN_CMD) { |
407 | 407 | scroll (0, h () - vscrollbar->linesize ()); |
408 | } else if (cmd == core::SCREEN_LEFT_CMD) { | |
409 | scroll (-w() + hscrollbar->linesize (), 0); | |
410 | } else if (cmd == core::SCREEN_RIGHT_CMD) { | |
411 | scroll (w() - hscrollbar->linesize (), 0); | |
408 | 412 | } else if (cmd == core::LINE_UP_CMD) { |
409 | 413 | scroll (0, (int) -vscrollbar->linesize ()); |
410 | 414 | } else if (cmd == core::LINE_DOWN_CMD) { |
31 | 31 | VPOS_NO_CHANGE |
32 | 32 | }; |
33 | 33 | |
34 | enum ScrollCommand {SCREEN_UP_CMD, SCREEN_DOWN_CMD, LINE_UP_CMD, LINE_DOWN_CMD, | |
34 | enum ScrollCommand {SCREEN_UP_CMD, SCREEN_DOWN_CMD, SCREEN_LEFT_CMD, | |
35 | SCREEN_RIGHT_CMD, LINE_UP_CMD, LINE_DOWN_CMD, | |
35 | 36 | LEFT_CMD, RIGHT_CMD, TOP_CMD, BOTTOM_CMD}; |
36 | 37 | |
37 | 38 | /* |
0 | 0 | #!/bin/sh |
1 | # | |
2 | # $NetBSD: install-sh.in,v 1.5 2010/10/08 19:57:05 tez Exp $ | |
3 | # This script now also installs multiple files, but might choke on installing | |
4 | # multiple files with spaces in the file names. | |
5 | # | |
1 | 6 | # install - install a program, script, or datafile |
2 | ||
3 | scriptversion=2009-04-28.21; # UTC | |
4 | ||
5 | # This originates from X11R5 (mit/util/scripts/install.sh), which was | |
6 | # later released in X11R6 (xc/config/util/install.sh) with the | |
7 | # following copyright and license. | |
8 | # | |
9 | # Copyright (C) 1994 X Consortium | |
10 | # | |
11 | # Permission is hereby granted, free of charge, to any person obtaining a copy | |
12 | # of this software and associated documentation files (the "Software"), to | |
13 | # deal in the Software without restriction, including without limitation the | |
14 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
15 | # sell copies of the Software, and to permit persons to whom the Software is | |
16 | # furnished to do so, subject to the following conditions: | |
17 | # | |
18 | # The above copyright notice and this permission notice shall be included in | |
19 | # all copies or substantial portions of the Software. | |
20 | # | |
21 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
22 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
23 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
24 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN | |
25 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- | |
26 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
27 | # | |
28 | # Except as contained in this notice, the name of the X Consortium shall not | |
29 | # be used in advertising or otherwise to promote the sale, use or other deal- | |
30 | # ings in this Software without prior written authorization from the X Consor- | |
31 | # tium. | |
32 | # | |
33 | # | |
34 | # FSF changes to this file are in the public domain. | |
7 | # This comes from X11R5 (mit/util/scripts/install.sh). | |
8 | # | |
9 | # Copyright 1991 by the Massachusetts Institute of Technology | |
10 | # | |
11 | # Permission to use, copy, modify, distribute, and sell this software and its | |
12 | # documentation for any purpose is hereby granted without fee, provided that | |
13 | # the above copyright notice appear in all copies and that both that | |
14 | # copyright notice and this permission notice appear in supporting | |
15 | # documentation, and that the name of M.I.T. not be used in advertising or | |
16 | # publicity pertaining to distribution of the software without specific, | |
17 | # written prior permission. M.I.T. makes no representations about the | |
18 | # suitability of this software for any purpose. It is provided "as is" | |
19 | # without express or implied warranty. | |
35 | 20 | # |
36 | 21 | # Calling this script install-sh is preferred over install.sh, to prevent |
37 | 22 | # `make' implicit rules from creating a file called install from it |
40 | 25 | # This script is compatible with the BSD install script, but was written |
41 | 26 | # from scratch. |
42 | 27 | |
43 | nl=' | |
28 | # set DOITPROG to echo to test this script | |
29 | ||
30 | # Don't use :- since 4.3BSD and earlier shells don't like it. | |
31 | doit="${DOITPROG-}" | |
32 | ||
33 | ||
34 | # put in absolute paths if you don't have them in your path; or use env. vars. | |
35 | ||
36 | awkprog="${AWKPROG-awk}" | |
37 | mvprog="${MVPROG-mv}" | |
38 | cpprog="${CPPROG-cp}" | |
39 | chmodprog="${CHMODPROG-chmod}" | |
40 | chownprog="${CHOWNPROG-chown}" | |
41 | chgrpprog="${CHGRPPROG-chgrp}" | |
42 | stripprog="${STRIPPROG-strip}" | |
43 | rmprog="${RMPROG-rm}" | |
44 | mkdirprog="${MKDIRPROG-mkdir}" | |
45 | ||
46 | instcmd="$cpprog" | |
47 | pathcompchmodcmd="$chmodprog 755" | |
48 | chmodcmd="$chmodprog 755" | |
49 | chowncmd="" | |
50 | chgrpcmd="" | |
51 | stripcmd="" | |
52 | stripflags="" | |
53 | rmcmd="$rmprog -f" | |
54 | mvcmd="$mvprog" | |
55 | src="" | |
56 | msrc="" | |
57 | dst="" | |
58 | dir_arg="" | |
59 | suffix="" | |
60 | suffixfmt="" | |
61 | ||
62 | while [ x"$1" != x ]; do | |
63 | case $1 in | |
64 | -b) suffix=".old" | |
65 | shift | |
66 | continue;; | |
67 | ||
68 | -B) suffixfmt="$2" | |
69 | shift | |
70 | shift | |
71 | continue;; | |
72 | ||
73 | -c) instcmd="$cpprog" | |
74 | shift | |
75 | continue;; | |
76 | ||
77 | -d) dir_arg=true | |
78 | shift | |
79 | continue;; | |
80 | ||
81 | -m) chmodcmd="$chmodprog $2" | |
82 | shift | |
83 | shift | |
84 | continue;; | |
85 | ||
86 | -o) chowncmd="$chownprog $2" | |
87 | shift | |
88 | shift | |
89 | continue;; | |
90 | ||
91 | -g) chgrpcmd="$chgrpprog $2" | |
92 | shift | |
93 | shift | |
94 | continue;; | |
95 | ||
96 | -s) stripcmd="$stripprog" | |
97 | shift | |
98 | continue;; | |
99 | ||
100 | -S) stripcmd="$stripprog" | |
101 | stripflags="-S $2 $stripflags" | |
102 | shift | |
103 | shift | |
104 | continue;; | |
105 | ||
106 | *) if [ x"$msrc" = x ] | |
107 | then | |
108 | msrc="$dst" | |
109 | else | |
110 | msrc="$msrc $dst" | |
111 | fi | |
112 | src="$dst" | |
113 | dst="$1" | |
114 | shift | |
115 | continue;; | |
116 | esac | |
117 | done | |
118 | ||
119 | if [ x"$dir_arg" = x ] | |
120 | then | |
121 | dstisfile="" | |
122 | if [ ! -d "$dst" ] | |
123 | then | |
124 | if [ x"$msrc" = x"$src" ] | |
125 | then | |
126 | dstisfile=true | |
127 | else | |
128 | echo "install: destination is not a directory" | |
129 | exit 1 | |
130 | fi | |
131 | fi | |
132 | else | |
133 | msrc="$msrc $dst" | |
134 | fi | |
135 | ||
136 | if [ x"$msrc" = x ] | |
137 | then | |
138 | echo "install: no destination specified" | |
139 | exit 1 | |
140 | fi | |
141 | ||
142 | for srcarg in $msrc; do | |
143 | ||
144 | if [ x"$dir_arg" != x ]; then | |
145 | ||
146 | dstarg="$srcarg" | |
147 | else | |
148 | dstarg="$dst" | |
149 | ||
150 | # Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command | |
151 | # might cause directories to be created, which would be especially bad | |
152 | # if $src (and thus $dsttmp) contains '*'. | |
153 | ||
154 | if [ -f "$srcarg" ] | |
155 | then | |
156 | doinst="$instcmd" | |
157 | elif [ -d "$srcarg" ] | |
158 | then | |
159 | echo "install: $srcarg: not a regular file" | |
160 | exit 1 | |
161 | elif [ "$srcarg" = "/dev/null" ] | |
162 | then | |
163 | doinst="$cpprog" | |
164 | else | |
165 | echo "install: $srcarg does not exist" | |
166 | exit 1 | |
167 | fi | |
168 | ||
169 | # If destination is a directory, append the input filename; if your system | |
170 | # does not like double slashes in filenames, you may need to add some logic | |
171 | ||
172 | if [ -d "$dstarg" ] | |
173 | then | |
174 | dstarg="$dstarg"/`basename "$srcarg"` | |
175 | fi | |
176 | fi | |
177 | ||
178 | ## this sed command emulates the dirname command | |
179 | dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` | |
180 | ||
181 | # Make sure that the destination directory exists. | |
182 | # this part is taken from Noah Friedman's mkinstalldirs script | |
183 | ||
184 | # Skip lots of stat calls in the usual case. | |
185 | if [ ! -d "$dstdir" ]; then | |
186 | defaultIFS=' | |
44 | 187 | ' |
45 | IFS=" "" $nl" | |
46 | ||
47 | # set DOITPROG to echo to test this script | |
48 | ||
49 | # Don't use :- since 4.3BSD and earlier shells don't like it. | |
50 | doit=${DOITPROG-} | |
51 | if test -z "$doit"; then | |
52 | doit_exec=exec | |
53 | else | |
54 | doit_exec=$doit | |
188 | IFS="${IFS-${defaultIFS}}" | |
189 | ||
190 | oIFS="${IFS}" | |
191 | # Some sh's can't handle IFS=/ for some reason. | |
192 | IFS='%' | |
193 | set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` | |
194 | IFS="${oIFS}" | |
195 | ||
196 | pathcomp='' | |
197 | ||
198 | while [ $# -ne 0 ] ; do | |
199 | pathcomp="${pathcomp}${1}" | |
200 | shift | |
201 | ||
202 | if [ ! -d "${pathcomp}" ] ; | |
203 | then | |
204 | $doit $mkdirprog "${pathcomp}" | |
205 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi && | |
206 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi && | |
207 | if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi | |
208 | ||
209 | else | |
210 | true | |
211 | fi | |
212 | ||
213 | pathcomp="${pathcomp}/" | |
214 | done | |
55 | 215 | fi |
56 | 216 | |
57 | # Put in absolute file names if you don't have them in your path; | |
58 | # or use environment vars. | |
59 | ||
60 | chgrpprog=${CHGRPPROG-chgrp} | |
61 | chmodprog=${CHMODPROG-chmod} | |
62 | chownprog=${CHOWNPROG-chown} | |
63 | cmpprog=${CMPPROG-cmp} | |
64 | cpprog=${CPPROG-cp} | |
65 | mkdirprog=${MKDIRPROG-mkdir} | |
66 | mvprog=${MVPROG-mv} | |
67 | rmprog=${RMPROG-rm} | |
68 | stripprog=${STRIPPROG-strip} | |
69 | ||
70 | posix_glob='?' | |
71 | initialize_posix_glob=' | |
72 | test "$posix_glob" != "?" || { | |
73 | if (set -f) 2>/dev/null; then | |
74 | posix_glob= | |
75 | else | |
76 | posix_glob=: | |
77 | fi | |
78 | } | |
79 | ' | |
80 | ||
81 | posix_mkdir= | |
82 | ||
83 | # Desired mode of installed file. | |
84 | mode=0755 | |
85 | ||
86 | chgrpcmd= | |
87 | chmodcmd=$chmodprog | |
88 | chowncmd= | |
89 | mvcmd=$mvprog | |
90 | rmcmd="$rmprog -f" | |
91 | stripcmd= | |
92 | ||
93 | src= | |
94 | dst= | |
95 | dir_arg= | |
96 | dst_arg= | |
97 | ||
98 | copy_on_change=false | |
99 | no_target_directory= | |
100 | ||
101 | usage="\ | |
102 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE | |
103 | or: $0 [OPTION]... SRCFILES... DIRECTORY | |
104 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... | |
105 | or: $0 [OPTION]... -d DIRECTORIES... | |
106 | ||
107 | In the 1st form, copy SRCFILE to DSTFILE. | |
108 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. | |
109 | In the 4th, create DIRECTORIES. | |
110 | ||
111 | Options: | |
112 | --help display this help and exit. | |
113 | --version display version info and exit. | |
114 | ||
115 | -c (ignored) | |
116 | -C install only if different (preserve the last data modification time) | |
117 | -d create directories instead of installing files. | |
118 | -g GROUP $chgrpprog installed files to GROUP. | |
119 | -m MODE $chmodprog installed files to MODE. | |
120 | -o USER $chownprog installed files to USER. | |
121 | -s $stripprog installed files. | |
122 | -t DIRECTORY install into DIRECTORY. | |
123 | -T report an error if DSTFILE is a directory. | |
124 | ||
125 | Environment variables override the default commands: | |
126 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG | |
127 | RMPROG STRIPPROG | |
128 | " | |
129 | ||
130 | while test $# -ne 0; do | |
131 | case $1 in | |
132 | -c) ;; | |
133 | ||
134 | -C) copy_on_change=true;; | |
135 | ||
136 | -d) dir_arg=true;; | |
137 | ||
138 | -g) chgrpcmd="$chgrpprog $2" | |
139 | shift;; | |
140 | ||
141 | --help) echo "$usage"; exit $?;; | |
142 | ||
143 | -m) mode=$2 | |
144 | case $mode in | |
145 | *' '* | *' '* | *' | |
146 | '* | *'*'* | *'?'* | *'['*) | |
147 | echo "$0: invalid mode: $mode" >&2 | |
148 | exit 1;; | |
149 | esac | |
150 | shift;; | |
151 | ||
152 | -o) chowncmd="$chownprog $2" | |
153 | shift;; | |
154 | ||
155 | -s) stripcmd=$stripprog;; | |
156 | ||
157 | -t) dst_arg=$2 | |
158 | shift;; | |
159 | ||
160 | -T) no_target_directory=true;; | |
161 | ||
162 | --version) echo "$0 $scriptversion"; exit $?;; | |
163 | ||
164 | --) shift | |
165 | break;; | |
166 | ||
167 | -*) echo "$0: invalid option: $1" >&2 | |
168 | exit 1;; | |
169 | ||
170 | *) break;; | |
171 | esac | |
172 | shift | |
173 | done | |
174 | ||
175 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then | |
176 | # When -d is used, all remaining arguments are directories to create. | |
177 | # When -t is used, the destination is already specified. | |
178 | # Otherwise, the last argument is the destination. Remove it from $@. | |
179 | for arg | |
180 | do | |
181 | if test -n "$dst_arg"; then | |
182 | # $@ is not empty: it contains at least $arg. | |
183 | set fnord "$@" "$dst_arg" | |
184 | shift # fnord | |
185 | fi | |
186 | shift # arg | |
187 | dst_arg=$arg | |
188 | done | |
189 | fi | |
190 | ||
191 | if test $# -eq 0; then | |
192 | if test -z "$dir_arg"; then | |
193 | echo "$0: no input file specified." >&2 | |
194 | exit 1 | |
195 | fi | |
196 | # It's OK to call `install-sh -d' without argument. | |
197 | # This can happen when creating conditional directories. | |
198 | exit 0 | |
199 | fi | |
200 | ||
201 | if test -z "$dir_arg"; then | |
202 | trap '(exit $?); exit' 1 2 13 15 | |
203 | ||
204 | # Set umask so as not to create temps with too-generous modes. | |
205 | # However, 'strip' requires both read and write access to temps. | |
206 | case $mode in | |
207 | # Optimize common cases. | |
208 | *644) cp_umask=133;; | |
209 | *755) cp_umask=22;; | |
210 | ||
211 | *[0-7]) | |
212 | if test -z "$stripcmd"; then | |
213 | u_plus_rw= | |
214 | else | |
215 | u_plus_rw='% 200' | |
216 | fi | |
217 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; | |
218 | *) | |
219 | if test -z "$stripcmd"; then | |
220 | u_plus_rw= | |
221 | else | |
222 | u_plus_rw=,u+rw | |
223 | fi | |
224 | cp_umask=$mode$u_plus_rw;; | |
225 | esac | |
226 | fi | |
227 | ||
228 | for src | |
229 | do | |
230 | # Protect names starting with `-'. | |
231 | case $src in | |
232 | -*) src=./$src;; | |
233 | esac | |
234 | ||
235 | if test -n "$dir_arg"; then | |
236 | dst=$src | |
237 | dstdir=$dst | |
238 | test -d "$dstdir" | |
239 | dstdir_status=$? | |
240 | else | |
241 | ||
242 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command | |
243 | # might cause directories to be created, which would be especially bad | |
244 | # if $src (and thus $dsttmp) contains '*'. | |
245 | if test ! -f "$src" && test ! -d "$src"; then | |
246 | echo "$0: $src does not exist." >&2 | |
247 | exit 1 | |
248 | fi | |
249 | ||
250 | if test -z "$dst_arg"; then | |
251 | echo "$0: no destination specified." >&2 | |
252 | exit 1 | |
253 | fi | |
254 | ||
255 | dst=$dst_arg | |
256 | # Protect names starting with `-'. | |
257 | case $dst in | |
258 | -*) dst=./$dst;; | |
259 | esac | |
260 | ||
261 | # If destination is a directory, append the input filename; won't work | |
262 | # if double slashes aren't ignored. | |
263 | if test -d "$dst"; then | |
264 | if test -n "$no_target_directory"; then | |
265 | echo "$0: $dst_arg: Is a directory" >&2 | |
266 | exit 1 | |
267 | fi | |
268 | dstdir=$dst | |
269 | dst=$dstdir/`basename "$src"` | |
270 | dstdir_status=0 | |
271 | else | |
272 | # Prefer dirname, but fall back on a substitute if dirname fails. | |
273 | dstdir=` | |
274 | (dirname "$dst") 2>/dev/null || | |
275 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
276 | X"$dst" : 'X\(//\)[^/]' \| \ | |
277 | X"$dst" : 'X\(//\)$' \| \ | |
278 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || | |
279 | echo X"$dst" | | |
280 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
281 | s//\1/ | |
282 | q | |
283 | } | |
284 | /^X\(\/\/\)[^/].*/{ | |
285 | s//\1/ | |
286 | q | |
287 | } | |
288 | /^X\(\/\/\)$/{ | |
289 | s//\1/ | |
290 | q | |
291 | } | |
292 | /^X\(\/\).*/{ | |
293 | s//\1/ | |
294 | q | |
295 | } | |
296 | s/.*/./; q' | |
297 | ` | |
298 | ||
299 | test -d "$dstdir" | |
300 | dstdir_status=$? | |
301 | fi | |
302 | fi | |
303 | ||
304 | obsolete_mkdir_used=false | |
305 | ||
306 | if test $dstdir_status != 0; then | |
307 | case $posix_mkdir in | |
308 | '') | |
309 | # Create intermediate dirs using mode 755 as modified by the umask. | |
310 | # This is like FreeBSD 'install' as of 1997-10-28. | |
311 | umask=`umask` | |
312 | case $stripcmd.$umask in | |
313 | # Optimize common cases. | |
314 | *[2367][2367]) mkdir_umask=$umask;; | |
315 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; | |
316 | ||
317 | *[0-7]) | |
318 | mkdir_umask=`expr $umask + 22 \ | |
319 | - $umask % 100 % 40 + $umask % 20 \ | |
320 | - $umask % 10 % 4 + $umask % 2 | |
321 | `;; | |
322 | *) mkdir_umask=$umask,go-w;; | |
323 | esac | |
324 | ||
325 | # With -d, create the new directory with the user-specified mode. | |
326 | # Otherwise, rely on $mkdir_umask. | |
327 | if test -n "$dir_arg"; then | |
328 | mkdir_mode=-m$mode | |
217 | if [ x"$dir_arg" != x ] | |
218 | then | |
219 | if [ -d "$dstarg" ]; then | |
220 | true | |
221 | else | |
222 | $doit $mkdirprog "$dstarg" && | |
223 | ||
224 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi && | |
225 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi && | |
226 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi | |
227 | fi | |
329 | 228 | else |
330 | mkdir_mode= | |
331 | fi | |
332 | ||
333 | posix_mkdir=false | |
334 | case $umask in | |
335 | *[123567][0-7][0-7]) | |
336 | # POSIX mkdir -p sets u+wx bits regardless of umask, which | |
337 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. | |
338 | ;; | |
339 | *) | |
340 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ | |
341 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 | |
342 | ||
343 | if (umask $mkdir_umask && | |
344 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 | |
345 | then | |
346 | if test -z "$dir_arg" || { | |
347 | # Check for POSIX incompatibilities with -m. | |
348 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or | |
349 | # other-writeable bit of parent directory when it shouldn't. | |
350 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. | |
351 | ls_ld_tmpdir=`ls -ld "$tmpdir"` | |
352 | case $ls_ld_tmpdir in | |
353 | d????-?r-*) different_mode=700;; | |
354 | d????-?--*) different_mode=755;; | |
355 | *) false;; | |
356 | esac && | |
357 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { | |
358 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` | |
359 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" | |
360 | } | |
361 | } | |
362 | then posix_mkdir=: | |
363 | fi | |
364 | rmdir "$tmpdir/d" "$tmpdir" | |
365 | else | |
366 | # Remove any dirs left behind by ancient mkdir implementations. | |
367 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null | |
368 | fi | |
369 | trap '' 0;; | |
370 | esac;; | |
371 | esac | |
372 | ||
373 | if | |
374 | $posix_mkdir && ( | |
375 | umask $mkdir_umask && | |
376 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" | |
377 | ) | |
378 | then : | |
379 | else | |
380 | ||
381 | # The umask is ridiculous, or mkdir does not conform to POSIX, | |
382 | # or it failed possibly due to a race condition. Create the | |
383 | # directory the slow way, step by step, checking for races as we go. | |
384 | ||
385 | case $dstdir in | |
386 | /*) prefix='/';; | |
387 | -*) prefix='./';; | |
388 | *) prefix='';; | |
389 | esac | |
390 | ||
391 | eval "$initialize_posix_glob" | |
392 | ||
393 | oIFS=$IFS | |
394 | IFS=/ | |
395 | $posix_glob set -f | |
396 | set fnord $dstdir | |
397 | shift | |
398 | $posix_glob set +f | |
399 | IFS=$oIFS | |
400 | ||
401 | prefixes= | |
402 | ||
403 | for d | |
404 | do | |
405 | test -z "$d" && continue | |
406 | ||
407 | prefix=$prefix$d | |
408 | if test -d "$prefix"; then | |
409 | prefixes= | |
410 | else | |
411 | if $posix_mkdir; then | |
412 | (umask=$mkdir_umask && | |
413 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break | |
414 | # Don't fail if two instances are running concurrently. | |
415 | test -d "$prefix" || exit 1 | |
416 | else | |
417 | case $prefix in | |
418 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; | |
419 | *) qprefix=$prefix;; | |
420 | esac | |
421 | prefixes="$prefixes '$qprefix'" | |
422 | fi | |
423 | fi | |
424 | prefix=$prefix/ | |
425 | done | |
426 | ||
427 | if test -n "$prefixes"; then | |
428 | # Don't fail if two instances are running concurrently. | |
429 | (umask $mkdir_umask && | |
430 | eval "\$doit_exec \$mkdirprog $prefixes") || | |
431 | test -d "$dstdir" || exit 1 | |
432 | obsolete_mkdir_used=true | |
433 | fi | |
434 | fi | |
435 | fi | |
436 | ||
437 | if test -n "$dir_arg"; then | |
438 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && | |
439 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && | |
440 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || | |
441 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 | |
442 | else | |
443 | ||
444 | # Make a couple of temp file names in the proper directory. | |
445 | dsttmp=$dstdir/_inst.$$_ | |
446 | rmtmp=$dstdir/_rm.$$_ | |
447 | ||
448 | # Trap to clean up those temp files at exit. | |
449 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 | |
450 | ||
451 | # Copy the file name to the temp name. | |
452 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && | |
453 | ||
454 | # and set any options; do chmod last to preserve setuid bits. | |
455 | # | |
456 | # If any of these fail, we abort the whole thing. If we want to | |
457 | # ignore errors from any of these, just make sure not to ignore | |
458 | # errors from the above "$doit $cpprog $src $dsttmp" command. | |
459 | # | |
460 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && | |
461 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && | |
462 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && | |
463 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && | |
464 | ||
465 | # If -C, don't bother to copy if it wouldn't change the file. | |
466 | if $copy_on_change && | |
467 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && | |
468 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && | |
469 | ||
470 | eval "$initialize_posix_glob" && | |
471 | $posix_glob set -f && | |
472 | set X $old && old=:$2:$4:$5:$6 && | |
473 | set X $new && new=:$2:$4:$5:$6 && | |
474 | $posix_glob set +f && | |
475 | ||
476 | test "$old" = "$new" && | |
477 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 | |
478 | then | |
479 | rm -f "$dsttmp" | |
480 | else | |
481 | # Rename the file to the real destination. | |
482 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || | |
483 | ||
484 | # The rename failed, perhaps because mv can't rename something else | |
485 | # to itself, or perhaps because mv is so ancient that it does not | |
486 | # support -f. | |
487 | { | |
488 | # Now remove or move aside any old file at destination location. | |
489 | # We try this two ways since rm can't unlink itself on some | |
490 | # systems and the destination file might be busy for other | |
491 | # reasons. In this case, the final cleanup might fail but the new | |
492 | # file should still install successfully. | |
493 | { | |
494 | test ! -f "$dst" || | |
495 | $doit $rmcmd -f "$dst" 2>/dev/null || | |
496 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && | |
497 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } | |
498 | } || | |
499 | { echo "$0: cannot unlink or rename $dst" >&2 | |
500 | (exit 1); exit 1 | |
501 | } | |
502 | } && | |
503 | ||
504 | # Now rename the file to the real destination. | |
505 | $doit $mvcmd "$dsttmp" "$dst" | |
506 | } | |
507 | fi || exit 1 | |
508 | ||
509 | trap '' 0 | |
510 | fi | |
511 | done | |
512 | ||
513 | # Local variables: | |
514 | # eval: (add-hook 'write-file-hooks 'time-stamp) | |
515 | # time-stamp-start: "scriptversion=" | |
516 | # time-stamp-format: "%:y-%02m-%02d.%02H" | |
517 | # time-stamp-time-zone: "UTC" | |
518 | # time-stamp-end: "; # UTC" | |
519 | # End: | |
229 | ||
230 | if [ x"$dstisfile" = x ] | |
231 | then | |
232 | file=$srcarg | |
233 | else | |
234 | file=$dst | |
235 | fi | |
236 | ||
237 | dstfile=`basename "$file"` | |
238 | dstfinal="$dstdir/$dstfile" | |
239 | ||
240 | # Make a temp file name in the proper directory. | |
241 | ||
242 | dsttmp=$dstdir/#inst.$$# | |
243 | ||
244 | # Make a backup file name in the proper directory. | |
245 | case x$suffixfmt in | |
246 | *%*) suffix=`echo x | | |
247 | $awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" ' | |
248 | { cnt = 0; | |
249 | do { | |
250 | sfx = sprintf(fmt, cnt++); | |
251 | name = bname sfx; | |
252 | } while (system("test -f " name) == 0); | |
253 | print sfx; }' -`;; | |
254 | x) ;; | |
255 | *) suffix="$suffixfmt";; | |
256 | esac | |
257 | dstbackup="$dstfinal$suffix" | |
258 | ||
259 | # Move or copy the file name to the temp name | |
260 | ||
261 | $doit $doinst $srcarg "$dsttmp" && | |
262 | ||
263 | trap "rm -f ${dsttmp}" 0 && | |
264 | ||
265 | # and set any options; do chmod last to preserve setuid bits | |
266 | ||
267 | # If any of these fail, we abort the whole thing. If we want to | |
268 | # ignore errors from any of these, just make sure not to ignore | |
269 | # errors from the above "$doit $instcmd $src $dsttmp" command. | |
270 | ||
271 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi && | |
272 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi && | |
273 | if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi && | |
274 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi && | |
275 | ||
276 | # Now rename the file to the real destination. | |
277 | ||
278 | if [ x"$suffix" != x ] && [ -f "$dstfinal" ] | |
279 | then | |
280 | $doit $mvcmd "$dstfinal" "$dstbackup" | |
281 | else | |
282 | $doit $rmcmd -f "$dstfinal" | |
283 | fi && | |
284 | $doit $mvcmd "$dsttmp" "$dstfinal" | |
285 | fi | |
286 | ||
287 | done && | |
288 | ||
289 | ||
290 | exit 0 |
17 | 17 | void a_Http_set_proxy_passwd(const char *str); |
18 | 18 | char *a_Http_make_connect_str(const DilloUrl *url); |
19 | 19 | const char *a_Http_get_proxy_urlstr(); |
20 | Dstr *a_Http_make_query_str(const DilloUrl *url, bool_t use_proxy); | |
20 | Dstr *a_Http_make_query_str(const DilloUrl *url, const DilloUrl *requester, | |
21 | bool_t use_proxy); | |
21 | 22 | |
22 | 23 | void a_Http_ccc (int Op, int Branch, int Dir, ChainLink *Info, |
23 | 24 | void *Data1, void *Data2); |
124 | 124 | " <tr>\n" |
125 | 125 | " <td> \n" |
126 | 126 | " <td>\n" |
127 | " <a href='http://www.mathaba.net/'>Mathaba</a>\n" | |
128 | " <tr>\n" | |
129 | " <tr>\n" | |
130 | " <td> \n" | |
131 | " <td>\n" | |
132 | 127 | " <a href='http://www.commondreams.org/'>C. Dreams</a>\n" |
133 | 128 | " <tr>\n" |
134 | 129 | " <td> \n" |
238 | 233 | "<tr>\n" |
239 | 234 | " <td bgcolor='#CCCCCC'>\n" |
240 | 235 | " <h4>Release overview</h4>\n" |
241 | " September 06, 2011\n" | |
236 | " September 21, 2011\n" | |
242 | 237 | "<tr>\n" |
243 | 238 | " <td bgcolor='#FFFFFF'>\n" |
244 | 239 | " <table border='0' cellspacing='0' cellpadding='5'>\n" |
245 | 240 | " <tr>\n" |
246 | 241 | " <td>\n" |
247 | 242 | "<p>\n" |
248 | "Dillo-3.0 is a port to FLTK-1.3, which is big news because FLTK-1.3.0 was\n" | |
243 | "The dillo-3.0.1 release brings improved privacy and some new options for\n" | |
244 | "configuring the user interface.\n" | |
245 | "<p>\n" | |
246 | "Dillo3 is a port to FLTK-1.3, which is big news because FLTK-1.3.0 was\n" | |
249 | 247 | "<a href='http://fltk.org/articles.php?L1086'>released</a>\n" |
250 | 248 | "in June, clearing the way for Dillo to return to those distributions\n" |
251 | 249 | "which had excluded Dillo2 due to FLTK2 never being officially released.\n" |
252 | "<p>\n" | |
253 | "Dillo-3.0 also has plenty of improvements and bugfixes.\n" | |
254 | 250 | "<p>\n" |
255 | 251 | "After this release, the core team will focus on implementing the CSS\n" |
256 | 252 | "feature of floating elements. This will <em>greatly</em> improve dillo's\n" |
278 | 274 | " <table border='0' cellspacing='0' cellpadding='5'>\n" |
279 | 275 | " <tr>\n" |
280 | 276 | " <td>\n" |
277 | "dillo-3.0.1:\n" | |
278 | "<ul>\n" | |
279 | "<li>Privacy -- never send cookies when making third-party requests, and\n" | |
280 | " never accept cookies in the responses to these requests.\n" | |
281 | "<li>Add preference for UI theme.\n" | |
282 | "<li>Allow key bindings for paging left/right.\n" | |
283 | "<li>Add show_quit_dialog dillorc option.\n" | |
284 | "</ul>\n" | |
285 | "dillo-3.0:\n" | |
281 | 286 | "<ul>\n" |
282 | 287 | "<li>Ported Dillo to FLTK-1.3.\n" |
283 | 288 | "<li>Native build on OSX.\n" |
270 | 270 | /* |
271 | 271 | * Make the http query string |
272 | 272 | */ |
273 | Dstr *a_Http_make_query_str(const DilloUrl *url, bool_t use_proxy) | |
273 | Dstr *a_Http_make_query_str(const DilloUrl *url, const DilloUrl *requester, | |
274 | bool_t use_proxy) | |
274 | 275 | { |
275 | 276 | const char *auth; |
276 | 277 | char *ptr, *cookies, *referer; |
295 | 296 | (URL_PATH_(url) || URL_QUERY_(url)) ? "" : "/"); |
296 | 297 | } |
297 | 298 | |
298 | cookies = a_Cookies_get_query(url); | |
299 | cookies = a_Cookies_get_query(url, requester); | |
299 | 300 | auth = a_Auth_get_auth_str(url); |
300 | 301 | referer = Http_get_referer(url); |
301 | 302 | if (URL_FLAGS(url) & URL_Post) { |
364 | 365 | DataBuf *dbuf; |
365 | 366 | |
366 | 367 | /* Create the query */ |
367 | query = a_Http_make_query_str(S->web->url,S->flags & HTTP_SOCKET_USE_PROXY); | |
368 | query = a_Http_make_query_str(S->web->url, S->web->requester, | |
369 | S->flags & HTTP_SOCKET_USE_PROXY); | |
368 | 370 | dbuf = a_Chain_dbuf_new(query->str, query->len, 0); |
369 | 371 | |
370 | 372 | /* actually this message is sent too early. |
741 | 741 | |
742 | 742 | #ifndef DISABLE_COOKIES |
743 | 743 | if ((Cookies = Cache_parse_multiple_fields(header, "Set-Cookie"))) { |
744 | char *server_date = Cache_parse_field(header, "Date"); | |
745 | ||
746 | a_Cookies_set(Cookies, entry->Url, server_date); | |
744 | CacheClient_t *client; | |
745 | ||
746 | for (i = 0; (client = dList_nth_data(ClientQueue, i)); ++i) { | |
747 | if (client->Url == entry->Url) { | |
748 | DilloWeb *web = client->Web; | |
749 | ||
750 | if (!web->requester || | |
751 | a_Url_same_organization(entry->Url, web->requester)) { | |
752 | char *server_date = Cache_parse_field(header, "Date"); | |
753 | ||
754 | a_Cookies_set(Cookies, entry->Url, server_date); | |
755 | dFree(server_date); | |
756 | break; | |
757 | } | |
758 | } | |
759 | } | |
760 | if (i >= dList_length(ClientQueue)) { | |
761 | MSG("Cache: cookies not accepted from '%s'\n", URL_STR(entry->Url)); | |
762 | } | |
763 | ||
747 | 764 | for (i = 0; (data = dList_nth_data(Cookies, i)); ++i) |
748 | 765 | dFree(data); |
749 | 766 | dList_free(Cookies); |
750 | dFree(server_date); | |
751 | 767 | } |
752 | 768 | #endif /* !DISABLE_COOKIES */ |
753 | 769 |
299 | 299 | if (strcmp(server, "proto.https") == 0) { |
300 | 300 | /* Let's be kind and make the HTTP query string for the dpi */ |
301 | 301 | char *proxy_connect = a_Http_make_connect_str(web->url); |
302 | Dstr *http_query = a_Http_make_query_str(web->url, FALSE); | |
302 | Dstr *http_query = a_Http_make_query_str(web->url, web->requester,FALSE); | |
303 | 303 | /* BUG: embedded NULLs in query data will truncate message */ |
304 | 304 | |
305 | 305 | /* BUG: WORKAROUND: request to only check the root URL's certificate. |
384 | 384 | case PREFS_FILTER_SAME_DOMAIN: |
385 | 385 | { |
386 | 386 | const char *req_host = URL_HOST(requester), |
387 | *want_host = URL_HOST(wanted), | |
388 | *req_suffix, | |
389 | *want_suffix; | |
387 | *want_host = URL_HOST(wanted); | |
390 | 388 | if (want_host[0] == '\0') { |
391 | 389 | ret = (req_host[0] == '\0' || |
392 | 390 | !dStrcasecmp(URL_SCHEME(wanted), "data")) ? TRUE : FALSE; |
394 | 392 | /* This will regard "www.dillo.org" and "www.dillo.org." as |
395 | 393 | * different, but it doesn't seem worth caring about. |
396 | 394 | */ |
397 | req_suffix = a_Url_host_find_public_suffix(req_host); | |
398 | want_suffix = a_Url_host_find_public_suffix(want_host); | |
399 | ||
400 | ret = dStrcasecmp(req_suffix, want_suffix) == 0; | |
401 | } | |
402 | ||
403 | MSG("Capi_filters_test: %s from '%s' to '%s'\n", | |
404 | ret ? "ALLOW" : "DENY", req_host, want_host); | |
395 | ret = a_Url_same_organization(wanted, requester); | |
396 | } | |
397 | if (ret == FALSE) { | |
398 | MSG("Capi_filters_test: deny from '%s' to '%s'\n", req_host, | |
399 | want_host); | |
400 | } | |
405 | 401 | break; |
406 | 402 | } |
407 | 403 | case PREFS_FILTER_ALLOW_ALL: |
178 | 178 | /* |
179 | 179 | * Return a string containing cookie data for an HTTP query. |
180 | 180 | */ |
181 | char *a_Cookies_get_query(const DilloUrl *request_url) | |
181 | char *a_Cookies_get_query(const DilloUrl *query_url, const DilloUrl *requester) | |
182 | 182 | { |
183 | 183 | char *cmd, *dpip_tag, *query; |
184 | 184 | const char *path; |
187 | 187 | if (disabled) |
188 | 188 | return dStrdup(""); |
189 | 189 | |
190 | action = Cookies_control_check(request_url); | |
190 | action = Cookies_control_check(query_url); | |
191 | 191 | if (action == COOKIE_DENY) { |
192 | _MSG("Cookies: denied GET for %s\n", URL_HOST_(request_url)); | |
192 | _MSG("Cookies: denied GET for %s\n", URL_HOST_(query_url)); | |
193 | 193 | return dStrdup(""); |
194 | 194 | } |
195 | path = URL_PATH_(request_url); | |
195 | ||
196 | if (requester == NULL) { | |
197 | /* request made by user */ | |
198 | } else if (!a_Url_same_organization(query_url, requester)) { | |
199 | MSG("Cookies: not sent for request by '%s' for '%s'\n", | |
200 | URL_HOST(requester), URL_HOST(query_url)); | |
201 | return dStrdup(""); | |
202 | } | |
203 | ||
204 | path = URL_PATH_(query_url); | |
196 | 205 | |
197 | 206 | cmd = a_Dpip_build_cmd("cmd=%s scheme=%s host=%s path=%s", |
198 | "get_cookie", URL_SCHEME(request_url), | |
199 | URL_HOST(request_url), path ? path : "/"); | |
207 | "get_cookie", URL_SCHEME(query_url), | |
208 | URL_HOST(query_url), path ? path : "/"); | |
200 | 209 | |
201 | 210 | /* Get the answer from cookies.dpi */ |
202 | 211 | _MSG("cookies.c: a_Dpi_send_blocking_cmd cmd = {%s}\n", cmd); |
6 | 6 | |
7 | 7 | |
8 | 8 | #ifdef DISABLE_COOKIES |
9 | # define a_Cookies_get_query(url) dStrdup("") | |
9 | # define a_Cookies_get_query(url, requester) dStrdup("") | |
10 | 10 | # define a_Cookies_set() ; |
11 | 11 | # define a_Cookies_init() ; |
12 | 12 | # define a_Cookies_freeall() ; |
13 | 13 | #else |
14 | char *a_Cookies_get_query(const DilloUrl *request_url); | |
14 | char *a_Cookies_get_query(const DilloUrl *query_url, | |
15 | const DilloUrl *requester); | |
15 | 16 | void a_Cookies_set(Dlist *cookie_string, const DilloUrl *set_url, |
16 | 17 | const char *server_date); |
17 | 18 | void a_Cookies_init( void ); |
364 | 364 | // Sets WM_CLASS hint on X11 |
365 | 365 | Fl_Window::default_xclass("dillo"); |
366 | 366 | |
367 | Fl::scheme(prefs.theme); | |
368 | ||
367 | 369 | if (!prefs.show_tooltip) { |
368 | 370 | // turn off UI tooltips |
369 | 371 | Fl::option(Fl::OPTION_SHOW_TOOLTIPS, false); |
2137 | 2137 | DilloWeb *Web; |
2138 | 2138 | int ClientKey; |
2139 | 2139 | /* Fill a Web structure for the cache query */ |
2140 | Web = a_Web_new(url, requester); | |
2141 | Web->bw = bw; | |
2140 | Web = a_Web_new(bw, url, requester); | |
2142 | 2141 | Web->Image = Image; |
2143 | 2142 | a_Image_ref(Image); |
2144 | 2143 | Web->flags |= WEB_Image; |
2966 | 2965 | } else { |
2967 | 2966 | /* Fill a Web structure for the cache query */ |
2968 | 2967 | int ClientKey; |
2969 | DilloWeb *Web = a_Web_new(url, html->page_url); | |
2970 | Web->bw = html->bw; | |
2968 | DilloWeb *Web = a_Web_new(html->bw, url, html->page_url); | |
2971 | 2969 | if ((ClientKey = a_Capi_open_url(Web, Html_css_load_callback, NULL))) { |
2972 | 2970 | ++html->bw->NumPendingStyleSheets; |
2973 | 2971 | a_Bw_add_client(html->bw, ClientKey, 0); |
123 | 123 | { "screen-up" , KEYS_SCREEN_UP , 0 , 'b' }, |
124 | 124 | { "screen-down" , KEYS_SCREEN_DOWN , 0 , FL_Page_Down }, |
125 | 125 | { "screen-down" , KEYS_SCREEN_DOWN , 0 , ' ' }, |
126 | { "screen-left" , KEYS_SCREEN_LEFT , 0 , 0 }, | |
127 | { "screen-right" , KEYS_SCREEN_RIGHT , 0 , 0 }, | |
126 | 128 | { "line-up" , KEYS_LINE_UP , 0 , FL_Up }, |
127 | 129 | { "line-down" , KEYS_LINE_DOWN , 0 , FL_Down }, |
128 | 130 | { "left" , KEYS_LEFT , 0 , FL_Left }, |
38 | 38 | KEYS_HOME, |
39 | 39 | KEYS_SCREEN_UP, |
40 | 40 | KEYS_SCREEN_DOWN, |
41 | KEYS_SCREEN_LEFT, | |
42 | KEYS_SCREEN_RIGHT, | |
41 | 43 | KEYS_LINE_UP, |
42 | 44 | KEYS_LINE_DOWN, |
43 | 45 | KEYS_LEFT, |
88 | 88 | #pagedown = screen-down |
89 | 89 | #space = screen-down |
90 | 90 | |
91 | #(screen-left has no default binding) | |
92 | ||
93 | #(screen-right has no default binding) | |
94 | ||
91 | 95 | #up = line-up |
92 | 96 | |
93 | 97 | #down = line-down |
527 | 527 | * |
528 | 528 | * direction: {backward = -1, forward = 1} |
529 | 529 | */ |
530 | void a_Menu_history_popup(BrowserWindow *bw, int direction) | |
530 | void a_Menu_history_popup(BrowserWindow *bw, int x, int y, int direction) | |
531 | 531 | { |
532 | 532 | static Fl_Menu_Item *pm = 0; |
533 | 533 | int i, n; |
534 | 534 | |
535 | 535 | popup_bw = bw; |
536 | popup_x = Fl::event_x(); | |
537 | popup_y = Fl::event_y(); | |
536 | popup_x = x; | |
537 | popup_y = y; | |
538 | 538 | history_direction = direction; |
539 | 539 | |
540 | 540 | // TODO: hook popdown event with delete or similar. |
615 | 615 | /* |
616 | 616 | * Tools popup menu (construction & popup) |
617 | 617 | */ |
618 | void a_Menu_tools_popup(BrowserWindow *bw, void *v_wid) | |
618 | void a_Menu_tools_popup(BrowserWindow *bw, int x, int y) | |
619 | 619 | { |
620 | 620 | const Fl_Menu_Item *item; |
621 | Fl_Widget *wid = (Fl_Widget*)v_wid; | |
622 | 621 | UI *ui = (UI*)bw->ui; |
623 | 622 | |
624 | 623 | static Fl_Menu_Item pm[] = { |
651 | 650 | pm[4+cur_panelsize].setonly(); |
652 | 651 | cur_smallicons ? pm[7].set() : pm[7].clear(); |
653 | 652 | |
654 | item = pm->popup(wid->x(), wid->y() + wid->h()); | |
653 | item = pm->popup(x, y); | |
655 | 654 | if (item) { |
656 | 655 | ((Fl_Widget *)item)->do_callback(); |
657 | 656 | } |
16 | 16 | void *vform, bool_t showing_hiddens); |
17 | 17 | void a_Menu_file_popup(BrowserWindow *bw, void *v_wid); |
18 | 18 | void a_Menu_bugmeter_popup(BrowserWindow *bw, const DilloUrl *url); |
19 | void a_Menu_history_popup(BrowserWindow *bw, int direction); | |
20 | void a_Menu_tools_popup(BrowserWindow *bw, void *v_wid); | |
19 | void a_Menu_history_popup(BrowserWindow *bw, int x, int y, int direction); | |
20 | void a_Menu_tools_popup(BrowserWindow *bw, int x, int y); | |
21 | 21 | |
22 | 22 | |
23 | 23 | #ifdef __cplusplus |
231 | 231 | |
232 | 232 | // a_Menu_pagemarks_new(bw); |
233 | 233 | |
234 | Web = a_Web_new(url, requester); | |
235 | Web->bw = bw; | |
234 | Web = a_Web_new(bw, url, requester); | |
236 | 235 | Web->flags |= WEB_RootUrl; |
237 | 236 | if ((ClientKey = a_Capi_open_url(Web, NULL, NULL)) != 0) { |
238 | 237 | a_Bw_add_client(bw, ClientKey, 1); |
565 | 564 | void a_Nav_save_url(BrowserWindow *bw, |
566 | 565 | const DilloUrl *url, const char *filename) |
567 | 566 | { |
568 | DilloWeb *Web = a_Web_new(url, NULL); | |
569 | Web->bw = bw; | |
567 | DilloWeb *Web = a_Web_new(bw, url, NULL); | |
570 | 568 | Web->filename = dStrdup(filename); |
571 | 569 | Web->flags |= WEB_Download; |
572 | 570 | /* TODO: keep track of this client */ |
818 | 818 | " ", |
819 | 819 | " ", |
820 | 820 | " .XXo. ", |
821 | " oO $$+. ", | |
821 | " oO$$$+. ", | |
822 | 822 | " oo@$$$@# ", |
823 | 823 | " #o@$$$O# ", |
824 | 824 | " #X$$$$%X ", |
825 | " &#% #X$$$@o ", | |
825 | " &# #X$$$@o ", | |
826 | 826 | " #*o =-@$$$# ", |
827 | 827 | " oO*o #$@$$$$# ", |
828 | 828 | " oOOOX oO@;$$$$X ", |
1425 | 1425 | " p*45<Xg ", |
1426 | 1426 | " h.>885oa ", |
1427 | 1427 | " p.3883Xg ", |
1428 | " i$O s$488;s ", | |
1428 | " $O s$488;s ", | |
1429 | 1429 | " O>1p e;588;a ", |
1430 | 1430 | " O331sr;7778:s ", |
1431 | 1431 | " O343,**3678;a ", |
1432 | " f,643;#%368:s ", | |
1432 | " O,643;#%368:s ", | |
1433 | 1433 | " t<64>= &374f ", |
1434 | 1434 | " t244>= &379ih", |
1435 | 1435 | " d@:;=& &475u", |
1538 | 1538 | "D c #000000", |
1539 | 1539 | "E c #000000", |
1540 | 1540 | "F c #000000", |
1541 | " 5555555 ", | |
1542 | " 544433355 ", | |
1543 | " 54555438455 ", | |
1544 | " 44555542835 ", | |
1545 | " 44445548245 ", | |
1546 | " 4444554274 ", | |
1547 | " 544554274 ", | |
1548 | " 55474 ", | |
1549 | " 5474 ", | |
1550 | " 544 ", | |
1541 | " ", | |
1542 | " 444333 ", | |
1543 | " 4 4384 ", | |
1544 | " 44 4283 ", | |
1545 | " 4444 4824 ", | |
1546 | " 4444 4274 ", | |
1547 | " 44 4274 ", | |
1548 | " 474 ", | |
1549 | " 474 ", | |
1550 | " 44 ", | |
1551 | 1551 | " 44 ", |
1552 | 1552 | " ", |
1553 | " 5445 ", | |
1553 | " 44 ", | |
1554 | 1554 | " 4764 ", |
1555 | 1555 | " 4674 ", |
1556 | " 5445 "}; | |
1556 | " 44 "}; | |
1557 | 1557 | |
1558 | 1558 | /* XPM */ |
1559 | 1559 | static const char *const full_screen_on_xpm[] = { |
22 | 22 | #define PREFS_SAVE_DIR "/tmp/" |
23 | 23 | #define PREFS_HTTP_REFERER "host" |
24 | 24 | #define PREFS_HTTP_USER_AGENT "Dillo/" VERSION |
25 | #define PREFS_THEME "none" | |
25 | 26 | |
26 | 27 | /*----------------------------------------------------------------------------- |
27 | 28 | * Global Data |
88 | 89 | prefs.show_home = TRUE; |
89 | 90 | prefs.show_msg = TRUE; |
90 | 91 | prefs.show_progress_box = TRUE; |
92 | prefs.show_quit_dialog = TRUE; | |
91 | 93 | prefs.show_reload = TRUE; |
92 | 94 | prefs.show_save = TRUE; |
93 | 95 | prefs.show_search = TRUE; |
97 | 99 | prefs.show_url = TRUE; |
98 | 100 | prefs.small_icons = FALSE; |
99 | 101 | prefs.start_page = a_Url_new(PREFS_START_PAGE, NULL); |
102 | prefs.theme = dStrdup(PREFS_THEME); | |
100 | 103 | prefs.w3c_plus_heuristics = TRUE; |
101 | 104 | } |
102 | 105 | |
125 | 128 | dFree(dList_nth_data(prefs.search_urls, i)); |
126 | 129 | dList_free(prefs.search_urls); |
127 | 130 | a_Url_free(prefs.start_page); |
131 | dFree(prefs.theme); | |
128 | 132 | } |
48 | 48 | int32_t bg_color; |
49 | 49 | bool_t contrast_visited_color; |
50 | 50 | bool_t show_tooltip; |
51 | char *theme; | |
51 | 52 | int panel_size; |
52 | 53 | bool_t small_icons; |
53 | 54 | bool_t limit_text_width; |
70 | 71 | bool_t show_search; |
71 | 72 | bool_t show_help; |
72 | 73 | bool_t show_progress_box; |
74 | bool_t show_quit_dialog; | |
73 | 75 | bool_t fullwindow_start; |
74 | 76 | bool_t load_images; |
75 | 77 | bool_t load_stylesheets; |
97 | 97 | { "show_home", &prefs.show_home, PREFS_BOOL }, |
98 | 98 | { "show_msg", &prefs.show_msg, PREFS_BOOL }, |
99 | 99 | { "show_progress_box", &prefs.show_progress_box, PREFS_BOOL }, |
100 | { "show_quit_dialog", &prefs.show_quit_dialog, PREFS_BOOL }, | |
100 | 101 | { "show_reload", &prefs.show_reload, PREFS_BOOL }, |
101 | 102 | { "show_save", &prefs.show_save, PREFS_BOOL }, |
102 | 103 | { "show_search", &prefs.show_search, PREFS_BOOL }, |
106 | 107 | { "show_url", &prefs.show_url, PREFS_BOOL }, |
107 | 108 | { "small_icons", &prefs.small_icons, PREFS_BOOL }, |
108 | 109 | { "start_page", &prefs.start_page, PREFS_URL }, |
110 | { "theme", &prefs.theme, PREFS_STRING }, | |
109 | 111 | { "w3c_plus_heuristics", &prefs.w3c_plus_heuristics, PREFS_BOOL } |
110 | 112 | }; |
111 | 113 | |
129 | 131 | break; |
130 | 132 | case PREFS_COLOR: |
131 | 133 | *(int32_t *)node->pref = a_Color_parse(value, *(int32_t*)node->pref,&st); |
134 | if (st) | |
135 | MSG("prefs: Color '%s' not recognized.\n", value); | |
132 | 136 | break; |
133 | 137 | case PREFS_STRING: |
134 | 138 | dFree(*(char **)node->pref); |
304 | 304 | if (b == FL_LEFT_MOUSE) { |
305 | 305 | a_UIcmd_back(a_UIcmd_get_bw_by_widget(wid)); |
306 | 306 | } else if (b == FL_RIGHT_MOUSE) { |
307 | a_UIcmd_back_popup(a_UIcmd_get_bw_by_widget(wid)); | |
307 | a_UIcmd_back_popup(a_UIcmd_get_bw_by_widget(wid), wid->x(), | |
308 | wid->y() + wid->h()); | |
308 | 309 | } |
309 | 310 | break; |
310 | 311 | case UI_FORW: |
311 | 312 | if (b == FL_LEFT_MOUSE) { |
312 | 313 | a_UIcmd_forw(a_UIcmd_get_bw_by_widget(wid)); |
313 | 314 | } else if (b == FL_RIGHT_MOUSE) { |
314 | a_UIcmd_forw_popup(a_UIcmd_get_bw_by_widget(wid)); | |
315 | a_UIcmd_forw_popup(a_UIcmd_get_bw_by_widget(wid), wid->x(), | |
316 | wid->y() + wid->h()); | |
315 | 317 | } |
316 | 318 | break; |
317 | 319 | case UI_HOME: |
341 | 343 | break; |
342 | 344 | case UI_TOOLS: |
343 | 345 | if (b == FL_LEFT_MOUSE || b == FL_RIGHT_MOUSE) { |
344 | a_UIcmd_tools(a_UIcmd_get_bw_by_widget(wid), wid); | |
346 | a_UIcmd_tools(a_UIcmd_get_bw_by_widget(wid), wid->x(), | |
347 | wid->y() + wid->h()); | |
345 | 348 | } |
346 | 349 | break; |
347 | 350 | default: |
713 | 716 | if (cmd == KEYS_NOP) { |
714 | 717 | // Do nothing |
715 | 718 | } else if (cmd == KEYS_SCREEN_UP || cmd == KEYS_SCREEN_DOWN || |
719 | cmd == KEYS_SCREEN_LEFT || cmd == KEYS_SCREEN_RIGHT || | |
716 | 720 | cmd == KEYS_LINE_UP || cmd == KEYS_LINE_DOWN || |
717 | 721 | cmd == KEYS_LEFT || cmd == KEYS_RIGHT || |
718 | 722 | cmd == KEYS_TOP || cmd == KEYS_BOTTOM) { |
106 | 106 | Fl_Group(0,0,ww,th,lbl) { |
107 | 107 | Pack = NULL; |
108 | 108 | tab_w = 50, tab_h = th, ctab_h = 1, btn_w = 20, ctl_w = 1*btn_w+2; |
109 | tabcolor_active = FL_DARK_CYAN; tabcolor_inactive = 206; | |
109 | tabcolor_active = 0x87aca700; tabcolor_inactive = 0xb7beb700; | |
110 | 110 | resize(0,0,ww,ctab_h); |
111 | 111 | /* tab buttons go inside a pack within a scroll */ |
112 | 112 | Scroll = new Fl_Scroll(0,0,ww-ctl_w,ctab_h); |
122 | 122 | /* control buttons go inside a group */ |
123 | 123 | Control = new Fl_Group(ww-ctl_w,0,ctl_w,ctab_h); |
124 | 124 | CloseBtn = new CustLightButton(ww-ctl_w+2,0,btn_w,ctab_h, "X"); |
125 | CloseBtn->box(FL_PLASTIC_ROUND_UP_BOX); | |
125 | CloseBtn->box(FL_THIN_UP_BOX); | |
126 | 126 | CloseBtn->labelcolor(0x00641000); |
127 | 127 | CloseBtn->hl_color(FL_WHITE); |
128 | 128 | CloseBtn->clear_visible_focus(); |
251 | 251 | btn->labelsize(btn->labelsize()-2); |
252 | 252 | btn->copy_label(DEFAULT_TAB_LABEL); |
253 | 253 | btn->clear_visible_focus(); |
254 | btn->box(FL_PLASTIC_ROUND_UP_BOX); | |
254 | btn->box(FL_GTK_THIN_UP_BOX); | |
255 | 255 | btn->color(focus ? tabcolor_active : tabcolor_inactive); |
256 | 256 | btn->ui(new_ui); |
257 | 257 | btn->callback(tab_btn_cb, this); |
432 | 432 | CustTabs *tabs = (CustTabs*) cb_data; |
433 | 433 | int choice = 1, ntabs = tabs->num_tabs(); |
434 | 434 | |
435 | if (ntabs > 1) | |
435 | if (prefs.show_quit_dialog && ntabs > 1) | |
436 | 436 | choice = a_Dialog_choice5("Window contains more than one tab.", |
437 | 437 | "Close", "Cancel", NULL, NULL, NULL); |
438 | 438 | if (choice == 1) |
572 | 572 | BrowserWindow *bw; |
573 | 573 | int choice = 1; |
574 | 574 | |
575 | if (a_Bw_num() > 1) | |
575 | if (prefs.show_quit_dialog && a_Bw_num() > 1) | |
576 | 576 | choice = a_Dialog_choice5("More than one open tab or window.", |
577 | 577 | "Quit", "Cancel", NULL, NULL, NULL); |
578 | 578 | if (choice == 1) |
685 | 685 | /* |
686 | 686 | * Popup the navigation menu of the Back button |
687 | 687 | */ |
688 | void a_UIcmd_back_popup(void *vbw) | |
689 | { | |
690 | a_Menu_history_popup((BrowserWindow*)vbw, -1); | |
688 | void a_UIcmd_back_popup(void *vbw, int x, int y) | |
689 | { | |
690 | a_Menu_history_popup((BrowserWindow*)vbw, x, y, -1); | |
691 | 691 | } |
692 | 692 | |
693 | 693 | /* |
701 | 701 | /* |
702 | 702 | * Popup the navigation menu of the Forward button |
703 | 703 | */ |
704 | void a_UIcmd_forw_popup(void *vbw) | |
705 | { | |
706 | a_Menu_history_popup((BrowserWindow*)vbw, 1); | |
704 | void a_UIcmd_forw_popup(void *vbw, int x, int y) | |
705 | { | |
706 | a_Menu_history_popup((BrowserWindow*)vbw, x, y, 1); | |
707 | 707 | } |
708 | 708 | |
709 | 709 | /* |
837 | 837 | /* |
838 | 838 | * Popup the tools menu |
839 | 839 | */ |
840 | void a_UIcmd_tools(void *vbw, void *v_wid) | |
841 | { | |
842 | a_Menu_tools_popup((BrowserWindow*)vbw, v_wid); | |
840 | void a_UIcmd_tools(void *vbw, int x, int y) | |
841 | { | |
842 | a_Menu_tools_popup((BrowserWindow*)vbw, x, y); | |
843 | 843 | } |
844 | 844 | |
845 | 845 | /* |
1165 | 1165 | const mapping_t map[] = { |
1166 | 1166 | {KEYS_SCREEN_UP, SCREEN_UP_CMD}, |
1167 | 1167 | {KEYS_SCREEN_DOWN, SCREEN_DOWN_CMD}, |
1168 | {KEYS_SCREEN_LEFT, SCREEN_LEFT_CMD}, | |
1169 | {KEYS_SCREEN_RIGHT, SCREEN_RIGHT_CMD}, | |
1168 | 1170 | {KEYS_LINE_UP, LINE_UP_CMD}, |
1169 | 1171 | {KEYS_LINE_DOWN, LINE_DOWN_CMD}, |
1170 | 1172 | {KEYS_LEFT, LEFT_CMD}, |
16 | 16 | void a_UIcmd_open_url_nw(BrowserWindow *bw, const DilloUrl *url); |
17 | 17 | void a_UIcmd_open_url_nt(void *vbw, const DilloUrl *url, int focus); |
18 | 18 | void a_UIcmd_back(void *vbw); |
19 | void a_UIcmd_back_popup(void *vbw); | |
19 | void a_UIcmd_back_popup(void *vbw, int x, int y); | |
20 | 20 | void a_UIcmd_forw(void *vbw); |
21 | void a_UIcmd_forw_popup(void *vbw); | |
21 | void a_UIcmd_forw_popup(void *vbw, int x, int y); | |
22 | 22 | void a_UIcmd_home(void *vbw); |
23 | 23 | void a_UIcmd_reload(void *vbw); |
24 | 24 | void a_UIcmd_repush(void *vbw); |
25 | 25 | void a_UIcmd_redirection0(void *vbw, const DilloUrl *url); |
26 | 26 | void a_UIcmd_save(void *vbw); |
27 | 27 | void a_UIcmd_stop(void *vbw); |
28 | void a_UIcmd_tools(void *vbw, void *v_wid); | |
28 | void a_UIcmd_tools(void *vbw, int x, int y); | |
29 | 29 | void a_UIcmd_save_link(BrowserWindow *bw, const DilloUrl *url); |
30 | 30 | void a_UIcmd_open_file(void *vbw); |
31 | 31 | const char *a_UIcmd_select_file(); |
688 | 688 | |
689 | 689 | if (tld_len > 0) { |
690 | 690 | /* These TLDs were chosen by examining the current publicsuffix list |
691 | * in January 2010 and picking out those where it was simplest for | |
691 | * in September 2011 and picking out those where it was simplest for | |
692 | 692 | * them to describe the situation by beginning with a "*.[tld]" rule. |
693 | 693 | */ |
694 | const char *const tlds[] = {"ar","au","bd","bn","bt","ck","cy","do", | |
695 | "eg","er","et","fj","fk","gt","gu","id", | |
694 | const char *const tlds[] = {"ar","au","bd","bn","bt","ck","cy", | |
695 | "er","et","fj","fk","gt","gu","id", | |
696 | 696 | "il","jm","ke","kh","kw","ml","mm","mt", |
697 | 697 | "mz","ni","np","nz","om","pg","py","qa", |
698 | 698 | "sv","tr","uk","uy","ve","ye","yu","za", |
717 | 717 | * domain that is in a registry outside the organization. |
718 | 718 | * For 'www.dillo.org', that would be 'dillo.org'. |
719 | 719 | */ |
720 | const char *a_Url_host_find_public_suffix(const char *host) | |
720 | static const char *Url_host_find_public_suffix(const char *host) | |
721 | 721 | { |
722 | 722 | const char *s; |
723 | 723 | uint_t dots; |
752 | 752 | _MSG("public suffix of %s is %s\n", host, s); |
753 | 753 | return s; |
754 | 754 | } |
755 | ||
756 | bool_t a_Url_same_organization(const DilloUrl *u1, const DilloUrl *u2) | |
757 | { | |
758 | if (!u1 || !u2) | |
759 | return FALSE; | |
760 | ||
761 | return dStrcasecmp(Url_host_find_public_suffix(URL_HOST(u1)), | |
762 | Url_host_find_public_suffix(URL_HOST(u2))) ? FALSE :TRUE; | |
763 | } |
121 | 121 | char *a_Url_decode_hex_str(const char *str); |
122 | 122 | char *a_Url_encode_hex_str(const char *str); |
123 | 123 | char *a_Url_string_strip_delimiters(const char *str); |
124 | const char *a_Url_host_find_public_suffix(const char *host); | |
124 | bool_t a_Url_same_organization(const DilloUrl *u1, const DilloUrl *u2); | |
125 | 125 | #ifdef __cplusplus |
126 | 126 | } |
127 | 127 | #endif /* __cplusplus */ |
108 | 108 | /* |
109 | 109 | * Allocate and set safe values for a DilloWeb structure |
110 | 110 | */ |
111 | DilloWeb* a_Web_new(const DilloUrl *url, const DilloUrl *requester) | |
111 | DilloWeb* a_Web_new(BrowserWindow *bw, const DilloUrl *url, | |
112 | const DilloUrl *requester) | |
112 | 113 | { |
113 | 114 | DilloWeb *web= dNew(DilloWeb, 1); |
114 | 115 | |
115 | 116 | _MSG(" a_Web_new: ValidWebs ==> %d\n", dList_length(ValidWebs)); |
116 | 117 | web->url = a_Url_dup(url); |
117 | 118 | web->requester = a_Url_dup(requester); |
118 | web->bw = NULL; | |
119 | web->bw = bw; | |
119 | 120 | web->flags = 0; |
120 | 121 | web->Image = NULL; |
121 | 122 | web->filename = NULL; |
35 | 35 | }; |
36 | 36 | |
37 | 37 | void a_Web_init(void); |
38 | DilloWeb* a_Web_new (const DilloUrl* url, const DilloUrl *requester); | |
38 | DilloWeb* a_Web_new (BrowserWindow *bw, const DilloUrl* url, | |
39 | const DilloUrl *requester); | |
39 | 40 | int a_Web_valid(DilloWeb *web); |
40 | 41 | void a_Web_free (DilloWeb*); |
41 | 42 | int a_Web_dispatch_by_type (const char *Type, DilloWeb *web, |