Package list dillo / 5e27650
Imported Upstream version 3.0.1~rc1 Axel Beckert 10 years ago
41 changed file(s) with 662 addition(s) and 859 deletion(s). Raw diff Collapse all Expand all
00 =============================================================================
11 Dillo project
22 =============================================================================
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 -----------------------------------------------------------------------------
315
416 dillo-3.0 [September 06, 2011]
517
3535
3636 dillo-3.0, the first of the 3.x series is released.
3737
38 dillo-3.0.1, a bugfix release for the new 3.x series is out.
39
3840
3941 Jorge.-
4042 jcid@dillo.org
5858
5959 2.- Then dillo3:
6060
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
6363 ./configure; make
6464 sudo make install-strip
6565
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
22 # 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'
77
88 # This file is free software; you can redistribute it and/or modify it
99 # under the terms of the GNU General Public License as published by
5656
5757 Originally written by Per Bothner.
5858 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
6060 Software Foundation, Inc.
6161
6262 This is free software; see the source for copying conditions. There is NO
180180 fi
181181 ;;
182182 *)
183 os=netbsd
183 os=netbsd
184184 ;;
185185 esac
186186 # The OS release
223223 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
224224 ;;
225225 *5.*)
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
226 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
227227 ;;
228228 esac
229229 # According to Compaq, /usr/sbin/psrinfo has been available on
269269 # A Xn.n version is an unreleased experimental baselevel.
270270 # 1.2 uses "1.2" for uname -r.
271271 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 ;;
276273 Alpha\ *:Windows_NT*:*)
277274 # How do we know it's Interix rather than the generic POSIX subsystem?
278275 # Should we change UNAME_MACHINE based on the output of uname instead
298295 echo s390-ibm-zvmoe
299296 exit ;;
300297 *:OS400:*:*)
301 echo powerpc-ibm-os400
298 echo powerpc-ibm-os400
302299 exit ;;
303300 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
304301 echo arm-acorn-riscix${UNAME_RELEASE}
397394 # MiNT. But MiNT is downward compatible to TOS, so this should
398395 # be no problem.
399396 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
400 echo m68k-atari-mint${UNAME_RELEASE}
397 echo m68k-atari-mint${UNAME_RELEASE}
401398 exit ;;
402399 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
403400 echo m68k-atari-mint${UNAME_RELEASE}
404 exit ;;
401 exit ;;
405402 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
406 echo m68k-atari-mint${UNAME_RELEASE}
403 echo m68k-atari-mint${UNAME_RELEASE}
407404 exit ;;
408405 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
409 echo m68k-milan-mint${UNAME_RELEASE}
410 exit ;;
406 echo m68k-milan-mint${UNAME_RELEASE}
407 exit ;;
411408 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
412 echo m68k-hades-mint${UNAME_RELEASE}
413 exit ;;
409 echo m68k-hades-mint${UNAME_RELEASE}
410 exit ;;
414411 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
415 echo m68k-unknown-mint${UNAME_RELEASE}
416 exit ;;
412 echo m68k-unknown-mint${UNAME_RELEASE}
413 exit ;;
417414 m68k:machten:*:*)
418415 echo m68k-apple-machten${UNAME_RELEASE}
419416 exit ;;
483480 echo m88k-motorola-sysv3
484481 exit ;;
485482 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`
488485 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
489486 then
490487 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
497494 else
498495 echo i586-dg-dgux${UNAME_RELEASE}
499496 fi
500 exit ;;
497 exit ;;
501498 M88*:DolphinOS:*:*) # DolphinOS (SVR3)
502499 echo m88k-dolphin-sysv3
503500 exit ;;
554551 echo rs6000-ibm-aix3.2
555552 fi
556553 exit ;;
557 *:AIX:*:[4567])
554 *:AIX:*:[456])
558555 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
559556 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
560557 IBM_ARCH=rs6000
597594 9000/[678][0-9][0-9])
598595 if [ -x /usr/bin/getconf ]; then
599596 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" ;;
608605 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
609 esac ;;
610 esac
606 esac ;;
607 esac
611608 fi
612609 if [ "${HP_ARCH}" = "" ]; then
613610 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 }
646643 EOF
647644 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
648645 test -z "$HP_ARCH" && HP_ARCH=hppa
733730 exit ;;
734731 C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
735732 echo c1-convex-bsd
736 exit ;;
733 exit ;;
737734 C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
738735 if getsysinfo -f scalar_acc
739736 then echo c32-convex-bsd
740737 else echo c2-convex-bsd
741738 fi
742 exit ;;
739 exit ;;
743740 C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
744741 echo c34-convex-bsd
745 exit ;;
742 exit ;;
746743 C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
747744 echo c38-convex-bsd
748 exit ;;
745 exit ;;
749746 C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
750747 echo c4-convex-bsd
751 exit ;;
748 exit ;;
752749 CRAY*Y-MP:*:*:*)
753750 echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
754751 exit ;;
772769 exit ;;
773770 F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
774771 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 ;;
779776 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}"
783780 exit ;;
784781 i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
785782 echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
807804 echo ${UNAME_MACHINE}-pc-mingw32
808805 exit ;;
809806 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
812809 exit ;;
813810 i*:PW*:*)
814811 echo ${UNAME_MACHINE}-pc-pw32
815812 exit ;;
816813 *:Interix*:*)
817 case ${UNAME_MACHINE} in
814 case ${UNAME_MACHINE} in
818815 x86)
819816 echo i586-pc-interix${UNAME_RELEASE}
820817 exit ;;
869866 EV6) UNAME_MACHINE=alphaev6 ;;
870867 EV67) UNAME_MACHINE=alphaev67 ;;
871868 EV68*) UNAME_MACHINE=alphaev68 ;;
872 esac
869 esac
873870 objdump --private-headers /bin/sh | grep -q ld.so.1
874871 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
875872 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
881878 then
882879 echo ${UNAME_MACHINE}-unknown-linux-gnu
883880 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
891882 fi
892883 exit ;;
893884 avr32*:Linux:*:*)
900891 echo crisv32-axis-linux-gnu
901892 exit ;;
902893 frv:Linux:*:*)
903 echo frv-unknown-linux-gnu
894 echo frv-unknown-linux-gnu
904895 exit ;;
905896 i*86:Linux:*:*)
906897 LIBC=gnu
968959 echo ${UNAME_MACHINE}-ibm-linux
969960 exit ;;
970961 sh64*:Linux:*:*)
971 echo ${UNAME_MACHINE}-unknown-linux-gnu
962 echo ${UNAME_MACHINE}-unknown-linux-gnu
972963 exit ;;
973964 sh*:Linux:*:*)
974965 echo ${UNAME_MACHINE}-unknown-linux-gnu
976967 sparc:Linux:*:* | sparc64:Linux:*:*)
977968 echo ${UNAME_MACHINE}-unknown-linux-gnu
978969 exit ;;
979 tile*:Linux:*:*)
980 echo ${UNAME_MACHINE}-tilera-linux-gnu
981 exit ;;
982970 vax:Linux:*:*)
983971 echo ${UNAME_MACHINE}-dec-linux-gnu
984972 exit ;;
986974 echo x86_64-unknown-linux-gnu
987975 exit ;;
988976 xtensa*:Linux:*:*)
989 echo ${UNAME_MACHINE}-unknown-linux-gnu
977 echo ${UNAME_MACHINE}-unknown-linux-gnu
990978 exit ;;
991979 i*86:DYNIX/ptx:4*:*)
992980 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
995983 echo i386-sequent-sysv4
996984 exit ;;
997985 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,
1001989 # I just have to hope. -- rms.
1002 # Use sysv4.2uw... so that sysv4* matches it.
990 # Use sysv4.2uw... so that sysv4* matches it.
1003991 echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
1004992 exit ;;
1005993 i*86:OS/2:*:*)
10311019 fi
10321020 exit ;;
10331021 i*86:*:5:[678]*)
1034 # UnixWare 7.x, OpenUNIX and OpenServer 6.
1022 # UnixWare 7.x, OpenUNIX and OpenServer 6.
10351023 case `/bin/uname -X | grep "^Machine"` in
10361024 *486*) UNAME_MACHINE=i486 ;;
10371025 *Pentium) UNAME_MACHINE=i586 ;;
10591047 exit ;;
10601048 pc:*:*:*)
10611049 # 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.
10641052 # Note: whatever this is, it MUST be the same as what config.sub
10651053 # prints for the "djgpp" host, or else GDB configury will decide that
10661054 # this is a cross-build.
10671055 echo i586-pc-msdosdjgpp
1068 exit ;;
1056 exit ;;
10691057 Intel:Mach:3*:*)
10701058 echo i386-pc-mach3
10711059 exit ;;
11001088 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
11011089 && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
11021090 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; } ;;
11051093 NCR*:*:4.2:* | MPRAS*:*:4.2:*)
11061094 OS_REL='.3'
11071095 test -r /etc/.relid \
11441132 echo ns32k-sni-sysv
11451133 fi
11461134 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 ;;
11511139 *:UNIX_System_V:4*:FTX*)
11521140 # From Gerald Hewes <hewes@openmarket.com>.
11531141 # How about differentiating between stratus architectures? -djm
11731161 exit ;;
11741162 R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
11751163 if [ -d /usr/nec ]; then
1176 echo mips-nec-sysv${UNAME_RELEASE}
1164 echo mips-nec-sysv${UNAME_RELEASE}
11771165 else
1178 echo mips-unknown-sysv${UNAME_RELEASE}
1179 fi
1180 exit ;;
1166 echo mips-unknown-sysv${UNAME_RELEASE}
1167 fi
1168 exit ;;
11811169 BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
11821170 echo powerpc-be-beos
11831171 exit ;;
12421230 *:QNX:*:4*)
12431231 echo i386-pc-qnx
12441232 exit ;;
1245 NEO-?:NONSTOP_KERNEL:*:*)
1246 echo neo-tandem-nsk${UNAME_RELEASE}
1247 exit ;;
12481233 NSE-?:NONSTOP_KERNEL:*:*)
12491234 echo nse-tandem-nsk${UNAME_RELEASE}
12501235 exit ;;
12901275 echo pdp10-unknown-its
12911276 exit ;;
12921277 SEI:*:*:SEIUX)
1293 echo mips-sei-seiux${UNAME_RELEASE}
1278 echo mips-sei-seiux${UNAME_RELEASE}
12941279 exit ;;
12951280 *:DragonFly:*:*)
12961281 echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
12971282 exit ;;
12981283 *:*VMS:*:*)
1299 UNAME_MACHINE=`(uname -p) 2>/dev/null`
1284 UNAME_MACHINE=`(uname -p) 2>/dev/null`
13001285 case "${UNAME_MACHINE}" in
13011286 A*) echo alpha-dec-vms ; exit ;;
13021287 I*) echo ia64-dec-vms ; exit ;;
13361321 #include <sys/param.h>
13371322 printf ("m68k-sony-newsos%s\n",
13381323 #ifdef NEWSOS4
1339 "4"
1324 "4"
13401325 #else
1341 ""
1342 #endif
1343 ); exit (0);
1326 ""
1327 #endif
1328 ); exit (0);
13441329 #endif
13451330 #endif
13461331
00 #! /bin/sh
11 # Configuration validation subroutine script.
22 # 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'
77
88 # This file is (in principle) common to ALL GNU software.
99 # The presence of a machine in this file suggests that SOME GNU software
7575 GNU config.sub ($timestamp)
7676
7777 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
7979 Software Foundation, Inc.
8080
8181 This is free software; see the source for copying conditions. There is NO
123123 # Here we must recognize all the valid KERNEL-OS combinations.
124124 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
125125 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* | \
129128 kopensolaris*-gnu* | \
130129 storm-chaos* | os2-emx* | rtmk-nova*)
131130 os=-$maybe_os
157156 os=
158157 basic_machine=$1
159158 ;;
160 -bluegene*)
161 os=-cnk
159 -bluegene*)
160 os=-cnk
162161 ;;
163162 -sim | -cisco | -oki | -wec | -winbond)
164163 os=
174173 os=-chorusos
175174 basic_machine=$1
176175 ;;
177 -chorusrdb)
178 os=-chorusrdb
176 -chorusrdb)
177 os=-chorusrdb
179178 basic_machine=$1
180 ;;
179 ;;
181180 -hiux*)
182181 os=-hiuxwe2
183182 ;;
282281 | moxie \
283282 | mt \
284283 | msp430 \
285 | nds32 | nds32le | nds32be \
286284 | nios | nios2 \
287285 | ns16k | ns32k \
288 | open8 \
289286 | or32 \
290287 | pdp10 | pdp11 | pj | pjl \
291 | powerpc | powerpc64 | powerpc64le | powerpcle \
288 | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
292289 | pyramid \
293290 | rx \
294291 | score \
296293 | sh64 | sh64le \
297294 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
298295 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
299 | spu \
300 | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
296 | spu | strongarm \
297 | tahoe | thumb | tic4x | tic80 | tron \
301298 | ubicom32 \
302299 | v850 | v850e \
303300 | we32k \
304 | x86 | xc16x | xstormy16 | xtensa \
301 | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
305302 | z8k | z80)
306303 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
316304 ;;
317305 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
318306 # Motorola 68HC11/12.
323311 ;;
324312 ms1)
325313 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
338314 ;;
339315
340316 # We use `pc' rather than `unknown'
357333 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
358334 | avr-* | avr32-* \
359335 | bfin-* | bs2000-* \
360 | c[123]* | c30-* | [cjt]90-* | c4x-* \
336 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
361337 | clipper-* | craynv-* | cydra-* \
362338 | d10v-* | d30v-* | dlx-* \
363339 | elxsi-* \
391367 | mmix-* \
392368 | mt-* \
393369 | msp430-* \
394 | nds32-* | nds32le-* | nds32be-* \
395370 | nios-* | nios2-* \
396371 | none-* | np1-* | ns16k-* | ns32k-* \
397 | open8-* \
398372 | orion-* \
399373 | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
400 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
374 | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
401375 | pyramid-* \
402376 | romp-* | rs6000-* | rx-* \
403377 | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
404378 | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
405379 | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
406380 | 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-* \
411384 | tron-* \
412385 | ubicom32-* \
413386 | v850-* | v850e-* | vax-* \
414387 | we32k-* \
415 | x86-* | x86_64-* | xc16x-* | xps100-* \
388 | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
416389 | xstormy16-* | xtensa*-* \
417390 | ymp-* \
418391 | z8k-* | z80-*)
437410 basic_machine=a29k-amd
438411 os=-udi
439412 ;;
440 abacus)
413 abacus)
441414 basic_machine=abacus-unknown
442415 ;;
443416 adobe68k)
507480 basic_machine=powerpc-ibm
508481 os=-cnk
509482 ;;
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 ;;
519483 c90)
520484 basic_machine=c90-cray
521485 os=-unicos
522486 ;;
523 cegcc)
487 cegcc)
524488 basic_machine=arm-unknown
525489 os=-cegcc
526490 ;;
552516 basic_machine=craynv-cray
553517 os=-unicosmp
554518 ;;
555 cr16 | cr16-*)
519 cr16)
556520 basic_machine=cr16-unknown
557521 os=-elf
558522 ;;
768732 basic_machine=ns32k-utek
769733 os=-sysv
770734 ;;
771 microblaze)
735 microblaze)
772736 basic_machine=microblaze-xilinx
773737 ;;
774738 mingw32)
875839 np1)
876840 basic_machine=np1-gould
877841 ;;
878 neo-tandem)
879 basic_machine=neo-tandem
880 ;;
881 nse-tandem)
882 basic_machine=nse-tandem
883 ;;
884842 nsr-tandem)
885843 basic_machine=nsr-tandem
886844 ;;
963921 ;;
964922 power) basic_machine=power-ibm
965923 ;;
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/^[^-]*-//'`
970927 ;;
971928 ppcle | powerpclittle | ppc-le | powerpc-little)
972929 basic_machine=powerpcle-unknown
10601017 basic_machine=i860-stratus
10611018 os=-sysv4
10621019 ;;
1063 strongarm-* | thumb-*)
1064 basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
1065 ;;
10661020 sun2)
10671021 basic_machine=m68000-sun
10681022 ;;
11191073 basic_machine=t90-cray
11201074 os=-unicos
11211075 ;;
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
11261087 ;;
11271088 tile*)
11281089 basic_machine=tile-unknown
11941155 ;;
11951156 xps | xps100)
11961157 basic_machine=xps100-honeywell
1197 ;;
1198 xscale-* | xscalee[bl]-*)
1199 basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
12001158 ;;
12011159 ymp)
12021160 basic_machine=ymp-cray
12951253 if [ x"$os" != x"" ]
12961254 then
12971255 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.
13001258 # -solaris* is a basic system type, with this one exception.
1301 -auroraux)
1302 os=-auroraux
1259 -auroraux)
1260 os=-auroraux
13031261 ;;
13041262 -solaris1 | -solaris1.*)
13051263 os=`echo $os | sed -e 's|solaris1|sunos4|'`
13361294 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
13371295 | -chorusos* | -chorusrdb* | -cegcc* \
13381296 | -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* \
13411298 | -uxpv* | -beos* | -mpeix* | -udk* \
13421299 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
13431300 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
13841341 -opened*)
13851342 os=-openedition
13861343 ;;
1387 -os400*)
1344 -os400*)
13881345 os=-os400
13891346 ;;
13901347 -wince*)
14331390 -sinix*)
14341391 os=-sysv4
14351392 ;;
1436 -tpf*)
1393 -tpf*)
14371394 os=-tpf
14381395 ;;
14391396 -triton*)
14781435 -dicos*)
14791436 os=-dicos
14801437 ;;
1481 -nacl*)
1482 ;;
1438 -nacl*)
1439 ;;
14831440 -none)
14841441 ;;
14851442 *)
15021459 # system, and we'll never get to this point.
15031460
15041461 case $basic_machine in
1505 score-*)
1462 score-*)
15061463 os=-elf
15071464 ;;
1508 spu-*)
1465 spu-*)
15091466 os=-elf
15101467 ;;
15111468 *-acorn)
15171474 arm*-semi)
15181475 os=-aout
15191476 ;;
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
15311479 ;;
15321480 # This must come before the *-dec entry.
15331481 pdp10-*)
15541502 m68*-cisco)
15551503 os=-aout
15561504 ;;
1557 mep-*)
1505 mep-*)
15581506 os=-elf
15591507 ;;
15601508 mips*-cisco)
15811529 *-ibm)
15821530 os=-aix
15831531 ;;
1584 *-knuth)
1532 *-knuth)
15851533 os=-mmixware
15861534 ;;
15871535 *-wec)
00 #! /bin/sh
11 # 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.
33 #
44 #
55 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
556556 # Identity of this package.
557557 PACKAGE_NAME='dillo'
558558 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'
561561 PACKAGE_BUGREPORT=''
562562 PACKAGE_URL=''
563563
12861286 # Omit some internal or obsolete options to make the list less imposing.
12871287 # This message is too long to be a string in the A/UX 3.1 sh.
12881288 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.
12901290
12911291 Usage: $0 [OPTION]... [VAR=VALUE]...
12921292
13571357
13581358 if test -n "$ac_init_help"; then
13591359 case $ac_init_help in
1360 short | recursive ) echo "Configuration of dillo 3.0:";;
1360 short | recursive ) echo "Configuration of dillo 3.0.1:";;
13611361 esac
13621362 cat <<\_ACEOF
13631363
14631463 test -n "$ac_init_help" && exit $ac_status
14641464 if $ac_init_version; then
14651465 cat <<\_ACEOF
1466 dillo configure 3.0
1466 dillo configure 3.0.1
14671467 generated by GNU Autoconf 2.68
14681468
14691469 Copyright (C) 2010 Free Software Foundation, Inc.
21712171 This file contains any messages produced by compilers while
21722172 running configure, to aid debugging if configure makes a mistake.
21732173
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
21752175 generated by GNU Autoconf 2.68. Invocation command line was
21762176
21772177 $ $0 $@
30983098
30993099 # Define the identity of the package.
31003100 PACKAGE='dillo'
3101 VERSION='3.0'
3101 VERSION='3.0.1'
31023102
31033103
31043104 cat >>confdefs.h <<_ACEOF
69836983 # report actual input values of CONFIG_FILES etc. instead of their
69846984 # values after options handling.
69856985 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
69876987 generated by GNU Autoconf 2.68. Invocation command line was
69886988
69896989 CONFIG_FILES = $CONFIG_FILES
70497049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70507050 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
70517051 ac_cs_version="\\
7052 dillo config.status 3.0
7052 dillo config.status 3.0.1
70537053 configured by $0, generated by GNU Autoconf 2.68,
70547054 with options \\"\$ac_cs_config\\"
70557055
00 dnl Process this file with aclocal, autoconf and automake.
11
2 AC_INIT([dillo], [3.0])
2 AC_INIT([dillo], [3.0.1])
33
44 dnl Detect the canonical target build environment
55 AC_CANONICAL_TARGET
188188 #-------------------------------------------------------------------------
189189 # USER INTERFACE SECTION
190190 #-------------------------------------------------------------------------
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
191200
192201 # Size of dillo panel
193202 # tiny : buttons, location, and progress boxes in one row
241250 # You can hold SHIFT to temporarily revert this behaviour.
242251 #focus_new_tab=YES
243252
253 # Ask before quitting Dillo with more than one window or tab open.
254 #show_quit_dialog=YES
244255
245256 #-------------------------------------------------------------------------
246257 # DEBUG MESSAGES SECTION
00 README: Last update Jul 2009
11
22 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
44
55 --------------------------------------------------------------------------
66
10361036
10371037 if (tld_len > 0) {
10381038 /* 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
10401040 * them to describe the situation by beginning with a "*.[tld]" rule.
10411041 */
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",
10441044 "il","jm","ke","kh","kw","ml","mm","mt",
10451045 "mz","ni","np","nz","om","pg","py","qa",
10461046 "sv","tr","uk","uy","ve","ye","yu","za",
12811281 str = cookie_dstring->str;
12821282 dStr_free(cookie_dstring, FALSE);
12831283
1284 if (*str)
1284 if (*str) {
1285 MSG("%s GETTING: %s", url_host, str);
12851286 cookies_use_counter++;
1286
1287 MSG("%s GETTING: %s\n", url_host, str);
1287 }
12881288 return str;
12891289 }
12901290
508508 // Make room...
509509 if (log_len + esc_len >= log_max) {
510510 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);
512512 log_text[log_len] = 0;
513513 prTitle->tooltip(log_text);
514514 }
11561156 // Disable '@' and '&' interpretation in normal labels.
11571157 Fl::set_labeltype(FL_NORMAL_LABEL, custLabelDraw, custLabelMeasure);
11581158
1159 Fl::scheme(NULL);
1160
11591161 // Create the download window
11601162 dl_win = new DLWin(ww, wh);
11611163
231231 {
232232 this->color = color;
233233
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;
238242 }
239243
240244 FltkColor::~FltkColor ()
300304 Fl_Box *b = new Fl_Box(0,0,100,24);
301305 b->box(FL_BORDER_BOX);
302306 b->color(fl_color_cube(FL_NUM_RED-1, FL_NUM_GREEN-1, FL_NUM_BLUE-2));
307 b->labelcolor(FL_BLACK);
303308 b->labelfont(FL_HELVETICA);
304309 b->labelsize(14);
305310 b->align(FL_ALIGN_WRAP|FL_ALIGN_LEFT|FL_ALIGN_INSIDE);
405405 scroll (0, -h () + vscrollbar->linesize ());
406406 } else if (cmd == core::SCREEN_DOWN_CMD) {
407407 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);
408412 } else if (cmd == core::LINE_UP_CMD) {
409413 scroll (0, (int) -vscrollbar->linesize ());
410414 } else if (cmd == core::LINE_DOWN_CMD) {
3131 VPOS_NO_CHANGE
3232 };
3333
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,
3536 LEFT_CMD, RIGHT_CMD, TOP_CMD, BOTTOM_CMD};
3637
3738 /*
00 #!/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 #
16 # 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.
3520 #
3621 # Calling this script install-sh is preferred over install.sh, to prevent
3722 # `make' implicit rules from creating a file called install from it
4025 # This script is compatible with the BSD install script, but was written
4126 # from scratch.
4227
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='
44187 '
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
55215 fi
56216
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
329228 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
1717 void a_Http_set_proxy_passwd(const char *str);
1818 char *a_Http_make_connect_str(const DilloUrl *url);
1919 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);
2122
2223 void a_Http_ccc (int Op, int Branch, int Dir, ChainLink *Info,
2324 void *Data1, void *Data2);
124124 " <tr>\n"
125125 " <td>&nbsp;&nbsp;\n"
126126 " <td>\n"
127 " <a href='http://www.mathaba.net/'>Mathaba</a>\n"
128 " <tr>\n"
129 " <tr>\n"
130 " <td>&nbsp;&nbsp;\n"
131 " <td>\n"
132127 " <a href='http://www.commondreams.org/'>C.&nbsp;Dreams</a>\n"
133128 " <tr>\n"
134129 " <td>&nbsp;&nbsp;\n"
238233 "<tr>\n"
239234 " <td bgcolor='#CCCCCC'>\n"
240235 " <h4>Release overview</h4>\n"
241 " September 06, 2011\n"
236 " September 21, 2011\n"
242237 "<tr>\n"
243238 " <td bgcolor='#FFFFFF'>\n"
244239 " <table border='0' cellspacing='0' cellpadding='5'>\n"
245240 " <tr>\n"
246241 " <td>\n"
247242 "<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"
249247 "<a href='http://fltk.org/articles.php?L1086'>released</a>\n"
250248 "in June, clearing the way for Dillo to return to those distributions\n"
251249 "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"
254250 "<p>\n"
255251 "After this release, the core team will focus on implementing the CSS\n"
256252 "feature of floating elements. This will <em>greatly</em> improve dillo's\n"
278274 " <table border='0' cellspacing='0' cellpadding='5'>\n"
279275 " <tr>\n"
280276 " <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"
281286 "<ul>\n"
282287 "<li>Ported Dillo to FLTK-1.3.\n"
283288 "<li>Native build on OSX.\n"
270270 /*
271271 * Make the http query string
272272 */
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)
274275 {
275276 const char *auth;
276277 char *ptr, *cookies, *referer;
295296 (URL_PATH_(url) || URL_QUERY_(url)) ? "" : "/");
296297 }
297298
298 cookies = a_Cookies_get_query(url);
299 cookies = a_Cookies_get_query(url, requester);
299300 auth = a_Auth_get_auth_str(url);
300301 referer = Http_get_referer(url);
301302 if (URL_FLAGS(url) & URL_Post) {
364365 DataBuf *dbuf;
365366
366367 /* 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);
368370 dbuf = a_Chain_dbuf_new(query->str, query->len, 0);
369371
370372 /* actually this message is sent too early.
741741
742742 #ifndef DISABLE_COOKIES
743743 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
747764 for (i = 0; (data = dList_nth_data(Cookies, i)); ++i)
748765 dFree(data);
749766 dList_free(Cookies);
750 dFree(server_date);
751767 }
752768 #endif /* !DISABLE_COOKIES */
753769
299299 if (strcmp(server, "proto.https") == 0) {
300300 /* Let's be kind and make the HTTP query string for the dpi */
301301 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);
303303 /* BUG: embedded NULLs in query data will truncate message */
304304
305305 /* BUG: WORKAROUND: request to only check the root URL's certificate.
384384 case PREFS_FILTER_SAME_DOMAIN:
385385 {
386386 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);
390388 if (want_host[0] == '\0') {
391389 ret = (req_host[0] == '\0' ||
392390 !dStrcasecmp(URL_SCHEME(wanted), "data")) ? TRUE : FALSE;
394392 /* This will regard "www.dillo.org" and "www.dillo.org." as
395393 * different, but it doesn't seem worth caring about.
396394 */
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 }
405401 break;
406402 }
407403 case PREFS_FILTER_ALLOW_ALL:
178178 /*
179179 * Return a string containing cookie data for an HTTP query.
180180 */
181 char *a_Cookies_get_query(const DilloUrl *request_url)
181 char *a_Cookies_get_query(const DilloUrl *query_url, const DilloUrl *requester)
182182 {
183183 char *cmd, *dpip_tag, *query;
184184 const char *path;
187187 if (disabled)
188188 return dStrdup("");
189189
190 action = Cookies_control_check(request_url);
190 action = Cookies_control_check(query_url);
191191 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));
193193 return dStrdup("");
194194 }
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);
196205
197206 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 : "/");
200209
201210 /* Get the answer from cookies.dpi */
202211 _MSG("cookies.c: a_Dpi_send_blocking_cmd cmd = {%s}\n", cmd);
66
77
88 #ifdef DISABLE_COOKIES
9 # define a_Cookies_get_query(url) dStrdup("")
9 # define a_Cookies_get_query(url, requester) dStrdup("")
1010 # define a_Cookies_set() ;
1111 # define a_Cookies_init() ;
1212 # define a_Cookies_freeall() ;
1313 #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);
1516 void a_Cookies_set(Dlist *cookie_string, const DilloUrl *set_url,
1617 const char *server_date);
1718 void a_Cookies_init( void );
364364 // Sets WM_CLASS hint on X11
365365 Fl_Window::default_xclass("dillo");
366366
367 Fl::scheme(prefs.theme);
368
367369 if (!prefs.show_tooltip) {
368370 // turn off UI tooltips
369371 Fl::option(Fl::OPTION_SHOW_TOOLTIPS, false);
21372137 DilloWeb *Web;
21382138 int ClientKey;
21392139 /* 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);
21422141 Web->Image = Image;
21432142 a_Image_ref(Image);
21442143 Web->flags |= WEB_Image;
29662965 } else {
29672966 /* Fill a Web structure for the cache query */
29682967 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);
29712969 if ((ClientKey = a_Capi_open_url(Web, Html_css_load_callback, NULL))) {
29722970 ++html->bw->NumPendingStyleSheets;
29732971 a_Bw_add_client(html->bw, ClientKey, 0);
123123 { "screen-up" , KEYS_SCREEN_UP , 0 , 'b' },
124124 { "screen-down" , KEYS_SCREEN_DOWN , 0 , FL_Page_Down },
125125 { "screen-down" , KEYS_SCREEN_DOWN , 0 , ' ' },
126 { "screen-left" , KEYS_SCREEN_LEFT , 0 , 0 },
127 { "screen-right" , KEYS_SCREEN_RIGHT , 0 , 0 },
126128 { "line-up" , KEYS_LINE_UP , 0 , FL_Up },
127129 { "line-down" , KEYS_LINE_DOWN , 0 , FL_Down },
128130 { "left" , KEYS_LEFT , 0 , FL_Left },
3838 KEYS_HOME,
3939 KEYS_SCREEN_UP,
4040 KEYS_SCREEN_DOWN,
41 KEYS_SCREEN_LEFT,
42 KEYS_SCREEN_RIGHT,
4143 KEYS_LINE_UP,
4244 KEYS_LINE_DOWN,
4345 KEYS_LEFT,
8888 #pagedown = screen-down
8989 #space = screen-down
9090
91 #(screen-left has no default binding)
92
93 #(screen-right has no default binding)
94
9195 #up = line-up
9296
9397 #down = line-down
527527 *
528528 * direction: {backward = -1, forward = 1}
529529 */
530 void a_Menu_history_popup(BrowserWindow *bw, int direction)
530 void a_Menu_history_popup(BrowserWindow *bw, int x, int y, int direction)
531531 {
532532 static Fl_Menu_Item *pm = 0;
533533 int i, n;
534534
535535 popup_bw = bw;
536 popup_x = Fl::event_x();
537 popup_y = Fl::event_y();
536 popup_x = x;
537 popup_y = y;
538538 history_direction = direction;
539539
540540 // TODO: hook popdown event with delete or similar.
615615 /*
616616 * Tools popup menu (construction & popup)
617617 */
618 void a_Menu_tools_popup(BrowserWindow *bw, void *v_wid)
618 void a_Menu_tools_popup(BrowserWindow *bw, int x, int y)
619619 {
620620 const Fl_Menu_Item *item;
621 Fl_Widget *wid = (Fl_Widget*)v_wid;
622621 UI *ui = (UI*)bw->ui;
623622
624623 static Fl_Menu_Item pm[] = {
651650 pm[4+cur_panelsize].setonly();
652651 cur_smallicons ? pm[7].set() : pm[7].clear();
653652
654 item = pm->popup(wid->x(), wid->y() + wid->h());
653 item = pm->popup(x, y);
655654 if (item) {
656655 ((Fl_Widget *)item)->do_callback();
657656 }
1616 void *vform, bool_t showing_hiddens);
1717 void a_Menu_file_popup(BrowserWindow *bw, void *v_wid);
1818 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);
2121
2222
2323 #ifdef __cplusplus
231231
232232 // a_Menu_pagemarks_new(bw);
233233
234 Web = a_Web_new(url, requester);
235 Web->bw = bw;
234 Web = a_Web_new(bw, url, requester);
236235 Web->flags |= WEB_RootUrl;
237236 if ((ClientKey = a_Capi_open_url(Web, NULL, NULL)) != 0) {
238237 a_Bw_add_client(bw, ClientKey, 1);
565564 void a_Nav_save_url(BrowserWindow *bw,
566565 const DilloUrl *url, const char *filename)
567566 {
568 DilloWeb *Web = a_Web_new(url, NULL);
569 Web->bw = bw;
567 DilloWeb *Web = a_Web_new(bw, url, NULL);
570568 Web->filename = dStrdup(filename);
571569 Web->flags |= WEB_Download;
572570 /* TODO: keep track of this client */
818818 " ",
819819 " ",
820820 " .XXo. ",
821 " oO $$+. ",
821 " oO$$$+. ",
822822 " oo@$$$@# ",
823823 " #o@$$$O# ",
824824 " #X$$$$%X ",
825 " &#% #X$$$@o ",
825 " &# #X$$$@o ",
826826 " #*o =-@$$$# ",
827827 " oO*o #$@$$$$# ",
828828 " oOOOX oO@;$$$$X ",
14251425 " p*45<Xg ",
14261426 " h.>885oa ",
14271427 " p.3883Xg ",
1428 " i$O s$488;s ",
1428 " $O s$488;s ",
14291429 " O>1p e;588;a ",
14301430 " O331sr;7778:s ",
14311431 " O343,**3678;a ",
1432 " f,643;#%368:s ",
1432 " O,643;#%368:s ",
14331433 " t<64>= &374f ",
14341434 " t244>= &379ih",
14351435 " d@:;=& &475u",
15381538 "D c #000000",
15391539 "E c #000000",
15401540 "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 ",
15511551 " 44 ",
15521552 " ",
1553 " 5445 ",
1553 " 44 ",
15541554 " 4764 ",
15551555 " 4674 ",
1556 " 5445 "};
1556 " 44 "};
15571557
15581558 /* XPM */
15591559 static const char *const full_screen_on_xpm[] = {
2222 #define PREFS_SAVE_DIR "/tmp/"
2323 #define PREFS_HTTP_REFERER "host"
2424 #define PREFS_HTTP_USER_AGENT "Dillo/" VERSION
25 #define PREFS_THEME "none"
2526
2627 /*-----------------------------------------------------------------------------
2728 * Global Data
8889 prefs.show_home = TRUE;
8990 prefs.show_msg = TRUE;
9091 prefs.show_progress_box = TRUE;
92 prefs.show_quit_dialog = TRUE;
9193 prefs.show_reload = TRUE;
9294 prefs.show_save = TRUE;
9395 prefs.show_search = TRUE;
9799 prefs.show_url = TRUE;
98100 prefs.small_icons = FALSE;
99101 prefs.start_page = a_Url_new(PREFS_START_PAGE, NULL);
102 prefs.theme = dStrdup(PREFS_THEME);
100103 prefs.w3c_plus_heuristics = TRUE;
101104 }
102105
125128 dFree(dList_nth_data(prefs.search_urls, i));
126129 dList_free(prefs.search_urls);
127130 a_Url_free(prefs.start_page);
131 dFree(prefs.theme);
128132 }
4848 int32_t bg_color;
4949 bool_t contrast_visited_color;
5050 bool_t show_tooltip;
51 char *theme;
5152 int panel_size;
5253 bool_t small_icons;
5354 bool_t limit_text_width;
7071 bool_t show_search;
7172 bool_t show_help;
7273 bool_t show_progress_box;
74 bool_t show_quit_dialog;
7375 bool_t fullwindow_start;
7476 bool_t load_images;
7577 bool_t load_stylesheets;
9797 { "show_home", &prefs.show_home, PREFS_BOOL },
9898 { "show_msg", &prefs.show_msg, PREFS_BOOL },
9999 { "show_progress_box", &prefs.show_progress_box, PREFS_BOOL },
100 { "show_quit_dialog", &prefs.show_quit_dialog, PREFS_BOOL },
100101 { "show_reload", &prefs.show_reload, PREFS_BOOL },
101102 { "show_save", &prefs.show_save, PREFS_BOOL },
102103 { "show_search", &prefs.show_search, PREFS_BOOL },
106107 { "show_url", &prefs.show_url, PREFS_BOOL },
107108 { "small_icons", &prefs.small_icons, PREFS_BOOL },
108109 { "start_page", &prefs.start_page, PREFS_URL },
110 { "theme", &prefs.theme, PREFS_STRING },
109111 { "w3c_plus_heuristics", &prefs.w3c_plus_heuristics, PREFS_BOOL }
110112 };
111113
129131 break;
130132 case PREFS_COLOR:
131133 *(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);
132136 break;
133137 case PREFS_STRING:
134138 dFree(*(char **)node->pref);
304304 if (b == FL_LEFT_MOUSE) {
305305 a_UIcmd_back(a_UIcmd_get_bw_by_widget(wid));
306306 } 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());
308309 }
309310 break;
310311 case UI_FORW:
311312 if (b == FL_LEFT_MOUSE) {
312313 a_UIcmd_forw(a_UIcmd_get_bw_by_widget(wid));
313314 } 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());
315317 }
316318 break;
317319 case UI_HOME:
341343 break;
342344 case UI_TOOLS:
343345 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());
345348 }
346349 break;
347350 default:
713716 if (cmd == KEYS_NOP) {
714717 // Do nothing
715718 } else if (cmd == KEYS_SCREEN_UP || cmd == KEYS_SCREEN_DOWN ||
719 cmd == KEYS_SCREEN_LEFT || cmd == KEYS_SCREEN_RIGHT ||
716720 cmd == KEYS_LINE_UP || cmd == KEYS_LINE_DOWN ||
717721 cmd == KEYS_LEFT || cmd == KEYS_RIGHT ||
718722 cmd == KEYS_TOP || cmd == KEYS_BOTTOM) {
106106 Fl_Group(0,0,ww,th,lbl) {
107107 Pack = NULL;
108108 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;
110110 resize(0,0,ww,ctab_h);
111111 /* tab buttons go inside a pack within a scroll */
112112 Scroll = new Fl_Scroll(0,0,ww-ctl_w,ctab_h);
122122 /* control buttons go inside a group */
123123 Control = new Fl_Group(ww-ctl_w,0,ctl_w,ctab_h);
124124 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);
126126 CloseBtn->labelcolor(0x00641000);
127127 CloseBtn->hl_color(FL_WHITE);
128128 CloseBtn->clear_visible_focus();
251251 btn->labelsize(btn->labelsize()-2);
252252 btn->copy_label(DEFAULT_TAB_LABEL);
253253 btn->clear_visible_focus();
254 btn->box(FL_PLASTIC_ROUND_UP_BOX);
254 btn->box(FL_GTK_THIN_UP_BOX);
255255 btn->color(focus ? tabcolor_active : tabcolor_inactive);
256256 btn->ui(new_ui);
257257 btn->callback(tab_btn_cb, this);
432432 CustTabs *tabs = (CustTabs*) cb_data;
433433 int choice = 1, ntabs = tabs->num_tabs();
434434
435 if (ntabs > 1)
435 if (prefs.show_quit_dialog && ntabs > 1)
436436 choice = a_Dialog_choice5("Window contains more than one tab.",
437437 "Close", "Cancel", NULL, NULL, NULL);
438438 if (choice == 1)
572572 BrowserWindow *bw;
573573 int choice = 1;
574574
575 if (a_Bw_num() > 1)
575 if (prefs.show_quit_dialog && a_Bw_num() > 1)
576576 choice = a_Dialog_choice5("More than one open tab or window.",
577577 "Quit", "Cancel", NULL, NULL, NULL);
578578 if (choice == 1)
685685 /*
686686 * Popup the navigation menu of the Back button
687687 */
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);
691691 }
692692
693693 /*
701701 /*
702702 * Popup the navigation menu of the Forward button
703703 */
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);
707707 }
708708
709709 /*
837837 /*
838838 * Popup the tools menu
839839 */
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);
843843 }
844844
845845 /*
11651165 const mapping_t map[] = {
11661166 {KEYS_SCREEN_UP, SCREEN_UP_CMD},
11671167 {KEYS_SCREEN_DOWN, SCREEN_DOWN_CMD},
1168 {KEYS_SCREEN_LEFT, SCREEN_LEFT_CMD},
1169 {KEYS_SCREEN_RIGHT, SCREEN_RIGHT_CMD},
11681170 {KEYS_LINE_UP, LINE_UP_CMD},
11691171 {KEYS_LINE_DOWN, LINE_DOWN_CMD},
11701172 {KEYS_LEFT, LEFT_CMD},
1616 void a_UIcmd_open_url_nw(BrowserWindow *bw, const DilloUrl *url);
1717 void a_UIcmd_open_url_nt(void *vbw, const DilloUrl *url, int focus);
1818 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);
2020 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);
2222 void a_UIcmd_home(void *vbw);
2323 void a_UIcmd_reload(void *vbw);
2424 void a_UIcmd_repush(void *vbw);
2525 void a_UIcmd_redirection0(void *vbw, const DilloUrl *url);
2626 void a_UIcmd_save(void *vbw);
2727 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);
2929 void a_UIcmd_save_link(BrowserWindow *bw, const DilloUrl *url);
3030 void a_UIcmd_open_file(void *vbw);
3131 const char *a_UIcmd_select_file();
688688
689689 if (tld_len > 0) {
690690 /* 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
692692 * them to describe the situation by beginning with a "*.[tld]" rule.
693693 */
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",
696696 "il","jm","ke","kh","kw","ml","mm","mt",
697697 "mz","ni","np","nz","om","pg","py","qa",
698698 "sv","tr","uk","uy","ve","ye","yu","za",
717717 * domain that is in a registry outside the organization.
718718 * For 'www.dillo.org', that would be 'dillo.org'.
719719 */
720 const char *a_Url_host_find_public_suffix(const char *host)
720 static const char *Url_host_find_public_suffix(const char *host)
721721 {
722722 const char *s;
723723 uint_t dots;
752752 _MSG("public suffix of %s is %s\n", host, s);
753753 return s;
754754 }
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 }
121121 char *a_Url_decode_hex_str(const char *str);
122122 char *a_Url_encode_hex_str(const char *str);
123123 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);
125125 #ifdef __cplusplus
126126 }
127127 #endif /* __cplusplus */
108108 /*
109109 * Allocate and set safe values for a DilloWeb structure
110110 */
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)
112113 {
113114 DilloWeb *web= dNew(DilloWeb, 1);
114115
115116 _MSG(" a_Web_new: ValidWebs ==> %d\n", dList_length(ValidWebs));
116117 web->url = a_Url_dup(url);
117118 web->requester = a_Url_dup(requester);
118 web->bw = NULL;
119 web->bw = bw;
119120 web->flags = 0;
120121 web->Image = NULL;
121122 web->filename = NULL;
3535 };
3636
3737 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);
3940 int a_Web_valid(DilloWeb *web);
4041 void a_Web_free (DilloWeb*);
4142 int a_Web_dispatch_by_type (const char *Type, DilloWeb *web,