Codebase list dillo / upstream/3.0.4_rc1
Imported Upstream version 3.0.4~rc1 Axel Beckert 10 years ago
128 changed file(s) with 9345 addition(s) and 3695 deletion(s). Raw diff Collapse all Expand all
55 user. For a history of changes in full detail, see our Mercurial repository
66 at http://hg.dillo.org/dillo
77
8
9 dillo-3.0.4 [not released yet]
10
11 +- OPTGROUP and INS elements.
12 - Some HTML5 elements, etc.
13 - Added show_ui_tooltip preference (BUG#1140).
14 Patches: corvid
15 +- Make embedding into other applications more reliable (BUG#1127).
16 - Add search from address bar.
17 - Share CSS user agent stylesheet between pages.
18 Patches: Johannes Hofmann
19 +- Better scaling (down) of images, even with consideration of gamma
20 correction.
21 - Fixed (possibly security) problem of FltkImgBuf caused by integer overflow
22 (BUG#1129).
23 - Some linebreaking fixes, and optimization for non-justified text, including
24 new preference stretchability_factor.
25 - Added white_bg_replacement preference.
26 - Implemented background images (except 'background-attachment'), added
27 load_background_images preference, as well as a new entry in the tools menu.
28 Patches: Sebastian Geerken
29 +- Fix a set of bugs reported by Oulu Univ. Secure Programming Group
30 (HTML parsing, URL resolution, GIF processing, etc.)
31 - Improved/fixed handling of HEAD, TITLE, TEXTAREA and form inputs.
32 - Made show_url dillorc option work again (BUG#1128)
33 Patches: Jorge Arellano Cid
34 +- Fix compiling on Hurd.
35 Patch: Pino Toscano
36 +- Avoid Dpid children becoming zombies.
37 Patch: Jorge Arellano, J. Gaffney
38 +- HTML5 WBR element.
39 - Fix compiling on IRIX with MIPSpro compiler.
40 Patches: corvid, Sebastian Geerken
41
42 -----------------------------------------------------------------------------
843
944 dillo-3.0.3 [April 17, 2013]
1045
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1615
1716
1817 VPATH = @srcdir@
19 am__make_dryrun = \
20 { \
21 am__dry=no; \
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
2231 case $$MAKEFLAGS in \
2332 *\\[\ \ ]*) \
24 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
25 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
26 *) \
27 for am__flg in $$MAKEFLAGS; do \
28 case $$am__flg in \
29 *=*|--*) ;; \
30 *n*) am__dry=yes; break;; \
31 esac; \
32 done;; \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3336 esac; \
34 test $$am__dry = yes; \
35 }
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3663 pkgdatadir = $(datadir)/@PACKAGE@
3764 pkgincludedir = $(includedir)/@PACKAGE@
3865 pkglibdir = $(libdir)/@PACKAGE@
5380 host_triplet = @host@
5481 target_triplet = @target@
5582 subdir = .
56 DIST_COMMON = README $(am__configure_deps) $(dist_bin_SCRIPTS) \
57 $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
58 $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
59 ChangeLog INSTALL NEWS config.guess config.sub depcomp \
60 install-sh missing
83 DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
84 $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
85 $(top_srcdir)/configure $(am__configure_deps) \
86 $(srcdir)/config.h.in $(dist_bin_SCRIPTS) COPYING compile \
87 config.guess config.sub depcomp install-sh missing
6188 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
6289 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
6390 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
97124 }
98125 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sysconfdir)"
99126 SCRIPTS = $(dist_bin_SCRIPTS)
127 AM_V_P = $(am__v_P_@AM_V@)
128 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
129 am__v_P_0 = false
130 am__v_P_1 = :
131 AM_V_GEN = $(am__v_GEN_@AM_V@)
132 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
133 am__v_GEN_0 = @echo " GEN " $@;
134 am__v_GEN_1 =
135 AM_V_at = $(am__v_at_@AM_V@)
136 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
137 am__v_at_0 = @
138 am__v_at_1 =
100139 SOURCES =
101140 DIST_SOURCES =
102 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
103 html-recursive info-recursive install-data-recursive \
104 install-dvi-recursive install-exec-recursive \
105 install-html-recursive install-info-recursive \
106 install-pdf-recursive install-ps-recursive install-recursive \
107 installcheck-recursive installdirs-recursive pdf-recursive \
108 ps-recursive uninstall-recursive
141 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
142 ctags-recursive dvi-recursive html-recursive info-recursive \
143 install-data-recursive install-dvi-recursive \
144 install-exec-recursive install-html-recursive \
145 install-info-recursive install-pdf-recursive \
146 install-ps-recursive install-recursive installcheck-recursive \
147 installdirs-recursive pdf-recursive ps-recursive \
148 tags-recursive uninstall-recursive
109149 am__can_run_installinfo = \
110150 case $$AM_UPDATE_INFO_DIR in \
111151 n|no|NO) false;; \
114154 DATA = $(sysconf_DATA)
115155 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
116156 distclean-recursive maintainer-clean-recursive
117 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
118 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
119 distdir dist dist-all distcheck
157 am__recursive_targets = \
158 $(RECURSIVE_TARGETS) \
159 $(RECURSIVE_CLEAN_TARGETS) \
160 $(am__extra_recursive_targets)
161 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
162 cscope distdir dist dist-all distcheck
163 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
164 $(LISP)config.h.in
165 # Read a list of newline-separated strings from the standard input,
166 # and print each of them once, without duplicates. Input order is
167 # *not* preserved.
168 am__uniquify_input = $(AWK) '\
169 BEGIN { nonempty = 0; } \
170 { items[$$0] = 1; nonempty = 1; } \
171 END { if (nonempty) { for (i in items) print i; }; } \
172 '
173 # Make sure the list of sources is unique. This is necessary because,
174 # e.g., the same source file might be shared among _SOURCES variables
175 # for different programs/libraries.
176 am__define_uniq_tagged_files = \
177 list='$(am__tagged_files)'; \
178 unique=`for i in $$list; do \
179 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
180 done | $(am__uniquify_input)`
120181 ETAGS = etags
121182 CTAGS = ctags
183 CSCOPE = cscope
122184 DIST_SUBDIRS = $(SUBDIRS)
123185 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
124186 distdir = $(PACKAGE)-$(VERSION)
129191 && rm -rf "$(distdir)" \
130192 || { sleep 5 && rm -rf "$(distdir)"; }; \
131193 else :; fi
194 am__post_remove_distdir = $(am__remove_distdir)
132195 am__relativize = \
133196 dir0=`pwd`; \
134197 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
156219 reldir="$$dir2"
157220 DIST_ARCHIVES = $(distdir).tar.gz
158221 GZIP_ENV = --best
222 DIST_TARGETS = dist-gzip
159223 distuninstallcheck_listfiles = find . -type f -print
160224 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
161225 | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
162226 distcleancheck_listfiles = find . -type f -print
163227 ACLOCAL = @ACLOCAL@
164228 AMTAR = @AMTAR@
229 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
165230 AUTOCONF = @AUTOCONF@
166231 AUTOHEADER = @AUTOHEADER@
167232 AUTOMAKE = @AUTOMAKE@
203268 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
204269 LIBS = @LIBS@
205270 LIBSSL_LIBS = @LIBSSL_LIBS@
271 LIBX11_LIBS = @LIBX11_LIBS@
206272 LIBZ_LIBS = @LIBZ_LIBS@
207273 LTLIBOBJS = @LTLIBOBJS@
208274 MAKEINFO = @MAKEINFO@
320386 $(am__aclocal_m4_deps):
321387
322388 config.h: stamp-h1
323 @if test ! -f $@; then rm -f stamp-h1; else :; fi
324 @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
389 @test -f $@ || rm -f stamp-h1
390 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
325391
326392 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
327393 @rm -f stamp-h1
391457 dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
392458
393459 # This directory's subdirectories are mostly independent; you can cd
394 # into them and run `make' without going through this Makefile.
395 # To change the values of `make' variables: instead of editing Makefiles,
396 # (1) if the variable is set in `config.status', edit `config.status'
397 # (which will cause the Makefiles to be regenerated when you run `make');
398 # (2) otherwise, pass the desired values on the `make' command line.
399 $(RECURSIVE_TARGETS):
400 @fail= failcom='exit 1'; \
401 for f in x $$MAKEFLAGS; do \
402 case $$f in \
403 *=* | --[!k]*);; \
404 *k*) failcom='fail=yes';; \
405 esac; \
406 done; \
460 # into them and run 'make' without going through this Makefile.
461 # To change the values of 'make' variables: instead of editing Makefiles,
462 # (1) if the variable is set in 'config.status', edit 'config.status'
463 # (which will cause the Makefiles to be regenerated when you run 'make');
464 # (2) otherwise, pass the desired values on the 'make' command line.
465 $(am__recursive_targets):
466 @fail=; \
467 if $(am__make_keepgoing); then \
468 failcom='fail=yes'; \
469 else \
470 failcom='exit 1'; \
471 fi; \
407472 dot_seen=no; \
408473 target=`echo $@ | sed s/-recursive//`; \
409 list='$(SUBDIRS)'; for subdir in $$list; do \
474 case "$@" in \
475 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
476 *) list='$(SUBDIRS)' ;; \
477 esac; \
478 for subdir in $$list; do \
410479 echo "Making $$target in $$subdir"; \
411480 if test "$$subdir" = "."; then \
412481 dot_seen=yes; \
421490 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
422491 fi; test -z "$$fail"
423492
424 $(RECURSIVE_CLEAN_TARGETS):
425 @fail= failcom='exit 1'; \
426 for f in x $$MAKEFLAGS; do \
427 case $$f in \
428 *=* | --[!k]*);; \
429 *k*) failcom='fail=yes';; \
430 esac; \
431 done; \
432 dot_seen=no; \
433 case "$@" in \
434 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
435 *) list='$(SUBDIRS)' ;; \
436 esac; \
437 rev=''; for subdir in $$list; do \
438 if test "$$subdir" = "."; then :; else \
439 rev="$$subdir $$rev"; \
440 fi; \
441 done; \
442 rev="$$rev ."; \
443 target=`echo $@ | sed s/-recursive//`; \
444 for subdir in $$rev; do \
445 echo "Making $$target in $$subdir"; \
446 if test "$$subdir" = "."; then \
447 local_target="$$target-am"; \
448 else \
449 local_target="$$target"; \
450 fi; \
451 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
452 || eval $$failcom; \
453 done && test -z "$$fail"
454 tags-recursive:
455 list='$(SUBDIRS)'; for subdir in $$list; do \
456 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
457 done
458 ctags-recursive:
459 list='$(SUBDIRS)'; for subdir in $$list; do \
460 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
461 done
462
463 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
464 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
465 unique=`for i in $$list; do \
466 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
467 done | \
468 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
469 END { if (nonempty) { for (i in files) print i; }; }'`; \
470 mkid -fID $$unique
471 tags: TAGS
472
473 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
474 $(TAGS_FILES) $(LISP)
493 ID: $(am__tagged_files)
494 $(am__define_uniq_tagged_files); mkid -fID $$unique
495 tags: tags-recursive
496 TAGS: tags
497
498 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
475499 set x; \
476500 here=`pwd`; \
477501 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
487511 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
488512 fi; \
489513 done; \
490 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
491 unique=`for i in $$list; do \
492 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
493 done | \
494 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
495 END { if (nonempty) { for (i in files) print i; }; }'`; \
514 $(am__define_uniq_tagged_files); \
496515 shift; \
497516 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
498517 test -n "$$unique" || unique=$$empty_fix; \
504523 $$unique; \
505524 fi; \
506525 fi
507 ctags: CTAGS
508 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
509 $(TAGS_FILES) $(LISP)
510 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
511 unique=`for i in $$list; do \
512 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
513 done | \
514 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
515 END { if (nonempty) { for (i in files) print i; }; }'`; \
526 ctags: ctags-recursive
527
528 CTAGS: ctags
529 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
530 $(am__define_uniq_tagged_files); \
516531 test -z "$(CTAGS_ARGS)$$unique" \
517532 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
518533 $$unique
521536 here=`$(am__cd) $(top_builddir) && pwd` \
522537 && $(am__cd) $(top_srcdir) \
523538 && gtags -i $(GTAGS_ARGS) "$$here"
539 cscope: cscope.files
540 test ! -s cscope.files \
541 || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
542 clean-cscope:
543 -rm -f cscope.files
544 cscope.files: clean-cscope cscopelist
545 cscopelist: cscopelist-recursive
546
547 cscopelist-am: $(am__tagged_files)
548 list='$(am__tagged_files)'; \
549 case "$(srcdir)" in \
550 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
551 *) sdir=$(subdir)/$(srcdir) ;; \
552 esac; \
553 for i in $$list; do \
554 if test -f "$$i"; then \
555 echo "$(subdir)/$$i"; \
556 else \
557 echo "$$sdir/$$i"; \
558 fi; \
559 done >> $(top_builddir)/cscope.files
524560
525561 distclean-tags:
526562 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
563 -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
527564
528565 distdir: $(DISTFILES)
529566 $(am__remove_distdir)
591628 || chmod -R a+r "$(distdir)"
592629 dist-gzip: distdir
593630 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
594 $(am__remove_distdir)
631 $(am__post_remove_distdir)
595632
596633 dist-bzip2: distdir
597634 tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
598 $(am__remove_distdir)
635 $(am__post_remove_distdir)
599636
600637 dist-lzip: distdir
601638 tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
602 $(am__remove_distdir)
603
604 dist-lzma: distdir
605 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
606 $(am__remove_distdir)
639 $(am__post_remove_distdir)
607640
608641 dist-xz: distdir
609642 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
610 $(am__remove_distdir)
643 $(am__post_remove_distdir)
611644
612645 dist-tarZ: distdir
646 @echo WARNING: "Support for shar distribution archives is" \
647 "deprecated." >&2
648 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
613649 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
614 $(am__remove_distdir)
650 $(am__post_remove_distdir)
615651
616652 dist-shar: distdir
653 @echo WARNING: "Support for distribution archives compressed with" \
654 "legacy program 'compress' is deprecated." >&2
655 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
617656 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
618 $(am__remove_distdir)
657 $(am__post_remove_distdir)
619658
620659 dist-zip: distdir
621660 -rm -f $(distdir).zip
622661 zip -rq $(distdir).zip $(distdir)
623 $(am__remove_distdir)
624
625 dist dist-all: distdir
626 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
627 $(am__remove_distdir)
662 $(am__post_remove_distdir)
663
664 dist dist-all:
665 $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
666 $(am__post_remove_distdir)
628667
629668 # This target untars the dist file and tries a VPATH configuration. Then
630669 # it guarantees that the distribution is self-contained by making another
635674 GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
636675 *.tar.bz2*) \
637676 bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
638 *.tar.lzma*) \
639 lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
640677 *.tar.lz*) \
641678 lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
642679 *.tar.xz*) \
648685 *.zip*) \
649686 unzip $(distdir).zip ;;\
650687 esac
651 chmod -R a-w $(distdir); chmod u+w $(distdir)
652 mkdir $(distdir)/_build
653 mkdir $(distdir)/_inst
688 chmod -R a-w $(distdir)
689 chmod u+w $(distdir)
690 mkdir $(distdir)/_build $(distdir)/_inst
654691 chmod a-w $(distdir)
655692 test -d $(distdir)/_build || exit 0; \
656693 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
682719 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
683720 && cd "$$am__cwd" \
684721 || exit 1
685 $(am__remove_distdir)
722 $(am__post_remove_distdir)
686723 @(echo "$(distdir) archives ready for distribution: "; \
687724 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
688725 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
819856
820857 uninstall-am: uninstall-dist_binSCRIPTS uninstall-sysconfDATA
821858
822 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
823 ctags-recursive install-am install-strip tags-recursive
824
825 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
826 all all-am am--refresh check check-am clean clean-generic \
827 ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
828 dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
859 .MAKE: $(am__recursive_targets) all install-am install-strip
860
861 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
862 am--refresh check check-am clean clean-cscope clean-generic \
863 cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
864 dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
829865 distcheck distclean distclean-generic distclean-hdr \
830866 distclean-tags distcleancheck distdir distuninstallcheck dvi \
831867 dvi-am html html-am info info-am install install-am \
836872 install-ps-am install-strip install-sysconfDATA installcheck \
837873 installcheck-am installdirs installdirs-am maintainer-clean \
838874 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
839 pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
875 pdf-am ps ps-am tags tags-am uninstall uninstall-am \
840876 uninstall-dist_binSCRIPTS uninstall-sysconfDATA
841877
842878
0 # generated automatically by aclocal 1.11.6 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
4 # Inc.
0 # generated automatically by aclocal 1.14 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
3
54 # This file is free software; the Free Software Foundation
65 # gives unlimited permission to copy and/or distribute it,
76 # with or without modifications, as long as this notice is preserved.
1110 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1211 # PARTICULAR PURPOSE.
1312
13 m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1414 m4_ifndef([AC_AUTOCONF_VERSION],
1515 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1616 m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
1717 [m4_warning([this file was generated for autoconf 2.69.
1818 You have another version of autoconf. It may work, but is not guaranteed to.
1919 If you have problems, you may need to regenerate the build system entirely.
20 To do so, use the procedure documented by the package, typically `autoreconf'.])])
21
22 # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
23 # Foundation, Inc.
24 #
25 # This file is free software; the Free Software Foundation
26 # gives unlimited permission to copy and/or distribute it,
27 # with or without modifications, as long as this notice is preserved.
28
29 # serial 1
20 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
21
22 # Copyright (C) 2002-2013 Free Software Foundation, Inc.
23 #
24 # This file is free software; the Free Software Foundation
25 # gives unlimited permission to copy and/or distribute it,
26 # with or without modifications, as long as this notice is preserved.
3027
3128 # AM_AUTOMAKE_VERSION(VERSION)
3229 # ----------------------------
3431 # generated from the m4 files accompanying Automake X.Y.
3532 # (This private macro should not be called outside this file.)
3633 AC_DEFUN([AM_AUTOMAKE_VERSION],
37 [am__api_version='1.11'
34 [am__api_version='1.14'
3835 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3936 dnl require some minimum version. Point them to the right macro.
40 m4_if([$1], [1.11.6], [],
37 m4_if([$1], [1.14], [],
4138 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
4239 ])
4340
5350 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5451 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5552 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
56 [AM_AUTOMAKE_VERSION([1.11.6])dnl
53 [AM_AUTOMAKE_VERSION([1.14])dnl
5754 m4_ifndef([AC_AUTOCONF_VERSION],
5855 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5956 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
6057
6158 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
6259
63 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
64 #
65 # This file is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
67 # with or without modifications, as long as this notice is preserved.
68
69 # serial 1
60 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
61 #
62 # This file is free software; the Free Software Foundation
63 # gives unlimited permission to copy and/or distribute it,
64 # with or without modifications, as long as this notice is preserved.
7065
7166 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
72 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
73 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
67 # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
68 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
7469 #
7570 # Of course, Automake must honor this variable whenever it calls a
7671 # tool from the auxiliary directory. The problem is that $srcdir (and
8984 #
9085 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
9186 # are both prefixed by $srcdir. In an in-source build this is usually
92 # harmless because $srcdir is `.', but things will broke when you
87 # harmless because $srcdir is '.', but things will broke when you
9388 # start a VPATH build or use an absolute $srcdir.
9489 #
9590 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
115110
116111 # AM_CONDITIONAL -*- Autoconf -*-
117112
118 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
119 # Free Software Foundation, Inc.
120 #
121 # This file is free software; the Free Software Foundation
122 # gives unlimited permission to copy and/or distribute it,
123 # with or without modifications, as long as this notice is preserved.
124
125 # serial 9
113 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
114 #
115 # This file is free software; the Free Software Foundation
116 # gives unlimited permission to copy and/or distribute it,
117 # with or without modifications, as long as this notice is preserved.
126118
127119 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
128120 # -------------------------------------
129121 # Define a conditional.
130122 AC_DEFUN([AM_CONDITIONAL],
131 [AC_PREREQ(2.52)dnl
132 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
133 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
123 [AC_PREREQ([2.52])dnl
124 m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
125 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
134126 AC_SUBST([$1_TRUE])dnl
135127 AC_SUBST([$1_FALSE])dnl
136128 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
149141 Usually this means the macro was only invoked conditionally.]])
150142 fi])])
151143
152 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
153 # 2010, 2011 Free Software Foundation, Inc.
154 #
155 # This file is free software; the Free Software Foundation
156 # gives unlimited permission to copy and/or distribute it,
157 # with or without modifications, as long as this notice is preserved.
158
159 # serial 12
160
161 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
144 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
145 #
146 # This file is free software; the Free Software Foundation
147 # gives unlimited permission to copy and/or distribute it,
148 # with or without modifications, as long as this notice is preserved.
149
150
151 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
162152 # written in clear, in which case automake, when reading aclocal.m4,
163153 # will think it sees a *use*, and therefore will trigger all it's
164154 # C support machinery. Also note that it means that autoscan, seeing
168158 # _AM_DEPENDENCIES(NAME)
169159 # ----------------------
170160 # See how the compiler implements dependency checking.
171 # NAME is "CC", "CXX", "GCJ", or "OBJC".
161 # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
172162 # We try a few techniques and use that to set a single cache variable.
173163 #
174164 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
181171 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
182172 AC_REQUIRE([AM_DEP_TRACK])dnl
183173
184 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
185 [$1], CXX, [depcc="$CXX" am_compiler_list=],
186 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
187 [$1], UPC, [depcc="$UPC" am_compiler_list=],
188 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
189 [depcc="$$1" am_compiler_list=])
174 m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
175 [$1], [CXX], [depcc="$CXX" am_compiler_list=],
176 [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
177 [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
178 [$1], [UPC], [depcc="$UPC" am_compiler_list=],
179 [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
180 [depcc="$$1" am_compiler_list=])
190181
191182 AC_CACHE_CHECK([dependency style of $depcc],
192183 [am_cv_$1_dependencies_compiler_type],
194185 # We make a subdir and do the tests there. Otherwise we can end up
195186 # making bogus files that we don't know about and never remove. For
196187 # instance it was reported that on HP-UX the gcc test will end up
197 # making a dummy file named `D' -- because `-MD' means `put the output
198 # in D'.
188 # making a dummy file named 'D' -- because '-MD' means "put the output
189 # in D".
199190 rm -rf conftest.dir
200191 mkdir conftest.dir
201192 # Copy depcomp to subdir because otherwise we won't find it if we're
235226 : > sub/conftest.c
236227 for i in 1 2 3 4 5 6; do
237228 echo '#include "conftst'$i'.h"' >> sub/conftest.c
238 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
239 # Solaris 8's {/usr,}/bin/sh.
240 touch sub/conftst$i.h
229 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
230 # Solaris 10 /bin/sh.
231 echo '/* dummy */' > sub/conftst$i.h
241232 done
242233 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
243234
244 # We check with `-c' and `-o' for the sake of the "dashmstdout"
235 # We check with '-c' and '-o' for the sake of the "dashmstdout"
245236 # mode. It turns out that the SunPro C++ compiler does not properly
246 # handle `-M -o', and we need to detect this. Also, some Intel
247 # versions had trouble with output in subdirs
237 # handle '-M -o', and we need to detect this. Also, some Intel
238 # versions had trouble with output in subdirs.
248239 am__obj=sub/conftest.${OBJEXT-o}
249240 am__minus_obj="-o $am__obj"
250241 case $depmode in
253244 test "$am__universal" = false || continue
254245 ;;
255246 nosideeffect)
256 # after this tag, mechanisms are not by side-effect, so they'll
257 # only be used when explicitly requested
247 # After this tag, mechanisms are not by side-effect, so they'll
248 # only be used when explicitly requested.
258249 if test "x$enable_dependency_tracking" = xyes; then
259250 continue
260251 else
262253 fi
263254 ;;
264255 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
265 # This compiler won't grok `-c -o', but also, the minuso test has
256 # This compiler won't grok '-c -o', but also, the minuso test has
266257 # not run yet. These depmodes are late enough in the game, and
267258 # so weak that their functioning should not be impacted.
268259 am__obj=conftest.${OBJEXT-o}
310301 # AM_SET_DEPDIR
311302 # -------------
312303 # Choose a directory name for dependency files.
313 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
304 # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
314305 AC_DEFUN([AM_SET_DEPDIR],
315306 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
316307 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
320311 # AM_DEP_TRACK
321312 # ------------
322313 AC_DEFUN([AM_DEP_TRACK],
323 [AC_ARG_ENABLE(dependency-tracking,
324 [ --disable-dependency-tracking speeds up one-time build
325 --enable-dependency-tracking do not reject slow dependency extractors])
314 [AC_ARG_ENABLE([dependency-tracking], [dnl
315 AS_HELP_STRING(
316 [--enable-dependency-tracking],
317 [do not reject slow dependency extractors])
318 AS_HELP_STRING(
319 [--disable-dependency-tracking],
320 [speeds up one-time build])])
326321 if test "x$enable_dependency_tracking" != xno; then
327322 am_depcomp="$ac_aux_dir/depcomp"
328323 AMDEPBACKSLASH='\'
337332
338333 # Generate code to set up dependency tracking. -*- Autoconf -*-
339334
340 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
341 # Free Software Foundation, Inc.
342 #
343 # This file is free software; the Free Software Foundation
344 # gives unlimited permission to copy and/or distribute it,
345 # with or without modifications, as long as this notice is preserved.
346
347 #serial 5
335 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
336 #
337 # This file is free software; the Free Software Foundation
338 # gives unlimited permission to copy and/or distribute it,
339 # with or without modifications, as long as this notice is preserved.
340
348341
349342 # _AM_OUTPUT_DEPENDENCY_COMMANDS
350343 # ------------------------------
351344 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
352345 [{
353 # Autoconf 2.62 quotes --file arguments for eval, but not when files
346 # Older Autoconf quotes --file arguments for eval, but not when files
354347 # are listed without --file. Let's play safe and only enable the eval
355348 # if we detect the quoting.
356349 case $CONFIG_FILES in
363356 # Strip MF so we end up with the name of the file.
364357 mf=`echo "$mf" | sed -e 's/:.*$//'`
365358 # Check whether this is an Automake generated Makefile or not.
366 # We used to match only the files named `Makefile.in', but
359 # We used to match only the files named 'Makefile.in', but
367360 # some people rename them; so instead we look at the file content.
368361 # Grep'ing the first line is not enough: some people post-process
369362 # each Makefile.in and add a new line on top of each file to say so.
375368 continue
376369 fi
377370 # Extract the definition of DEPDIR, am__include, and am__quote
378 # from the Makefile without running `make'.
371 # from the Makefile without running 'make'.
379372 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
380373 test -z "$DEPDIR" && continue
381374 am__include=`sed -n 's/^am__include = //p' < "$mf"`
382 test -z "am__include" && continue
375 test -z "$am__include" && continue
383376 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
384 # When using ansi2knr, U may be empty or an underscore; expand it
385 U=`sed -n 's/^U = //p' < "$mf"`
386377 # Find all dependency output files, they are included files with
387378 # $(DEPDIR) in their names. We invoke sed twice because it is the
388379 # simplest approach to changing $(DEPDIR) to its actual value in the
389380 # expansion.
390381 for file in `sed -n "
391382 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
392 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
383 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
393384 # Make sure the directory exists.
394385 test -f "$dirpart/$file" && continue
395386 fdir=`AS_DIRNAME(["$file"])`
407398 # This macro should only be invoked once -- use via AC_REQUIRE.
408399 #
409400 # This code is only required when automatic dependency tracking
410 # is enabled. FIXME. This creates each `.P' file that we will
401 # is enabled. FIXME. This creates each '.P' file that we will
411402 # need in order to bootstrap the dependency handling code.
412403 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
413404 [AC_CONFIG_COMMANDS([depfiles],
417408
418409 # Do all the work for Automake. -*- Autoconf -*-
419410
420 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
421 # 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
422 #
423 # This file is free software; the Free Software Foundation
424 # gives unlimited permission to copy and/or distribute it,
425 # with or without modifications, as long as this notice is preserved.
426
427 # serial 16
411 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
412 #
413 # This file is free software; the Free Software Foundation
414 # gives unlimited permission to copy and/or distribute it,
415 # with or without modifications, as long as this notice is preserved.
428416
429417 # This macro actually does too much. Some checks are only needed if
430418 # your package does certain things. But this isn't really a big deal.
419
420 dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
421 m4_define([AC_PROG_CC],
422 m4_defn([AC_PROG_CC])
423 [_AM_PROG_CC_C_O
424 ])
431425
432426 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
433427 # AM_INIT_AUTOMAKE([OPTIONS])
441435 # arguments mandatory, and then we can depend on a new Autoconf
442436 # release and drop the old call support.
443437 AC_DEFUN([AM_INIT_AUTOMAKE],
444 [AC_PREREQ([2.62])dnl
438 [AC_PREREQ([2.65])dnl
445439 dnl Autoconf wants to disallow AM_ names. We explicitly allow
446440 dnl the ones we care about.
447441 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
470464 # Define the identity of the package.
471465 dnl Distinguish between old-style and new-style calls.
472466 m4_ifval([$2],
473 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
467 [AC_DIAGNOSE([obsolete],
468 [$0: two- and three-arguments forms are deprecated.])
469 m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
474470 AC_SUBST([PACKAGE], [$1])dnl
475471 AC_SUBST([VERSION], [$2])],
476472 [_AM_SET_OPTIONS([$1])dnl
477473 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
478 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
474 m4_if(
475 m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
476 [ok:ok],,
479477 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
480478 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
481479 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
482480
483481 _AM_IF_OPTION([no-define],,
484 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
485 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
482 [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
483 AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
486484
487485 # Some tools Automake needs.
488486 AC_REQUIRE([AM_SANITY_CHECK])dnl
489487 AC_REQUIRE([AC_ARG_PROGRAM])dnl
490 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
491 AM_MISSING_PROG(AUTOCONF, autoconf)
492 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
493 AM_MISSING_PROG(AUTOHEADER, autoheader)
494 AM_MISSING_PROG(MAKEINFO, makeinfo)
488 AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
489 AM_MISSING_PROG([AUTOCONF], [autoconf])
490 AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
491 AM_MISSING_PROG([AUTOHEADER], [autoheader])
492 AM_MISSING_PROG([MAKEINFO], [makeinfo])
495493 AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
496494 AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
497 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
495 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
496 # For better backward compatibility. To be removed once Automake 1.9.x
497 # dies out for good. For more background, see:
498 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
499 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
500 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
498501 # We need awk for the "check" target. The system "awk" is bad on
499502 # some platforms.
500503 AC_REQUIRE([AC_PROG_AWK])dnl
505508 [_AM_PROG_TAR([v7])])])
506509 _AM_IF_OPTION([no-dependencies],,
507510 [AC_PROVIDE_IFELSE([AC_PROG_CC],
508 [_AM_DEPENDENCIES(CC)],
509 [define([AC_PROG_CC],
510 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
511 [_AM_DEPENDENCIES([CC])],
512 [m4_define([AC_PROG_CC],
513 m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
511514 AC_PROVIDE_IFELSE([AC_PROG_CXX],
512 [_AM_DEPENDENCIES(CXX)],
513 [define([AC_PROG_CXX],
514 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
515 [_AM_DEPENDENCIES([CXX])],
516 [m4_define([AC_PROG_CXX],
517 m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
515518 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
516 [_AM_DEPENDENCIES(OBJC)],
517 [define([AC_PROG_OBJC],
518 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
519 ])
520 _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
521 dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
522 dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
523 dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
519 [_AM_DEPENDENCIES([OBJC])],
520 [m4_define([AC_PROG_OBJC],
521 m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
522 AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
523 [_AM_DEPENDENCIES([OBJCXX])],
524 [m4_define([AC_PROG_OBJCXX],
525 m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
526 ])
527 AC_REQUIRE([AM_SILENT_RULES])dnl
528 dnl The testsuite driver may need to know about EXEEXT, so add the
529 dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
530 dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
524531 AC_CONFIG_COMMANDS_PRE(dnl
525532 [m4_provide_if([_AM_COMPILER_EXEEXT],
526533 [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
527 ])
528
529 dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
534
535 # POSIX will say in a future version that running "rm -f" with no argument
536 # is OK; and we want to be able to make that assumption in our Makefile
537 # recipes. So use an aggressive probe to check that the usage we want is
538 # actually supported "in the wild" to an acceptable degree.
539 # See automake bug#10828.
540 # To make any issue more visible, cause the running configure to be aborted
541 # by default if the 'rm' program in use doesn't match our expectations; the
542 # user can still override this though.
543 if rm -f && rm -fr && rm -rf; then : OK; else
544 cat >&2 <<'END'
545 Oops!
546
547 Your 'rm' program seems unable to run without file operands specified
548 on the command line, even when the '-f' option is present. This is contrary
549 to the behaviour of most rm programs out there, and not conforming with
550 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
551
552 Please tell bug-automake@gnu.org about your system, including the value
553 of your $PATH and any error possibly output before this message. This
554 can help us improve future automake versions.
555
556 END
557 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
558 echo 'Configuration will proceed anyway, since you have set the' >&2
559 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
560 echo >&2
561 else
562 cat >&2 <<'END'
563 Aborting the configuration process, to ensure you take notice of the issue.
564
565 You can download and install GNU coreutils to get an 'rm' implementation
566 that behaves properly: <http://www.gnu.org/software/coreutils/>.
567
568 If you want to complete the configuration process using your problematic
569 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
570 to "yes", and re-run configure.
571
572 END
573 AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
574 fi
575 fi])
576
577 dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
530578 dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
531579 dnl mangled by Autoconf and run in a shell conditional statement.
532580 m4_define([_AC_COMPILER_EXEEXT],
533581 m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
534
535582
536583 # When config.status generates a header, we must update the stamp-h file.
537584 # This file resides in the same directory as the config header
554601 done
555602 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
556603
557 # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
558 # Inc.
559 #
560 # This file is free software; the Free Software Foundation
561 # gives unlimited permission to copy and/or distribute it,
562 # with or without modifications, as long as this notice is preserved.
563
564 # serial 1
604 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
605 #
606 # This file is free software; the Free Software Foundation
607 # gives unlimited permission to copy and/or distribute it,
608 # with or without modifications, as long as this notice is preserved.
565609
566610 # AM_PROG_INSTALL_SH
567611 # ------------------
576620 install_sh="\${SHELL} $am_aux_dir/install-sh"
577621 esac
578622 fi
579 AC_SUBST(install_sh)])
580
581 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
582 #
583 # This file is free software; the Free Software Foundation
584 # gives unlimited permission to copy and/or distribute it,
585 # with or without modifications, as long as this notice is preserved.
586
587 # serial 2
623 AC_SUBST([install_sh])])
624
625 # Copyright (C) 2003-2013 Free Software Foundation, Inc.
626 #
627 # This file is free software; the Free Software Foundation
628 # gives unlimited permission to copy and/or distribute it,
629 # with or without modifications, as long as this notice is preserved.
588630
589631 # Check whether the underlying file-system supports filenames
590632 # with a leading dot. For instance MS-DOS doesn't.
601643
602644 # Check to see how 'make' treats includes. -*- Autoconf -*-
603645
604 # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
605 #
606 # This file is free software; the Free Software Foundation
607 # gives unlimited permission to copy and/or distribute it,
608 # with or without modifications, as long as this notice is preserved.
609
610 # serial 4
646 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
647 #
648 # This file is free software; the Free Software Foundation
649 # gives unlimited permission to copy and/or distribute it,
650 # with or without modifications, as long as this notice is preserved.
611651
612652 # AM_MAKE_INCLUDE()
613653 # -----------------
626666 _am_result=none
627667 # First try GNU make style include.
628668 echo "include confinc" > confmf
629 # Ignore all kinds of additional output from `make'.
669 # Ignore all kinds of additional output from 'make'.
630670 case `$am_make -s -f confmf 2> /dev/null` in #(
631671 *the\ am__doit\ target*)
632672 am__include=include
653693
654694 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
655695
656 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
657 # Free Software Foundation, Inc.
658 #
659 # This file is free software; the Free Software Foundation
660 # gives unlimited permission to copy and/or distribute it,
661 # with or without modifications, as long as this notice is preserved.
662
663 # serial 6
696 # Copyright (C) 1997-2013 Free Software Foundation, Inc.
697 #
698 # This file is free software; the Free Software Foundation
699 # gives unlimited permission to copy and/or distribute it,
700 # with or without modifications, as long as this notice is preserved.
664701
665702 # AM_MISSING_PROG(NAME, PROGRAM)
666703 # ------------------------------
669706 $1=${$1-"${am_missing_run}$2"}
670707 AC_SUBST($1)])
671708
672
673709 # AM_MISSING_HAS_RUN
674710 # ------------------
675 # Define MISSING if not defined so far and test if it supports --run.
676 # If it does, set am_missing_run to use it, otherwise, to nothing.
711 # Define MISSING if not defined so far and test if it is modern enough.
712 # If it is, set am_missing_run to use it, otherwise, to nothing.
677713 AC_DEFUN([AM_MISSING_HAS_RUN],
678714 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
679715 AC_REQUIRE_AUX_FILE([missing])dnl
686722 esac
687723 fi
688724 # Use eval to expand $SHELL
689 if eval "$MISSING --run true"; then
690 am_missing_run="$MISSING --run "
725 if eval "$MISSING --is-lightweight"; then
726 am_missing_run="$MISSING "
691727 else
692728 am_missing_run=
693 AC_MSG_WARN([`missing' script is too old or missing])
694 fi
695 ])
696
697 # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
698 # Inc.
699 #
700 # This file is free software; the Free Software Foundation
701 # gives unlimited permission to copy and/or distribute it,
702 # with or without modifications, as long as this notice is preserved.
703
704 # serial 1
705
706 # AM_PROG_MKDIR_P
707 # ---------------
708 # Check for `mkdir -p'.
709 AC_DEFUN([AM_PROG_MKDIR_P],
710 [AC_PREREQ([2.60])dnl
711 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
712 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
713 dnl while keeping a definition of mkdir_p for backward compatibility.
714 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
715 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
716 dnl Makefile.ins that do not define MKDIR_P, so we do our own
717 dnl adjustment using top_builddir (which is defined more often than
718 dnl MKDIR_P).
719 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
720 case $mkdir_p in
721 [[\\/$]]* | ?:[[\\/]]*) ;;
722 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
723 esac
729 AC_MSG_WARN(['missing' script is too old or missing])
730 fi
724731 ])
725732
726733 # Helper functions for option handling. -*- Autoconf -*-
727734
728 # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
729 # Foundation, Inc.
730 #
731 # This file is free software; the Free Software Foundation
732 # gives unlimited permission to copy and/or distribute it,
733 # with or without modifications, as long as this notice is preserved.
734
735 # serial 5
735 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
736 #
737 # This file is free software; the Free Software Foundation
738 # gives unlimited permission to copy and/or distribute it,
739 # with or without modifications, as long as this notice is preserved.
736740
737741 # _AM_MANGLE_OPTION(NAME)
738742 # -----------------------
743747 # --------------------
744748 # Set option NAME. Presently that only means defining a flag for this option.
745749 AC_DEFUN([_AM_SET_OPTION],
746 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
750 [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
747751
748752 # _AM_SET_OPTIONS(OPTIONS)
749753 # ------------------------
757761 AC_DEFUN([_AM_IF_OPTION],
758762 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
759763
764 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
765 #
766 # This file is free software; the Free Software Foundation
767 # gives unlimited permission to copy and/or distribute it,
768 # with or without modifications, as long as this notice is preserved.
769
770 # _AM_PROG_CC_C_O
771 # ---------------
772 # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
773 # to automatically call this.
774 AC_DEFUN([_AM_PROG_CC_C_O],
775 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
776 AC_REQUIRE_AUX_FILE([compile])dnl
777 AC_LANG_PUSH([C])dnl
778 AC_CACHE_CHECK(
779 [whether $CC understands -c and -o together],
780 [am_cv_prog_cc_c_o],
781 [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
782 # Make sure it works both with $CC and with simple cc.
783 # Following AC_PROG_CC_C_O, we do the test twice because some
784 # compilers refuse to overwrite an existing .o file with -o,
785 # though they will create one.
786 am_cv_prog_cc_c_o=yes
787 for am_i in 1 2; do
788 if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
789 && test -f conftest2.$ac_objext; then
790 : OK
791 else
792 am_cv_prog_cc_c_o=no
793 break
794 fi
795 done
796 rm -f core conftest*
797 unset am_i])
798 if test "$am_cv_prog_cc_c_o" != yes; then
799 # Losing compiler, so override with the script.
800 # FIXME: It is wrong to rewrite CC.
801 # But if we don't then we get into trouble of one sort or another.
802 # A longer-term fix would be to have automake use am__CC in this case,
803 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
804 CC="$am_aux_dir/compile $CC"
805 fi
806 AC_LANG_POP([C])])
807
808 # For backward compatibility.
809 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
810
811 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
812 #
813 # This file is free software; the Free Software Foundation
814 # gives unlimited permission to copy and/or distribute it,
815 # with or without modifications, as long as this notice is preserved.
816
817 # AM_RUN_LOG(COMMAND)
818 # -------------------
819 # Run COMMAND, save the exit status in ac_status, and log it.
820 # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
821 AC_DEFUN([AM_RUN_LOG],
822 [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
823 ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
824 ac_status=$?
825 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
826 (exit $ac_status); }])
827
760828 # Check to make sure that the build environment is sane. -*- Autoconf -*-
761829
762 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
763 # Free Software Foundation, Inc.
764 #
765 # This file is free software; the Free Software Foundation
766 # gives unlimited permission to copy and/or distribute it,
767 # with or without modifications, as long as this notice is preserved.
768
769 # serial 5
830 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
831 #
832 # This file is free software; the Free Software Foundation
833 # gives unlimited permission to copy and/or distribute it,
834 # with or without modifications, as long as this notice is preserved.
770835
771836 # AM_SANITY_CHECK
772837 # ---------------
773838 AC_DEFUN([AM_SANITY_CHECK],
774839 [AC_MSG_CHECKING([whether build environment is sane])
775 # Just in case
776 sleep 1
777 echo timestamp > conftest.file
778840 # Reject unsafe characters in $srcdir or the absolute working directory
779841 # name. Accept space and tab only in the latter.
780842 am_lf='
785847 esac
786848 case $srcdir in
787849 *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
788 AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
850 AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
789851 esac
790852
791 # Do `set' in a subshell so we don't clobber the current shell's
853 # Do 'set' in a subshell so we don't clobber the current shell's
792854 # arguments. Must try -L first in case configure is actually a
793855 # symlink; some systems play weird games with the mod time of symlinks
794856 # (eg FreeBSD returns the mod time of the symlink's containing
795857 # directory).
796858 if (
797 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
798 if test "$[*]" = "X"; then
799 # -L didn't work.
800 set X `ls -t "$srcdir/configure" conftest.file`
801 fi
802 rm -f conftest.file
803 if test "$[*]" != "X $srcdir/configure conftest.file" \
804 && test "$[*]" != "X conftest.file $srcdir/configure"; then
805
806 # If neither matched, then we have a broken ls. This can happen
807 # if, for instance, CONFIG_SHELL is bash and it inherits a
808 # broken ls alias from the environment. This has actually
809 # happened. Such a system could not be considered "sane".
810 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
811 alias in your environment])
812 fi
813
859 am_has_slept=no
860 for am_try in 1 2; do
861 echo "timestamp, slept: $am_has_slept" > conftest.file
862 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
863 if test "$[*]" = "X"; then
864 # -L didn't work.
865 set X `ls -t "$srcdir/configure" conftest.file`
866 fi
867 if test "$[*]" != "X $srcdir/configure conftest.file" \
868 && test "$[*]" != "X conftest.file $srcdir/configure"; then
869
870 # If neither matched, then we have a broken ls. This can happen
871 # if, for instance, CONFIG_SHELL is bash and it inherits a
872 # broken ls alias from the environment. This has actually
873 # happened. Such a system could not be considered "sane".
874 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
875 alias in your environment])
876 fi
877 if test "$[2]" = conftest.file || test $am_try -eq 2; then
878 break
879 fi
880 # Just in case.
881 sleep 1
882 am_has_slept=yes
883 done
814884 test "$[2]" = conftest.file
815885 )
816886 then
820890 AC_MSG_ERROR([newly created file is older than distributed files!
821891 Check your system clock])
822892 fi
823 AC_MSG_RESULT(yes)])
824
825 # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
826 #
827 # This file is free software; the Free Software Foundation
828 # gives unlimited permission to copy and/or distribute it,
829 # with or without modifications, as long as this notice is preserved.
830
831 # serial 1
893 AC_MSG_RESULT([yes])
894 # If we didn't sleep, we still need to ensure time stamps of config.status and
895 # generated files are strictly newer.
896 am_sleep_pid=
897 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
898 ( sleep 1 ) &
899 am_sleep_pid=$!
900 fi
901 AC_CONFIG_COMMANDS_PRE(
902 [AC_MSG_CHECKING([that generated files are newer than configure])
903 if test -n "$am_sleep_pid"; then
904 # Hide warnings about reused PIDs.
905 wait $am_sleep_pid 2>/dev/null
906 fi
907 AC_MSG_RESULT([done])])
908 rm -f conftest.file
909 ])
910
911 # Copyright (C) 2009-2013 Free Software Foundation, Inc.
912 #
913 # This file is free software; the Free Software Foundation
914 # gives unlimited permission to copy and/or distribute it,
915 # with or without modifications, as long as this notice is preserved.
916
917 # AM_SILENT_RULES([DEFAULT])
918 # --------------------------
919 # Enable less verbose build rules; with the default set to DEFAULT
920 # ("yes" being less verbose, "no" or empty being verbose).
921 AC_DEFUN([AM_SILENT_RULES],
922 [AC_ARG_ENABLE([silent-rules], [dnl
923 AS_HELP_STRING(
924 [--enable-silent-rules],
925 [less verbose build output (undo: "make V=1")])
926 AS_HELP_STRING(
927 [--disable-silent-rules],
928 [verbose build output (undo: "make V=0")])dnl
929 ])
930 case $enable_silent_rules in @%:@ (((
931 yes) AM_DEFAULT_VERBOSITY=0;;
932 no) AM_DEFAULT_VERBOSITY=1;;
933 *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
934 esac
935 dnl
936 dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
937 dnl do not support nested variable expansions.
938 dnl See automake bug#9928 and bug#10237.
939 am_make=${MAKE-make}
940 AC_CACHE_CHECK([whether $am_make supports nested variables],
941 [am_cv_make_support_nested_variables],
942 [if AS_ECHO([['TRUE=$(BAR$(V))
943 BAR0=false
944 BAR1=true
945 V=1
946 am__doit:
947 @$(TRUE)
948 .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
949 am_cv_make_support_nested_variables=yes
950 else
951 am_cv_make_support_nested_variables=no
952 fi])
953 if test $am_cv_make_support_nested_variables = yes; then
954 dnl Using '$V' instead of '$(V)' breaks IRIX make.
955 AM_V='$(V)'
956 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
957 else
958 AM_V=$AM_DEFAULT_VERBOSITY
959 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
960 fi
961 AC_SUBST([AM_V])dnl
962 AM_SUBST_NOTMAKE([AM_V])dnl
963 AC_SUBST([AM_DEFAULT_V])dnl
964 AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
965 AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
966 AM_BACKSLASH='\'
967 AC_SUBST([AM_BACKSLASH])dnl
968 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
969 ])
970
971 # Copyright (C) 2001-2013 Free Software Foundation, Inc.
972 #
973 # This file is free software; the Free Software Foundation
974 # gives unlimited permission to copy and/or distribute it,
975 # with or without modifications, as long as this notice is preserved.
832976
833977 # AM_PROG_INSTALL_STRIP
834978 # ---------------------
835 # One issue with vendor `install' (even GNU) is that you can't
979 # One issue with vendor 'install' (even GNU) is that you can't
836980 # specify the program used to strip binaries. This is especially
837981 # annoying in cross-compiling environments, where the build's strip
838982 # is unlikely to handle the host's binaries.
839983 # Fortunately install-sh will honor a STRIPPROG variable, so we
840 # always use install-sh in `make install-strip', and initialize
984 # always use install-sh in "make install-strip", and initialize
841985 # STRIPPROG with the value of the STRIP variable (set by the user).
842986 AC_DEFUN([AM_PROG_INSTALL_STRIP],
843987 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
844 # Installed binaries are usually stripped using `strip' when the user
845 # run `make install-strip'. However `strip' might not be the right
988 # Installed binaries are usually stripped using 'strip' when the user
989 # run "make install-strip". However 'strip' might not be the right
846990 # tool to use in cross-compilation environments, therefore Automake
847 # will honor the `STRIP' environment variable to overrule this program.
848 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
991 # will honor the 'STRIP' environment variable to overrule this program.
992 dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
849993 if test "$cross_compiling" != no; then
850994 AC_CHECK_TOOL([STRIP], [strip], :)
851995 fi
852996 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
853997 AC_SUBST([INSTALL_STRIP_PROGRAM])])
854998
855 # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
856 #
857 # This file is free software; the Free Software Foundation
858 # gives unlimited permission to copy and/or distribute it,
859 # with or without modifications, as long as this notice is preserved.
860
861 # serial 3
999 # Copyright (C) 2006-2013 Free Software Foundation, Inc.
1000 #
1001 # This file is free software; the Free Software Foundation
1002 # gives unlimited permission to copy and/or distribute it,
1003 # with or without modifications, as long as this notice is preserved.
8621004
8631005 # _AM_SUBST_NOTMAKE(VARIABLE)
8641006 # ---------------------------
8731015
8741016 # Check how to create a tarball. -*- Autoconf -*-
8751017
876 # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
877 #
878 # This file is free software; the Free Software Foundation
879 # gives unlimited permission to copy and/or distribute it,
880 # with or without modifications, as long as this notice is preserved.
881
882 # serial 2
1018 # Copyright (C) 2004-2013 Free Software Foundation, Inc.
1019 #
1020 # This file is free software; the Free Software Foundation
1021 # gives unlimited permission to copy and/or distribute it,
1022 # with or without modifications, as long as this notice is preserved.
8831023
8841024 # _AM_PROG_TAR(FORMAT)
8851025 # --------------------
8861026 # Check how to create a tarball in format FORMAT.
887 # FORMAT should be one of `v7', `ustar', or `pax'.
1027 # FORMAT should be one of 'v7', 'ustar', or 'pax'.
8881028 #
8891029 # Substitute a variable $(am__tar) that is a command
8901030 # writing to stdout a FORMAT-tarball containing the directory
8941034 # Substitute a variable $(am__untar) that extract such
8951035 # a tarball read from stdin.
8961036 # $(am__untar) < result.tar
1037 #
8971038 AC_DEFUN([_AM_PROG_TAR],
8981039 [# Always define AMTAR for backward compatibility. Yes, it's still used
8991040 # in the wild :-( We should find a proper way to deprecate it ...
9001041 AC_SUBST([AMTAR], ['$${TAR-tar}'])
1042
1043 # We'll loop over all known methods to create a tar archive until one works.
1044 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
1045
9011046 m4_if([$1], [v7],
902 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
903 [m4_case([$1], [ustar],, [pax],,
904 [m4_fatal([Unknown tar format])])
905 AC_MSG_CHECKING([how to create a $1 tar archive])
906 # Loop over all known methods to create a tar archive until one works.
907 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
908 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
909 # Do not fold the above two line into one, because Tru64 sh and
910 # Solaris sh will not grok spaces in the rhs of `-'.
911 for _am_tool in $_am_tools
912 do
913 case $_am_tool in
914 gnutar)
915 for _am_tar in tar gnutar gtar;
916 do
917 AM_RUN_LOG([$_am_tar --version]) && break
918 done
919 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
920 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
921 am__untar="$_am_tar -xf -"
922 ;;
923 plaintar)
924 # Must skip GNU tar: if it does not support --format= it doesn't create
925 # ustar tarball either.
926 (tar --version) >/dev/null 2>&1 && continue
927 am__tar='tar chf - "$$tardir"'
928 am__tar_='tar chf - "$tardir"'
929 am__untar='tar xf -'
930 ;;
931 pax)
932 am__tar='pax -L -x $1 -w "$$tardir"'
933 am__tar_='pax -L -x $1 -w "$tardir"'
934 am__untar='pax -r'
935 ;;
936 cpio)
937 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
938 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
939 am__untar='cpio -i -H $1 -d'
940 ;;
941 none)
942 am__tar=false
943 am__tar_=false
944 am__untar=false
945 ;;
946 esac
947
948 # If the value was cached, stop now. We just wanted to have am__tar
949 # and am__untar set.
950 test -n "${am_cv_prog_tar_$1}" && break
951
952 # tar/untar a dummy directory, and stop if the command works
1047 [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1048
1049 [m4_case([$1],
1050 [ustar],
1051 [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
1052 # There is notably a 21 bits limit for the UID and the GID. In fact,
1053 # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
1054 # and bug#13588).
1055 am_max_uid=2097151 # 2^21 - 1
1056 am_max_gid=$am_max_uid
1057 # The $UID and $GID variables are not portable, so we need to resort
1058 # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
1059 # below are definitely unexpected, so allow the users to see them
1060 # (that is, avoid stderr redirection).
1061 am_uid=`id -u || echo unknown`
1062 am_gid=`id -g || echo unknown`
1063 AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
1064 if test $am_uid -le $am_max_uid; then
1065 AC_MSG_RESULT([yes])
1066 else
1067 AC_MSG_RESULT([no])
1068 _am_tools=none
1069 fi
1070 AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
1071 if test $am_gid -le $am_max_gid; then
1072 AC_MSG_RESULT([yes])
1073 else
1074 AC_MSG_RESULT([no])
1075 _am_tools=none
1076 fi],
1077
1078 [pax],
1079 [],
1080
1081 [m4_fatal([Unknown tar format])])
1082
1083 AC_MSG_CHECKING([how to create a $1 tar archive])
1084
1085 # Go ahead even if we have the value already cached. We do so because we
1086 # need to set the values for the 'am__tar' and 'am__untar' variables.
1087 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1088
1089 for _am_tool in $_am_tools; do
1090 case $_am_tool in
1091 gnutar)
1092 for _am_tar in tar gnutar gtar; do
1093 AM_RUN_LOG([$_am_tar --version]) && break
1094 done
1095 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
1096 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
1097 am__untar="$_am_tar -xf -"
1098 ;;
1099 plaintar)
1100 # Must skip GNU tar: if it does not support --format= it doesn't create
1101 # ustar tarball either.
1102 (tar --version) >/dev/null 2>&1 && continue
1103 am__tar='tar chf - "$$tardir"'
1104 am__tar_='tar chf - "$tardir"'
1105 am__untar='tar xf -'
1106 ;;
1107 pax)
1108 am__tar='pax -L -x $1 -w "$$tardir"'
1109 am__tar_='pax -L -x $1 -w "$tardir"'
1110 am__untar='pax -r'
1111 ;;
1112 cpio)
1113 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
1114 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
1115 am__untar='cpio -i -H $1 -d'
1116 ;;
1117 none)
1118 am__tar=false
1119 am__tar_=false
1120 am__untar=false
1121 ;;
1122 esac
1123
1124 # If the value was cached, stop now. We just wanted to have am__tar
1125 # and am__untar set.
1126 test -n "${am_cv_prog_tar_$1}" && break
1127
1128 # tar/untar a dummy directory, and stop if the command works.
1129 rm -rf conftest.dir
1130 mkdir conftest.dir
1131 echo GrepMe > conftest.dir/file
1132 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
1133 rm -rf conftest.dir
1134 if test -s conftest.tar; then
1135 AM_RUN_LOG([$am__untar <conftest.tar])
1136 AM_RUN_LOG([cat conftest.dir/file])
1137 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
1138 fi
1139 done
9531140 rm -rf conftest.dir
954 mkdir conftest.dir
955 echo GrepMe > conftest.dir/file
956 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
957 rm -rf conftest.dir
958 if test -s conftest.tar; then
959 AM_RUN_LOG([$am__untar <conftest.tar])
960 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
961 fi
962 done
963 rm -rf conftest.dir
964
965 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
966 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1141
1142 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
1143 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1144
9671145 AC_SUBST([am__tar])
9681146 AC_SUBST([am__untar])
9691147 ]) # _AM_PROG_TAR
0 #! /bin/sh
1 # Wrapper for compilers which do not understand '-c -o'.
2
3 scriptversion=2012-10-14.11; # UTC
4
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
6 # Written by Tom Tromey <tromey@cygnus.com>.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26 # This file is maintained in Automake, please report
27 # bugs to <bug-automake@gnu.org> or send patches to
28 # <automake-patches@gnu.org>.
29
30 nl='
31 '
32
33 # We need space, tab and new line, in precisely that order. Quoting is
34 # there to prevent tools from complaining about whitespace usage.
35 IFS=" "" $nl"
36
37 file_conv=
38
39 # func_file_conv build_file lazy
40 # Convert a $build file to $host form and store it in $file
41 # Currently only supports Windows hosts. If the determined conversion
42 # type is listed in (the comma separated) LAZY, no conversion will
43 # take place.
44 func_file_conv ()
45 {
46 file=$1
47 case $file in
48 / | /[!/]*) # absolute file, and not a UNC file
49 if test -z "$file_conv"; then
50 # lazily determine how to convert abs files
51 case `uname -s` in
52 MINGW*)
53 file_conv=mingw
54 ;;
55 CYGWIN*)
56 file_conv=cygwin
57 ;;
58 *)
59 file_conv=wine
60 ;;
61 esac
62 fi
63 case $file_conv/,$2, in
64 *,$file_conv,*)
65 ;;
66 mingw/*)
67 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
68 ;;
69 cygwin/*)
70 file=`cygpath -m "$file" || echo "$file"`
71 ;;
72 wine/*)
73 file=`winepath -w "$file" || echo "$file"`
74 ;;
75 esac
76 ;;
77 esac
78 }
79
80 # func_cl_dashL linkdir
81 # Make cl look for libraries in LINKDIR
82 func_cl_dashL ()
83 {
84 func_file_conv "$1"
85 if test -z "$lib_path"; then
86 lib_path=$file
87 else
88 lib_path="$lib_path;$file"
89 fi
90 linker_opts="$linker_opts -LIBPATH:$file"
91 }
92
93 # func_cl_dashl library
94 # Do a library search-path lookup for cl
95 func_cl_dashl ()
96 {
97 lib=$1
98 found=no
99 save_IFS=$IFS
100 IFS=';'
101 for dir in $lib_path $LIB
102 do
103 IFS=$save_IFS
104 if $shared && test -f "$dir/$lib.dll.lib"; then
105 found=yes
106 lib=$dir/$lib.dll.lib
107 break
108 fi
109 if test -f "$dir/$lib.lib"; then
110 found=yes
111 lib=$dir/$lib.lib
112 break
113 fi
114 if test -f "$dir/lib$lib.a"; then
115 found=yes
116 lib=$dir/lib$lib.a
117 break
118 fi
119 done
120 IFS=$save_IFS
121
122 if test "$found" != yes; then
123 lib=$lib.lib
124 fi
125 }
126
127 # func_cl_wrapper cl arg...
128 # Adjust compile command to suit cl
129 func_cl_wrapper ()
130 {
131 # Assume a capable shell
132 lib_path=
133 shared=:
134 linker_opts=
135 for arg
136 do
137 if test -n "$eat"; then
138 eat=
139 else
140 case $1 in
141 -o)
142 # configure might choose to run compile as 'compile cc -o foo foo.c'.
143 eat=1
144 case $2 in
145 *.o | *.[oO][bB][jJ])
146 func_file_conv "$2"
147 set x "$@" -Fo"$file"
148 shift
149 ;;
150 *)
151 func_file_conv "$2"
152 set x "$@" -Fe"$file"
153 shift
154 ;;
155 esac
156 ;;
157 -I)
158 eat=1
159 func_file_conv "$2" mingw
160 set x "$@" -I"$file"
161 shift
162 ;;
163 -I*)
164 func_file_conv "${1#-I}" mingw
165 set x "$@" -I"$file"
166 shift
167 ;;
168 -l)
169 eat=1
170 func_cl_dashl "$2"
171 set x "$@" "$lib"
172 shift
173 ;;
174 -l*)
175 func_cl_dashl "${1#-l}"
176 set x "$@" "$lib"
177 shift
178 ;;
179 -L)
180 eat=1
181 func_cl_dashL "$2"
182 ;;
183 -L*)
184 func_cl_dashL "${1#-L}"
185 ;;
186 -static)
187 shared=false
188 ;;
189 -Wl,*)
190 arg=${1#-Wl,}
191 save_ifs="$IFS"; IFS=','
192 for flag in $arg; do
193 IFS="$save_ifs"
194 linker_opts="$linker_opts $flag"
195 done
196 IFS="$save_ifs"
197 ;;
198 -Xlinker)
199 eat=1
200 linker_opts="$linker_opts $2"
201 ;;
202 -*)
203 set x "$@" "$1"
204 shift
205 ;;
206 *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
207 func_file_conv "$1"
208 set x "$@" -Tp"$file"
209 shift
210 ;;
211 *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
212 func_file_conv "$1" mingw
213 set x "$@" "$file"
214 shift
215 ;;
216 *)
217 set x "$@" "$1"
218 shift
219 ;;
220 esac
221 fi
222 shift
223 done
224 if test -n "$linker_opts"; then
225 linker_opts="-link$linker_opts"
226 fi
227 exec "$@" $linker_opts
228 exit 1
229 }
230
231 eat=
232
233 case $1 in
234 '')
235 echo "$0: No command. Try '$0 --help' for more information." 1>&2
236 exit 1;
237 ;;
238 -h | --h*)
239 cat <<\EOF
240 Usage: compile [--help] [--version] PROGRAM [ARGS]
241
242 Wrapper for compilers which do not understand '-c -o'.
243 Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
244 arguments, and rename the output as expected.
245
246 If you are trying to build a whole package this is not the
247 right script to run: please start by reading the file 'INSTALL'.
248
249 Report bugs to <bug-automake@gnu.org>.
250 EOF
251 exit $?
252 ;;
253 -v | --v*)
254 echo "compile $scriptversion"
255 exit $?
256 ;;
257 cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
258 func_cl_wrapper "$@" # Doesn't return...
259 ;;
260 esac
261
262 ofile=
263 cfile=
264
265 for arg
266 do
267 if test -n "$eat"; then
268 eat=
269 else
270 case $1 in
271 -o)
272 # configure might choose to run compile as 'compile cc -o foo foo.c'.
273 # So we strip '-o arg' only if arg is an object.
274 eat=1
275 case $2 in
276 *.o | *.obj)
277 ofile=$2
278 ;;
279 *)
280 set x "$@" -o "$2"
281 shift
282 ;;
283 esac
284 ;;
285 *.c)
286 cfile=$1
287 set x "$@" "$1"
288 shift
289 ;;
290 *)
291 set x "$@" "$1"
292 shift
293 ;;
294 esac
295 fi
296 shift
297 done
298
299 if test -z "$ofile" || test -z "$cfile"; then
300 # If no '-o' option was seen then we might have been invoked from a
301 # pattern rule where we don't need one. That is ok -- this is a
302 # normal compilation that the losing compiler can handle. If no
303 # '.c' file was seen then we are probably linking. That is also
304 # ok.
305 exec "$@"
306 fi
307
308 # Name of file we expect compiler to create.
309 cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
310
311 # Create the lock directory.
312 # Note: use '[/\\:.-]' here to ensure that we don't use the same name
313 # that we are using for the .o file. Also, base the name on the expected
314 # object file name, since that is what matters with a parallel build.
315 lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
316 while true; do
317 if mkdir "$lockdir" >/dev/null 2>&1; then
318 break
319 fi
320 sleep 1
321 done
322 # FIXME: race condition here if user kills between mkdir and trap.
323 trap "rmdir '$lockdir'; exit 1" 1 2 15
324
325 # Run the compile.
326 "$@"
327 ret=$?
328
329 if test -f "$cofile"; then
330 test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
331 elif test -f "${cofile}bj"; then
332 test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
333 fi
334
335 rmdir "$lockdir"
336 exit $ret
337
338 # Local Variables:
339 # mode: shell-script
340 # sh-indentation: 2
341 # eval: (add-hook 'write-file-hooks 'time-stamp)
342 # time-stamp-start: "scriptversion="
343 # time-stamp-format: "%:y-%02m-%02d.%02H"
344 # time-stamp-time-zone: "UTC"
345 # time-stamp-end: "; # UTC"
346 # End:
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
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, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-02-10'
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-05-16'
75
86 # This file is free software; you can redistribute it and/or modify it
97 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
8 # the Free Software Foundation; either version 3 of the License, or
119 # (at your option) any later version.
1210 #
1311 # This program is distributed in the hope that it will be useful, but
2119 # As a special exception to the GNU General Public License, if you
2220 # distribute this file as part of a program that contains a
2321 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25
26
27 # Originally written by Per Bothner. Please send patches (context
28 # diff format) to <config-patches@gnu.org> and include a ChangeLog
29 # entry.
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
3025 #
31 # This script attempts to guess a canonical system name similar to
32 # config.sub. If it succeeds, it prints the system name on stdout, and
33 # exits with 0. Otherwise, it exits with 1.
26 # Originally written by Per Bothner.
3427 #
3528 # You can get the latest version of this script from:
3629 # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
30 #
31 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
32
3733
3834 me=`echo "$0" | sed -e 's,.*/,,'`
3935
5349 GNU config.guess ($timestamp)
5450
5551 Originally written by Per Bothner.
56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
57 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
58 Free Software Foundation, Inc.
52 Copyright 1992-2013 Free Software Foundation, Inc.
5953
6054 This is free software; see the source for copying conditions. There is NO
6155 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
136130 UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
137131 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
138132 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
133
134 case "${UNAME_SYSTEM}" in
135 Linux|GNU|GNU/*)
136 # If the system lacks a compiler, then just pick glibc.
137 # We could probably try harder.
138 LIBC=gnu
139
140 eval $set_cc_for_build
141 cat <<-EOF > $dummy.c
142 #include <features.h>
143 #if defined(__UCLIBC__)
144 LIBC=uclibc
145 #elif defined(__dietlibc__)
146 LIBC=dietlibc
147 #else
148 LIBC=gnu
149 #endif
150 EOF
151 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
152 ;;
153 esac
139154
140155 # Note: order is significant - the case branches are not exclusive.
141156
198213 # contains redundant information, the shorter form:
199214 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
200215 echo "${machine}-${os}${release}"
216 exit ;;
217 *:Bitrig:*:*)
218 UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
219 echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
201220 exit ;;
202221 *:OpenBSD:*:*)
203222 UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
301320 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
302321 echo arm-acorn-riscix${UNAME_RELEASE}
303322 exit ;;
304 arm:riscos:*:*|arm:RISCOS:*:*)
323 arm*:riscos:*:*|arm*:RISCOS:*:*)
305324 echo arm-unknown-riscos
306325 exit ;;
307326 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
790809 exit ;;
791810 *:FreeBSD:*:*)
792811 UNAME_PROCESSOR=`/usr/bin/uname -p`
793 case ${UNAME_PROCESSOR} in
794 amd64)
795 echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
796 *)
797 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
798 esac
812 echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
799813 exit ;;
800814 i*:CYGWIN*:*)
801815 echo ${UNAME_MACHINE}-pc-cygwin
816 exit ;;
817 *:MINGW64*:*)
818 echo ${UNAME_MACHINE}-pc-mingw64
802819 exit ;;
803820 *:MINGW*:*)
804821 echo ${UNAME_MACHINE}-pc-mingw32
851868 exit ;;
852869 *:GNU:*:*)
853870 # the GNU system
854 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
871 echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
855872 exit ;;
856873 *:GNU/*:*:*)
857874 # other systems with GNU libc and userland
858 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
875 echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
859876 exit ;;
860877 i*86:Minix:*:*)
861878 echo ${UNAME_MACHINE}-pc-minix
862879 exit ;;
863880 aarch64:Linux:*:*)
864 echo ${UNAME_MACHINE}-unknown-linux-gnu
881 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
865882 exit ;;
866883 aarch64_be:Linux:*:*)
867884 UNAME_MACHINE=aarch64_be
868 echo ${UNAME_MACHINE}-unknown-linux-gnu
885 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
869886 exit ;;
870887 alpha:Linux:*:*)
871888 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
878895 EV68*) UNAME_MACHINE=alphaev68 ;;
879896 esac
880897 objdump --private-headers /bin/sh | grep -q ld.so.1
881 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
882 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
898 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
899 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
900 exit ;;
901 arc:Linux:*:* | arceb:Linux:*:*)
902 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
883903 exit ;;
884904 arm*:Linux:*:*)
885905 eval $set_cc_for_build
886906 if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
887907 | grep -q __ARM_EABI__
888908 then
889 echo ${UNAME_MACHINE}-unknown-linux-gnu
909 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
890910 else
891911 if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
892912 | grep -q __ARM_PCS_VFP
893913 then
894 echo ${UNAME_MACHINE}-unknown-linux-gnueabi
914 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
895915 else
896 echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
916 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
897917 fi
898918 fi
899919 exit ;;
900920 avr32*:Linux:*:*)
901 echo ${UNAME_MACHINE}-unknown-linux-gnu
921 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
902922 exit ;;
903923 cris:Linux:*:*)
904 echo ${UNAME_MACHINE}-axis-linux-gnu
924 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
905925 exit ;;
906926 crisv32:Linux:*:*)
907 echo ${UNAME_MACHINE}-axis-linux-gnu
927 echo ${UNAME_MACHINE}-axis-linux-${LIBC}
908928 exit ;;
909929 frv:Linux:*:*)
910 echo ${UNAME_MACHINE}-unknown-linux-gnu
930 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
911931 exit ;;
912932 hexagon:Linux:*:*)
913 echo ${UNAME_MACHINE}-unknown-linux-gnu
933 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
914934 exit ;;
915935 i*86:Linux:*:*)
916 LIBC=gnu
917 eval $set_cc_for_build
918 sed 's/^ //' << EOF >$dummy.c
919 #ifdef __dietlibc__
920 LIBC=dietlibc
921 #endif
922 EOF
923 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
924 echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
936 echo ${UNAME_MACHINE}-pc-linux-${LIBC}
925937 exit ;;
926938 ia64:Linux:*:*)
927 echo ${UNAME_MACHINE}-unknown-linux-gnu
939 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
928940 exit ;;
929941 m32r*:Linux:*:*)
930 echo ${UNAME_MACHINE}-unknown-linux-gnu
942 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
931943 exit ;;
932944 m68*:Linux:*:*)
933 echo ${UNAME_MACHINE}-unknown-linux-gnu
945 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
934946 exit ;;
935947 mips:Linux:*:* | mips64:Linux:*:*)
936948 eval $set_cc_for_build
949961 #endif
950962 EOF
951963 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
952 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
964 test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
953965 ;;
966 or1k:Linux:*:*)
967 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
968 exit ;;
954969 or32:Linux:*:*)
955 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
956971 exit ;;
957972 padre:Linux:*:*)
958 echo sparc-unknown-linux-gnu
973 echo sparc-unknown-linux-${LIBC}
959974 exit ;;
960975 parisc64:Linux:*:* | hppa64:Linux:*:*)
961 echo hppa64-unknown-linux-gnu
976 echo hppa64-unknown-linux-${LIBC}
962977 exit ;;
963978 parisc:Linux:*:* | hppa:Linux:*:*)
964979 # Look for CPU level
965980 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
966 PA7*) echo hppa1.1-unknown-linux-gnu ;;
967 PA8*) echo hppa2.0-unknown-linux-gnu ;;
968 *) echo hppa-unknown-linux-gnu ;;
981 PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
982 PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
983 *) echo hppa-unknown-linux-${LIBC} ;;
969984 esac
970985 exit ;;
971986 ppc64:Linux:*:*)
972 echo powerpc64-unknown-linux-gnu
987 echo powerpc64-unknown-linux-${LIBC}
973988 exit ;;
974989 ppc:Linux:*:*)
975 echo powerpc-unknown-linux-gnu
990 echo powerpc-unknown-linux-${LIBC}
976991 exit ;;
977992 s390:Linux:*:* | s390x:Linux:*:*)
978 echo ${UNAME_MACHINE}-ibm-linux
993 echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
979994 exit ;;
980995 sh64*:Linux:*:*)
981 echo ${UNAME_MACHINE}-unknown-linux-gnu
996 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
982997 exit ;;
983998 sh*:Linux:*:*)
984 echo ${UNAME_MACHINE}-unknown-linux-gnu
999 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9851000 exit ;;
9861001 sparc:Linux:*:* | sparc64:Linux:*:*)
987 echo ${UNAME_MACHINE}-unknown-linux-gnu
1002 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9881003 exit ;;
9891004 tile*:Linux:*:*)
990 echo ${UNAME_MACHINE}-unknown-linux-gnu
1005 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9911006 exit ;;
9921007 vax:Linux:*:*)
993 echo ${UNAME_MACHINE}-dec-linux-gnu
1008 echo ${UNAME_MACHINE}-dec-linux-${LIBC}
9941009 exit ;;
9951010 x86_64:Linux:*:*)
996 echo ${UNAME_MACHINE}-unknown-linux-gnu
1011 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
9971012 exit ;;
9981013 xtensa*:Linux:*:*)
999 echo ${UNAME_MACHINE}-unknown-linux-gnu
1014 echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
10001015 exit ;;
10011016 i*86:DYNIX/ptx:4*:*)
10021017 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
12001215 BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
12011216 echo i586-pc-haiku
12021217 exit ;;
1218 x86_64:Haiku:*:*)
1219 echo x86_64-unknown-haiku
1220 exit ;;
12031221 SX-4:SUPER-UX:*:*)
12041222 echo sx4-nec-superux${UNAME_RELEASE}
12051223 exit ;;
12261244 exit ;;
12271245 *:Darwin:*:*)
12281246 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1229 case $UNAME_PROCESSOR in
1230 i386)
1231 eval $set_cc_for_build
1232 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1233 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1234 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1235 grep IS_64BIT_ARCH >/dev/null
1236 then
1237 UNAME_PROCESSOR="x86_64"
1238 fi
1239 fi ;;
1240 unknown) UNAME_PROCESSOR=powerpc ;;
1241 esac
1247 eval $set_cc_for_build
1248 if test "$UNAME_PROCESSOR" = unknown ; then
1249 UNAME_PROCESSOR=powerpc
1250 fi
1251 if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1252 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1253 (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1254 grep IS_64BIT_ARCH >/dev/null
1255 then
1256 case $UNAME_PROCESSOR in
1257 i386) UNAME_PROCESSOR=x86_64 ;;
1258 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1259 esac
1260 fi
1261 fi
12421262 echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
12431263 exit ;;
12441264 *:procnto*:*:* | *:QNX:[0123456789]*:*)
12551275 NEO-?:NONSTOP_KERNEL:*:*)
12561276 echo neo-tandem-nsk${UNAME_RELEASE}
12571277 exit ;;
1258 NSE-?:NONSTOP_KERNEL:*:*)
1278 NSE-*:NONSTOP_KERNEL:*:*)
12591279 echo nse-tandem-nsk${UNAME_RELEASE}
12601280 exit ;;
12611281 NSR-?:NONSTOP_KERNEL:*:*)
13281348 echo ${UNAME_MACHINE}-unknown-esx
13291349 exit ;;
13301350 esac
1331
1332 #echo '(No uname command or uname output not recognized.)' 1>&2
1333 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
13341351
13351352 eval $set_cc_for_build
13361353 cat >$dummy.c <<EOF
00 #! /bin/sh
11 # Configuration validation subroutine script.
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, 2012 Free Software Foundation, Inc.
5
6 timestamp='2012-04-18'
7
8 # This file is (in principle) common to ALL GNU software.
9 # The presence of a machine in this file suggests that SOME GNU software
10 # can handle that machine. It does not imply ALL GNU software can.
11 #
12 # This file is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2 of the License, or
2 # Copyright 1992-2013 Free Software Foundation, Inc.
3
4 timestamp='2013-04-24'
5
6 # This file is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
159 # (at your option) any later version.
1610 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
2115 #
2216 # You should have received a copy of the GNU General Public License
2317 # along with this program; if not, see <http://www.gnu.org/licenses/>.
2519 # As a special exception to the GNU General Public License, if you
2620 # distribute this file as part of a program that contains a
2721 # configuration script generated by Autoconf, you may include it under
28 # the same distribution terms that you use for the rest of that program.
29
30
31 # Please send patches to <config-patches@gnu.org>. Submit a context
32 # diff and a properly formatted GNU ChangeLog entry.
22 # the same distribution terms that you use for the rest of that
23 # program. This Exception is an additional permission under section 7
24 # of the GNU General Public License, version 3 ("GPLv3").
25
26
27 # Please send patches with a ChangeLog entry to config-patches@gnu.org.
3328 #
3429 # Configuration subroutine to validate and canonicalize a configuration type.
3530 # Supply the specified configuration type as an argument.
7267 version="\
7368 GNU config.sub ($timestamp)
7469
75 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
76 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
77 Free Software Foundation, Inc.
70 Copyright 1992-2013 Free Software Foundation, Inc.
7871
7972 This is free software; see the source for copying conditions. There is NO
8073 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
122115 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
123116 case $maybe_os in
124117 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
125 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
118 linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
126119 knetbsd*-gnu* | netbsd*-gnu* | \
127120 kopensolaris*-gnu* | \
128121 storm-chaos* | os2-emx* | rtmk-nova*)
155148 -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
156149 -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
157150 -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
158 -apple | -axis | -knuth | -cray | -microblaze)
151 -apple | -axis | -knuth | -cray | -microblaze*)
159152 os=
160153 basic_machine=$1
161154 ;;
258251 | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
259252 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
260253 | am33_2.0 \
261 | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
262 | be32 | be64 \
254 | arc | arceb \
255 | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
256 | avr | avr32 \
257 | be32 | be64 \
263258 | bfin \
264259 | c4x | clipper \
265260 | d10v | d30v | dlx | dsp16xx \
272267 | le32 | le64 \
273268 | lm32 \
274269 | m32c | m32r | m32rle | m68000 | m68k | m88k \
275 | maxq | mb | microblaze | mcore | mep | metag \
270 | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
276271 | mips | mipsbe | mipseb | mipsel | mipsle \
277272 | mips16 \
278273 | mips64 | mips64el \
290285 | mipsisa64r2 | mipsisa64r2el \
291286 | mipsisa64sb1 | mipsisa64sb1el \
292287 | mipsisa64sr71k | mipsisa64sr71kel \
288 | mipsr5900 | mipsr5900el \
293289 | mipstx39 | mipstx39el \
294290 | mn10200 | mn10300 \
295291 | moxie \
296292 | mt \
297293 | msp430 \
298294 | nds32 | nds32le | nds32be \
299 | nios | nios2 \
295 | nios | nios2 | nios2eb | nios2el \
300296 | ns16k | ns32k \
301297 | open8 \
302 | or32 \
298 | or1k | or32 \
303299 | pdp10 | pdp11 | pj | pjl \
304300 | powerpc | powerpc64 | powerpc64le | powerpcle \
305301 | pyramid \
369365 | aarch64-* | aarch64_be-* \
370366 | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
371367 | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
372 | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
368 | alphapca5[67]-* | alpha64pca5[67]-* | amd64-* | arc-* | arceb-* \
373369 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
374370 | avr-* | avr32-* \
375371 | be32-* | be64-* \
388384 | lm32-* \
389385 | m32c-* | m32r-* | m32rle-* \
390386 | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
391 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
387 | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
388 | microblaze-* | microblazeel-* \
392389 | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
393390 | mips16-* \
394391 | mips64-* | mips64el-* \
406403 | mipsisa64r2-* | mipsisa64r2el-* \
407404 | mipsisa64sb1-* | mipsisa64sb1el-* \
408405 | mipsisa64sr71k-* | mipsisa64sr71kel-* \
406 | mipsr5900-* | mipsr5900el-* \
409407 | mipstx39-* | mipstx39el-* \
410408 | mmix-* \
411409 | mt-* \
412410 | msp430-* \
413411 | nds32-* | nds32le-* | nds32be-* \
414 | nios-* | nios2-* \
412 | nios-* | nios2-* | nios2eb-* | nios2el-* \
415413 | none-* | np1-* | ns16k-* | ns32k-* \
416414 | open8-* \
417415 | orion-* \
474472 basic_machine=a29k-none
475473 os=-bsd
476474 ;;
477 amd64)
478 basic_machine=x86_64-pc
479 ;;
480 amd64-*)
481 basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
482 ;;
483475 amdahl)
484476 basic_machine=580-amdahl
485477 os=-sysv
787779 basic_machine=ns32k-utek
788780 os=-sysv
789781 ;;
790 microblaze)
782 microblaze*)
791783 basic_machine=microblaze-xilinx
784 ;;
785 mingw64)
786 basic_machine=x86_64-pc
787 os=-mingw64
792788 ;;
793789 mingw32)
794790 basic_machine=i386-pc
10181014 basic_machine=i586-unknown
10191015 os=-pw32
10201016 ;;
1021 rdos)
1017 rdos | rdos64)
1018 basic_machine=x86_64-pc
1019 os=-rdos
1020 ;;
1021 rdos32)
10221022 basic_machine=i386-pc
10231023 os=-rdos
10241024 ;;
13451345 -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
13461346 | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
13471347 | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
1348 | -sym* | -kopensolaris* \
1348 | -sym* | -kopensolaris* | -plan9* \
13491349 | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
13501350 | -aos* | -aros* \
13511351 | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
13521352 | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
13531353 | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
1354 | -openbsd* | -solidbsd* \
1354 | -bitrig* | -openbsd* | -solidbsd* \
13551355 | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
13561356 | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
13571357 | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
13581358 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
13591359 | -chorusos* | -chorusrdb* | -cegcc* \
13601360 | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1361 | -mingw32* | -linux-gnu* | -linux-android* \
1362 | -linux-newlib* | -linux-uclibc* \
1361 | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
1362 | -linux-newlib* | -linux-musl* | -linux-uclibc* \
13631363 | -uxpv* | -beos* | -mpeix* | -udk* \
13641364 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
13651365 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
14911491 -aros*)
14921492 os=-aros
14931493 ;;
1494 -kaos*)
1495 os=-kaos
1496 ;;
14971494 -zvmoe)
14981495 os=-zvmoe
14991496 ;;
15831580 os=-elf
15841581 ;;
15851582 mips*-*)
1583 os=-elf
1584 ;;
1585 or1k-*)
15861586 os=-elf
15871587 ;;
15881588 or32-*)
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for dillo 3.0.3.
2 # Generated by GNU Autoconf 2.69 for dillo 3.0.4-rc1.
33 #
44 #
55 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
576576 # Identity of this package.
577577 PACKAGE_NAME='dillo'
578578 PACKAGE_TARNAME='dillo'
579 PACKAGE_VERSION='3.0.3'
580 PACKAGE_STRING='dillo 3.0.3'
579 PACKAGE_VERSION='3.0.4-rc1'
580 PACKAGE_STRING='dillo 3.0.4-rc1'
581581 PACKAGE_BUGREPORT=''
582582 PACKAGE_URL=''
583583
622622 am__EXEEXT_TRUE
623623 LTLIBOBJS
624624 LIBOBJS
625 LIBX11_LIBS
625626 LIBICONV_LIBS
626627 LIBFLTK_LIBS
627628 LIBFLTK_CFLAGS
662663 LDFLAGS
663664 CFLAGS
664665 CC
666 AM_BACKSLASH
667 AM_DEFAULT_VERBOSITY
668 AM_DEFAULT_V
669 AM_V
665670 am__untar
666671 am__tar
667672 AMTAR
738743 ac_subst_files=''
739744 ac_user_opts='
740745 enable_option_checking
746 enable_silent_rules
741747 with_jpeg_lib
742748 with_jpeg_inc
743749 enable_efence
13051311 # Omit some internal or obsolete options to make the list less imposing.
13061312 # This message is too long to be a string in the A/UX 3.1 sh.
13071313 cat <<_ACEOF
1308 \`configure' configures dillo 3.0.3 to adapt to many kinds of systems.
1314 \`configure' configures dillo 3.0.4-rc1 to adapt to many kinds of systems.
13091315
13101316 Usage: $0 [OPTION]... [VAR=VALUE]...
13111317
13761382
13771383 if test -n "$ac_init_help"; then
13781384 case $ac_init_help in
1379 short | recursive ) echo "Configuration of dillo 3.0.3:";;
1385 short | recursive ) echo "Configuration of dillo 3.0.4-rc1:";;
13801386 esac
13811387 cat <<\_ACEOF
13821388
13841390 --disable-option-checking ignore unrecognized --enable/--with options
13851391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
13861392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1393 --enable-silent-rules less verbose build output (undo: "make V=1")
1394 --disable-silent-rules verbose build output (undo: "make V=0")
13871395 --enable-efence Try to compile and run with Electric Fence
13881396 --enable-gprof Try to compile and run with profiling enabled
13891397 --enable-insure Try to compile and run with Insure++
13951403 --disable-gif Disable support for GIF images
13961404 --disable-threaded-dns Disable the advantage of a reentrant resolver library
13971405 --enable-rtfl Build with rtfl messages (for debugging rendering)
1398 --disable-dependency-tracking speeds up one-time build
1399 --enable-dependency-tracking do not reject slow dependency extractors
1406 --enable-dependency-tracking
1407 do not reject slow dependency extractors
1408 --disable-dependency-tracking
1409 speeds up one-time build
14001410
14011411 Optional Packages:
14021412 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
14821492 test -n "$ac_init_help" && exit $ac_status
14831493 if $ac_init_version; then
14841494 cat <<\_ACEOF
1485 dillo configure 3.0.3
1495 dillo configure 3.0.4-rc1
14861496 generated by GNU Autoconf 2.69
14871497
14881498 Copyright (C) 2012 Free Software Foundation, Inc.
21082118
21092119 } # ac_fn_c_check_func
21102120
2121 # ac_fn_cxx_try_run LINENO
2122 # ------------------------
2123 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2124 # that executables *can* be run.
2125 ac_fn_cxx_try_run ()
2126 {
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 if { { ac_try="$ac_link"
2129 case "(($ac_try" in
2130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2131 *) ac_try_echo=$ac_try;;
2132 esac
2133 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2134 $as_echo "$ac_try_echo"; } >&5
2135 (eval "$ac_link") 2>&5
2136 ac_status=$?
2137 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2138 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2139 { { case "(($ac_try" in
2140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2141 *) ac_try_echo=$ac_try;;
2142 esac
2143 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2144 $as_echo "$ac_try_echo"; } >&5
2145 (eval "$ac_try") 2>&5
2146 ac_status=$?
2147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2148 test $ac_status = 0; }; }; then :
2149 ac_retval=0
2150 else
2151 $as_echo "$as_me: program exited with status $ac_status" >&5
2152 $as_echo "$as_me: failed program was:" >&5
2153 sed 's/^/| /' conftest.$ac_ext >&5
2154
2155 ac_retval=$ac_status
2156 fi
2157 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2158 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2159 as_fn_set_status $ac_retval
2160
2161 } # ac_fn_cxx_try_run
2162
21112163 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
21122164 # -------------------------------------------------------
21132165 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
21982250 This file contains any messages produced by compilers while
21992251 running configure, to aid debugging if configure makes a mistake.
22002252
2201 It was created by dillo $as_me 3.0.3, which was
2253 It was created by dillo $as_me 3.0.4-rc1, which was
22022254 generated by GNU Autoconf 2.69. Invocation command line was
22032255
22042256 $ $0 $@
26872739 NONENONEs,x,x, &&
26882740 program_prefix=${target_alias}-
26892741
2690 am__api_version='1.11'
2742 am__api_version='1.14'
26912743
26922744 # Find a good install program. We prefer a C program (faster),
26932745 # so one script is as good as another. But avoid the broken or
27842836
27852837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
27862838 $as_echo_n "checking whether build environment is sane... " >&6; }
2787 # Just in case
2788 sleep 1
2789 echo timestamp > conftest.file
27902839 # Reject unsafe characters in $srcdir or the absolute working directory
27912840 # name. Accept space and tab only in the latter.
27922841 am_lf='
27972846 esac
27982847 case $srcdir in
27992848 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
2800 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
2849 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
28012850 esac
28022851
2803 # Do `set' in a subshell so we don't clobber the current shell's
2852 # Do 'set' in a subshell so we don't clobber the current shell's
28042853 # arguments. Must try -L first in case configure is actually a
28052854 # symlink; some systems play weird games with the mod time of symlinks
28062855 # (eg FreeBSD returns the mod time of the symlink's containing
28072856 # directory).
28082857 if (
2809 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2810 if test "$*" = "X"; then
2811 # -L didn't work.
2812 set X `ls -t "$srcdir/configure" conftest.file`
2813 fi
2814 rm -f conftest.file
2815 if test "$*" != "X $srcdir/configure conftest.file" \
2816 && test "$*" != "X conftest.file $srcdir/configure"; then
2817
2818 # If neither matched, then we have a broken ls. This can happen
2819 # if, for instance, CONFIG_SHELL is bash and it inherits a
2820 # broken ls alias from the environment. This has actually
2821 # happened. Such a system could not be considered "sane".
2822 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2823 alias in your environment" "$LINENO" 5
2824 fi
2825
2858 am_has_slept=no
2859 for am_try in 1 2; do
2860 echo "timestamp, slept: $am_has_slept" > conftest.file
2861 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
2862 if test "$*" = "X"; then
2863 # -L didn't work.
2864 set X `ls -t "$srcdir/configure" conftest.file`
2865 fi
2866 if test "$*" != "X $srcdir/configure conftest.file" \
2867 && test "$*" != "X conftest.file $srcdir/configure"; then
2868
2869 # If neither matched, then we have a broken ls. This can happen
2870 # if, for instance, CONFIG_SHELL is bash and it inherits a
2871 # broken ls alias from the environment. This has actually
2872 # happened. Such a system could not be considered "sane".
2873 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
2874 alias in your environment" "$LINENO" 5
2875 fi
2876 if test "$2" = conftest.file || test $am_try -eq 2; then
2877 break
2878 fi
2879 # Just in case.
2880 sleep 1
2881 am_has_slept=yes
2882 done
28262883 test "$2" = conftest.file
28272884 )
28282885 then
28342891 fi
28352892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28362893 $as_echo "yes" >&6; }
2894 # If we didn't sleep, we still need to ensure time stamps of config.status and
2895 # generated files are strictly newer.
2896 am_sleep_pid=
2897 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
2898 ( sleep 1 ) &
2899 am_sleep_pid=$!
2900 fi
2901
2902 rm -f conftest.file
2903
28372904 test "$program_prefix" != NONE &&
28382905 program_transform_name="s&^&$program_prefix&;$program_transform_name"
28392906 # Use a double $ so make ignores it.
28562923 esac
28572924 fi
28582925 # Use eval to expand $SHELL
2859 if eval "$MISSING --run true"; then
2860 am_missing_run="$MISSING --run "
2926 if eval "$MISSING --is-lightweight"; then
2927 am_missing_run="$MISSING "
28612928 else
28622929 am_missing_run=
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
2864 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
2930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
2931 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
28652932 fi
28662933
28672934 if test x"${install_sh}" != xset; then
28732940 esac
28742941 fi
28752942
2876 # Installed binaries are usually stripped using `strip' when the user
2877 # run `make install-strip'. However `strip' might not be the right
2943 # Installed binaries are usually stripped using 'strip' when the user
2944 # run "make install-strip". However 'strip' might not be the right
28782945 # tool to use in cross-compilation environments, therefore Automake
2879 # will honor the `STRIP' environment variable to overrule this program.
2946 # will honor the 'STRIP' environment variable to overrule this program.
28802947 if test "$cross_compiling" != no; then
28812948 if test -n "$ac_tool_prefix"; then
28822949 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
30153082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
30163083 $as_echo "$MKDIR_P" >&6; }
30173084
3018 mkdir_p="$MKDIR_P"
3019 case $mkdir_p in
3020 [\\/$]* | ?:[\\/]*) ;;
3021 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3022 esac
3023
30243085 for ac_prog in gawk mawk nawk awk
30253086 do
30263087 # Extract the first word of "$ac_prog", so it can be a program name with args.
31033164 fi
31043165 rmdir .tst 2>/dev/null
31053166
3167 # Check whether --enable-silent-rules was given.
3168 if test "${enable_silent_rules+set}" = set; then :
3169 enableval=$enable_silent_rules;
3170 fi
3171
3172 case $enable_silent_rules in # (((
3173 yes) AM_DEFAULT_VERBOSITY=0;;
3174 no) AM_DEFAULT_VERBOSITY=1;;
3175 *) AM_DEFAULT_VERBOSITY=1;;
3176 esac
3177 am_make=${MAKE-make}
3178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3179 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3180 if ${am_cv_make_support_nested_variables+:} false; then :
3181 $as_echo_n "(cached) " >&6
3182 else
3183 if $as_echo 'TRUE=$(BAR$(V))
3184 BAR0=false
3185 BAR1=true
3186 V=1
3187 am__doit:
3188 @$(TRUE)
3189 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3190 am_cv_make_support_nested_variables=yes
3191 else
3192 am_cv_make_support_nested_variables=no
3193 fi
3194 fi
3195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3196 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3197 if test $am_cv_make_support_nested_variables = yes; then
3198 AM_V='$(V)'
3199 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3200 else
3201 AM_V=$AM_DEFAULT_VERBOSITY
3202 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3203 fi
3204 AM_BACKSLASH='\'
3205
31063206 if test "`cd $srcdir && pwd`" != "`pwd`"; then
31073207 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
31083208 # is not polluted with repeated "-I."
31253225
31263226 # Define the identity of the package.
31273227 PACKAGE='dillo'
3128 VERSION='3.0.3'
3228 VERSION='3.0.4-rc1'
31293229
31303230
31313231 cat >>confdefs.h <<_ACEOF
31523252
31533253
31543254 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3255
3256 # For better backward compatibility. To be removed once Automake 1.9.x
3257 # dies out for good. For more background, see:
3258 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3259 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3260 mkdir_p='$(MKDIR_P)'
31553261
31563262 # We need awk for the "check" target. The system "awk" is bad on
31573263 # some platforms.
31593265 # in the wild :-( We should find a proper way to deprecate it ...
31603266 AMTAR='$${TAR-tar}'
31613267
3268
3269 # We'll loop over all known methods to create a tar archive until one works.
3270 _am_tools='gnutar pax cpio none'
3271
31623272 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
31633273
31643274
31653275
31663276
31673277
3278
3279 # POSIX will say in a future version that running "rm -f" with no argument
3280 # is OK; and we want to be able to make that assumption in our Makefile
3281 # recipes. So use an aggressive probe to check that the usage we want is
3282 # actually supported "in the wild" to an acceptable degree.
3283 # See automake bug#10828.
3284 # To make any issue more visible, cause the running configure to be aborted
3285 # by default if the 'rm' program in use doesn't match our expectations; the
3286 # user can still override this though.
3287 if rm -f && rm -fr && rm -rf; then : OK; else
3288 cat >&2 <<'END'
3289 Oops!
3290
3291 Your 'rm' program seems unable to run without file operands specified
3292 on the command line, even when the '-f' option is present. This is contrary
3293 to the behaviour of most rm programs out there, and not conforming with
3294 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3295
3296 Please tell bug-automake@gnu.org about your system, including the value
3297 of your $PATH and any error possibly output before this message. This
3298 can help us improve future automake versions.
3299
3300 END
3301 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3302 echo 'Configuration will proceed anyway, since you have set the' >&2
3303 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3304 echo >&2
3305 else
3306 cat >&2 <<'END'
3307 Aborting the configuration process, to ensure you take notice of the issue.
3308
3309 You can download and install GNU coreutils to get an 'rm' implementation
3310 that behaves properly: <http://www.gnu.org/software/coreutils/>.
3311
3312 If you want to complete the configuration process using your problematic
3313 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3314 to "yes", and re-run configure.
3315
3316 END
3317 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3318 fi
3319 fi
31683320
31693321 ac_config_headers="$ac_config_headers config.h"
31703322
40464198 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40474199 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40484200 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4201
4202 ac_ext=c
4203 ac_cpp='$CPP $CPPFLAGS'
4204 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4205 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4206 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4208 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4209 if ${am_cv_prog_cc_c_o+:} false; then :
4210 $as_echo_n "(cached) " >&6
4211 else
4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4213 /* end confdefs.h. */
4214
4215 int
4216 main ()
4217 {
4218
4219 ;
4220 return 0;
4221 }
4222 _ACEOF
4223 # Make sure it works both with $CC and with simple cc.
4224 # Following AC_PROG_CC_C_O, we do the test twice because some
4225 # compilers refuse to overwrite an existing .o file with -o,
4226 # though they will create one.
4227 am_cv_prog_cc_c_o=yes
4228 for am_i in 1 2; do
4229 if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4230 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4231 ac_status=$?
4232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4233 (exit $ac_status); } \
4234 && test -f conftest2.$ac_objext; then
4235 : OK
4236 else
4237 am_cv_prog_cc_c_o=no
4238 break
4239 fi
4240 done
4241 rm -f core conftest*
4242 unset am_i
4243 fi
4244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4245 $as_echo "$am_cv_prog_cc_c_o" >&6; }
4246 if test "$am_cv_prog_cc_c_o" != yes; then
4247 # Losing compiler, so override with the script.
4248 # FIXME: It is wrong to rewrite CC.
4249 # But if we don't then we get into trouble of one sort or another.
4250 # A longer-term fix would be to have automake use am__CC in this case,
4251 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4252 CC="$am_aux_dir/compile $CC"
4253 fi
4254 ac_ext=c
4255 ac_cpp='$CPP $CPPFLAGS'
4256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4259
40494260 DEPDIR="${am__leading_dot}deps"
40504261
40514262 ac_config_commands="$ac_config_commands depfiles"
40654276 _am_result=none
40664277 # First try GNU make style include.
40674278 echo "include confinc" > confmf
4068 # Ignore all kinds of additional output from `make'.
4279 # Ignore all kinds of additional output from 'make'.
40694280 case `$am_make -s -f confmf 2> /dev/null` in #(
40704281 *the\ am__doit\ target*)
40714282 am__include=include
41214332 # We make a subdir and do the tests there. Otherwise we can end up
41224333 # making bogus files that we don't know about and never remove. For
41234334 # instance it was reported that on HP-UX the gcc test will end up
4124 # making a dummy file named `D' -- because `-MD' means `put the output
4125 # in D'.
4335 # making a dummy file named 'D' -- because '-MD' means "put the output
4336 # in D".
41264337 rm -rf conftest.dir
41274338 mkdir conftest.dir
41284339 # Copy depcomp to subdir because otherwise we won't find it if we're
41574368 : > sub/conftest.c
41584369 for i in 1 2 3 4 5 6; do
41594370 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4160 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4161 # Solaris 8's {/usr,}/bin/sh.
4162 touch sub/conftst$i.h
4371 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4372 # Solaris 10 /bin/sh.
4373 echo '/* dummy */' > sub/conftst$i.h
41634374 done
41644375 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
41654376
4166 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4377 # We check with '-c' and '-o' for the sake of the "dashmstdout"
41674378 # mode. It turns out that the SunPro C++ compiler does not properly
4168 # handle `-M -o', and we need to detect this. Also, some Intel
4169 # versions had trouble with output in subdirs
4379 # handle '-M -o', and we need to detect this. Also, some Intel
4380 # versions had trouble with output in subdirs.
41704381 am__obj=sub/conftest.${OBJEXT-o}
41714382 am__minus_obj="-o $am__obj"
41724383 case $depmode in
41754386 test "$am__universal" = false || continue
41764387 ;;
41774388 nosideeffect)
4178 # after this tag, mechanisms are not by side-effect, so they'll
4179 # only be used when explicitly requested
4389 # After this tag, mechanisms are not by side-effect, so they'll
4390 # only be used when explicitly requested.
41804391 if test "x$enable_dependency_tracking" = xyes; then
41814392 continue
41824393 else
41844395 fi
41854396 ;;
41864397 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4187 # This compiler won't grok `-c -o', but also, the minuso test has
4398 # This compiler won't grok '-c -o', but also, the minuso test has
41884399 # not run yet. These depmodes are late enough in the game, and
41894400 # so weak that their functioning should not be impacted.
41904401 am__obj=conftest.${OBJEXT-o}
45064717 # We make a subdir and do the tests there. Otherwise we can end up
45074718 # making bogus files that we don't know about and never remove. For
45084719 # instance it was reported that on HP-UX the gcc test will end up
4509 # making a dummy file named `D' -- because `-MD' means `put the output
4510 # in D'.
4720 # making a dummy file named 'D' -- because '-MD' means "put the output
4721 # in D".
45114722 rm -rf conftest.dir
45124723 mkdir conftest.dir
45134724 # Copy depcomp to subdir because otherwise we won't find it if we're
45424753 : > sub/conftest.c
45434754 for i in 1 2 3 4 5 6; do
45444755 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4545 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4546 # Solaris 8's {/usr,}/bin/sh.
4547 touch sub/conftst$i.h
4756 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4757 # Solaris 10 /bin/sh.
4758 echo '/* dummy */' > sub/conftst$i.h
45484759 done
45494760 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
45504761
4551 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4762 # We check with '-c' and '-o' for the sake of the "dashmstdout"
45524763 # mode. It turns out that the SunPro C++ compiler does not properly
4553 # handle `-M -o', and we need to detect this. Also, some Intel
4554 # versions had trouble with output in subdirs
4764 # handle '-M -o', and we need to detect this. Also, some Intel
4765 # versions had trouble with output in subdirs.
45554766 am__obj=sub/conftest.${OBJEXT-o}
45564767 am__minus_obj="-o $am__obj"
45574768 case $depmode in
45604771 test "$am__universal" = false || continue
45614772 ;;
45624773 nosideeffect)
4563 # after this tag, mechanisms are not by side-effect, so they'll
4564 # only be used when explicitly requested
4774 # After this tag, mechanisms are not by side-effect, so they'll
4775 # only be used when explicitly requested.
45654776 if test "x$enable_dependency_tracking" = xyes; then
45664777 continue
45674778 else
45694780 fi
45704781 ;;
45714782 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4572 # This compiler won't grok `-c -o', but also, the minuso test has
4783 # This compiler won't grok '-c -o', but also, the minuso test has
45734784 # not run yet. These depmodes are late enough in the game, and
45744785 # so weak that their functioning should not be impacted.
45754786 am__obj=conftest.${OBJEXT-o}
55735784 as_fn_error $? "FLTK 1.3 required; fltk-config not found" "$LINENO" 5
55745785 esac
55755786
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to link to X11" >&5
5788 $as_echo_n "checking whether to link to X11... " >&6; }
5789 ac_ext=cpp
5790 ac_cpp='$CXXCPP $CPPFLAGS'
5791 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5792 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5793 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5794
5795 old_libs=$LIBS
5796 old_cxxflags=$CXXFLAGS
5797 LIBS=$LIBFLTK_LIBS
5798 CXXFLAGS=$LIBFLTK_CXXFLAGS
5799
5800 if test "$cross_compiling" = yes; then :
5801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5802 $as_echo "no" >&6; }
5803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Test for X11 not possible when cross-compiling. ***" >&5
5804 $as_echo "$as_me: WARNING: *** Test for X11 not possible when cross-compiling. ***" >&2;}
5805 else
5806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5807 /* end confdefs.h. */
5808
5809 #define FL_INTERNALS
5810 #include <FL/x.H>
5811
5812 int
5813 main ()
5814 {
5815
5816 #ifdef X_PROTOCOL
5817 return 0;
5818 #else
5819 return 1;
5820 #endif
5821
5822 ;
5823 return 0;
5824 }
5825 _ACEOF
5826 if ac_fn_cxx_try_run "$LINENO"; then :
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5828 $as_echo "yes" >&6; }
5829 LIBX11_LIBS="-lX11"
5830 else
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832 $as_echo "no" >&6; }
5833 fi
5834 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5835 conftest.$ac_objext conftest.beam conftest.$ac_ext
5836 fi
5837
5838 CXXFLAGS=$old_cxxflags
5839 LIBS=$old_libs
5840 ac_ext=c
5841 ac_cpp='$CPP $CPPFLAGS'
5842 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5843 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5844 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5845
55765846
55775847 if test "x$enable_jpeg" = "xyes"; then
55785848 ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
60546324 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
60556325 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
60566326
6057
6058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
60596328 /* end confdefs.h. */
60606329
60616330 #include <iconv.h>
64516720 if eval "test x$GCC = xyes"; then
64526721 CXXFLAGS="$CXXFLAGS -Wall -W -Wno-unused-parameter -fno-rtti -fno-exceptions"
64536722 fi
6723
64546724
64556725
64566726
65796849 LTLIBOBJS=$ac_ltlibobjs
65806850
65816851
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
6853 $as_echo_n "checking that generated files are newer than configure... " >&6; }
6854 if test -n "$am_sleep_pid"; then
6855 # Hide warnings about reused PIDs.
6856 wait $am_sleep_pid 2>/dev/null
6857 fi
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
6859 $as_echo "done" >&6; }
65826860 if test -n "$EXEEXT"; then
65836861 am__EXEEXT_TRUE=
65846862 am__EXEEXT_FALSE='#'
69967274 # report actual input values of CONFIG_FILES etc. instead of their
69977275 # values after options handling.
69987276 ac_log="
6999 This file was extended by dillo $as_me 3.0.3, which was
7277 This file was extended by dillo $as_me 3.0.4-rc1, which was
70007278 generated by GNU Autoconf 2.69. Invocation command line was
70017279
70027280 CONFIG_FILES = $CONFIG_FILES
70627340 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70637341 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
70647342 ac_cs_version="\\
7065 dillo config.status 3.0.3
7343 dillo config.status 3.0.4-rc1
70667344 configured by $0, generated by GNU Autoconf 2.69,
70677345 with options \\"\$ac_cs_config\\"
70687346
78008078
78018079 case $ac_file$ac_mode in
78028080 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
7803 # Autoconf 2.62 quotes --file arguments for eval, but not when files
8081 # Older Autoconf quotes --file arguments for eval, but not when files
78048082 # are listed without --file. Let's play safe and only enable the eval
78058083 # if we detect the quoting.
78068084 case $CONFIG_FILES in
78138091 # Strip MF so we end up with the name of the file.
78148092 mf=`echo "$mf" | sed -e 's/:.*$//'`
78158093 # Check whether this is an Automake generated Makefile or not.
7816 # We used to match only the files named `Makefile.in', but
8094 # We used to match only the files named 'Makefile.in', but
78178095 # some people rename them; so instead we look at the file content.
78188096 # Grep'ing the first line is not enough: some people post-process
78198097 # each Makefile.in and add a new line on top of each file to say so.
78478125 continue
78488126 fi
78498127 # Extract the definition of DEPDIR, am__include, and am__quote
7850 # from the Makefile without running `make'.
8128 # from the Makefile without running 'make'.
78518129 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
78528130 test -z "$DEPDIR" && continue
78538131 am__include=`sed -n 's/^am__include = //p' < "$mf"`
7854 test -z "am__include" && continue
8132 test -z "$am__include" && continue
78558133 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7856 # When using ansi2knr, U may be empty or an underscore; expand it
7857 U=`sed -n 's/^U = //p' < "$mf"`
78588134 # Find all dependency output files, they are included files with
78598135 # $(DEPDIR) in their names. We invoke sed twice because it is the
78608136 # simplest approach to changing $(DEPDIR) to its actual value in the
78618137 # expansion.
78628138 for file in `sed -n "
78638139 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7864 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
8140 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
78658141 # Make sure the directory exists.
78668142 test -f "$dirpart/$file" && continue
78678143 fdir=`$as_dirname -- "$file" ||
00 dnl Process this file with aclocal, autoconf and automake.
11
2 AC_INIT([dillo], [3.0.3])
2 AC_INIT([dillo], [3.0.4-rc1])
33
44 dnl Detect the canonical target build environment
55 AC_CANONICAL_TARGET
105105 fi
106106
107107
108 dnl ----------------------
108 dnl -------------------------
109109 dnl Test for FLTK 1.3 library
110 dnl ----------------------
110 dnl -------------------------
111111 dnl
112112 dnl For debugging and to be user friendly
113113 AC_MSG_CHECKING([FLTK 1.3])
123123 AC_MSG_ERROR(FLTK 1.3 required; fltk-config not found)
124124 esac
125125
126 dnl -----------------------------------
127 dnl Test for X11 (only on some systems)
128 dnl -----------------------------------
129 AC_MSG_CHECKING([whether to link to X11])
130 AC_LANG_PUSH([C++])
131 old_libs=$LIBS
132 old_cxxflags=$CXXFLAGS
133 LIBS=$LIBFLTK_LIBS
134 CXXFLAGS=$LIBFLTK_CXXFLAGS
135 AC_RUN_IFELSE([AC_LANG_PROGRAM([[
136 #define FL_INTERNALS
137 #include <FL/x.H>
138 ]],[[
139 #ifdef X_PROTOCOL
140 return 0;
141 #else
142 return 1;
143 #endif
144 ]])], [AC_MSG_RESULT(yes)
145 LIBX11_LIBS="-lX11"],
146 [AC_MSG_RESULT(no)],
147 [AC_MSG_RESULT(no)
148 AC_MSG_WARN([*** Test for X11 not possible when cross-compiling. ***])])
149 CXXFLAGS=$old_cxxflags
150 LIBS=$old_libs
151 AC_LANG_POP([C++])
126152
127153 dnl ----------------
128154 dnl Test for libjpeg
468494 AC_SUBST(LIBFLTK_CFLAGS)
469495 AC_SUBST(LIBFLTK_LIBS)
470496 AC_SUBST(LIBICONV_LIBS)
497 AC_SUBST(LIBX11_LIBS)
471498 AC_SUBST(datadir)
472499
473500 AC_CONFIG_FILES([
+271
-188
depcomp less more
00 #! /bin/sh
11 # depcomp - compile a program generating dependencies as side-effects
22
3 scriptversion=2012-03-27.16; # UTC
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
6 # 2011, 2012 Free Software Foundation, Inc.
3 scriptversion=2013-05-30.07; # UTC
4
5 # Copyright (C) 1999-2013 Free Software Foundation, Inc.
76
87 # This program is free software; you can redistribute it and/or modify
98 # it under the terms of the GNU General Public License as published by
2726
2827 case $1 in
2928 '')
30 echo "$0: No command. Try '$0 --help' for more information." 1>&2
31 exit 1;
32 ;;
29 echo "$0: No command. Try '$0 --help' for more information." 1>&2
30 exit 1;
31 ;;
3332 -h | --h*)
3433 cat <<\EOF
3534 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
5655 ;;
5756 esac
5857
58 # Get the directory component of the given path, and save it in the
59 # global variables '$dir'. Note that this directory component will
60 # be either empty or ending with a '/' character. This is deliberate.
61 set_dir_from ()
62 {
63 case $1 in
64 */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
65 *) dir=;;
66 esac
67 }
68
69 # Get the suffix-stripped basename of the given path, and save it the
70 # global variable '$base'.
71 set_base_from ()
72 {
73 base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
74 }
75
76 # If no dependency file was actually created by the compiler invocation,
77 # we still have to create a dummy depfile, to avoid errors with the
78 # Makefile "include basename.Plo" scheme.
79 make_dummy_depfile ()
80 {
81 echo "#dummy" > "$depfile"
82 }
83
84 # Factor out some common post-processing of the generated depfile.
85 # Requires the auxiliary global variable '$tmpdepfile' to be set.
86 aix_post_process_depfile ()
87 {
88 # If the compiler actually managed to produce a dependency file,
89 # post-process it.
90 if test -f "$tmpdepfile"; then
91 # Each line is of the form 'foo.o: dependency.h'.
92 # Do two passes, one to just change these to
93 # $object: dependency.h
94 # and one to simply output
95 # dependency.h:
96 # which is needed to avoid the deleted-header problem.
97 { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
98 sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
99 } > "$depfile"
100 rm -f "$tmpdepfile"
101 else
102 make_dummy_depfile
103 fi
104 }
105
59106 # A tabulation character.
60107 tab=' '
61108 # A newline character.
62109 nl='
63110 '
111 # Character ranges might be problematic outside the C locale.
112 # These definitions help.
113 upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
114 lower=abcdefghijklmnopqrstuvwxyz
115 digits=0123456789
116 alpha=${upper}${lower}
64117
65118 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
66119 echo "depcomp: Variables source, object and depmode must be set" 1>&2
73126 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
74127
75128 rm -f "$tmpdepfile"
129
130 # Avoid interferences from the environment.
131 gccflag= dashmflag=
76132
77133 # Some modes work just like other modes, but use different flags. We
78134 # parameterize here, but still list the modes in the big case below,
85141 fi
86142
87143 if test "$depmode" = dashXmstdout; then
88 # This is just like dashmstdout with a different argument.
89 dashmflag=-xM
90 depmode=dashmstdout
144 # This is just like dashmstdout with a different argument.
145 dashmflag=-xM
146 depmode=dashmstdout
91147 fi
92148
93149 cygpath_u="cygpath -u -f -"
94150 if test "$depmode" = msvcmsys; then
95 # This is just like msvisualcpp but w/o cygpath translation.
96 # Just convert the backslash-escaped backslashes to single forward
97 # slashes to satisfy depend.m4
98 cygpath_u='sed s,\\\\,/,g'
99 depmode=msvisualcpp
151 # This is just like msvisualcpp but w/o cygpath translation.
152 # Just convert the backslash-escaped backslashes to single forward
153 # slashes to satisfy depend.m4
154 cygpath_u='sed s,\\\\,/,g'
155 depmode=msvisualcpp
100156 fi
101157
102158 if test "$depmode" = msvc7msys; then
103 # This is just like msvc7 but w/o cygpath translation.
104 # Just convert the backslash-escaped backslashes to single forward
105 # slashes to satisfy depend.m4
106 cygpath_u='sed s,\\\\,/,g'
107 depmode=msvc7
159 # This is just like msvc7 but w/o cygpath translation.
160 # Just convert the backslash-escaped backslashes to single forward
161 # slashes to satisfy depend.m4
162 cygpath_u='sed s,\\\\,/,g'
163 depmode=msvc7
108164 fi
109165
110166 if test "$depmode" = xlc; then
111 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
112 gccflag=-qmakedep=gcc,-MF
113 depmode=gcc
167 # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
168 gccflag=-qmakedep=gcc,-MF
169 depmode=gcc
114170 fi
115171
116172 case "$depmode" in
133189 done
134190 "$@"
135191 stat=$?
136 if test $stat -eq 0; then :
137 else
192 if test $stat -ne 0; then
138193 rm -f "$tmpdepfile"
139194 exit $stat
140195 fi
142197 ;;
143198
144199 gcc)
200 ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
201 ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
202 ## (see the conditional assignment to $gccflag above).
145203 ## There are various ways to get dependency output from gcc. Here's
146204 ## why we pick this rather obscure method:
147205 ## - Don't want to use -MD because we'd like the dependencies to end
148206 ## up in a subdir. Having to rename by hand is ugly.
149207 ## (We might end up doing this anyway to support other compilers.)
150208 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
151 ## -MM, not -M (despite what the docs say).
209 ## -MM, not -M (despite what the docs say). Also, it might not be
210 ## supported by the other compilers which use the 'gcc' depmode.
152211 ## - Using -M directly means running the compiler twice (even worse
153212 ## than renaming).
154213 if test -z "$gccflag"; then
156215 fi
157216 "$@" -Wp,"$gccflag$tmpdepfile"
158217 stat=$?
159 if test $stat -eq 0; then :
160 else
218 if test $stat -ne 0; then
161219 rm -f "$tmpdepfile"
162220 exit $stat
163221 fi
164222 rm -f "$depfile"
165223 echo "$object : \\" > "$depfile"
166 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
167 ## The second -e expression handles DOS-style file names with drive letters.
224 # The second -e expression handles DOS-style file names with drive
225 # letters.
168226 sed -e 's/^[^:]*: / /' \
169227 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
170228 ## This next piece of magic avoids the "deleted header file" problem.
173231 ## typically no way to rebuild the header). We avoid this by adding
174232 ## dummy dependencies for each header file. Too bad gcc doesn't do
175233 ## this for us directly.
176 tr ' ' "$nl" < "$tmpdepfile" |
177234 ## Some versions of gcc put a space before the ':'. On the theory
178235 ## that the space means something, we add a space to the output as
179236 ## well. hp depmode also adds that space, but also prefixes the VPATH
180237 ## to the object. Take care to not repeat it in the output.
181238 ## Some versions of the HPUX 10.20 sed can't process this invocation
182239 ## correctly. Breaking it into two sed invocations is a workaround.
183 sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
184 | sed -e 's/$/ :/' >> "$depfile"
240 tr ' ' "$nl" < "$tmpdepfile" \
241 | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
242 | sed -e 's/$/ :/' >> "$depfile"
185243 rm -f "$tmpdepfile"
186244 ;;
187245
199257 "$@" -MDupdate "$tmpdepfile"
200258 fi
201259 stat=$?
202 if test $stat -eq 0; then :
203 else
260 if test $stat -ne 0; then
204261 rm -f "$tmpdepfile"
205262 exit $stat
206263 fi
208265
209266 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
210267 echo "$object : \\" > "$depfile"
211
212268 # Clip off the initial element (the dependent). Don't try to be
213269 # clever and replace this with sed code, as IRIX sed won't handle
214270 # lines with more than a fixed number of characters (4096 in
216272 # the IRIX cc adds comments like '#:fec' to the end of the
217273 # dependency line.
218274 tr ' ' "$nl" < "$tmpdepfile" \
219 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
220 tr "$nl" ' ' >> "$depfile"
275 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
276 | tr "$nl" ' ' >> "$depfile"
221277 echo >> "$depfile"
222
223278 # The second pass generates a dummy entry for each header file.
224279 tr ' ' "$nl" < "$tmpdepfile" \
225 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
226 >> "$depfile"
280 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
281 >> "$depfile"
227282 else
228 # The sourcefile does not contain any dependencies, so just
229 # store a dummy comment line, to avoid errors with the Makefile
230 # "include basename.Plo" scheme.
231 echo "#dummy" > "$depfile"
283 make_dummy_depfile
232284 fi
233285 rm -f "$tmpdepfile"
234286 ;;
246298 # current directory. Also, the AIX compiler puts '$object:' at the
247299 # start of each line; $object doesn't have directory information.
248300 # Version 6 uses the directory in both cases.
249 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
250 test "x$dir" = "x$object" && dir=
251 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
301 set_dir_from "$object"
302 set_base_from "$object"
252303 if test "$libtool" = yes; then
253304 tmpdepfile1=$dir$base.u
254305 tmpdepfile2=$base.u
261312 "$@" -M
262313 fi
263314 stat=$?
264
265 if test $stat -eq 0; then :
266 else
315 if test $stat -ne 0; then
267316 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
268317 exit $stat
269318 fi
272321 do
273322 test -f "$tmpdepfile" && break
274323 done
275 if test -f "$tmpdepfile"; then
276 # Each line is of the form 'foo.o: dependent.h'.
277 # Do two passes, one to just change these to
278 # '$object: dependent.h' and one to simply 'dependent.h:'.
279 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
280 sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
281 else
282 # The sourcefile does not contain any dependencies, so just
283 # store a dummy comment line, to avoid errors with the Makefile
284 # "include basename.Plo" scheme.
285 echo "#dummy" > "$depfile"
286 fi
324 aix_post_process_depfile
325 ;;
326
327 tcc)
328 # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
329 # FIXME: That version still under development at the moment of writing.
330 # Make that this statement remains true also for stable, released
331 # versions.
332 # It will wrap lines (doesn't matter whether long or short) with a
333 # trailing '\', as in:
334 #
335 # foo.o : \
336 # foo.c \
337 # foo.h \
338 #
339 # It will put a trailing '\' even on the last line, and will use leading
340 # spaces rather than leading tabs (at least since its commit 0394caf7
341 # "Emit spaces for -MD").
342 "$@" -MD -MF "$tmpdepfile"
343 stat=$?
344 if test $stat -ne 0; then
345 rm -f "$tmpdepfile"
346 exit $stat
347 fi
348 rm -f "$depfile"
349 # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
350 # We have to change lines of the first kind to '$object: \'.
351 sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
352 # And for each line of the second kind, we have to emit a 'dep.h:'
353 # dummy dependency, to avoid the deleted-header problem.
354 sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
287355 rm -f "$tmpdepfile"
288356 ;;
289357
290 icc)
291 # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
292 # However on
293 # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
294 # ICC 7.0 will fill foo.d with something like
295 # foo.o: sub/foo.c
296 # foo.o: sub/foo.h
297 # which is wrong. We want
298 # sub/foo.o: sub/foo.c
299 # sub/foo.o: sub/foo.h
300 # sub/foo.c:
301 # sub/foo.h:
302 # ICC 7.1 will output
358 ## The order of this option in the case statement is important, since the
359 ## shell code in configure will try each of these formats in the order
360 ## listed in this file. A plain '-MD' option would be understood by many
361 ## compilers, so we must ensure this comes after the gcc and icc options.
362 pgcc)
363 # Portland's C compiler understands '-MD'.
364 # Will always output deps to 'file.d' where file is the root name of the
365 # source file under compilation, even if file resides in a subdirectory.
366 # The object file name does not affect the name of the '.d' file.
367 # pgcc 10.2 will output
303368 # foo.o: sub/foo.c sub/foo.h
304 # and will wrap long lines using '\':
369 # and will wrap long lines using '\' :
305370 # foo.o: sub/foo.c ... \
306371 # sub/foo.h ... \
307372 # ...
308 # tcc 0.9.26 (FIXME still under development at the moment of writing)
309 # will emit a similar output, but also prepend the continuation lines
310 # with horizontal tabulation characters.
311 "$@" -MD -MF "$tmpdepfile"
312 stat=$?
313 if test $stat -eq 0; then :
314 else
373 set_dir_from "$object"
374 # Use the source, not the object, to determine the base name, since
375 # that's sadly what pgcc will do too.
376 set_base_from "$source"
377 tmpdepfile=$base.d
378
379 # For projects that build the same source file twice into different object
380 # files, the pgcc approach of using the *source* file root name can cause
381 # problems in parallel builds. Use a locking strategy to avoid stomping on
382 # the same $tmpdepfile.
383 lockdir=$base.d-lock
384 trap "
385 echo '$0: caught signal, cleaning up...' >&2
386 rmdir '$lockdir'
387 exit 1
388 " 1 2 13 15
389 numtries=100
390 i=$numtries
391 while test $i -gt 0; do
392 # mkdir is a portable test-and-set.
393 if mkdir "$lockdir" 2>/dev/null; then
394 # This process acquired the lock.
395 "$@" -MD
396 stat=$?
397 # Release the lock.
398 rmdir "$lockdir"
399 break
400 else
401 # If the lock is being held by a different process, wait
402 # until the winning process is done or we timeout.
403 while test -d "$lockdir" && test $i -gt 0; do
404 sleep 1
405 i=`expr $i - 1`
406 done
407 fi
408 i=`expr $i - 1`
409 done
410 trap - 1 2 13 15
411 if test $i -le 0; then
412 echo "$0: failed to acquire lock after $numtries attempts" >&2
413 echo "$0: check lockdir '$lockdir'" >&2
414 exit 1
415 fi
416
417 if test $stat -ne 0; then
315418 rm -f "$tmpdepfile"
316419 exit $stat
317420 fi
318421 rm -f "$depfile"
319 # Each line is of the form 'foo.o: dependent.h',
320 # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
422 # Each line is of the form `foo.o: dependent.h',
423 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
321424 # Do two passes, one to just change these to
322 # '$object: dependent.h' and one to simply 'dependent.h:'.
323 sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \
324 < "$tmpdepfile" > "$depfile"
325 sed '
326 s/[ '"$tab"'][ '"$tab"']*/ /g
327 s/^ *//
328 s/ *\\*$//
329 s/^[^:]*: *//
330 /^$/d
331 /:$/d
332 s/$/ :/
333 ' < "$tmpdepfile" >> "$depfile"
425 # `$object: dependent.h' and one to simply `dependent.h:'.
426 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
427 # Some versions of the HPUX 10.20 sed can't process this invocation
428 # correctly. Breaking it into two sed invocations is a workaround.
429 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
430 | sed -e 's/$/ :/' >> "$depfile"
334431 rm -f "$tmpdepfile"
335432 ;;
336433
341438 # 'foo.d', which lands next to the object file, wherever that
342439 # happens to be.
343440 # Much of this is similar to the tru64 case; see comments there.
344 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
345 test "x$dir" = "x$object" && dir=
346 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
441 set_dir_from "$object"
442 set_base_from "$object"
347443 if test "$libtool" = yes; then
348444 tmpdepfile1=$dir$base.d
349445 tmpdepfile2=$dir.libs/$base.d
354450 "$@" +Maked
355451 fi
356452 stat=$?
357 if test $stat -eq 0; then :
358 else
453 if test $stat -ne 0; then
359454 rm -f "$tmpdepfile1" "$tmpdepfile2"
360455 exit $stat
361456 fi
365460 test -f "$tmpdepfile" && break
366461 done
367462 if test -f "$tmpdepfile"; then
368 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
463 sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
369464 # Add 'dependent.h:' lines.
370465 sed -ne '2,${
371 s/^ *//
372 s/ \\*$//
373 s/$/:/
374 p
375 }' "$tmpdepfile" >> "$depfile"
466 s/^ *//
467 s/ \\*$//
468 s/$/:/
469 p
470 }' "$tmpdepfile" >> "$depfile"
376471 else
377 echo "#dummy" > "$depfile"
472 make_dummy_depfile
378473 fi
379474 rm -f "$tmpdepfile" "$tmpdepfile2"
380475 ;;
381476
382477 tru64)
383 # The Tru64 compiler uses -MD to generate dependencies as a side
384 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
385 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
386 # dependencies in 'foo.d' instead, so we check for that too.
387 # Subdirectories are respected.
388 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
389 test "x$dir" = "x$object" && dir=
390 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
391
392 if test "$libtool" = yes; then
393 # With Tru64 cc, shared objects can also be used to make a
394 # static library. This mechanism is used in libtool 1.4 series to
395 # handle both shared and static libraries in a single compilation.
396 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
397 #
398 # With libtool 1.5 this exception was removed, and libtool now
399 # generates 2 separate objects for the 2 libraries. These two
400 # compilations output dependencies in $dir.libs/$base.o.d and
401 # in $dir$base.o.d. We have to check for both files, because
402 # one of the two compilations can be disabled. We should prefer
403 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
404 # automatically cleaned when .libs/ is deleted, while ignoring
405 # the former would cause a distcleancheck panic.
406 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
407 tmpdepfile2=$dir$base.o.d # libtool 1.5
408 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
409 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
410 "$@" -Wc,-MD
411 else
412 tmpdepfile1=$dir$base.o.d
413 tmpdepfile2=$dir$base.d
414 tmpdepfile3=$dir$base.d
415 tmpdepfile4=$dir$base.d
416 "$@" -MD
417 fi
418
419 stat=$?
420 if test $stat -eq 0; then :
421 else
422 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
423 exit $stat
424 fi
425
426 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
427 do
428 test -f "$tmpdepfile" && break
429 done
430 if test -f "$tmpdepfile"; then
431 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
432 sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
433 else
434 echo "#dummy" > "$depfile"
435 fi
436 rm -f "$tmpdepfile"
437 ;;
478 # The Tru64 compiler uses -MD to generate dependencies as a side
479 # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
480 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
481 # dependencies in 'foo.d' instead, so we check for that too.
482 # Subdirectories are respected.
483 set_dir_from "$object"
484 set_base_from "$object"
485
486 if test "$libtool" = yes; then
487 # Libtool generates 2 separate objects for the 2 libraries. These
488 # two compilations output dependencies in $dir.libs/$base.o.d and
489 # in $dir$base.o.d. We have to check for both files, because
490 # one of the two compilations can be disabled. We should prefer
491 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
492 # automatically cleaned when .libs/ is deleted, while ignoring
493 # the former would cause a distcleancheck panic.
494 tmpdepfile1=$dir$base.o.d # libtool 1.5
495 tmpdepfile2=$dir.libs/$base.o.d # Likewise.
496 tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
497 "$@" -Wc,-MD
498 else
499 tmpdepfile1=$dir$base.d
500 tmpdepfile2=$dir$base.d
501 tmpdepfile3=$dir$base.d
502 "$@" -MD
503 fi
504
505 stat=$?
506 if test $stat -ne 0; then
507 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
508 exit $stat
509 fi
510
511 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
512 do
513 test -f "$tmpdepfile" && break
514 done
515 # Same post-processing that is required for AIX mode.
516 aix_post_process_depfile
517 ;;
438518
439519 msvc7)
440520 if test "$libtool" = yes; then
445525 "$@" $showIncludes > "$tmpdepfile"
446526 stat=$?
447527 grep -v '^Note: including file: ' "$tmpdepfile"
448 if test "$stat" = 0; then :
449 else
528 if test $stat -ne 0; then
450529 rm -f "$tmpdepfile"
451530 exit $stat
452531 fi
472551 G
473552 p
474553 }' >> "$depfile"
554 echo >> "$depfile" # make sure the fragment doesn't end with a backslash
475555 rm -f "$tmpdepfile"
476556 ;;
477557
523603 # in the target name. This is to cope with DOS-style filenames:
524604 # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
525605 "$@" $dashmflag |
526 sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
606 sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
527607 rm -f "$depfile"
528608 cat < "$tmpdepfile" > "$depfile"
529 tr ' ' "$nl" < "$tmpdepfile" | \
530 ## Some versions of the HPUX 10.20 sed can't process this invocation
531 ## correctly. Breaking it into two sed invocations is a workaround.
532 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
609 # Some versions of the HPUX 10.20 sed can't process this sed invocation
610 # correctly. Breaking it into two sed invocations is a workaround.
611 tr ' ' "$nl" < "$tmpdepfile" \
612 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
613 | sed -e 's/$/ :/' >> "$depfile"
533614 rm -f "$tmpdepfile"
534615 ;;
535616
582663 # makedepend may prepend the VPATH from the source file name to the object.
583664 # No need to regex-escape $object, excess matching of '.' is harmless.
584665 sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
585 sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
586 ## Some versions of the HPUX 10.20 sed can't process this invocation
587 ## correctly. Breaking it into two sed invocations is a workaround.
588 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
666 # Some versions of the HPUX 10.20 sed can't process the last invocation
667 # correctly. Breaking it into two sed invocations is a workaround.
668 sed '1,2d' "$tmpdepfile" \
669 | tr ' ' "$nl" \
670 | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
671 | sed -e 's/$/ :/' >> "$depfile"
589672 rm -f "$tmpdepfile" "$tmpdepfile".bak
590673 ;;
591674
621704 esac
622705 done
623706
624 "$@" -E |
625 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
626 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
627 sed '$ s: \\$::' > "$tmpdepfile"
707 "$@" -E \
708 | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
709 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
710 | sed '$ s: \\$::' > "$tmpdepfile"
628711 rm -f "$depfile"
629712 echo "$object : \\" > "$depfile"
630713 cat < "$tmpdepfile" >> "$depfile"
656739 shift
657740 ;;
658741 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
659 set fnord "$@"
660 shift
661 shift
662 ;;
742 set fnord "$@"
743 shift
744 shift
745 ;;
663746 *)
664 set fnord "$@" "$arg"
665 shift
666 shift
667 ;;
747 set fnord "$@" "$arg"
748 shift
749 shift
750 ;;
668751 esac
669752 done
670753 "$@" -E 2>/dev/null |
66 $host = "mirrors.dotsrc.org";
77 $basesourcedir = "/ctan";
88 $sourcedir = "";
9
10 sub ftpmessage {
11 # I'm not sure whether $ftp->message is supposed to end with "\n"
12 # or not. To be sure (and have nicer output on the screen), it is
13 # removed here.
14 my $x = $ftp->message;
15 chomp $x;
16 return $x;
17 }
918
1019 # Determine ${prefix}, for the default target directory for pattern
1120 # files. Two different strategies ...
8089 # Connect to CTAN FTP server, change to the directory where the
8190 # patterns lie, and read files list (which may be useful later).
8291 $ftp = Net::FTP->new($host,Timeout=>240)
83 or die "Cannot connect to $host: $!";
84 $ftp->login() or die "Cannot login: $!";
85 $ftp->cwd($sourcedir) or die "Cannot change to directory $sourcedir: $!";
86 @files = $ftp->ls or die "Cannot read directory: $!";
92 or die "Cannot connect to $host: $@";
93 $ftp->login() or die "Cannot login: ", ftpmessage;
94 $ftp->cwd($sourcedir)
95 or die "Cannot change to directory $sourcedir: ", ftpmessage;
96 @files = $ftp->ls or die "Cannot read directory: ", ftpmessage;
8797
8898 # Finally, read pattern files.
8999 foreach $arg (@ARGV) {
107117 if ($ftp->get ("hyph-$arg.lic.txt", $tmplic)) {
108118 $licfound = 1;
109119 } else {
110 print "Warning: Cannot download license file for \"$arg\": $!\n";
120 print "Warning: Cannot download license file for \"$arg\": ",
121 ftpmessage, "\n";
111122 }
112123
113124 # Combine both, licence and pattern, to the final pattern
146157 } else {
147158 # Not found. If a single language was specified (e. g. "en"),
148159 # search for possibilities.
149 print "Error: Cannot download pattern file for \"$arg\": $!\n";
160 print "Error: Cannot download pattern file for \"$arg\": ",
161 ftpmessage, "\n";
150162 if ($lang eq $arg) {
151163 print "Try one of these:\n";
152164 foreach(@files) {
1313 # geometry=650x545+0+20
1414 #geometry=780x580
1515
16 # Change this if you want to have text-only browsing from the start.
16 # Change this (and the following option) if you want to have text-only browsing
17 # from the start. (While browsing, this can be changed from the tools/settings
18 # menu.)
19 #load_images=YES
20
21 # Change this if you do not want background images to be loaded initially.
1722 # (While browsing, this can be changed from the tools/settings menu.)
18 #load_images=YES
23 #load_background_images=YES
1924
2025 # Change this if you want to disable loading of CSS stylesheets initially.
2126 # (While browsing, this can be changed from the tools/settings menu.)
6772 # Minimum font size in pixels
6873 #font_min_size=6
6974
70 # Show tooltip popups for UI and for HTML title attributes
75 # Show tooltip popups for HTML title attributes
7176 #show_tooltip=YES
7277
7378 # Set this to YES if you want to limit the word wrap width to the viewport
115120 # Notice that there is no "penalty_em_dash_left_2", since breaking
116121 # left of an em-dash makes the line *begin*, not *end* with a dash.
117122
123 # This factor is multiplied with the line height to get the
124 # stretchability of a non-justified line. The larger this factor (and
125 # thus, the stretchability), the less likely the words are hyphenated;
126 # so you can use this value to control hyphenation of non-justified
127 # text.
128 #stretchability_factor=1
118129
119130 #-------------------------------------------------------------------------
120131 # PARSING SECTION
145156 # Format: search_url="[<label> ]<url>"
146157 # You can enable multiple search_url strings at once and select from among
147158 # them at runtime, with the first being the default.
148 search_url="http://duckduckgo.com/lite/?kp=-1&q=%s"
159 search_url="DuckDuckGo http://duckduckgo.com/lite/?kp=-1&q=%s"
149160 search_url="Wikipedia http://www.wikipedia.org/w/index.php?search=%s&go=Go"
150161 search_url="Free Dictionary http://www.thefreedictionary.com/%s"
151162 search_url="Google http://www.google.com/search?ie=UTF-8&oe=UTF-8&q=%s"
197208 #
198209 # See http://zytrax.com/tech/web/browser_ids.htm for a compilation of strings.
199210 #
200 # http_user_agent="Mozilla/5.0 (Windows NT 5.1; rv:18.0) Gecko/20100101 Firefox/18.0"
201 # http_user_agent="Wget/1.12 (linux-gnu)"
211 # http_user_agent="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0"
212 # http_user_agent="Wget/1.13.4 (linux-gnu)"
202213 #The default is "Dillo/"+current_version_number
203214
204215 #-------------------------------------------------------------------------
212223
213224 # If your eyes suffer with white backgrounds, change this.
214225 #allow_white_bg=YES
226
227 # If allow_white_bg is set to NO, white backgrounds are replaced by
228 # this color.
229 #white_bg_replacement=0xe0e0a3
215230
216231 # When set to YES, the page author's visited link color may be overridden
217232 # to allow better contrast with text/links/background
315330 #show_tools=YES
316331 #show_filemenu=YES
317332 #show_clear_url=YES
333 #show_url=YES
318334 #show_search=YES
319335 #show_help=YES
320336 #show_progress_box=YES
337
338 # Show tooltip popups for the UI
339 #show_ui_tooltip=YES
321340
322341 # Start dillo with the panels hidden?
323342 #fullwindow_start=NO
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5279 host_triplet = @host@
5380 target_triplet = @target@
5481 subdir = dlib
55 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp
5684 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5785 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
5886 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6492 LIBRARIES = $(noinst_LIBRARIES)
6593 AR = ar
6694 ARFLAGS = cru
95 AM_V_AR = $(am__v_AR_@AM_V@)
96 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
97 am__v_AR_0 = @echo " AR " $@;
98 am__v_AR_1 =
6799 libDlib_a_AR = $(AR) $(ARFLAGS)
68100 libDlib_a_LIBADD =
69101 am_libDlib_a_OBJECTS = dlib.$(OBJEXT)
70102 libDlib_a_OBJECTS = $(am_libDlib_a_OBJECTS)
103 AM_V_P = $(am__v_P_@AM_V@)
104 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
105 am__v_P_0 = false
106 am__v_P_1 = :
107 AM_V_GEN = $(am__v_GEN_@AM_V@)
108 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
109 am__v_GEN_0 = @echo " GEN " $@;
110 am__v_GEN_1 =
111 AM_V_at = $(am__v_at_@AM_V@)
112 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
113 am__v_at_0 = @
114 am__v_at_1 =
71115 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
72116 depcomp = $(SHELL) $(top_srcdir)/depcomp
73117 am__depfiles_maybe = depfiles
74118 am__mv = mv -f
75119 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
76120 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
121 AM_V_CC = $(am__v_CC_@AM_V@)
122 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
123 am__v_CC_0 = @echo " CC " $@;
124 am__v_CC_1 =
77125 CCLD = $(CC)
78126 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
127 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
128 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
129 am__v_CCLD_0 = @echo " CCLD " $@;
130 am__v_CCLD_1 =
79131 SOURCES = $(libDlib_a_SOURCES)
80132 DIST_SOURCES = $(libDlib_a_SOURCES)
81133 am__can_run_installinfo = \
83135 n|no|NO) false;; \
84136 *) (install-info --version) >/dev/null 2>&1;; \
85137 esac
138 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
139 # Read a list of newline-separated strings from the standard input,
140 # and print each of them once, without duplicates. Input order is
141 # *not* preserved.
142 am__uniquify_input = $(AWK) '\
143 BEGIN { nonempty = 0; } \
144 { items[$$0] = 1; nonempty = 1; } \
145 END { if (nonempty) { for (i in items) print i; }; } \
146 '
147 # Make sure the list of sources is unique. This is necessary because,
148 # e.g., the same source file might be shared among _SOURCES variables
149 # for different programs/libraries.
150 am__define_uniq_tagged_files = \
151 list='$(am__tagged_files)'; \
152 unique=`for i in $$list; do \
153 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
154 done | $(am__uniquify_input)`
86155 ETAGS = etags
87156 CTAGS = ctags
88157 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
89158 ACLOCAL = @ACLOCAL@
90159 AMTAR = @AMTAR@
160 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
91161 AUTOCONF = @AUTOCONF@
92162 AUTOHEADER = @AUTOHEADER@
93163 AUTOMAKE = @AUTOMAKE@
129199 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
130200 LIBS = @LIBS@
131201 LIBSSL_LIBS = @LIBSSL_LIBS@
202 LIBX11_LIBS = @LIBX11_LIBS@
132203 LIBZ_LIBS = @LIBZ_LIBS@
133204 LTLIBOBJS = @LTLIBOBJS@
134205 MAKEINFO = @MAKEINFO@
247318
248319 clean-noinstLIBRARIES:
249320 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
321
250322 libDlib.a: $(libDlib_a_OBJECTS) $(libDlib_a_DEPENDENCIES) $(EXTRA_libDlib_a_DEPENDENCIES)
251 -rm -f libDlib.a
252 $(libDlib_a_AR) libDlib.a $(libDlib_a_OBJECTS) $(libDlib_a_LIBADD)
253 $(RANLIB) libDlib.a
323 $(AM_V_at)-rm -f libDlib.a
324 $(AM_V_AR)$(libDlib_a_AR) libDlib.a $(libDlib_a_OBJECTS) $(libDlib_a_LIBADD)
325 $(AM_V_at)$(RANLIB) libDlib.a
254326
255327 mostlyclean-compile:
256328 -rm -f *.$(OBJEXT)
261333 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlib.Po@am__quote@
262334
263335 .c.o:
264 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
265 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
266 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
336 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
337 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
338 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
267339 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
268 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
340 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
269341
270342 .c.obj:
271 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
272 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
273 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
343 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
344 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
345 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
274346 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
275 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
276
277 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
278 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
279 unique=`for i in $$list; do \
280 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
281 done | \
282 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
283 END { if (nonempty) { for (i in files) print i; }; }'`; \
284 mkid -fID $$unique
285 tags: TAGS
286
287 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
288 $(TAGS_FILES) $(LISP)
347 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
348
349 ID: $(am__tagged_files)
350 $(am__define_uniq_tagged_files); mkid -fID $$unique
351 tags: tags-am
352 TAGS: tags
353
354 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
289355 set x; \
290356 here=`pwd`; \
291 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
292 unique=`for i in $$list; do \
293 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
294 done | \
295 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
296 END { if (nonempty) { for (i in files) print i; }; }'`; \
357 $(am__define_uniq_tagged_files); \
297358 shift; \
298359 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
299360 test -n "$$unique" || unique=$$empty_fix; \
305366 $$unique; \
306367 fi; \
307368 fi
308 ctags: CTAGS
309 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
310 $(TAGS_FILES) $(LISP)
311 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
312 unique=`for i in $$list; do \
313 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
314 done | \
315 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
316 END { if (nonempty) { for (i in files) print i; }; }'`; \
369 ctags: ctags-am
370
371 CTAGS: ctags
372 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
373 $(am__define_uniq_tagged_files); \
317374 test -z "$(CTAGS_ARGS)$$unique" \
318375 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
319376 $$unique
322379 here=`$(am__cd) $(top_builddir) && pwd` \
323380 && $(am__cd) $(top_srcdir) \
324381 && gtags -i $(GTAGS_ARGS) "$$here"
382 cscopelist: cscopelist-am
383
384 cscopelist-am: $(am__tagged_files)
385 list='$(am__tagged_files)'; \
386 case "$(srcdir)" in \
387 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
388 *) sdir=$(subdir)/$(srcdir) ;; \
389 esac; \
390 for i in $$list; do \
391 if test -f "$$i"; then \
392 echo "$(subdir)/$$i"; \
393 else \
394 echo "$$sdir/$$i"; \
395 fi; \
396 done >> $(top_builddir)/cscope.files
325397
326398 distclean-tags:
327399 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
461533
462534 .MAKE: install-am install-strip
463535
464 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
465 clean-noinstLIBRARIES ctags distclean distclean-compile \
466 distclean-generic distclean-tags distdir dvi dvi-am html \
467 html-am info info-am install install-am install-data \
468 install-data-am install-dvi install-dvi-am install-exec \
469 install-exec-am install-html install-html-am install-info \
470 install-info-am install-man install-pdf install-pdf-am \
471 install-ps install-ps-am install-strip installcheck \
472 installcheck-am installdirs maintainer-clean \
536 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
537 clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
538 distclean-compile distclean-generic distclean-tags distdir dvi \
539 dvi-am html html-am info info-am install install-am \
540 install-data install-data-am install-dvi install-dvi-am \
541 install-exec install-exec-am install-html install-html-am \
542 install-info install-info-am install-man install-pdf \
543 install-pdf-am install-ps install-ps-am install-strip \
544 installcheck installcheck-am installdirs maintainer-clean \
473545 maintainer-clean-generic mostlyclean mostlyclean-compile \
474 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
546 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
475547 uninstall-am
476548
477549
0 Last review: August 04, 2009 --jcid
1
2
3 ----------------------------
4 Internal working for the CCC
5 ----------------------------
6
7
8 HTTP protocol
9 -------------
10
11
12 Query: |
13 .
14 1B --> 1B 1B --> 1B --> | -------------.
15 .----. .----. .----. . |
16 I |Capi| |http| | IO | | |
17 '----' '----' '----' . |
18 1F <-- 1F 1F <-- 1F | V
19 .
20 | [Server]
21 Answer: .
22
23 2B --> 2B 2B --> 2B | |
24 .----. .----. .----. . |
25 II |Capi| |Dpi | | IO | | |
26 '----' '----' '----' . |
27 2F <-- 2F 2F <-- 2F <-- | <------------'
28 .
29 |
30
31 * a_Capi_open_url() builds both the Answer and Query chains at
32 once (Answer first then Query), to ensure a uniform structure
33 that avoids complexity (e.g. race conditions).
34
35 * Http_get() sets a callback for the DNS hostname resolve.
36 Normally it comes later, but may also by issued immediately if
37 the hostname is cached.
38
39 * The socket FD is passed by means of OpSend by the http module
40 once the remote IP is known and the socket is connected.
41
42
43
44 Function calls for HTTP CCC
45 ---------------------------
46
47 a_Capi_open_url
48 if (reload)
49 Capi OpStart 2B (answer) [Capi] --> [dpi] --> [IO]
50 Capi OpStart 1B (query) [Capi] --> [http] --> [IO]
51 Http_get
52 a_Cache_open_url
53 if URL_E2EReload -> prepare reload
54 if cached
55 client enqueue
56 delayed process queue
57 else
58 Cache_entry_add
59 client enqueue
60
61 -//->
62 a_Http_dns_cb
63 Http_connect_socket
64 OpSend FD, BCK
65 OpSend FD, FWD
66 Http_send_query
67 a_Http_make_query_str
68 OpSend, BCK
69 IO_submit
70 a_IOwatch_add_fd (DIO_WRITE, ...)
71
72
73 Note about 'web' structures. They're created using a_Web_new().
74 The web.c module keeps a list of valid webs, so anytime you're
75 unsure of a weak reference to 'web', it can be checked with
76 a_Web_valid(web).
77
78
79
80 ------------
81 Dpi protocol
82 ------------
83
84
85 Query: |
86 .
87 1B --> 1B 1B --> 1B --> | -------------.
88 .----. .----. .----. . |
89 I |Capi| |Dpi | | IO | | |
90 '----' '----' '----' . |
91 1F <-- 1F 1F <-- 1F | V
92 .
93 | [Server]
94 .
95 Answer (same as HTTP): | |
96 . |
97 2B --> 2B 2B --> 2B | |
98 .----. .----. .----. . |
99 II |Capi| |Dpi | | IO | | |
100 '----' '----' '----' . |
101 2F <-- 2F 2F <-- 2F <-- | <------------'
102 .
103 |
104
105
106 CCC Construction:
107
108 a_Capi_open_url() calls a_Capi_dpi_send_cmd() when the URL
109 belongs to a dpi and it is not cached.
110
111 a_Capi_dpi_send_cmd() builds both the Answer and Query chains
112 at once (Answer first then Query), in the same way as HTTP does.
113 Note that the answer chain is the same for both, and the query
114 chain only differs in the module in the middle ([http] or [dpi]).
115
116
117 Function calls for DPI CCC
118 --------------------------
119
120 a_Capi_open_url
121 a_Capi_dpi_send_cmd
122 Capi OpStart 2B (answer) [Capi] --> [dpi] --> [IO]
123 Capi OpStart 1B (query) [Capi] --> [http] --> [IO]
124 a_Cache_open_url
125 [...]
126
127
128 Normal termination:
129
130 When the dpi server is done, it closes the FD, and OpEnd flows
131 from IO to Capi (answer branch). When in Capi, capi propagates
132 OpEnd to the query branch.
133
134 Abnormal termination:
135
136 The transfer may be aborted by a_Capi_conn_abort_by_url(). The
137 OpAbort is not yet standardized and has an ad-hoc implementation.
138 One idea is to have OpAbort always propagate BCK and then FWD and
139 to jump into the other chain when it gets to [Capi].
140
141
142 Debugging CCC
143 -------------
144
145 A simple way to "look" inside it, is to "#define VERBOSE 1" in
146 chain.c, and then to follow its work with a printed copy of the
147 diagrams in this document.
148
149 Each new data request generates a CCC, so if you want to debug,
150 it's good to refine the testcase to the minimum possible number
151 of connections.
152
1313 fltk-problems.doc \
1414 rounding-errors.doc \
1515 uml-legend.doc \
16 dw-line-breaking.doc \
1617 dw-example-screenshot.png \
1718 dw-viewport-without-scrollbar.png \
1819 dw-viewport-with-scrollbar.png \
2526 dw-textblock-collapsing-spaces-1-2.png \
2627 dw-textblock-collapsing-spaces-2-1.png \
2728 dw-textblock-collapsing-spaces-2-2.png \
29 not-so-simple-container.png \
2830 Cache.txt \
2931 Cookies.txt \
3032 Dillo.txt \
3638 NC_design.txt \
3739 Selection.txt \
3840 Dpid.txt \
41 CCCwork.txt \
3942 README \
4043 dillo.1.in
4144
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5279 host_triplet = @host@
5380 target_triplet = @target@
5481 subdir = doc
55 DIST_COMMON = README $(dist_doc_DATA) $(srcdir)/Makefile.am \
56 $(srcdir)/Makefile.in
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(dist_doc_DATA) README
5784 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5885 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
5986 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6289 CONFIG_HEADER = $(top_builddir)/config.h
6390 CONFIG_CLEAN_FILES =
6491 CONFIG_CLEAN_VPATH_FILES =
92 AM_V_P = $(am__v_P_@AM_V@)
93 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
94 am__v_P_0 = false
95 am__v_P_1 = :
96 AM_V_GEN = $(am__v_GEN_@AM_V@)
97 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
98 am__v_GEN_0 = @echo " GEN " $@;
99 am__v_GEN_1 =
100 AM_V_at = $(am__v_at_@AM_V@)
101 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
102 am__v_at_0 = @
103 am__v_at_1 =
65104 SOURCES =
66105 DIST_SOURCES =
67106 am__can_run_installinfo = \
101140 NROFF = nroff
102141 MANS = $(man_MANS)
103142 DATA = $(dist_doc_DATA)
143 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
104144 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
105145 ACLOCAL = @ACLOCAL@
106146 AMTAR = @AMTAR@
147 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
107148 AUTOCONF = @AUTOCONF@
108149 AUTOHEADER = @AUTOHEADER@
109150 AUTOMAKE = @AUTOMAKE@
145186 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
146187 LIBS = @LIBS@
147188 LIBSSL_LIBS = @LIBSSL_LIBS@
189 LIBX11_LIBS = @LIBX11_LIBS@
148190 LIBZ_LIBS = @LIBZ_LIBS@
149191 LTLIBOBJS = @LTLIBOBJS@
150192 MAKEINFO = @MAKEINFO@
234276 fltk-problems.doc \
235277 rounding-errors.doc \
236278 uml-legend.doc \
279 dw-line-breaking.doc \
237280 dw-example-screenshot.png \
238281 dw-viewport-without-scrollbar.png \
239282 dw-viewport-with-scrollbar.png \
246289 dw-textblock-collapsing-spaces-1-2.png \
247290 dw-textblock-collapsing-spaces-2-1.png \
248291 dw-textblock-collapsing-spaces-2-2.png \
292 not-so-simple-container.png \
249293 Cache.txt \
250294 Cookies.txt \
251295 Dillo.txt \
257301 NC_design.txt \
258302 Selection.txt \
259303 Dpid.txt \
304 CCCwork.txt \
260305 README \
261306 dillo.1.in
262307
357402 @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
358403 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
359404 dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
360 tags: TAGS
361 TAGS:
362
363 ctags: CTAGS
364 CTAGS:
405 tags TAGS:
406
407 ctags CTAGS:
408
409 cscope cscopelist:
365410
366411
367412 distdir: $(DISTFILES)
368 @list='$(MANS)'; if test -n "$$list"; then \
369 list=`for p in $$list; do \
370 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
371 if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
372 if test -n "$$list" && \
373 grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
374 echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
375 grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
376 echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
377 echo " typically \`make maintainer-clean' will remove them" >&2; \
378 exit 1; \
379 else :; fi; \
380 else :; fi
381413 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
382414 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
383415 list='$(DISTFILES)'; \
514546
515547 .MAKE: install-am install-strip
516548
517 .PHONY: all all-am check check-am clean clean-generic distclean \
518 distclean-generic distdir dvi dvi-am html html-am info info-am \
519 install install-am install-data install-data-am \
520 install-dist_docDATA install-dvi install-dvi-am install-exec \
521 install-exec-am install-html install-html-am install-info \
522 install-info-am install-man install-man1 install-pdf \
523 install-pdf-am install-ps install-ps-am install-strip \
524 installcheck installcheck-am installdirs maintainer-clean \
525 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
526 pdf-am ps ps-am uninstall uninstall-am uninstall-dist_docDATA \
527 uninstall-man uninstall-man1
549 .PHONY: all all-am check check-am clean clean-generic cscopelist-am \
550 ctags-am distclean distclean-generic distdir dvi dvi-am html \
551 html-am info info-am install install-am install-data \
552 install-data-am install-dist_docDATA install-dvi \
553 install-dvi-am install-exec install-exec-am install-html \
554 install-html-am install-info install-info-am install-man \
555 install-man1 install-pdf install-pdf-am install-ps \
556 install-ps-am install-strip installcheck installcheck-am \
557 installdirs maintainer-clean maintainer-clean-generic \
558 mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \
559 uninstall uninstall-am uninstall-dist_docDATA uninstall-man \
560 uninstall-man1
528561
529562
530563 dillo.1: $(srcdir)/dillo.1.in Makefile
00 /** \page dw-images-and-backgrounds Images and Backgrounds in Dw
11
2 <h2>General</h2>
3
4 Representation of the image data is delegated to dw::core::Imgbuf, see
5 there for details. Drawing is delegated to dw::core::View
6 (dw::core::View::drawImgbuf).
2 Image Buffers
3 =============
4
5 Representation of the image data is done by dw::core::Imgbuf, see
6 there for details. Drawing is done by dw::core::View
7 (dw::core::View::drawImage).
78
89 Since dw::core::Imgbuf provides memory management based on reference
910 counting, there may be an 1-to-n relation from image renderers (image
1415 buffer.
1516
1617
17 <h2>Images</h2>
18 Image Renderer
19 ==============
20
21 Generally, there are no restrictions on how to manage
22 dw::core::Imgbuf; but to handle image data from web resources, the
23 interface dw::core::ImgRenderer should be implemented. It is again
24 wrapped by DilloImage (to make access from the C part possible, since
25 dw::core::ImgRenderer is written in C++), which is referenced by
26 DilloWeb. There are two positions where retrieving image data is
27 initiated:
28
29 - Html_load_image: for embedded images (implemented by dw::Image,
30 which implements dw::core::ImgRenderer);
31 - StyleEngine::apply (search for "case
32 CSS_PROPERTY_BACKGROUND_IMAGE"): for backgrond images; there are
33 some implementations of dw::core::ImgRenderer within the context of
34 dw::core::style::StyleImage.
35
36 Both are described in detail below. Notice that the code is quite
37 similar; only the implementation of dw::core::ImgRenderer differs.
38
39 At this time, dw::core::ImgRenderer has got two methods (see more
40 documentation there):
41
42 - dw::core::ImgRenderer::setBuffer,
43 - dw::core::ImgRenderer::drawRow,
44 - dw::core::ImgRenderer::finish, and
45 - dw::core::ImgRenderer::fatal.
46
47
48 Images
49 ======
1850
1951 This is the simplest renderer, displaying an image. For each row to be
2052 drawn,
2153
22 <ol>
23 <li> first dw::core::Imgbuf::copyRow, and then
24 <li> for each dw::Image, dw::Image::drawRow must be called, with the same
25 argument (no scaling is necessary).
26 </ol>
54 - first dw::core::Imgbuf::copyRow, and then
55 - for each dw::Image, dw::Image::drawRow must be called, with the same
56 argument (no scaling is necessary).
2757
2858 dw::Image automatically scales the dw::core::Imgbuf, the root buffer
2959 should be passed to dw::Image::setBuffer.
3060
3161 \see dw::Image for more details.
3262
33 <h2>Future Extensions</h2>
34
35 (This is not implemented yet.) Rendering itself (image widgets and
36 background) will be abstracted, by a new interface
37 dw::core::ImageRenderer. In the current code for image decoding, this
38 interface will replace references to dw::Image, which implements
39 dw::core::ImageRenderer, in most cases.
40
41 <h2>Backgrounds</h2>
42
43 (This is based on future extensions described above.) Since background
44 are style resources, they are associated with
45 dw::core::style::Style. For backgrounds, another level is needed,
46 because of the 1-to-n relation from dw::core::style::Style to
47 dw::core::Widget:
63
64 Background Images
65 =================
66
67 Since background images are style resources, they are associated with
68 dw::core::style::Style, as dw::core::style::StyleImage, which is
69 handled in a similar way (reference counting etc.) as
70 dw::core::style::Color and dw::core::style::Font, although it is
71 concrete and not platform-dependant.
72
73 The actual renderer (passed to Web) is an instance of
74 dw::core::ImgRendererDist (distributes all calls to a set of other
75 instances of dw::core::ImgRenderer), which contains two kinds of
76 renderers:
77
78 - one instance of dw::core::style::StyleImage::StyleImgRenderer, which
79 does everything needed for dw::core::style::StyleImage, and
80 - other renderers, used externally (widgets etc.), which are added by
81 dw::core::style::StyleImage::putExternalImgRenderer (and removed by
82 dw::core::style::StyleImage::removeExternalImgRenderer).
83
84 This diagram gives an comprehensive overview:
4885
4986 \dot
5087 digraph G {
5491 labelfontcolor="#000080"];
5592 fontname=Helvetica; fontsize=10;
5693
57 "background renderer (as a part of style)" -> "image buffer" [headlabel="*",
58 taillabel="1"];
59 "widget (or a part of it)" -> "background renderer (as a part of style)"
60 [headlabel="*", taillabel="1"];
94 subgraph cluster_dw_style {
95 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
96
97 Style [URL="\ref dw::core::style::Style"];
98 StyleImage [URL="\ref dw::core::style::StyleImage"];
99 Imgbuf [URL="\ref dw::core::Imgbuf", color="#a0a0a0"];
100 StyleImgRenderer
101 [URL="\ref dw::core::style::StyleImage::StyleImgRenderer"];
102 ImgRenderer [URL="\ref dw::core::ImgRenderer", color="#ff8080"];
103 ImgRendererDist [URL="\ref dw::core::ImgRendererDist"];
104 ExternalImgRenderer
105 [URL="\ref dw::core::style::StyleImage::ExternalImgRenderer",
106 color="#a0a0a0"];
107 ExternalWidgetImgRenderer
108 [URL="\ref dw::core::style::StyleImage::ExternalWidgetImgRenderer",
109 color="#a0a0a0"];
110 }
111
112 subgraph cluster_dw_layout {
113 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
114
115 Layout [URL="\ref dw::core::Layout"];
116 LayoutImgRenderer [URL="\ref dw::core::Layout::LayoutImgRenderer"];
117 }
118
119 subgraph cluster_dw_widget {
120 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
121
122 Widget [URL="\ref dw::core::Widget", color="#a0a0a0"];
123 WidgetImgRenderer [URL="\ref dw::core::Widget::WidgetImgRenderer"];
124 }
125
126 subgraph cluster_dw_textblock {
127 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
128
129 Textblock [URL="\ref dw::Textblock"];
130 Word [URL="\ref dw::Textblock::Word"];
131 WordImgRenderer [URL="\ref dw::Textblock::WordImgRenderer"];
132 SpaceImgRenderer [URL="\ref dw::Textblock::SpaceImgRenderer"];
133 }
134
135 Style -> StyleImage [headlabel="*", taillabel="1"];
136 StyleImage -> Imgbuf [headlabel="*", taillabel="1"];
137 StyleImage -> StyleImgRenderer [headlabel="1", taillabel="1"];
138 StyleImage -> ImgRendererDist [headlabel="1", taillabel="1"];
139 ImgRendererDist -> StyleImgRenderer [headlabel="1", taillabel="1"];
140 ImgRendererDist -> ImgRenderer [headlabel="1", taillabel="*"];
141
142 ImgRenderer -> ImgRendererDist [arrowhead="none", arrowtail="empty",
143 dir="both", style="dashed"];
144 ImgRenderer -> StyleImgRenderer [arrowhead="none", arrowtail="empty",
145 dir="both", style="dashed"];
146 ImgRenderer -> ExternalImgRenderer [arrowhead="none", arrowtail="empty",
147 dir="both", style="dashed"];
148 ExternalImgRenderer -> ExternalWidgetImgRenderer [arrowhead="none",
149 arrowtail="empty", dir="both", style="dashed"];
150
151 Layout -> LayoutImgRenderer [headlabel="1", taillabel="0..1"];
152 ExternalImgRenderer -> LayoutImgRenderer [arrowhead="none",
153 arrowtail="empty", dir="both", style="dashed"];
154
155 Widget -> WidgetImgRenderer [headlabel="1", taillabel="0..1"];
156 ExternalWidgetImgRenderer -> WidgetImgRenderer [arrowhead="none",
157 arrowtail="empty", dir="both", style="dashed"];
158
159 Textblock -> Word [headlabel="1", taillabel="*"];
160 Word -> WordImgRenderer [headlabel="1", taillabel="0..1"];
161 Word -> SpaceImgRenderer [headlabel="1", taillabel="0..1"];
162 ExternalWidgetImgRenderer -> WordImgRenderer [arrowhead="none",
163 arrowtail="empty", dir="both", style="dashed"];
164 WordImgRenderer -> SpaceImgRenderer [arrowhead="none", arrowtail="empty",
165 dir="both", style="dashed"];
61166 }
62167 \enddot
63168
64 Unlike dw::Image, dw::core::style::BgRenderer is not associated with a
65 certain rectangle on the canvas. Instead, widgets, or parts of widgets
66 take this role. This is generally represented by an implementation of
67 the interface dw::core::style::BgAllocation, which is implemented by
68 dw::core::Widget, but also by all parts of widget implementation,
69 which may have an own background image.
70
71 The following diagram gives a total overview:
72
73 \dot
74 digraph G {
75 node [shape=record, fontname=Helvetica, fontsize=10];
76 edge [arrowhead="open", dir="both", arrowtail="none",
77 labelfontname=Helvetica, labelfontsize=10, color="#404040",
78 labelfontcolor="#000080"];
79 fontname=Helvetica; fontsize=10;
80
81 "DICache Entry";
82
83 subgraph cluster_dw_images {
84 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
85 label="Dw Images";
86
87 ImageRenderer [URL="\ref dw::core::ImageRenderer", color="#ff8080"];
88 Imgbuf [URL="\ref dw::core::Imgbuf", color="#ff8080"];
89 }
90
91 subgraph cluster_widgets {
92 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
93 label="Widgets";
94
95 Widget [URL="\ref dw::core::Widget", color="#a0a0a0"];
96 Textblock [URL="\ref dw::Textblock"];
97 "Textblock::Word" [URL="\ref dw::Textblock::Word"];
98 Table [URL="\ref dw::Table"];
99 "Table::Row" [URL="\ref dw::Table::Row"];
100 Image [URL="\ref dw::Image"];
101 }
102
103 subgraph cluster_style {
104 style="dashed"; color="#000080"; fontname=Helvetica; fontsize=10;
105 label="dw::core::style";
106
107 Style [URL="\ref dw::core::style::Style"];
108 BgRenderer [URL="\ref dw::core::style::BgRenderer"];
109 BgAllocation [URL="\ref dw::core::style::BgAllocation", color="#ff8080"];
110 }
111
112 "DICache Entry" -> ImageRenderer [headlabel="*", taillabel="1"];
113 "DICache Entry" -> Imgbuf [headlabel="1", taillabel="1"];
114
115 BgRenderer -> Imgbuf [headlabel="1", taillabel="*"];
116 BgRenderer -> BgAllocation [headlabel="*", taillabel="1"];
117 ImageRenderer -> BgRenderer [arrowhead="none", arrowtail="empty", dir="both",
118 style="dashed"];
119 ImageRenderer -> Image [arrowhead="none", arrowtail="empty", dir="both",
120 style="dashed"];
121
122 Style -> BgRenderer [headlabel="0..1", taillabel="1"];
123
124 Widget -> Textblock [arrowhead="none", arrowtail="empty", dir="both"];
125 Textblock -> "Textblock::Word" [headlabel="*", taillabel="1"];
126 Widget -> Table [arrowhead="none", arrowtail="empty", dir="both"];
127 Table -> "Table::Row" [headlabel="*", taillabel="1"];
128 Widget -> Image [arrowhead="none", arrowtail="empty", dir="both"];
129
130 BgAllocation -> Widget [arrowhead="none", arrowtail="empty", dir="both",
131 style="dashed"];
132 BgAllocation -> "Textblock::Word" [arrowhead="none", arrowtail="empty",
133 dir="both", style="dashed"];
134 BgAllocation -> "Table::Row" [arrowhead="none", arrowtail="empty",
135 dir="both", style="dashed"];
136 }
137 \enddot
138
139169 <center>[\ref uml-legend "legend"]</center>
140170
141171
142 <h2>Integration into dillo</h2>
143
144 \todo Add some references.
145
172 Memory management
173 -----------------
174
175 dw::core::style::StyleImage extends lout::signal::ObservedObject, so
176 that deleting this instance can be connected to code dealing with
177 cache clients etc. See StyleImageDeletionReceiver and how it is
178 attached in StyleEngine::apply ("case CSS_PROPERTY_BACKGROUND_IMAGE").
179
180
181 Bugs and Things Needing Improvement
182 ===================================
183
184 (Mostly related to image backgrounds, when not otherwise mentioned.)
185
186 High Priority
187 -------------
188
189 **Configurability, security/privacy aspects, etc.,** which are
190 currently available for image widgets, should be adopted. Perhaps some
191 more configuration options specially for background images.
192
193
194 Medium Priority
195 ---------------
196
197 **Background-attachment** is not yet implemented, and will be postponed.
198
199 **Calls to dw::core::ImgRenderer::fatal** are incomplete. As an
200 example, it is not called, when connecting to a server fails. (And so,
201 as far as I see, no cache client is started.)
202
203
204 Low Priority
205 ------------
206
207 **Alpha support:** (not related to image backgrounds) currently alpha
208 support (and also colormap management) is done in dicache, while
209 dw::Image is only created with type RGB. This leads to several problems:
210
211 - One dicache entry (representing an image related to the same URL),
212 which has only one background color, may refer to different images
213 with different background colors.
214 - The dicache only handles background colors, not background images.
215
216 The solution is basicly simple: keep alpha support out of dicache;
217 instead implement RGBA in dw::Image. As it seems, the main problem is
218 alpha support in FLTK/X11.
219
220
221 Solved (Must Be Documented)
222 ---------------------------
223
224 *Drawing background images row by row may become slow. As an
225 alternative, dw::core::ImgRenderer::finish could be used. However,
226 drawing row by row could become an option.* There is now
227 dw::core::style::drawBackgroundLineByLine, which can be changed in the
228 code, and is set to *false*. The old code still exists, so changing
229 this to *true* activates again drawing line by line.
230
231 (For image widgets, this could also become an option: in contexts,
232 when image data is retrieved in a very fast way.)
146233
147234 */
0 /** \page dw-line-breaking Changes in Line-Breaking and Hyphenation
1
2 <div style="border: 2px solid #ffff00; margin-bottom: 0.5em;
3 padding: 0.5em 1em; background-color: #ffffe0"><b>Info:</b>
4 Should be incorporated into dw::Textblock.</div>
5
6 Introduction
7 ============
8
9 For the implementation of hyphenation in dillo, not only a
10 hyphenation algorithm was implemented, but also, the line breaking was
11 changed to a simple optimization per line. Aside from the improvement
12 by this change per se, an important aspect is the introduction of
13 "penalties". Before this change, dillo put all words into a line which
14 fitted into it; now, a "badness" is calculated for a possible
15 breakpoint, and the best breakpoint, i.&nbsp;e. the breakpoint with the
16 smallest value for "badness", is chosen. This can be simply refined
17 to define "good" and "bad" breakpoints by assigning a "penalty"; the
18 best breakpoint is then the one with the smallest value of "badness +
19 penalty". Details can be found below.
20
21 Example: Normal spaces have a penalty of 0, while hyphenation points
22 get a penalty of, say, 1, since hyphenation is generally considered as
23 a bit "ugly" and should rather be avoided. Consider a situation where
24 the word "dillo" could be hyphenated, with the following badnesses:
25
26 - before "dillo": 0.6;
27 - between "dil-" and "lo": 0.2;
28 - after "dillo": 0.5.
29
30 Since the penalty is added, the last value is the best one, so "dillo"
31 is put at the end of the line, without hyphenation.
32
33 Under other circumstances (e.&nbsp;g. narrower lines), the values
34 might be different:
35
36 - before "dillo": infinite;
37 - between "dil-" and "lo": 0.3;
38 - after "dillo": 1.5.
39
40 In this case, even the addition of the penalty makes hyphenation the
41 best choice.
42
43
44 Literature
45 ==========
46
47 Breaking Paragraphs Into Lines
48 ------------------------------
49
50 Although dillo does not (yet?) implement the algorithm T<sub>E</sub>X
51 uses for line breaking, this document shares much of the notation used
52 by the article *Breaking Paragraphs Into Lines* by Donald E. Knuth and
53 Michael F. Plass; originally published in: Software -- Practice and
54 Experience **11** (1981), 1119-1184; reprinted in: *Digital
55 Typography* by Donalt E. Knuth, CSLI Publications 1999. Anyway an
56 interesting reading.
57
58 Hyphenation
59 -----------
60
61 Dillo uses the algorithm by Frank Liang, which is described in his
62 doctoral dissertation found at http://www.tug.org/docs/liang/. There
63 is also a description in chapter H ("Hyphenation") of *The
64 T<sub>E</sub>Xbook* by Donald E. Knuth, Addison-Wesley 1984.
65
66 Pattern files can be found at
67 http://www.ctan.org/tex-archive/language/hyphenation.
68
69
70 Overview of Changes
71 ===================
72
73 Starting with this change, dw/textblock.cc has been split up; anything
74 related to line breaking has been moved into
75 dw/textblock_linebreaking.cc. This will also be done for other aspects
76 like floats. (Better, however, would be a clean logical split.)
77
78 An important change relates to the way that lines are added: before,
79 dillo would add a line as soon as a new word for this line was
80 added. Now, a line is added not before the *last* word of this line is
81 known. This has two important implications:
82
83 - Some values in dw::Textblock::Line, which represented values
84 accumulated within the line, could be removed, since now, these
85 values can be calculated simply in a loop.
86 - On the other hand, this means that some words may not belong to any
87 line. For this reason, in some cases (e.&nbsp;g. in
88 dw::Textblock::sizeRequestImpl) dw::Textblock::showMissingLines is
89 called, which creates temporary lines, which must, under other
90 circumstances, be removed again by
91 dw::Textblock::removeTemporaryLines, since they have been created
92 based on limited information, and so possibly in a wrong way. (See
93 below for details.)
94
95 When a word can be hyphenated, an instance of dw::Textblock::Word is
96 used for each part. Notice that soft hyphens are evaluated
97 immediately, but automatic hyphenation is done in a lazy way (details
98 below), so the number of instances may change. There are some new
99 attributes: only when dw::Textblock::Word::canBeHyphenated is set to
100 *true*, automatic hyphenation is allowed; it is set to false when soft
101 hyphens are used for a word, and (of course) by the automatic
102 hyphenation itself. Furthermore, dw::Textblock::Word::hyphenWidth
103 (more details in the comment there) has to be included when
104 calculating line widths.
105
106 Some values should be configurable: dw::Textblock::HYPHEN_BREAK, the
107 penalty for hyphens. Also dw::Textblock::Word::stretchability,
108 dw::Textblock::Word::shrinkability, which are both set in
109 dw::Textblock::addSpace.
110
111
112 Criteria for Line-Breaking
113 ==========================
114
115 Before these changes to line breaking, a word (represented by
116 dw::Textblock::Word) had the following attributes related to
117 line-breaking:
118
119 - the width of the word itself, represented by
120 dw::Textblock::Word::size;
121 - the width of the space following the word, represented by
122 dw::Textblock::Word::origSpace.
123
124 In a more mathematical notation, the \f$i\f$th word has a width
125 \f$w_i\f$ and a space \f$s_i\f$.
126
127 A break was possible, when there was a space between the two words,
128 and the first possible break was chosen.
129
130 With hyphenation, the criteria are refined. Hyphenation should only be
131 used when otherwise line breaking results in very large spaces. We
132 define:
133
134 - the badness \f$\beta\f$ of a line, which is greater the more the
135 spaces between the words differ from the ideal space;
136 - a penalty \f$p\f$ for any possible break point.
137
138 The goal is to find those break points, where \f$\beta + p\f$ is
139 minimal.
140
141 Examples for the penalty \f$p\f$:
142
143 - 0 for normal line breaks (between words);
144 - \f$\infty\f$ to prevent a line break at all costs;
145 - \f$-\infty\f$ to force a line
146 - a positive, but finite, value for hyphenation points.
147
148 So we need the following values:
149
150 - \f$w_i\f$ (the width of the word \f$i\f$ itself);
151 - \f$s_i\f$ (the width of the space following the word \f$i\f$);
152 - the stretchability \f$y_i\f$, a value denoting how much the space
153 after word\f$i\f$ can be stretched (typically \f${1\over 2} s_i\f$
154 for justified text; otherwise 0, since the spaces are not
155 stretched);
156 - the shrinkability \f$y_i\f$, a value denoting how much the space
157 after word\f$i\f$ can be shrunken (typically \f${1\over 3} s_i\f$
158 for justified text; otherwise 0, since the spaces are not shrinked);
159 - the penalty \f$p_i\f$, if the line is broken after word \f$i\f$;
160 - a width \f$h_i\f$, which is added, when the line is broken after
161 word \f$i\f$.
162
163 \f$h_i\f$ is the width of the hyphen, if the word \f$i\f$ is a part of
164 the hyphenated word (except the last part); otherwise 0.
165
166 Let \f$l\f$ be the (ideal) width (length) of the line, which is
167 e.&nbsp;at the top given by the browser window width. Furthermore, all words
168 from \f$a\f$ to \f$b\f$ are added to the line. \f$a\f$ is fixed: we do
169 not modify the previous lines anymore; but our task is to find a
170 suitable \f$b\f$.
171
172 We define:
173
174 \f[W_a^b = \sum_{i=a}^{b} w_i + \sum_{i=a}^{b-1} s_i + h_b\f]
175
176 \f[Y_a^b = {Y_0}_a^b + \sum_{i=a}^{b-1} y_i\f]
177
178 \f[Z_a^b = {Z_0}_a^b + \sum_{i=a}^{b-1} z_i\f]
179
180
181 \f$W_a^b\f$ is the total width, \f$Y_a^b\f$ the total stretchability,
182 and \f$Z_a^b\f$ the total shrinkability. \f${Y_0}_a^b\f$ and
183 \f${Z_0}_a^b\f$ are the stretchability and shrinkability defined per
184 line, and applied at the borders; they are 0 for justified text, but
185 \f${Y_0}_a^b\f$ has a positive value otherwise, see below for details.
186
187 Furthermore the *adjustment ratio* \f$r_a^b\f$:
188
189 - in the ideal case that \f$W_a^b = l\f$: \f$r_a^b = 0\f$;
190 - if \f$W_a^b < l\f$: \f$r_a^b = (l - W_a^b) / Y_a^b\f$
191 (\f$r_a^b < 0\f$ in this case);
192 - if \f$W_a^b > l\f$: \f$r_a^b = (l - W_a^b) / Z_a^b\f$
193 (\f$r_a^b < 0\f$ in this case).
194
195 The badness \f$\beta_a^b\f$ is defined as follows:
196
197 - if \f$r_a^b\f$ is undefined or \f$r_a^b < -1\f$: \f$\beta_a^b = \infty\f$;
198 - otherwise: \f$\beta_a^b = |r_a^b|^3\f$
199
200 The goal is to find the value of \f$b\f$ where \f$\beta_a^b + p_b\f$
201 is minimal. (\f$a\f$ is given, since we do not modify the previous
202 lines.)
203
204 After a couple of words, it is not predictable whether this minimum
205 has already been reached. There are two cases where this is possible
206 for a given \f$b'\f$:
207
208 - \f$\beta_{b'}^a = \infty\f$ (line gets too tight):
209 \f$a \le b < b'\f$, the minimum has to be searched between these two
210 values;
211 - \f$p_{b'} = -\infty\f$ (forced line break):
212 \f$a \le b \le b'\f$ (there may be another minimum of
213 \f$\beta_a^b\f$ before; note the \f$\le\f$ instead of \f$<\f$).
214
215 This leads to a problem that the last words of a text block are not
216 displayed this way, since they do not fulfill these rules for being
217 added to a line. For this reason, there are "temporary" lines already
218 described above.
219
220 (Note that the actual calculation differs from this description, since
221 integer arithmetic is used for performance, which make the actual
222 code more complicated. See dw::Textblock::BadnessAndPenalty for
223 details.)
224
225 Ragged Borders
226 --------------
227
228 For other than justified text (left-, right-aligned and centered), the
229 spaces between the words are not shrinked or stretched (so \f$y_i\f$
230 and \f$z_i\f$ are 0), but additional space is added to the left or
231 right border or to both. For this reason, an additional stretchability
232 \f${Y_0}_a^b\f$ is added (see definition above). Since this space at
233 the border is 0 in an ideal case (\f$W_a^b = l\f$), it cannot be
234 shrunken, so \f${Z_0}_a^b\f$ is 0.
235
236 This is not equivalent to the calculation of the total stretchability
237 as done for justified text, since in this case, the stretchability
238 depends on the number of words: consider the typical case that all
239 spaces and stretchabilities are equal (\f$y_a = y_{a + 1} = \ldots =
240 y_b\f$). With \f$n\f$ words, the total strechability would be \f$n
241 \cdot y_a\f$, so increase with an increasing number of words
242 (\f$y_a\f$ is constant). This is correct for justified text, but for
243 other alignments, where only one space (or two, for centered text) is
244 changed, this would mean that a line with many narrow words is more
245 stretchable than a line with few wide words.
246
247 It is obvious that left-aligned text can be handled in the same way as
248 right-aligned text. [... Centered text? ...]
249
250 The default value for the stretchability is the line height without
251 the space between the lines (more precisely: the maximum of all word
252 heights). The exact value not so important when comparing different
253 possible values for the badness \f$\beta_a^b\f$, when \f${Y_0}_a^b\f$
254 is nearly constant for different \f$b\f$ (which is the case for the
255 actual value), but it is important for the comparison with penalties,
256 which are constant. To be considered is also that for non-justified
257 text, hyphenation is differently (less) desirable; this effect can be
258 achieved by enlarging the stretchability, which will lead to a smaller
259 badness, and so make hyphenation less likely. The user can configure
260 the stretchability by changing the preference value
261 *stretchability_factor* (default: 1.0).
262
263 (Comparison to T<sub>E</sub>X: Knuth and Plass describe a method for
264 ragged borders, which is effectively the same as described here (Knuth
265 1999, pp.&nbsp;93--94). The value for the stretchability of the line
266 is slightly less, 1&nsbp;em (ibid., see also p.&nsbp;72 for the
267 definition of the units). However, this article suggests a value for
268 the hyphenation penalty, which is ten times larger than the value for
269 justified text; this would suggest a larger value for
270 *stretchability_factor*.)
271
272
273 Hyphens
274 =======
275
276 Words (instances of dw::Textblock::Word), which are actually part of a
277 hyphenated word, are always drawn as a whole, not seperately. This
278 way, the underlying platform is able to apply kerning, ligatures, etc.
279
280 Calculating the width of such words causes some problems, since it is
281 not required that the width of text "AB" is identical to the width of
282 "A" plus the width of "B", just for the reasons mentioned above. It
283 gets even a bit more complicated, since it is required that a word
284 part (instance of dw::Textblock::Word) has always the same length,
285 independent of whether hyphenation is applied or not. Furthermore, the
286 hyphen length is fixed for a word; for practical reasons, it is always
287 the width of a hyphen, in the given font.
288
289 For calculating the widths, consider a word of four syllables:
290 A-B-C-D. There are 3 hyphenation points, and so 2<sup>3</sup> = 8
291 possible ways of hyphenation: ABCD, ABC-D, AB-CD, AB-C-D, A-BCD,
292 A-BC-D, A-B-CD, A-B-C-D. (Some of them, like the last one, are only
293 probable for very narrow lines.)
294
295 Let w(A), w(B), w(C), w(D) be the word widths (part of
296 dw::Textblock::Word::size), which have to be calculated, and l be a
297 shorthand for dw::core::Platform::textWidth. Without considering
298 this problem, the calculation would be simple: w(A) = l(A)
299 etc. However, it gets a bit more complicated. Since all
300 non-hyphenations are drawn as a whole, the following conditions can be
301 concluded:
302
303 - from drawing "ABCD" (not hyphenated at all): w(A) + w(B) + w(C) +
304 w(D) = l(ABCD);
305 - from drawing "BCD", when hyphenated as "A-BCD" ("A-" is not
306 considered here): w(B) + w(C) + w(D) = l(BCD);
307 - likewise, from drawing "CD" (cases "AB-CD" and "A-B-CD"): w(C) +
308 w(D) = l(CD);
309 - finally, for the cases "ABC-D", "AB-C-D", "A-BC-D", and "A-B-C-D":
310 w(D) = l(D).
311
312 So, the calculation is simple:
313
314 - w(D) = l(D)
315 - w(C) = l(CD) - w(D)
316 - w(B) = l(BCD) - (w(C) + w(D))
317 - w(A) = l(ABCD) - (w(B) + w(C) + w(D))
318
319 For calculation the hyphen widths, the exact conditions would be
320 over-determined, even when the possibility for individual hyphen
321 widths (instead of simply the text width of a hyphen character) would
322 be used. However, a simple approach of fixed hyphen widths will have
323 near-perfect results, so this is kept simple.
324
325
326 Automatic Hyphenation
327 =====================
328
329 When soft hyphens are used, words are immediately divided into
330 different parts, and so different instances of
331 dw::Textblock::Word. Automatic hyphenation (using Liang's algorithm)
332 is, however, not applied always, but only when possibly needed, after
333 calculating a line without hyphenation:
334
335 - When the line is tight, the last word of the line is hyphenated;
336 possibly this will result in a line with less parts of this word,
337 and so a less tight line.
338 - When the line is loose, and there is another word (for the next
339 line) available, this word is hyphenated; possibly, some parts of
340 this word are taken into this line, making it less loose.
341
342 After this, the line is re-calculated.
343
344 A problem arrises when the textblock is rewrapped, e.&nbsp;g. when the
345 user changes the window width. In this case, some new instances of
346 dw::Textblock::Word must be inserted into the word list,
347 dw::Textblock::words. This word list is implemented as an array, which
348 is dynamically increased; a simple approach would involve moving all
349 of the <i>n</i> elements after position <i>i</i>, so
350 <i>n</i>&nbsp;-&nbsp;<i>i</i> steps are necessary. This would not be a
351 problem, since O(n) steps are necessary; however, this will be
352 necessary again for the next hyphenated word (at the end of a
353 following line), and so on, so that
354 (<i>n</i>&nbsp;-&nbsp;<i>i</i><sub>1</sub>) +
355 (<i>n</i>&nbsp;-&nbsp;<i>i</i><sub>2</sub>) + ..., with
356 <i>i</i><sub>1</sub>&nbsp;&lt;&nbsp;<i>i</i><sub>2</sub>&nbsp;&lt;&nbsp;...,
357 which results in O(n<sup>2</sup>) steps. For this reason, the word
358 list is managed by the class lout::misc::NotSoSimpleVector, which uses
359 a trick (a second array) to deal with exactly this problem. See there
360 for more details.
361
362
363 Tests
364 =====
365
366 There are test HTML files in the <i>test</i> directory. Also, there is
367 a program testing automatic hyphenation, <i>test/liang</i>, which can
368 be easily extended.
369
370
371 Bugs and Things Needing Improvement
372 ===================================
373
374 High Priority
375 -------------
376
377 None.
378
379 Medium Priority
380 ---------------
381
382 None.
383
384 Low Priority
385 ------------
386
387 **Mark the end of a paragraph:** Should dw::core::Content::BREAK still
388 be used? Currently, this is redundant to
389 dw::Textblock::BadnessAndPenalty.
390
391 Solved (Must Be Documented)
392 ---------------------------
393
394 These have been solved recently and should be documented above.
395
396 *Bugs in hyphenation:* There seem to be problems when breaking words
397 containing hyphens already. Example: "Abtei-Stadt", which is divided
398 into "Abtei-" and "Stadt", resulting possibly in
399 &quot;Abtei-<span></span>-[new line]Stadt&quot;. See also below under
400 "Medium Priority", on how to deal with hyphens and dashes.
401
402 **Solution:** See next.
403
404 *Break hyphens and dashes:* The following rules seem to be relevant:
405
406 - In English, an em-dash is used with no spaces around. Breaking
407 before and after the dash should be possible, perhaps with a
408 penalty > 0. (In German, an en-dash (Halbgeviert) with spaces around
409 is used instead.)
410 - After a hyphen, which is part of a compound word, a break should be
411 possible. As described above ("Abtei-Stadt"), this collides with
412 hyphenation.
413
414 Where to implement? In the same dynamic, lazy way like hyphenation? As
415 part of hyphenation?
416
417 Notice that Liang's algorithm may behave different regarding hyphens:
418 "Abtei-Stadt" is (using the patterns from CTAN) divided into "Abtei-"
419 and "Stadt", but "Nordrhein-Westfalen" is divided into "Nord",
420 "rhein-West", "fa", "len": the part containing the hyphen
421 ("rhein-West") is untouched. (Sorry for the German words; if you have
422 got English examples, send them me.)</div>
423
424 **Solution for both:** This has been implemented in
425 dw::Textblock::addText, in a similar way to soft hyphens. Liang's
426 algorithm now only operates on the parts: "Abtei" and "Stadt";
427 "Nordrhein" and "Westfalen".
428
429 *Hyphens in adjacent lines:* It should be simple to assign a larger
430 penalty for hyphens, when the line before is already hyphenated. This
431 way, hyphens in adjacent lines are penalized further.
432
433 **Solved:** There are always two penalties. Must be documented in
434 detail.
435
436 *Incorrect calculation of extremes:* The minimal width of a text block
437 (as part of the width extremes, which are mainly used for tables) is
438 defined by everything between two possible breaks. A possible break
439 may also be a hyphenation point; however, hyphenation points are
440 calculated in a lazy way, when the lines are broken, and not when
441 extremes are calculated. So, it is a matter of chance whether the
442 calculation of the minimal width will take the two parts "dil-" and
443 "lo" into account (when "dillo" has already been hyphenated), or only
444 one part, "dillo" (when "dillo" has not yet been hyphenated),
445 resulting possibly in a different value for the minimal width.
446
447 Possible strategies to deal with this problem:
448
449 - Ignore. The implications should be minimal.
450 - Any solution will make it neccessary to hyphenate at least some
451 words when calculating extremes. Since the minimal widths of all
452 words are used to calculate the minimal width of the text block, the
453 simplest approach will hyphenate all words. This would, of course,
454 eliminate the performance gains of the current lazy approach.
455 - The latter approach could be optimized in some ways. Examples: (i)
456 If a word is already narrower than the current accumulated value for
457 the minimal width, it makes no sense to hyphenate it. (ii) In other
458 cases, heuristics may be used to estimate the number of syllables,
459 the width of the widest of them etc.
460
461 **Solved:** Hyphenated parts of a word are not considered anymore for
462 width extremes, but only whole words. This is also one reason for the
463 introduction of the paragraphs list.
464
465 **Also:**
466
467 - Configuration of penalties.
468
469 */
1818
1919 Of corse, when all \f$y_i\f$ are calculated in a sequence,
2020 \f$\sum_{j=0}^{j=i} x_j\f$ and \f$\sum_{j=0}^{j=i-1} y_j\f$ can be
21 accumulated in the same loop.
21 accumulated in the same loop. Regard this as sample:
2222
23 */
23 \code
24 int n, x[n], a, b; // Should all be initialized.
25 int y[n], cumX = 0, cumY = 0;
26
27 for (int i = 0; i < n; i++) {
28 cumX += x[i]
29 y[i] = (cumX * a) / b - cumY;
30 cumY += y[i];
31 }
32 \endcode
33
34 */
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
6188 cookies_PROGRAMS = cookies.dpi$(EXEEXT)
6289 datauri_PROGRAMS = datauri.filter.dpi$(EXEEXT)
6390 subdir = dpi
64 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
91 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
92 $(top_srcdir)/depcomp
6593 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
6694 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
6795 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
118146 vsource_filter_dpi_OBJECTS = $(am_vsource_filter_dpi_OBJECTS)
119147 vsource_filter_dpi_DEPENDENCIES = $(top_builddir)/dpip/libDpip.a \
120148 $(top_builddir)/dlib/libDlib.a
149 AM_V_P = $(am__v_P_@AM_V@)
150 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
151 am__v_P_0 = false
152 am__v_P_1 = :
153 AM_V_GEN = $(am__v_GEN_@AM_V@)
154 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
155 am__v_GEN_0 = @echo " GEN " $@;
156 am__v_GEN_1 =
157 AM_V_at = $(am__v_at_@AM_V@)
158 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
159 am__v_at_0 = @
160 am__v_at_1 =
121161 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
122162 depcomp = $(SHELL) $(top_srcdir)/depcomp
123163 am__depfiles_maybe = depfiles
124164 am__mv = mv -f
125165 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
126166 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
167 AM_V_CC = $(am__v_CC_@AM_V@)
168 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
169 am__v_CC_0 = @echo " CC " $@;
170 am__v_CC_1 =
127171 CCLD = $(CC)
128172 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
173 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
174 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
175 am__v_CCLD_0 = @echo " CCLD " $@;
176 am__v_CCLD_1 =
177 AM_V_lt = $(am__v_lt_@AM_V@)
178 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
179 am__v_lt_0 = --silent
180 am__v_lt_1 =
129181 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
130182 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
183 AM_V_CXX = $(am__v_CXX_@AM_V@)
184 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
185 am__v_CXX_0 = @echo " CXX " $@;
186 am__v_CXX_1 =
131187 CXXLD = $(CXX)
132188 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
133189 -o $@
190 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
191 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
192 am__v_CXXLD_0 = @echo " CXXLD " $@;
193 am__v_CXXLD_1 =
134194 SOURCES = $(bookmarks_dpi_SOURCES) $(cookies_dpi_SOURCES) \
135195 $(datauri_filter_dpi_SOURCES) $(downloads_dpi_SOURCES) \
136196 $(file_dpi_SOURCES) $(ftp_filter_dpi_SOURCES) \
146206 n|no|NO) false;; \
147207 *) (install-info --version) >/dev/null 2>&1;; \
148208 esac
209 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
210 # Read a list of newline-separated strings from the standard input,
211 # and print each of them once, without duplicates. Input order is
212 # *not* preserved.
213 am__uniquify_input = $(AWK) '\
214 BEGIN { nonempty = 0; } \
215 { items[$$0] = 1; nonempty = 1; } \
216 END { if (nonempty) { for (i in items) print i; }; } \
217 '
218 # Make sure the list of sources is unique. This is necessary because,
219 # e.g., the same source file might be shared among _SOURCES variables
220 # for different programs/libraries.
221 am__define_uniq_tagged_files = \
222 list='$(am__tagged_files)'; \
223 unique=`for i in $$list; do \
224 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
225 done | $(am__uniquify_input)`
149226 ETAGS = etags
150227 CTAGS = ctags
151228 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
152229 ACLOCAL = @ACLOCAL@
153230 AMTAR = @AMTAR@
231 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
154232 AUTOCONF = @AUTOCONF@
155233 AUTOHEADER = @AUTOHEADER@
156234 AUTOMAKE = @AUTOMAKE@
192270 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
193271 LIBS = @LIBS@
194272 LIBSSL_LIBS = @LIBSSL_LIBS@
273 LIBX11_LIBS = @LIBX11_LIBS@
195274 LIBZ_LIBS = @LIBZ_LIBS@
196275 LTLIBOBJS = @LTLIBOBJS@
197276 MAKEINFO = @MAKEINFO@
366445 fi; \
367446 for p in $$list; do echo "$$p $$p"; done | \
368447 sed 's/$(EXEEXT)$$//' | \
369 while read p p1; do if test -f $$p; \
370 then echo "$$p"; echo "$$p"; else :; fi; \
448 while read p p1; do if test -f $$p \
449 ; then echo "$$p"; echo "$$p"; else :; fi; \
371450 done | \
372 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
451 sed -e 'p;s,.*/,,;n;h' \
452 -e 's|.*|.|' \
373453 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
374454 sed 'N;N;N;s,\n, ,g' | \
375455 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
390470 @list='$(bookmarks_PROGRAMS)'; test -n "$(bookmarksdir)" || list=; \
391471 files=`for p in $$list; do echo "$$p"; done | \
392472 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
393 -e 's/$$/$(EXEEXT)/' `; \
473 -e 's/$$/$(EXEEXT)/' \
474 `; \
394475 test -n "$$list" || exit 0; \
395476 echo " ( cd '$(DESTDIR)$(bookmarksdir)' && rm -f" $$files ")"; \
396477 cd "$(DESTDIR)$(bookmarksdir)" && rm -f $$files
406487 fi; \
407488 for p in $$list; do echo "$$p $$p"; done | \
408489 sed 's/$(EXEEXT)$$//' | \
409 while read p p1; do if test -f $$p; \
410 then echo "$$p"; echo "$$p"; else :; fi; \
490 while read p p1; do if test -f $$p \
491 ; then echo "$$p"; echo "$$p"; else :; fi; \
411492 done | \
412 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
493 sed -e 'p;s,.*/,,;n;h' \
494 -e 's|.*|.|' \
413495 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
414496 sed 'N;N;N;s,\n, ,g' | \
415497 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
430512 @list='$(cookies_PROGRAMS)'; test -n "$(cookiesdir)" || list=; \
431513 files=`for p in $$list; do echo "$$p"; done | \
432514 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
433 -e 's/$$/$(EXEEXT)/' `; \
515 -e 's/$$/$(EXEEXT)/' \
516 `; \
434517 test -n "$$list" || exit 0; \
435518 echo " ( cd '$(DESTDIR)$(cookiesdir)' && rm -f" $$files ")"; \
436519 cd "$(DESTDIR)$(cookiesdir)" && rm -f $$files
446529 fi; \
447530 for p in $$list; do echo "$$p $$p"; done | \
448531 sed 's/$(EXEEXT)$$//' | \
449 while read p p1; do if test -f $$p; \
450 then echo "$$p"; echo "$$p"; else :; fi; \
532 while read p p1; do if test -f $$p \
533 ; then echo "$$p"; echo "$$p"; else :; fi; \
451534 done | \
452 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
535 sed -e 'p;s,.*/,,;n;h' \
536 -e 's|.*|.|' \
453537 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
454538 sed 'N;N;N;s,\n, ,g' | \
455539 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
470554 @list='$(datauri_PROGRAMS)'; test -n "$(datauridir)" || list=; \
471555 files=`for p in $$list; do echo "$$p"; done | \
472556 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
473 -e 's/$$/$(EXEEXT)/' `; \
557 -e 's/$$/$(EXEEXT)/' \
558 `; \
474559 test -n "$$list" || exit 0; \
475560 echo " ( cd '$(DESTDIR)$(datauridir)' && rm -f" $$files ")"; \
476561 cd "$(DESTDIR)$(datauridir)" && rm -f $$files
486571 fi; \
487572 for p in $$list; do echo "$$p $$p"; done | \
488573 sed 's/$(EXEEXT)$$//' | \
489 while read p p1; do if test -f $$p; \
490 then echo "$$p"; echo "$$p"; else :; fi; \
574 while read p p1; do if test -f $$p \
575 ; then echo "$$p"; echo "$$p"; else :; fi; \
491576 done | \
492 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
577 sed -e 'p;s,.*/,,;n;h' \
578 -e 's|.*|.|' \
493579 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
494580 sed 'N;N;N;s,\n, ,g' | \
495581 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
510596 @list='$(downloads_PROGRAMS)'; test -n "$(downloadsdir)" || list=; \
511597 files=`for p in $$list; do echo "$$p"; done | \
512598 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
513 -e 's/$$/$(EXEEXT)/' `; \
599 -e 's/$$/$(EXEEXT)/' \
600 `; \
514601 test -n "$$list" || exit 0; \
515602 echo " ( cd '$(DESTDIR)$(downloadsdir)' && rm -f" $$files ")"; \
516603 cd "$(DESTDIR)$(downloadsdir)" && rm -f $$files
526613 fi; \
527614 for p in $$list; do echo "$$p $$p"; done | \
528615 sed 's/$(EXEEXT)$$//' | \
529 while read p p1; do if test -f $$p; \
530 then echo "$$p"; echo "$$p"; else :; fi; \
616 while read p p1; do if test -f $$p \
617 ; then echo "$$p"; echo "$$p"; else :; fi; \
531618 done | \
532 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
619 sed -e 'p;s,.*/,,;n;h' \
620 -e 's|.*|.|' \
533621 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
534622 sed 'N;N;N;s,\n, ,g' | \
535623 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
550638 @list='$(file_PROGRAMS)'; test -n "$(filedir)" || list=; \
551639 files=`for p in $$list; do echo "$$p"; done | \
552640 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
553 -e 's/$$/$(EXEEXT)/' `; \
641 -e 's/$$/$(EXEEXT)/' \
642 `; \
554643 test -n "$$list" || exit 0; \
555644 echo " ( cd '$(DESTDIR)$(filedir)' && rm -f" $$files ")"; \
556645 cd "$(DESTDIR)$(filedir)" && rm -f $$files
566655 fi; \
567656 for p in $$list; do echo "$$p $$p"; done | \
568657 sed 's/$(EXEEXT)$$//' | \
569 while read p p1; do if test -f $$p; \
570 then echo "$$p"; echo "$$p"; else :; fi; \
658 while read p p1; do if test -f $$p \
659 ; then echo "$$p"; echo "$$p"; else :; fi; \
571660 done | \
572 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
661 sed -e 'p;s,.*/,,;n;h' \
662 -e 's|.*|.|' \
573663 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
574664 sed 'N;N;N;s,\n, ,g' | \
575665 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
590680 @list='$(ftp_PROGRAMS)'; test -n "$(ftpdir)" || list=; \
591681 files=`for p in $$list; do echo "$$p"; done | \
592682 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
593 -e 's/$$/$(EXEEXT)/' `; \
683 -e 's/$$/$(EXEEXT)/' \
684 `; \
594685 test -n "$$list" || exit 0; \
595686 echo " ( cd '$(DESTDIR)$(ftpdir)' && rm -f" $$files ")"; \
596687 cd "$(DESTDIR)$(ftpdir)" && rm -f $$files
606697 fi; \
607698 for p in $$list; do echo "$$p $$p"; done | \
608699 sed 's/$(EXEEXT)$$//' | \
609 while read p p1; do if test -f $$p; \
610 then echo "$$p"; echo "$$p"; else :; fi; \
700 while read p p1; do if test -f $$p \
701 ; then echo "$$p"; echo "$$p"; else :; fi; \
611702 done | \
612 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
703 sed -e 'p;s,.*/,,;n;h' \
704 -e 's|.*|.|' \
613705 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
614706 sed 'N;N;N;s,\n, ,g' | \
615707 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
630722 @list='$(hello_PROGRAMS)'; test -n "$(hellodir)" || list=; \
631723 files=`for p in $$list; do echo "$$p"; done | \
632724 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
633 -e 's/$$/$(EXEEXT)/' `; \
725 -e 's/$$/$(EXEEXT)/' \
726 `; \
634727 test -n "$$list" || exit 0; \
635728 echo " ( cd '$(DESTDIR)$(hellodir)' && rm -f" $$files ")"; \
636729 cd "$(DESTDIR)$(hellodir)" && rm -f $$files
646739 fi; \
647740 for p in $$list; do echo "$$p $$p"; done | \
648741 sed 's/$(EXEEXT)$$//' | \
649 while read p p1; do if test -f $$p; \
650 then echo "$$p"; echo "$$p"; else :; fi; \
742 while read p p1; do if test -f $$p \
743 ; then echo "$$p"; echo "$$p"; else :; fi; \
651744 done | \
652 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
745 sed -e 'p;s,.*/,,;n;h' \
746 -e 's|.*|.|' \
653747 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
654748 sed 'N;N;N;s,\n, ,g' | \
655749 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
670764 @list='$(https_PROGRAMS)'; test -n "$(httpsdir)" || list=; \
671765 files=`for p in $$list; do echo "$$p"; done | \
672766 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
673 -e 's/$$/$(EXEEXT)/' `; \
767 -e 's/$$/$(EXEEXT)/' \
768 `; \
674769 test -n "$$list" || exit 0; \
675770 echo " ( cd '$(DESTDIR)$(httpsdir)' && rm -f" $$files ")"; \
676771 cd "$(DESTDIR)$(httpsdir)" && rm -f $$files
686781 fi; \
687782 for p in $$list; do echo "$$p $$p"; done | \
688783 sed 's/$(EXEEXT)$$//' | \
689 while read p p1; do if test -f $$p; \
690 then echo "$$p"; echo "$$p"; else :; fi; \
784 while read p p1; do if test -f $$p \
785 ; then echo "$$p"; echo "$$p"; else :; fi; \
691786 done | \
692 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
787 sed -e 'p;s,.*/,,;n;h' \
788 -e 's|.*|.|' \
693789 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
694790 sed 'N;N;N;s,\n, ,g' | \
695791 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
710806 @list='$(vsource_PROGRAMS)'; test -n "$(vsourcedir)" || list=; \
711807 files=`for p in $$list; do echo "$$p"; done | \
712808 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
713 -e 's/$$/$(EXEEXT)/' `; \
809 -e 's/$$/$(EXEEXT)/' \
810 `; \
714811 test -n "$$list" || exit 0; \
715812 echo " ( cd '$(DESTDIR)$(vsourcedir)' && rm -f" $$files ")"; \
716813 cd "$(DESTDIR)$(vsourcedir)" && rm -f $$files
717814
718815 clean-vsourcePROGRAMS:
719816 -test -z "$(vsource_PROGRAMS)" || rm -f $(vsource_PROGRAMS)
817
720818 bookmarks.dpi$(EXEEXT): $(bookmarks_dpi_OBJECTS) $(bookmarks_dpi_DEPENDENCIES) $(EXTRA_bookmarks_dpi_DEPENDENCIES)
721819 @rm -f bookmarks.dpi$(EXEEXT)
722 $(LINK) $(bookmarks_dpi_OBJECTS) $(bookmarks_dpi_LDADD) $(LIBS)
820 $(AM_V_CCLD)$(LINK) $(bookmarks_dpi_OBJECTS) $(bookmarks_dpi_LDADD) $(LIBS)
821
723822 cookies.dpi$(EXEEXT): $(cookies_dpi_OBJECTS) $(cookies_dpi_DEPENDENCIES) $(EXTRA_cookies_dpi_DEPENDENCIES)
724823 @rm -f cookies.dpi$(EXEEXT)
725 $(LINK) $(cookies_dpi_OBJECTS) $(cookies_dpi_LDADD) $(LIBS)
824 $(AM_V_CCLD)$(LINK) $(cookies_dpi_OBJECTS) $(cookies_dpi_LDADD) $(LIBS)
825
726826 datauri.filter.dpi$(EXEEXT): $(datauri_filter_dpi_OBJECTS) $(datauri_filter_dpi_DEPENDENCIES) $(EXTRA_datauri_filter_dpi_DEPENDENCIES)
727827 @rm -f datauri.filter.dpi$(EXEEXT)
728 $(LINK) $(datauri_filter_dpi_OBJECTS) $(datauri_filter_dpi_LDADD) $(LIBS)
828 $(AM_V_CCLD)$(LINK) $(datauri_filter_dpi_OBJECTS) $(datauri_filter_dpi_LDADD) $(LIBS)
829
729830 downloads.dpi$(EXEEXT): $(downloads_dpi_OBJECTS) $(downloads_dpi_DEPENDENCIES) $(EXTRA_downloads_dpi_DEPENDENCIES)
730831 @rm -f downloads.dpi$(EXEEXT)
731 $(downloads_dpi_LINK) $(downloads_dpi_OBJECTS) $(downloads_dpi_LDADD) $(LIBS)
832 $(AM_V_CXXLD)$(downloads_dpi_LINK) $(downloads_dpi_OBJECTS) $(downloads_dpi_LDADD) $(LIBS)
833
732834 file.dpi$(EXEEXT): $(file_dpi_OBJECTS) $(file_dpi_DEPENDENCIES) $(EXTRA_file_dpi_DEPENDENCIES)
733835 @rm -f file.dpi$(EXEEXT)
734 $(LINK) $(file_dpi_OBJECTS) $(file_dpi_LDADD) $(LIBS)
836 $(AM_V_CCLD)$(LINK) $(file_dpi_OBJECTS) $(file_dpi_LDADD) $(LIBS)
837
735838 ftp.filter.dpi$(EXEEXT): $(ftp_filter_dpi_OBJECTS) $(ftp_filter_dpi_DEPENDENCIES) $(EXTRA_ftp_filter_dpi_DEPENDENCIES)
736839 @rm -f ftp.filter.dpi$(EXEEXT)
737 $(LINK) $(ftp_filter_dpi_OBJECTS) $(ftp_filter_dpi_LDADD) $(LIBS)
840 $(AM_V_CCLD)$(LINK) $(ftp_filter_dpi_OBJECTS) $(ftp_filter_dpi_LDADD) $(LIBS)
841
738842 hello.filter.dpi$(EXEEXT): $(hello_filter_dpi_OBJECTS) $(hello_filter_dpi_DEPENDENCIES) $(EXTRA_hello_filter_dpi_DEPENDENCIES)
739843 @rm -f hello.filter.dpi$(EXEEXT)
740 $(LINK) $(hello_filter_dpi_OBJECTS) $(hello_filter_dpi_LDADD) $(LIBS)
844 $(AM_V_CCLD)$(LINK) $(hello_filter_dpi_OBJECTS) $(hello_filter_dpi_LDADD) $(LIBS)
845
741846 https.filter.dpi$(EXEEXT): $(https_filter_dpi_OBJECTS) $(https_filter_dpi_DEPENDENCIES) $(EXTRA_https_filter_dpi_DEPENDENCIES)
742847 @rm -f https.filter.dpi$(EXEEXT)
743 $(LINK) $(https_filter_dpi_OBJECTS) $(https_filter_dpi_LDADD) $(LIBS)
848 $(AM_V_CCLD)$(LINK) $(https_filter_dpi_OBJECTS) $(https_filter_dpi_LDADD) $(LIBS)
849
744850 vsource.filter.dpi$(EXEEXT): $(vsource_filter_dpi_OBJECTS) $(vsource_filter_dpi_DEPENDENCIES) $(EXTRA_vsource_filter_dpi_DEPENDENCIES)
745851 @rm -f vsource.filter.dpi$(EXEEXT)
746 $(LINK) $(vsource_filter_dpi_OBJECTS) $(vsource_filter_dpi_LDADD) $(LIBS)
852 $(AM_V_CCLD)$(LINK) $(vsource_filter_dpi_OBJECTS) $(vsource_filter_dpi_LDADD) $(LIBS)
747853
748854 mostlyclean-compile:
749855 -rm -f *.$(OBJEXT)
763869 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsource.Po@am__quote@
764870
765871 .c.o:
766 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
767 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
768 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
872 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
873 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
874 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
769875 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
770 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
876 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
771877
772878 .c.obj:
773 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
774 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
775 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
879 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
880 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
881 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
776882 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
777 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
883 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
778884
779885 .cc.o:
780 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
781 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
782 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
886 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
887 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
888 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
783889 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
784 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
890 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
785891
786892 .cc.obj:
787 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
788 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
789 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
893 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
894 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
895 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
790896 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
791 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
897 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
792898
793899 downloads_dpi-downloads.o: downloads.cc
794 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -MT downloads_dpi-downloads.o -MD -MP -MF $(DEPDIR)/downloads_dpi-downloads.Tpo -c -o downloads_dpi-downloads.o `test -f 'downloads.cc' || echo '$(srcdir)/'`downloads.cc
795 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/downloads_dpi-downloads.Tpo $(DEPDIR)/downloads_dpi-downloads.Po
796 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='downloads.cc' object='downloads_dpi-downloads.o' libtool=no @AMDEPBACKSLASH@
900 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -MT downloads_dpi-downloads.o -MD -MP -MF $(DEPDIR)/downloads_dpi-downloads.Tpo -c -o downloads_dpi-downloads.o `test -f 'downloads.cc' || echo '$(srcdir)/'`downloads.cc
901 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/downloads_dpi-downloads.Tpo $(DEPDIR)/downloads_dpi-downloads.Po
902 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='downloads.cc' object='downloads_dpi-downloads.o' libtool=no @AMDEPBACKSLASH@
797903 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
798 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -c -o downloads_dpi-downloads.o `test -f 'downloads.cc' || echo '$(srcdir)/'`downloads.cc
904 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -c -o downloads_dpi-downloads.o `test -f 'downloads.cc' || echo '$(srcdir)/'`downloads.cc
799905
800906 downloads_dpi-downloads.obj: downloads.cc
801 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -MT downloads_dpi-downloads.obj -MD -MP -MF $(DEPDIR)/downloads_dpi-downloads.Tpo -c -o downloads_dpi-downloads.obj `if test -f 'downloads.cc'; then $(CYGPATH_W) 'downloads.cc'; else $(CYGPATH_W) '$(srcdir)/downloads.cc'; fi`
802 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/downloads_dpi-downloads.Tpo $(DEPDIR)/downloads_dpi-downloads.Po
803 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='downloads.cc' object='downloads_dpi-downloads.obj' libtool=no @AMDEPBACKSLASH@
907 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -MT downloads_dpi-downloads.obj -MD -MP -MF $(DEPDIR)/downloads_dpi-downloads.Tpo -c -o downloads_dpi-downloads.obj `if test -f 'downloads.cc'; then $(CYGPATH_W) 'downloads.cc'; else $(CYGPATH_W) '$(srcdir)/downloads.cc'; fi`
908 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/downloads_dpi-downloads.Tpo $(DEPDIR)/downloads_dpi-downloads.Po
909 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='downloads.cc' object='downloads_dpi-downloads.obj' libtool=no @AMDEPBACKSLASH@
804910 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
805 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -c -o downloads_dpi-downloads.obj `if test -f 'downloads.cc'; then $(CYGPATH_W) 'downloads.cc'; else $(CYGPATH_W) '$(srcdir)/downloads.cc'; fi`
806
807 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
808 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
809 unique=`for i in $$list; do \
810 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
811 done | \
812 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
813 END { if (nonempty) { for (i in files) print i; }; }'`; \
814 mkid -fID $$unique
815 tags: TAGS
816
817 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
818 $(TAGS_FILES) $(LISP)
911 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(downloads_dpi_CXXFLAGS) $(CXXFLAGS) -c -o downloads_dpi-downloads.obj `if test -f 'downloads.cc'; then $(CYGPATH_W) 'downloads.cc'; else $(CYGPATH_W) '$(srcdir)/downloads.cc'; fi`
912
913 ID: $(am__tagged_files)
914 $(am__define_uniq_tagged_files); mkid -fID $$unique
915 tags: tags-am
916 TAGS: tags
917
918 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
819919 set x; \
820920 here=`pwd`; \
821 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
822 unique=`for i in $$list; do \
823 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
824 done | \
825 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
826 END { if (nonempty) { for (i in files) print i; }; }'`; \
921 $(am__define_uniq_tagged_files); \
827922 shift; \
828923 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
829924 test -n "$$unique" || unique=$$empty_fix; \
835930 $$unique; \
836931 fi; \
837932 fi
838 ctags: CTAGS
839 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
840 $(TAGS_FILES) $(LISP)
841 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
842 unique=`for i in $$list; do \
843 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
844 done | \
845 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
846 END { if (nonempty) { for (i in files) print i; }; }'`; \
933 ctags: ctags-am
934
935 CTAGS: ctags
936 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
937 $(am__define_uniq_tagged_files); \
847938 test -z "$(CTAGS_ARGS)$$unique" \
848939 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
849940 $$unique
852943 here=`$(am__cd) $(top_builddir) && pwd` \
853944 && $(am__cd) $(top_srcdir) \
854945 && gtags -i $(GTAGS_ARGS) "$$here"
946 cscopelist: cscopelist-am
947
948 cscopelist-am: $(am__tagged_files)
949 list='$(am__tagged_files)'; \
950 case "$(srcdir)" in \
951 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
952 *) sdir=$(subdir)/$(srcdir) ;; \
953 esac; \
954 for i in $$list; do \
955 if test -f "$$i"; then \
956 echo "$(subdir)/$$i"; \
957 else \
958 echo "$$sdir/$$i"; \
959 fi; \
960 done >> $(top_builddir)/cscope.files
855961
856962 distclean-tags:
857963 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
10051111
10061112 .MAKE: install-am install-strip
10071113
1008 .PHONY: CTAGS GTAGS all all-am check check-am clean \
1114 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
10091115 clean-bookmarksPROGRAMS clean-cookiesPROGRAMS \
10101116 clean-datauriPROGRAMS clean-downloadsPROGRAMS \
10111117 clean-filePROGRAMS clean-ftpPROGRAMS clean-generic \
10121118 clean-helloPROGRAMS clean-httpsPROGRAMS clean-vsourcePROGRAMS \
1013 ctags distclean distclean-compile distclean-generic \
1014 distclean-tags distdir dvi dvi-am html html-am info info-am \
1015 install install-am install-bookmarksPROGRAMS \
1016 install-cookiesPROGRAMS install-data install-data-am \
1017 install-datauriPROGRAMS install-downloadsPROGRAMS install-dvi \
1018 install-dvi-am install-exec install-exec-am \
1019 install-filePROGRAMS install-ftpPROGRAMS install-helloPROGRAMS \
1020 install-html install-html-am install-httpsPROGRAMS \
1021 install-info install-info-am install-man install-pdf \
1022 install-pdf-am install-ps install-ps-am install-strip \
1023 install-vsourcePROGRAMS installcheck installcheck-am \
1024 installdirs maintainer-clean maintainer-clean-generic \
1025 mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
1026 ps ps-am tags uninstall uninstall-am \
1027 uninstall-bookmarksPROGRAMS uninstall-cookiesPROGRAMS \
1028 uninstall-datauriPROGRAMS uninstall-downloadsPROGRAMS \
1029 uninstall-filePROGRAMS uninstall-ftpPROGRAMS \
1030 uninstall-helloPROGRAMS uninstall-httpsPROGRAMS \
1031 uninstall-vsourcePROGRAMS
1119 cscopelist-am ctags ctags-am distclean distclean-compile \
1120 distclean-generic distclean-tags distdir dvi dvi-am html \
1121 html-am info info-am install install-am \
1122 install-bookmarksPROGRAMS install-cookiesPROGRAMS install-data \
1123 install-data-am install-datauriPROGRAMS \
1124 install-downloadsPROGRAMS install-dvi install-dvi-am \
1125 install-exec install-exec-am install-filePROGRAMS \
1126 install-ftpPROGRAMS install-helloPROGRAMS install-html \
1127 install-html-am install-httpsPROGRAMS install-info \
1128 install-info-am install-man install-pdf install-pdf-am \
1129 install-ps install-ps-am install-strip install-vsourcePROGRAMS \
1130 installcheck installcheck-am installdirs maintainer-clean \
1131 maintainer-clean-generic mostlyclean mostlyclean-compile \
1132 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
1133 uninstall-am uninstall-bookmarksPROGRAMS \
1134 uninstall-cookiesPROGRAMS uninstall-datauriPROGRAMS \
1135 uninstall-downloadsPROGRAMS uninstall-filePROGRAMS \
1136 uninstall-ftpPROGRAMS uninstall-helloPROGRAMS \
1137 uninstall-httpsPROGRAMS uninstall-vsourcePROGRAMS
10321138
10331139
10341140 # Tell versions [3.59,3.63) of GNU make to not export all variables.
10411041
10421042 if (tld_len > 0) {
10431043 /* These TLDs were chosen by examining the current publicsuffix list
1044 * in October 2012 and picking out those where it was simplest for
1044 * in February 2014 and picking out those where it was simplest for
10451045 * them to describe the situation by beginning with a "*.[tld]" rule
10461046 * or every rule was "[something].[tld]".
10471047 */
1048 const char *const tlds[] = {"ar","au","bd","bn","ck","cy","er","et",
1049 "fj","fk","gt","gu","il","jm","ke","kh",
1050 "kp","kw","lb","lr","mm","mt","mz","ni",
1051 "np","nz","om","pg","py","sv","tr","uk",
1052 "ve","ye","za","zm","zw"};
1048 const char *const tlds[] = {"bd","bn","ck","cy","er","et","fj","fk",
1049 "gu","il","jm","ke","kh","kw","mm","mz",
1050 "ni","np","nz","pg","tr","uk","ye","za",
1051 "zm","zw"};
10531052 uint_t i, tld_num = sizeof(tlds) / sizeof(tlds[0]);
10541053
10551054 for (i = 0; i < tld_num; i++) {
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1615
1716
1817 VPATH = @srcdir@
19 am__make_dryrun = \
20 { \
21 am__dry=no; \
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
2231 case $$MAKEFLAGS in \
2332 *\\[\ \ ]*) \
24 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
25 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
26 *) \
27 for am__flg in $$MAKEFLAGS; do \
28 case $$am__flg in \
29 *=*|--*) ;; \
30 *n*) am__dry=yes; break;; \
31 esac; \
32 done;; \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3336 esac; \
34 test $$am__dry = yes; \
35 }
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3663 pkgdatadir = $(datadir)/@PACKAGE@
3764 pkgincludedir = $(includedir)/@PACKAGE@
3865 pkglibdir = $(libdir)/@PACKAGE@
5481 target_triplet = @target@
5582 bin_PROGRAMS = dpid$(EXEEXT) dpidc$(EXEEXT)
5683 subdir = dpid
57 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO
84 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
85 $(top_srcdir)/depcomp TODO
5886 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5987 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
6088 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
75103 dpidc_OBJECTS = $(am_dpidc_OBJECTS)
76104 dpidc_DEPENDENCIES = $(top_builddir)/dpip/libDpip.a \
77105 $(top_builddir)/dlib/libDlib.a
106 AM_V_P = $(am__v_P_@AM_V@)
107 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
108 am__v_P_0 = false
109 am__v_P_1 = :
110 AM_V_GEN = $(am__v_GEN_@AM_V@)
111 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
112 am__v_GEN_0 = @echo " GEN " $@;
113 am__v_GEN_1 =
114 AM_V_at = $(am__v_at_@AM_V@)
115 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
116 am__v_at_0 = @
117 am__v_at_1 =
78118 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
79119 depcomp = $(SHELL) $(top_srcdir)/depcomp
80120 am__depfiles_maybe = depfiles
81121 am__mv = mv -f
82122 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
83123 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
124 AM_V_CC = $(am__v_CC_@AM_V@)
125 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
126 am__v_CC_0 = @echo " CC " $@;
127 am__v_CC_1 =
84128 CCLD = $(CC)
85129 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
130 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
131 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
132 am__v_CCLD_0 = @echo " CCLD " $@;
133 am__v_CCLD_1 =
86134 SOURCES = $(dpid_SOURCES) $(dpidc_SOURCES)
87135 DIST_SOURCES = $(dpid_SOURCES) $(dpidc_SOURCES)
88136 am__can_run_installinfo = \
118166 $(am__cd) "$$dir" && rm -f $$files; }; \
119167 }
120168 DATA = $(sysconf_DATA)
169 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
170 # Read a list of newline-separated strings from the standard input,
171 # and print each of them once, without duplicates. Input order is
172 # *not* preserved.
173 am__uniquify_input = $(AWK) '\
174 BEGIN { nonempty = 0; } \
175 { items[$$0] = 1; nonempty = 1; } \
176 END { if (nonempty) { for (i in items) print i; }; } \
177 '
178 # Make sure the list of sources is unique. This is necessary because,
179 # e.g., the same source file might be shared among _SOURCES variables
180 # for different programs/libraries.
181 am__define_uniq_tagged_files = \
182 list='$(am__tagged_files)'; \
183 unique=`for i in $$list; do \
184 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
185 done | $(am__uniquify_input)`
121186 ETAGS = etags
122187 CTAGS = ctags
123188 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
124189 ACLOCAL = @ACLOCAL@
125190 AMTAR = @AMTAR@
191 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
126192 AUTOCONF = @AUTOCONF@
127193 AUTOHEADER = @AUTOHEADER@
128194 AUTOMAKE = @AUTOMAKE@
164230 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
165231 LIBS = @LIBS@
166232 LIBSSL_LIBS = @LIBSSL_LIBS@
233 LIBX11_LIBS = @LIBX11_LIBS@
167234 LIBZ_LIBS = @LIBZ_LIBS@
168235 LTLIBOBJS = @LTLIBOBJS@
169236 MAKEINFO = @MAKEINFO@
309376 fi; \
310377 for p in $$list; do echo "$$p $$p"; done | \
311378 sed 's/$(EXEEXT)$$//' | \
312 while read p p1; do if test -f $$p; \
313 then echo "$$p"; echo "$$p"; else :; fi; \
379 while read p p1; do if test -f $$p \
380 ; then echo "$$p"; echo "$$p"; else :; fi; \
314381 done | \
315 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
382 sed -e 'p;s,.*/,,;n;h' \
383 -e 's|.*|.|' \
316384 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
317385 sed 'N;N;N;s,\n, ,g' | \
318386 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
333401 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
334402 files=`for p in $$list; do echo "$$p"; done | \
335403 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
336 -e 's/$$/$(EXEEXT)/' `; \
404 -e 's/$$/$(EXEEXT)/' \
405 `; \
337406 test -n "$$list" || exit 0; \
338407 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
339408 cd "$(DESTDIR)$(bindir)" && rm -f $$files
340409
341410 clean-binPROGRAMS:
342411 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
412
343413 dpid$(EXEEXT): $(dpid_OBJECTS) $(dpid_DEPENDENCIES) $(EXTRA_dpid_DEPENDENCIES)
344414 @rm -f dpid$(EXEEXT)
345 $(LINK) $(dpid_OBJECTS) $(dpid_LDADD) $(LIBS)
415 $(AM_V_CCLD)$(LINK) $(dpid_OBJECTS) $(dpid_LDADD) $(LIBS)
416
346417 dpidc$(EXEEXT): $(dpidc_OBJECTS) $(dpidc_DEPENDENCIES) $(EXTRA_dpidc_DEPENDENCIES)
347418 @rm -f dpidc$(EXEEXT)
348 $(LINK) $(dpidc_OBJECTS) $(dpidc_LDADD) $(LIBS)
419 $(AM_V_CCLD)$(LINK) $(dpidc_OBJECTS) $(dpidc_LDADD) $(LIBS)
349420
350421 mostlyclean-compile:
351422 -rm -f *.$(OBJEXT)
362433 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_new.Po@am__quote@
363434
364435 .c.o:
365 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
366 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
367 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
436 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
437 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
438 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
368439 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
369 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
440 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
370441
371442 .c.obj:
372 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
373 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
374 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
443 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
444 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
445 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
375446 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
376 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
447 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
377448 install-sysconfDATA: $(sysconf_DATA)
378449 @$(NORMAL_INSTALL)
379450 @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
396467 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
397468 dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
398469
399 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
400 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
401 unique=`for i in $$list; do \
402 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
403 done | \
404 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
405 END { if (nonempty) { for (i in files) print i; }; }'`; \
406 mkid -fID $$unique
407 tags: TAGS
408
409 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
410 $(TAGS_FILES) $(LISP)
470 ID: $(am__tagged_files)
471 $(am__define_uniq_tagged_files); mkid -fID $$unique
472 tags: tags-am
473 TAGS: tags
474
475 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
411476 set x; \
412477 here=`pwd`; \
413 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
414 unique=`for i in $$list; do \
415 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
416 done | \
417 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
418 END { if (nonempty) { for (i in files) print i; }; }'`; \
478 $(am__define_uniq_tagged_files); \
419479 shift; \
420480 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
421481 test -n "$$unique" || unique=$$empty_fix; \
427487 $$unique; \
428488 fi; \
429489 fi
430 ctags: CTAGS
431 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
432 $(TAGS_FILES) $(LISP)
433 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
434 unique=`for i in $$list; do \
435 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
436 done | \
437 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
438 END { if (nonempty) { for (i in files) print i; }; }'`; \
490 ctags: ctags-am
491
492 CTAGS: ctags
493 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
494 $(am__define_uniq_tagged_files); \
439495 test -z "$(CTAGS_ARGS)$$unique" \
440496 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
441497 $$unique
444500 here=`$(am__cd) $(top_builddir) && pwd` \
445501 && $(am__cd) $(top_srcdir) \
446502 && gtags -i $(GTAGS_ARGS) "$$here"
503 cscopelist: cscopelist-am
504
505 cscopelist-am: $(am__tagged_files)
506 list='$(am__tagged_files)'; \
507 case "$(srcdir)" in \
508 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
509 *) sdir=$(subdir)/$(srcdir) ;; \
510 esac; \
511 for i in $$list; do \
512 if test -f "$$i"; then \
513 echo "$(subdir)/$$i"; \
514 else \
515 echo "$$sdir/$$i"; \
516 fi; \
517 done >> $(top_builddir)/cscope.files
447518
448519 distclean-tags:
449520 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
587658
588659 .MAKE: install-am install-strip
589660
590 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
591 clean-generic ctags distclean distclean-compile \
592 distclean-generic distclean-tags distdir dvi dvi-am html \
593 html-am info info-am install install-am install-binPROGRAMS \
594 install-data install-data-am install-dvi install-dvi-am \
595 install-exec install-exec-am install-html install-html-am \
596 install-info install-info-am install-man install-pdf \
597 install-pdf-am install-ps install-ps-am install-strip \
598 install-sysconfDATA installcheck installcheck-am installdirs \
599 maintainer-clean maintainer-clean-generic mostlyclean \
600 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
601 tags uninstall uninstall-am uninstall-binPROGRAMS \
602 uninstall-sysconfDATA
661 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
662 clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
663 distclean distclean-compile distclean-generic distclean-tags \
664 distdir dvi dvi-am html html-am info info-am install \
665 install-am install-binPROGRAMS install-data install-data-am \
666 install-dvi install-dvi-am install-exec install-exec-am \
667 install-html install-html-am install-info install-info-am \
668 install-man install-pdf install-pdf-am install-ps \
669 install-ps-am install-strip install-sysconfDATA installcheck \
670 installcheck-am installdirs maintainer-clean \
671 maintainer-clean-generic mostlyclean mostlyclean-compile \
672 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
673 uninstall-am uninstall-binPROGRAMS uninstall-sysconfDATA
603674
604675
605676 dpidrc: $(srcdir)/dpidrc.in Makefile
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5279 host_triplet = @host@
5380 target_triplet = @target@
5481 subdir = dpip
55 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp
5684 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5785 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
5886 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6492 LIBRARIES = $(noinst_LIBRARIES)
6593 AR = ar
6694 ARFLAGS = cru
95 AM_V_AR = $(am__v_AR_@AM_V@)
96 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
97 am__v_AR_0 = @echo " AR " $@;
98 am__v_AR_1 =
6799 libDpip_a_AR = $(AR) $(ARFLAGS)
68100 libDpip_a_LIBADD =
69101 am_libDpip_a_OBJECTS = dpip.$(OBJEXT)
70102 libDpip_a_OBJECTS = $(am_libDpip_a_OBJECTS)
103 AM_V_P = $(am__v_P_@AM_V@)
104 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
105 am__v_P_0 = false
106 am__v_P_1 = :
107 AM_V_GEN = $(am__v_GEN_@AM_V@)
108 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
109 am__v_GEN_0 = @echo " GEN " $@;
110 am__v_GEN_1 =
111 AM_V_at = $(am__v_at_@AM_V@)
112 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
113 am__v_at_0 = @
114 am__v_at_1 =
71115 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
72116 depcomp = $(SHELL) $(top_srcdir)/depcomp
73117 am__depfiles_maybe = depfiles
74118 am__mv = mv -f
75119 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
76120 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
121 AM_V_CC = $(am__v_CC_@AM_V@)
122 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
123 am__v_CC_0 = @echo " CC " $@;
124 am__v_CC_1 =
77125 CCLD = $(CC)
78126 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
127 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
128 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
129 am__v_CCLD_0 = @echo " CCLD " $@;
130 am__v_CCLD_1 =
79131 SOURCES = $(libDpip_a_SOURCES)
80132 DIST_SOURCES = $(libDpip_a_SOURCES)
81133 am__can_run_installinfo = \
83135 n|no|NO) false;; \
84136 *) (install-info --version) >/dev/null 2>&1;; \
85137 esac
138 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
139 # Read a list of newline-separated strings from the standard input,
140 # and print each of them once, without duplicates. Input order is
141 # *not* preserved.
142 am__uniquify_input = $(AWK) '\
143 BEGIN { nonempty = 0; } \
144 { items[$$0] = 1; nonempty = 1; } \
145 END { if (nonempty) { for (i in items) print i; }; } \
146 '
147 # Make sure the list of sources is unique. This is necessary because,
148 # e.g., the same source file might be shared among _SOURCES variables
149 # for different programs/libraries.
150 am__define_uniq_tagged_files = \
151 list='$(am__tagged_files)'; \
152 unique=`for i in $$list; do \
153 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
154 done | $(am__uniquify_input)`
86155 ETAGS = etags
87156 CTAGS = ctags
88157 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
89158 ACLOCAL = @ACLOCAL@
90159 AMTAR = @AMTAR@
160 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
91161 AUTOCONF = @AUTOCONF@
92162 AUTOHEADER = @AUTOHEADER@
93163 AUTOMAKE = @AUTOMAKE@
129199 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
130200 LIBS = @LIBS@
131201 LIBSSL_LIBS = @LIBSSL_LIBS@
202 LIBX11_LIBS = @LIBX11_LIBS@
132203 LIBZ_LIBS = @LIBZ_LIBS@
133204 LTLIBOBJS = @LTLIBOBJS@
134205 MAKEINFO = @MAKEINFO@
247318
248319 clean-noinstLIBRARIES:
249320 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
321
250322 libDpip.a: $(libDpip_a_OBJECTS) $(libDpip_a_DEPENDENCIES) $(EXTRA_libDpip_a_DEPENDENCIES)
251 -rm -f libDpip.a
252 $(libDpip_a_AR) libDpip.a $(libDpip_a_OBJECTS) $(libDpip_a_LIBADD)
253 $(RANLIB) libDpip.a
323 $(AM_V_at)-rm -f libDpip.a
324 $(AM_V_AR)$(libDpip_a_AR) libDpip.a $(libDpip_a_OBJECTS) $(libDpip_a_LIBADD)
325 $(AM_V_at)$(RANLIB) libDpip.a
254326
255327 mostlyclean-compile:
256328 -rm -f *.$(OBJEXT)
261333 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpip.Po@am__quote@
262334
263335 .c.o:
264 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
265 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
266 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
336 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
337 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
338 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
267339 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
268 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
340 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
269341
270342 .c.obj:
271 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
272 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
273 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
343 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
344 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
345 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
274346 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
275 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
276
277 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
278 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
279 unique=`for i in $$list; do \
280 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
281 done | \
282 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
283 END { if (nonempty) { for (i in files) print i; }; }'`; \
284 mkid -fID $$unique
285 tags: TAGS
286
287 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
288 $(TAGS_FILES) $(LISP)
347 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
348
349 ID: $(am__tagged_files)
350 $(am__define_uniq_tagged_files); mkid -fID $$unique
351 tags: tags-am
352 TAGS: tags
353
354 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
289355 set x; \
290356 here=`pwd`; \
291 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
292 unique=`for i in $$list; do \
293 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
294 done | \
295 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
296 END { if (nonempty) { for (i in files) print i; }; }'`; \
357 $(am__define_uniq_tagged_files); \
297358 shift; \
298359 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
299360 test -n "$$unique" || unique=$$empty_fix; \
305366 $$unique; \
306367 fi; \
307368 fi
308 ctags: CTAGS
309 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
310 $(TAGS_FILES) $(LISP)
311 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
312 unique=`for i in $$list; do \
313 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
314 done | \
315 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
316 END { if (nonempty) { for (i in files) print i; }; }'`; \
369 ctags: ctags-am
370
371 CTAGS: ctags
372 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
373 $(am__define_uniq_tagged_files); \
317374 test -z "$(CTAGS_ARGS)$$unique" \
318375 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
319376 $$unique
322379 here=`$(am__cd) $(top_builddir) && pwd` \
323380 && $(am__cd) $(top_srcdir) \
324381 && gtags -i $(GTAGS_ARGS) "$$here"
382 cscopelist: cscopelist-am
383
384 cscopelist-am: $(am__tagged_files)
385 list='$(am__tagged_files)'; \
386 case "$(srcdir)" in \
387 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
388 *) sdir=$(subdir)/$(srcdir) ;; \
389 esac; \
390 for i in $$list; do \
391 if test -f "$$i"; then \
392 echo "$(subdir)/$$i"; \
393 else \
394 echo "$$sdir/$$i"; \
395 fi; \
396 done >> $(top_builddir)/cscope.files
325397
326398 distclean-tags:
327399 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
461533
462534 .MAKE: install-am install-strip
463535
464 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
465 clean-noinstLIBRARIES ctags distclean distclean-compile \
466 distclean-generic distclean-tags distdir dvi dvi-am html \
467 html-am info info-am install install-am install-data \
468 install-data-am install-dvi install-dvi-am install-exec \
469 install-exec-am install-html install-html-am install-info \
470 install-info-am install-man install-pdf install-pdf-am \
471 install-ps install-ps-am install-strip installcheck \
472 installcheck-am installdirs maintainer-clean \
536 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
537 clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
538 distclean-compile distclean-generic distclean-tags distdir dvi \
539 dvi-am html html-am info info-am install install-am \
540 install-data install-data-am install-dvi install-dvi-am \
541 install-exec install-exec-am install-html install-html-am \
542 install-info install-info-am install-man install-pdf \
543 install-pdf-am install-ps install-ps-am install-strip \
544 installcheck installcheck-am installdirs maintainer-clean \
473545 maintainer-clean-generic mostlyclean mostlyclean-compile \
474 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
546 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
475547 uninstall-am
476548
477549
451451
452452 } else if (dsh->mode & DPIP_RAW) {
453453 /* Wait for data when the buffer is empty and there's no ERR/EOF */
454 while (dsh->rdbuf->len == 0 &&
454 while (dsh->rdbuf->len == 0 &&
455455 dsh->status != DPIP_ERROR && dsh->status != DPIP_EOF)
456456 Dpip_dsh_read(dsh, 1);
457457 }
1313 findtext.cc \
1414 findtext.hh \
1515 imgbuf.hh \
16 imgrenderer.hh \
17 imgrenderer.cc \
1618 iterator.cc \
1719 iterator.hh \
1820 layout.cc \
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5279 host_triplet = @host@
5380 target_triplet = @target@
5481 subdir = dw
55 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp
5684 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5785 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
5886 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6492 LIBRARIES = $(noinst_LIBRARIES)
6593 AR = ar
6694 ARFLAGS = cru
95 AM_V_AR = $(am__v_AR_@AM_V@)
96 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
97 am__v_AR_0 = @echo " AR " $@;
98 am__v_AR_1 =
6799 libDw_core_a_AR = $(AR) $(ARFLAGS)
68100 libDw_core_a_LIBADD =
69 am_libDw_core_a_OBJECTS = findtext.$(OBJEXT) iterator.$(OBJEXT) \
70 layout.$(OBJEXT) selection.$(OBJEXT) style.$(OBJEXT) \
71 types.$(OBJEXT) ui.$(OBJEXT) widget.$(OBJEXT)
101 am_libDw_core_a_OBJECTS = findtext.$(OBJEXT) imgrenderer.$(OBJEXT) \
102 iterator.$(OBJEXT) layout.$(OBJEXT) selection.$(OBJEXT) \
103 style.$(OBJEXT) types.$(OBJEXT) ui.$(OBJEXT) widget.$(OBJEXT)
72104 libDw_core_a_OBJECTS = $(am_libDw_core_a_OBJECTS)
73105 libDw_fltk_a_AR = $(AR) $(ARFLAGS)
74106 libDw_fltk_a_LIBADD =
90122 tablecell.$(OBJEXT) textblock.$(OBJEXT) \
91123 textblock_iterator.$(OBJEXT) textblock_linebreaking.$(OBJEXT)
92124 libDw_widgets_a_OBJECTS = $(am_libDw_widgets_a_OBJECTS)
125 AM_V_P = $(am__v_P_@AM_V@)
126 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
127 am__v_P_0 = false
128 am__v_P_1 = :
129 AM_V_GEN = $(am__v_GEN_@AM_V@)
130 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
131 am__v_GEN_0 = @echo " GEN " $@;
132 am__v_GEN_1 =
133 AM_V_at = $(am__v_at_@AM_V@)
134 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
135 am__v_at_0 = @
136 am__v_at_1 =
93137 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
94138 depcomp = $(SHELL) $(top_srcdir)/depcomp
95139 am__depfiles_maybe = depfiles
96140 am__mv = mv -f
141 AM_V_lt = $(am__v_lt_@AM_V@)
142 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
143 am__v_lt_0 = --silent
144 am__v_lt_1 =
97145 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
98146 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
147 AM_V_CXX = $(am__v_CXX_@AM_V@)
148 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
149 am__v_CXX_0 = @echo " CXX " $@;
150 am__v_CXX_1 =
99151 CXXLD = $(CXX)
100152 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
101153 -o $@
154 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
155 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
156 am__v_CXXLD_0 = @echo " CXXLD " $@;
157 am__v_CXXLD_1 =
102158 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
103159 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
160 AM_V_CC = $(am__v_CC_@AM_V@)
161 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
162 am__v_CC_0 = @echo " CC " $@;
163 am__v_CC_1 =
104164 CCLD = $(CC)
105165 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
166 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
167 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
168 am__v_CCLD_0 = @echo " CCLD " $@;
169 am__v_CCLD_1 =
106170 SOURCES = $(libDw_core_a_SOURCES) $(libDw_fltk_a_SOURCES) \
107171 $(libDw_widgets_a_SOURCES)
108172 DIST_SOURCES = $(libDw_core_a_SOURCES) $(libDw_fltk_a_SOURCES) \
112176 n|no|NO) false;; \
113177 *) (install-info --version) >/dev/null 2>&1;; \
114178 esac
179 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
180 # Read a list of newline-separated strings from the standard input,
181 # and print each of them once, without duplicates. Input order is
182 # *not* preserved.
183 am__uniquify_input = $(AWK) '\
184 BEGIN { nonempty = 0; } \
185 { items[$$0] = 1; nonempty = 1; } \
186 END { if (nonempty) { for (i in items) print i; }; } \
187 '
188 # Make sure the list of sources is unique. This is necessary because,
189 # e.g., the same source file might be shared among _SOURCES variables
190 # for different programs/libraries.
191 am__define_uniq_tagged_files = \
192 list='$(am__tagged_files)'; \
193 unique=`for i in $$list; do \
194 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
195 done | $(am__uniquify_input)`
115196 ETAGS = etags
116197 CTAGS = ctags
117198 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
118199 ACLOCAL = @ACLOCAL@
119200 AMTAR = @AMTAR@
201 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
120202 AUTOCONF = @AUTOCONF@
121203 AUTOHEADER = @AUTOHEADER@
122204 AUTOMAKE = @AUTOMAKE@
158240 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
159241 LIBS = @LIBS@
160242 LIBSSL_LIBS = @LIBSSL_LIBS@
243 LIBX11_LIBS = @LIBX11_LIBS@
161244 LIBZ_LIBS = @LIBZ_LIBS@
162245 LTLIBOBJS = @LTLIBOBJS@
163246 MAKEINFO = @MAKEINFO@
246329 findtext.cc \
247330 findtext.hh \
248331 imgbuf.hh \
332 imgrenderer.hh \
333 imgrenderer.cc \
249334 iterator.cc \
250335 iterator.hh \
251336 layout.cc \
345430
346431 clean-noinstLIBRARIES:
347432 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
433
348434 libDw-core.a: $(libDw_core_a_OBJECTS) $(libDw_core_a_DEPENDENCIES) $(EXTRA_libDw_core_a_DEPENDENCIES)
349 -rm -f libDw-core.a
350 $(libDw_core_a_AR) libDw-core.a $(libDw_core_a_OBJECTS) $(libDw_core_a_LIBADD)
351 $(RANLIB) libDw-core.a
435 $(AM_V_at)-rm -f libDw-core.a
436 $(AM_V_AR)$(libDw_core_a_AR) libDw-core.a $(libDw_core_a_OBJECTS) $(libDw_core_a_LIBADD)
437 $(AM_V_at)$(RANLIB) libDw-core.a
438
352439 libDw-fltk.a: $(libDw_fltk_a_OBJECTS) $(libDw_fltk_a_DEPENDENCIES) $(EXTRA_libDw_fltk_a_DEPENDENCIES)
353 -rm -f libDw-fltk.a
354 $(libDw_fltk_a_AR) libDw-fltk.a $(libDw_fltk_a_OBJECTS) $(libDw_fltk_a_LIBADD)
355 $(RANLIB) libDw-fltk.a
440 $(AM_V_at)-rm -f libDw-fltk.a
441 $(AM_V_AR)$(libDw_fltk_a_AR) libDw-fltk.a $(libDw_fltk_a_OBJECTS) $(libDw_fltk_a_LIBADD)
442 $(AM_V_at)$(RANLIB) libDw-fltk.a
443
356444 libDw-widgets.a: $(libDw_widgets_a_OBJECTS) $(libDw_widgets_a_DEPENDENCIES) $(EXTRA_libDw_widgets_a_DEPENDENCIES)
357 -rm -f libDw-widgets.a
358 $(libDw_widgets_a_AR) libDw-widgets.a $(libDw_widgets_a_OBJECTS) $(libDw_widgets_a_LIBADD)
359 $(RANLIB) libDw-widgets.a
445 $(AM_V_at)-rm -f libDw-widgets.a
446 $(AM_V_AR)$(libDw_widgets_a_AR) libDw-widgets.a $(libDw_widgets_a_OBJECTS) $(libDw_widgets_a_LIBADD)
447 $(AM_V_at)$(RANLIB) libDw-widgets.a
360448
361449 mostlyclean-compile:
362450 -rm -f *.$(OBJEXT)
369457 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/findtext.Po@am__quote@
370458 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hyphenator.Po@am__quote@
371459 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/image.Po@am__quote@
460 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/imgrenderer.Po@am__quote@
372461 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator.Po@am__quote@
373462 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/layout.Po@am__quote@
374463 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Po@am__quote@
394483 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/widget.Po@am__quote@
395484
396485 .cc.o:
397 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
398 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
399 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
400 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
401 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
486 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
487 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
488 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
489 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
490 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
402491
403492 .cc.obj:
404 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
405 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
406 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
407 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
408 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
493 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
494 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
495 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
496 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
497 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
409498
410499 libDw_fltk_a-fltkcomplexbutton.o: fltkcomplexbutton.cc
411 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkcomplexbutton.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo -c -o libDw_fltk_a-fltkcomplexbutton.o `test -f 'fltkcomplexbutton.cc' || echo '$(srcdir)/'`fltkcomplexbutton.cc
412 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Po
413 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkcomplexbutton.cc' object='libDw_fltk_a-fltkcomplexbutton.o' libtool=no @AMDEPBACKSLASH@
414 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
415 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkcomplexbutton.o `test -f 'fltkcomplexbutton.cc' || echo '$(srcdir)/'`fltkcomplexbutton.cc
500 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkcomplexbutton.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo -c -o libDw_fltk_a-fltkcomplexbutton.o `test -f 'fltkcomplexbutton.cc' || echo '$(srcdir)/'`fltkcomplexbutton.cc
501 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Po
502 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkcomplexbutton.cc' object='libDw_fltk_a-fltkcomplexbutton.o' libtool=no @AMDEPBACKSLASH@
503 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
504 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkcomplexbutton.o `test -f 'fltkcomplexbutton.cc' || echo '$(srcdir)/'`fltkcomplexbutton.cc
416505
417506 libDw_fltk_a-fltkcomplexbutton.obj: fltkcomplexbutton.cc
418 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkcomplexbutton.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo -c -o libDw_fltk_a-fltkcomplexbutton.obj `if test -f 'fltkcomplexbutton.cc'; then $(CYGPATH_W) 'fltkcomplexbutton.cc'; else $(CYGPATH_W) '$(srcdir)/fltkcomplexbutton.cc'; fi`
419 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Po
420 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkcomplexbutton.cc' object='libDw_fltk_a-fltkcomplexbutton.obj' libtool=no @AMDEPBACKSLASH@
421 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
422 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkcomplexbutton.obj `if test -f 'fltkcomplexbutton.cc'; then $(CYGPATH_W) 'fltkcomplexbutton.cc'; else $(CYGPATH_W) '$(srcdir)/fltkcomplexbutton.cc'; fi`
507 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkcomplexbutton.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo -c -o libDw_fltk_a-fltkcomplexbutton.obj `if test -f 'fltkcomplexbutton.cc'; then $(CYGPATH_W) 'fltkcomplexbutton.cc'; else $(CYGPATH_W) '$(srcdir)/fltkcomplexbutton.cc'; fi`
508 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Tpo $(DEPDIR)/libDw_fltk_a-fltkcomplexbutton.Po
509 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkcomplexbutton.cc' object='libDw_fltk_a-fltkcomplexbutton.obj' libtool=no @AMDEPBACKSLASH@
510 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
511 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkcomplexbutton.obj `if test -f 'fltkcomplexbutton.cc'; then $(CYGPATH_W) 'fltkcomplexbutton.cc'; else $(CYGPATH_W) '$(srcdir)/fltkcomplexbutton.cc'; fi`
423512
424513 libDw_fltk_a-fltkflatview.o: fltkflatview.cc
425 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkflatview.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo -c -o libDw_fltk_a-fltkflatview.o `test -f 'fltkflatview.cc' || echo '$(srcdir)/'`fltkflatview.cc
426 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo $(DEPDIR)/libDw_fltk_a-fltkflatview.Po
427 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkflatview.cc' object='libDw_fltk_a-fltkflatview.o' libtool=no @AMDEPBACKSLASH@
428 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
429 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkflatview.o `test -f 'fltkflatview.cc' || echo '$(srcdir)/'`fltkflatview.cc
514 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkflatview.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo -c -o libDw_fltk_a-fltkflatview.o `test -f 'fltkflatview.cc' || echo '$(srcdir)/'`fltkflatview.cc
515 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo $(DEPDIR)/libDw_fltk_a-fltkflatview.Po
516 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkflatview.cc' object='libDw_fltk_a-fltkflatview.o' libtool=no @AMDEPBACKSLASH@
517 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
518 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkflatview.o `test -f 'fltkflatview.cc' || echo '$(srcdir)/'`fltkflatview.cc
430519
431520 libDw_fltk_a-fltkflatview.obj: fltkflatview.cc
432 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkflatview.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo -c -o libDw_fltk_a-fltkflatview.obj `if test -f 'fltkflatview.cc'; then $(CYGPATH_W) 'fltkflatview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkflatview.cc'; fi`
433 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo $(DEPDIR)/libDw_fltk_a-fltkflatview.Po
434 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkflatview.cc' object='libDw_fltk_a-fltkflatview.obj' libtool=no @AMDEPBACKSLASH@
435 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
436 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkflatview.obj `if test -f 'fltkflatview.cc'; then $(CYGPATH_W) 'fltkflatview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkflatview.cc'; fi`
521 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkflatview.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo -c -o libDw_fltk_a-fltkflatview.obj `if test -f 'fltkflatview.cc'; then $(CYGPATH_W) 'fltkflatview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkflatview.cc'; fi`
522 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkflatview.Tpo $(DEPDIR)/libDw_fltk_a-fltkflatview.Po
523 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkflatview.cc' object='libDw_fltk_a-fltkflatview.obj' libtool=no @AMDEPBACKSLASH@
524 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
525 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkflatview.obj `if test -f 'fltkflatview.cc'; then $(CYGPATH_W) 'fltkflatview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkflatview.cc'; fi`
437526
438527 libDw_fltk_a-fltkimgbuf.o: fltkimgbuf.cc
439 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkimgbuf.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo -c -o libDw_fltk_a-fltkimgbuf.o `test -f 'fltkimgbuf.cc' || echo '$(srcdir)/'`fltkimgbuf.cc
440 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Po
441 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkimgbuf.cc' object='libDw_fltk_a-fltkimgbuf.o' libtool=no @AMDEPBACKSLASH@
442 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
443 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkimgbuf.o `test -f 'fltkimgbuf.cc' || echo '$(srcdir)/'`fltkimgbuf.cc
528 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkimgbuf.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo -c -o libDw_fltk_a-fltkimgbuf.o `test -f 'fltkimgbuf.cc' || echo '$(srcdir)/'`fltkimgbuf.cc
529 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Po
530 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkimgbuf.cc' object='libDw_fltk_a-fltkimgbuf.o' libtool=no @AMDEPBACKSLASH@
531 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
532 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkimgbuf.o `test -f 'fltkimgbuf.cc' || echo '$(srcdir)/'`fltkimgbuf.cc
444533
445534 libDw_fltk_a-fltkimgbuf.obj: fltkimgbuf.cc
446 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkimgbuf.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo -c -o libDw_fltk_a-fltkimgbuf.obj `if test -f 'fltkimgbuf.cc'; then $(CYGPATH_W) 'fltkimgbuf.cc'; else $(CYGPATH_W) '$(srcdir)/fltkimgbuf.cc'; fi`
447 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Po
448 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkimgbuf.cc' object='libDw_fltk_a-fltkimgbuf.obj' libtool=no @AMDEPBACKSLASH@
449 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
450 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkimgbuf.obj `if test -f 'fltkimgbuf.cc'; then $(CYGPATH_W) 'fltkimgbuf.cc'; else $(CYGPATH_W) '$(srcdir)/fltkimgbuf.cc'; fi`
535 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkimgbuf.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo -c -o libDw_fltk_a-fltkimgbuf.obj `if test -f 'fltkimgbuf.cc'; then $(CYGPATH_W) 'fltkimgbuf.cc'; else $(CYGPATH_W) '$(srcdir)/fltkimgbuf.cc'; fi`
536 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Tpo $(DEPDIR)/libDw_fltk_a-fltkimgbuf.Po
537 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkimgbuf.cc' object='libDw_fltk_a-fltkimgbuf.obj' libtool=no @AMDEPBACKSLASH@
538 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
539 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkimgbuf.obj `if test -f 'fltkimgbuf.cc'; then $(CYGPATH_W) 'fltkimgbuf.cc'; else $(CYGPATH_W) '$(srcdir)/fltkimgbuf.cc'; fi`
451540
452541 libDw_fltk_a-fltkmisc.o: fltkmisc.cc
453 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkmisc.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo -c -o libDw_fltk_a-fltkmisc.o `test -f 'fltkmisc.cc' || echo '$(srcdir)/'`fltkmisc.cc
454 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo $(DEPDIR)/libDw_fltk_a-fltkmisc.Po
455 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkmisc.cc' object='libDw_fltk_a-fltkmisc.o' libtool=no @AMDEPBACKSLASH@
456 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
457 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkmisc.o `test -f 'fltkmisc.cc' || echo '$(srcdir)/'`fltkmisc.cc
542 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkmisc.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo -c -o libDw_fltk_a-fltkmisc.o `test -f 'fltkmisc.cc' || echo '$(srcdir)/'`fltkmisc.cc
543 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo $(DEPDIR)/libDw_fltk_a-fltkmisc.Po
544 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkmisc.cc' object='libDw_fltk_a-fltkmisc.o' libtool=no @AMDEPBACKSLASH@
545 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
546 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkmisc.o `test -f 'fltkmisc.cc' || echo '$(srcdir)/'`fltkmisc.cc
458547
459548 libDw_fltk_a-fltkmisc.obj: fltkmisc.cc
460 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkmisc.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo -c -o libDw_fltk_a-fltkmisc.obj `if test -f 'fltkmisc.cc'; then $(CYGPATH_W) 'fltkmisc.cc'; else $(CYGPATH_W) '$(srcdir)/fltkmisc.cc'; fi`
461 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo $(DEPDIR)/libDw_fltk_a-fltkmisc.Po
462 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkmisc.cc' object='libDw_fltk_a-fltkmisc.obj' libtool=no @AMDEPBACKSLASH@
463 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
464 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkmisc.obj `if test -f 'fltkmisc.cc'; then $(CYGPATH_W) 'fltkmisc.cc'; else $(CYGPATH_W) '$(srcdir)/fltkmisc.cc'; fi`
549 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkmisc.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo -c -o libDw_fltk_a-fltkmisc.obj `if test -f 'fltkmisc.cc'; then $(CYGPATH_W) 'fltkmisc.cc'; else $(CYGPATH_W) '$(srcdir)/fltkmisc.cc'; fi`
550 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkmisc.Tpo $(DEPDIR)/libDw_fltk_a-fltkmisc.Po
551 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkmisc.cc' object='libDw_fltk_a-fltkmisc.obj' libtool=no @AMDEPBACKSLASH@
552 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
553 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkmisc.obj `if test -f 'fltkmisc.cc'; then $(CYGPATH_W) 'fltkmisc.cc'; else $(CYGPATH_W) '$(srcdir)/fltkmisc.cc'; fi`
465554
466555 libDw_fltk_a-fltkplatform.o: fltkplatform.cc
467 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkplatform.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo -c -o libDw_fltk_a-fltkplatform.o `test -f 'fltkplatform.cc' || echo '$(srcdir)/'`fltkplatform.cc
468 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo $(DEPDIR)/libDw_fltk_a-fltkplatform.Po
469 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkplatform.cc' object='libDw_fltk_a-fltkplatform.o' libtool=no @AMDEPBACKSLASH@
470 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
471 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkplatform.o `test -f 'fltkplatform.cc' || echo '$(srcdir)/'`fltkplatform.cc
556 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkplatform.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo -c -o libDw_fltk_a-fltkplatform.o `test -f 'fltkplatform.cc' || echo '$(srcdir)/'`fltkplatform.cc
557 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo $(DEPDIR)/libDw_fltk_a-fltkplatform.Po
558 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkplatform.cc' object='libDw_fltk_a-fltkplatform.o' libtool=no @AMDEPBACKSLASH@
559 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
560 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkplatform.o `test -f 'fltkplatform.cc' || echo '$(srcdir)/'`fltkplatform.cc
472561
473562 libDw_fltk_a-fltkplatform.obj: fltkplatform.cc
474 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkplatform.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo -c -o libDw_fltk_a-fltkplatform.obj `if test -f 'fltkplatform.cc'; then $(CYGPATH_W) 'fltkplatform.cc'; else $(CYGPATH_W) '$(srcdir)/fltkplatform.cc'; fi`
475 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo $(DEPDIR)/libDw_fltk_a-fltkplatform.Po
476 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkplatform.cc' object='libDw_fltk_a-fltkplatform.obj' libtool=no @AMDEPBACKSLASH@
477 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
478 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkplatform.obj `if test -f 'fltkplatform.cc'; then $(CYGPATH_W) 'fltkplatform.cc'; else $(CYGPATH_W) '$(srcdir)/fltkplatform.cc'; fi`
563 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkplatform.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo -c -o libDw_fltk_a-fltkplatform.obj `if test -f 'fltkplatform.cc'; then $(CYGPATH_W) 'fltkplatform.cc'; else $(CYGPATH_W) '$(srcdir)/fltkplatform.cc'; fi`
564 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkplatform.Tpo $(DEPDIR)/libDw_fltk_a-fltkplatform.Po
565 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkplatform.cc' object='libDw_fltk_a-fltkplatform.obj' libtool=no @AMDEPBACKSLASH@
566 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
567 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkplatform.obj `if test -f 'fltkplatform.cc'; then $(CYGPATH_W) 'fltkplatform.cc'; else $(CYGPATH_W) '$(srcdir)/fltkplatform.cc'; fi`
479568
480569 libDw_fltk_a-fltkpreview.o: fltkpreview.cc
481 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkpreview.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo -c -o libDw_fltk_a-fltkpreview.o `test -f 'fltkpreview.cc' || echo '$(srcdir)/'`fltkpreview.cc
482 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo $(DEPDIR)/libDw_fltk_a-fltkpreview.Po
483 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkpreview.cc' object='libDw_fltk_a-fltkpreview.o' libtool=no @AMDEPBACKSLASH@
484 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
485 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkpreview.o `test -f 'fltkpreview.cc' || echo '$(srcdir)/'`fltkpreview.cc
570 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkpreview.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo -c -o libDw_fltk_a-fltkpreview.o `test -f 'fltkpreview.cc' || echo '$(srcdir)/'`fltkpreview.cc
571 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo $(DEPDIR)/libDw_fltk_a-fltkpreview.Po
572 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkpreview.cc' object='libDw_fltk_a-fltkpreview.o' libtool=no @AMDEPBACKSLASH@
573 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
574 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkpreview.o `test -f 'fltkpreview.cc' || echo '$(srcdir)/'`fltkpreview.cc
486575
487576 libDw_fltk_a-fltkpreview.obj: fltkpreview.cc
488 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkpreview.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo -c -o libDw_fltk_a-fltkpreview.obj `if test -f 'fltkpreview.cc'; then $(CYGPATH_W) 'fltkpreview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkpreview.cc'; fi`
489 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo $(DEPDIR)/libDw_fltk_a-fltkpreview.Po
490 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkpreview.cc' object='libDw_fltk_a-fltkpreview.obj' libtool=no @AMDEPBACKSLASH@
491 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
492 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkpreview.obj `if test -f 'fltkpreview.cc'; then $(CYGPATH_W) 'fltkpreview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkpreview.cc'; fi`
577 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkpreview.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo -c -o libDw_fltk_a-fltkpreview.obj `if test -f 'fltkpreview.cc'; then $(CYGPATH_W) 'fltkpreview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkpreview.cc'; fi`
578 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkpreview.Tpo $(DEPDIR)/libDw_fltk_a-fltkpreview.Po
579 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkpreview.cc' object='libDw_fltk_a-fltkpreview.obj' libtool=no @AMDEPBACKSLASH@
580 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
581 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkpreview.obj `if test -f 'fltkpreview.cc'; then $(CYGPATH_W) 'fltkpreview.cc'; else $(CYGPATH_W) '$(srcdir)/fltkpreview.cc'; fi`
493582
494583 libDw_fltk_a-fltkui.o: fltkui.cc
495 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkui.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkui.Tpo -c -o libDw_fltk_a-fltkui.o `test -f 'fltkui.cc' || echo '$(srcdir)/'`fltkui.cc
496 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkui.Tpo $(DEPDIR)/libDw_fltk_a-fltkui.Po
497 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkui.cc' object='libDw_fltk_a-fltkui.o' libtool=no @AMDEPBACKSLASH@
498 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
499 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkui.o `test -f 'fltkui.cc' || echo '$(srcdir)/'`fltkui.cc
584 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkui.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkui.Tpo -c -o libDw_fltk_a-fltkui.o `test -f 'fltkui.cc' || echo '$(srcdir)/'`fltkui.cc
585 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkui.Tpo $(DEPDIR)/libDw_fltk_a-fltkui.Po
586 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkui.cc' object='libDw_fltk_a-fltkui.o' libtool=no @AMDEPBACKSLASH@
587 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
588 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkui.o `test -f 'fltkui.cc' || echo '$(srcdir)/'`fltkui.cc
500589
501590 libDw_fltk_a-fltkui.obj: fltkui.cc
502 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkui.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkui.Tpo -c -o libDw_fltk_a-fltkui.obj `if test -f 'fltkui.cc'; then $(CYGPATH_W) 'fltkui.cc'; else $(CYGPATH_W) '$(srcdir)/fltkui.cc'; fi`
503 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkui.Tpo $(DEPDIR)/libDw_fltk_a-fltkui.Po
504 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkui.cc' object='libDw_fltk_a-fltkui.obj' libtool=no @AMDEPBACKSLASH@
505 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
506 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkui.obj `if test -f 'fltkui.cc'; then $(CYGPATH_W) 'fltkui.cc'; else $(CYGPATH_W) '$(srcdir)/fltkui.cc'; fi`
591 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkui.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkui.Tpo -c -o libDw_fltk_a-fltkui.obj `if test -f 'fltkui.cc'; then $(CYGPATH_W) 'fltkui.cc'; else $(CYGPATH_W) '$(srcdir)/fltkui.cc'; fi`
592 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkui.Tpo $(DEPDIR)/libDw_fltk_a-fltkui.Po
593 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkui.cc' object='libDw_fltk_a-fltkui.obj' libtool=no @AMDEPBACKSLASH@
594 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
595 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkui.obj `if test -f 'fltkui.cc'; then $(CYGPATH_W) 'fltkui.cc'; else $(CYGPATH_W) '$(srcdir)/fltkui.cc'; fi`
507596
508597 libDw_fltk_a-fltkviewbase.o: fltkviewbase.cc
509 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewbase.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo -c -o libDw_fltk_a-fltkviewbase.o `test -f 'fltkviewbase.cc' || echo '$(srcdir)/'`fltkviewbase.cc
510 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewbase.Po
511 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkviewbase.cc' object='libDw_fltk_a-fltkviewbase.o' libtool=no @AMDEPBACKSLASH@
512 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
513 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewbase.o `test -f 'fltkviewbase.cc' || echo '$(srcdir)/'`fltkviewbase.cc
598 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewbase.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo -c -o libDw_fltk_a-fltkviewbase.o `test -f 'fltkviewbase.cc' || echo '$(srcdir)/'`fltkviewbase.cc
599 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewbase.Po
600 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkviewbase.cc' object='libDw_fltk_a-fltkviewbase.o' libtool=no @AMDEPBACKSLASH@
601 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
602 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewbase.o `test -f 'fltkviewbase.cc' || echo '$(srcdir)/'`fltkviewbase.cc
514603
515604 libDw_fltk_a-fltkviewbase.obj: fltkviewbase.cc
516 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewbase.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo -c -o libDw_fltk_a-fltkviewbase.obj `if test -f 'fltkviewbase.cc'; then $(CYGPATH_W) 'fltkviewbase.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewbase.cc'; fi`
517 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewbase.Po
518 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkviewbase.cc' object='libDw_fltk_a-fltkviewbase.obj' libtool=no @AMDEPBACKSLASH@
519 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
520 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewbase.obj `if test -f 'fltkviewbase.cc'; then $(CYGPATH_W) 'fltkviewbase.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewbase.cc'; fi`
605 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewbase.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo -c -o libDw_fltk_a-fltkviewbase.obj `if test -f 'fltkviewbase.cc'; then $(CYGPATH_W) 'fltkviewbase.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewbase.cc'; fi`
606 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewbase.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewbase.Po
607 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkviewbase.cc' object='libDw_fltk_a-fltkviewbase.obj' libtool=no @AMDEPBACKSLASH@
608 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
609 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewbase.obj `if test -f 'fltkviewbase.cc'; then $(CYGPATH_W) 'fltkviewbase.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewbase.cc'; fi`
521610
522611 libDw_fltk_a-fltkviewport.o: fltkviewport.cc
523 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewport.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo -c -o libDw_fltk_a-fltkviewport.o `test -f 'fltkviewport.cc' || echo '$(srcdir)/'`fltkviewport.cc
524 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewport.Po
525 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkviewport.cc' object='libDw_fltk_a-fltkviewport.o' libtool=no @AMDEPBACKSLASH@
526 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
527 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewport.o `test -f 'fltkviewport.cc' || echo '$(srcdir)/'`fltkviewport.cc
612 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewport.o -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo -c -o libDw_fltk_a-fltkviewport.o `test -f 'fltkviewport.cc' || echo '$(srcdir)/'`fltkviewport.cc
613 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewport.Po
614 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkviewport.cc' object='libDw_fltk_a-fltkviewport.o' libtool=no @AMDEPBACKSLASH@
615 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
616 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewport.o `test -f 'fltkviewport.cc' || echo '$(srcdir)/'`fltkviewport.cc
528617
529618 libDw_fltk_a-fltkviewport.obj: fltkviewport.cc
530 @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewport.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo -c -o libDw_fltk_a-fltkviewport.obj `if test -f 'fltkviewport.cc'; then $(CYGPATH_W) 'fltkviewport.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewport.cc'; fi`
531 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewport.Po
532 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fltkviewport.cc' object='libDw_fltk_a-fltkviewport.obj' libtool=no @AMDEPBACKSLASH@
533 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
534 @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewport.obj `if test -f 'fltkviewport.cc'; then $(CYGPATH_W) 'fltkviewport.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewport.cc'; fi`
535
536 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
537 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
538 unique=`for i in $$list; do \
539 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
540 done | \
541 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
542 END { if (nonempty) { for (i in files) print i; }; }'`; \
543 mkid -fID $$unique
544 tags: TAGS
545
546 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
547 $(TAGS_FILES) $(LISP)
619 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -MT libDw_fltk_a-fltkviewport.obj -MD -MP -MF $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo -c -o libDw_fltk_a-fltkviewport.obj `if test -f 'fltkviewport.cc'; then $(CYGPATH_W) 'fltkviewport.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewport.cc'; fi`
620 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libDw_fltk_a-fltkviewport.Tpo $(DEPDIR)/libDw_fltk_a-fltkviewport.Po
621 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='fltkviewport.cc' object='libDw_fltk_a-fltkviewport.obj' libtool=no @AMDEPBACKSLASH@
622 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
623 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libDw_fltk_a_CXXFLAGS) $(CXXFLAGS) -c -o libDw_fltk_a-fltkviewport.obj `if test -f 'fltkviewport.cc'; then $(CYGPATH_W) 'fltkviewport.cc'; else $(CYGPATH_W) '$(srcdir)/fltkviewport.cc'; fi`
624
625 ID: $(am__tagged_files)
626 $(am__define_uniq_tagged_files); mkid -fID $$unique
627 tags: tags-am
628 TAGS: tags
629
630 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
548631 set x; \
549632 here=`pwd`; \
550 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
551 unique=`for i in $$list; do \
552 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
553 done | \
554 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
555 END { if (nonempty) { for (i in files) print i; }; }'`; \
633 $(am__define_uniq_tagged_files); \
556634 shift; \
557635 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
558636 test -n "$$unique" || unique=$$empty_fix; \
564642 $$unique; \
565643 fi; \
566644 fi
567 ctags: CTAGS
568 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
569 $(TAGS_FILES) $(LISP)
570 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
571 unique=`for i in $$list; do \
572 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
573 done | \
574 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
575 END { if (nonempty) { for (i in files) print i; }; }'`; \
645 ctags: ctags-am
646
647 CTAGS: ctags
648 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
649 $(am__define_uniq_tagged_files); \
576650 test -z "$(CTAGS_ARGS)$$unique" \
577651 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
578652 $$unique
581655 here=`$(am__cd) $(top_builddir) && pwd` \
582656 && $(am__cd) $(top_srcdir) \
583657 && gtags -i $(GTAGS_ARGS) "$$here"
658 cscopelist: cscopelist-am
659
660 cscopelist-am: $(am__tagged_files)
661 list='$(am__tagged_files)'; \
662 case "$(srcdir)" in \
663 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
664 *) sdir=$(subdir)/$(srcdir) ;; \
665 esac; \
666 for i in $$list; do \
667 if test -f "$$i"; then \
668 echo "$(subdir)/$$i"; \
669 else \
670 echo "$$sdir/$$i"; \
671 fi; \
672 done >> $(top_builddir)/cscope.files
584673
585674 distclean-tags:
586675 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
720809
721810 .MAKE: install-am install-strip
722811
723 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
724 clean-noinstLIBRARIES ctags distclean distclean-compile \
725 distclean-generic distclean-tags distdir dvi dvi-am html \
726 html-am info info-am install install-am install-data \
727 install-data-am install-dvi install-dvi-am install-exec \
728 install-exec-am install-html install-html-am install-info \
729 install-info-am install-man install-pdf install-pdf-am \
730 install-ps install-ps-am install-strip installcheck \
731 installcheck-am installdirs maintainer-clean \
812 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
813 clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
814 distclean-compile distclean-generic distclean-tags distdir dvi \
815 dvi-am html html-am info info-am install install-am \
816 install-data install-data-am install-dvi install-dvi-am \
817 install-exec install-exec-am install-html install-html-am \
818 install-info install-info-am install-man install-pdf \
819 install-pdf-am install-ps install-ps-am install-strip \
820 installcheck installcheck-am installdirs maintainer-clean \
732821 maintainer-clean-generic mostlyclean mostlyclean-compile \
733 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
822 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
734823 uninstall-am
735824
736825
1919
2020
2121 #include "alignedtextblock.hh"
22 #include "../lout/debug.hh"
2223 #include <stdio.h>
2324
2425 namespace dw {
6162 AlignedTextblock::AlignedTextblock (bool limitTextWidth):
6263 Textblock (limitTextWidth)
6364 {
65 DBG_OBJ_CREATE ("dw::AlignedTextblock");
6466 registerName ("dw::AlignedTextblock", &CLASS_ID);
6567 }
6668
7880 AlignedTextblock::~AlignedTextblock()
7981 {
8082 list->unref (listPos);
83 DBG_OBJ_DELETE ();
8184 }
8285
8386 void AlignedTextblock::updateValue ()
2525 class Widget;
2626 class Iterator;
2727
28 // Nothing yet to free.
29 inline void freeall () { }
30
2831 namespace ui {
2932
3033 class ResourceFactory;
4043 #include "types.hh"
4144 #include "events.hh"
4245 #include "imgbuf.hh"
46 #include "imgrenderer.hh"
4347 #include "style.hh"
4448 #include "view.hh"
4549 #include "platform.hh"
1919
2020
2121 #include "core.hh"
22 #include "../lout/debug.hh"
2223 #include "../lout/msg.h"
2324
2425 namespace dw {
2627
2728 FindtextState::FindtextState ()
2829 {
30 DBG_OBJ_CREATE ("dw::core::FindtextState");
31
2932 key = NULL;
3033 nexttab = NULL;
3134 widget = NULL;
4346 delete iterator;
4447 if (hlIterator)
4548 delete hlIterator;
49
50 DBG_OBJ_DELETE ();
4651 }
4752
4853 void FindtextState::setWidget (Widget *widget)
1919 #include "fltkplatform.hh"
2020 #include "fltkui.hh"
2121
22 namespace dw {
23 namespace fltk {
24
25 inline void freeall ()
26 {
27 FltkImgbuf::freeall ();
28 }
29
30 } // namespace fltk
31 } // namespace dw
32
2233 #undef __INCLUDED_FROM_DW_FLTK_CORE_HH__
2334
2435 #endif // __DW_FLTK_CORE_HH__
1919
2020
2121 #include "fltkflatview.hh"
22 #include "../lout/debug.hh"
2223
2324 #include <stdio.h>
2425
3031 FltkFlatView::FltkFlatView (int x, int y, int w, int h, const char *label):
3132 FltkWidgetView (x, y, w, h, label)
3233 {
34 DBG_OBJ_CREATE ("dw::fltk::FltkFlatView");
3335 }
3436
3537 FltkFlatView::~FltkFlatView ()
00 /*
11 * Dillo Widget
22 *
3 * Copyright 2005-2007 Sebastian Geerken <sgeerken@dillo.org>
3 * Copyright 2005-2007, 2012-2013 Sebastian Geerken <sgeerken@dillo.org>
44 *
55 * This program is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published by
1616 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1717 */
1818
19
20
2119 #include "fltkcore.hh"
2220 #include "../lout/msg.h"
2321 #include "../lout/misc.hh"
2422
2523 #include <FL/fl_draw.H>
24 #include <math.h>
2625
2726 #define IMAGE_MAX_AREA (6000 * 6000)
27
28 #define MAX_WIDTH 0x8000
29 #define MAX_HEIGHT 0x8000
2830
2931 namespace dw {
3032 namespace fltk {
3133
3234 using namespace lout::container::typed;
3335
34 FltkImgbuf::FltkImgbuf (Type type, int width, int height)
35 {
36 const enum ScaleMode { SIMPLE, BEAUTIFUL, BEAUTIFUL_GAMMA }
37 scaleMode = BEAUTIFUL_GAMMA;
38
39 Vector <FltkImgbuf::GammaCorrectionTable> *FltkImgbuf::gammaCorrectionTables
40 = new Vector <FltkImgbuf::GammaCorrectionTable> (true, 2);
41
42 uchar *FltkImgbuf::findGammaCorrectionTable (double gamma)
43 {
44 // Since the number of possible keys is low, a linear search is
45 // sufficiently fast.
46
47 for (int i = 0; i < gammaCorrectionTables->size(); i++) {
48 GammaCorrectionTable *gct = gammaCorrectionTables->get(i);
49 if (gct->gamma == gamma)
50 return gct->map;
51 }
52
53 _MSG("Creating new table for gamma = %g\n", gamma);
54
55 GammaCorrectionTable *gct = new GammaCorrectionTable();
56 gct->gamma = gamma;
57
58 for (int i = 0; i < 256; i++)
59 gct->map[i] = 255 * pow((double)i / 255, gamma);
60
61 gammaCorrectionTables->put (gct);
62 return gct->map;
63 }
64
65 bool FltkImgbuf::excessiveImageDimensions (int width, int height)
66 {
67 return width <= 0 || height <= 0 ||
68 width > IMAGE_MAX_AREA / height;
69 }
70
71 void FltkImgbuf::freeall ()
72 {
73 _MSG("Deleting gammaCorrectionTables\n");
74 delete gammaCorrectionTables;
75 gammaCorrectionTables = NULL;
76 }
77
78 FltkImgbuf::FltkImgbuf (Type type, int width, int height, double gamma)
79 {
80 DBG_OBJ_CREATE ("dw::fltk::FltkImgbuf");
81
3682 _MSG("FltkImgbuf: new root %p\n", this);
37 init (type, width, height, NULL);
38 }
39
40 FltkImgbuf::FltkImgbuf (Type type, int width, int height, FltkImgbuf *root)
41 {
83 init (type, width, height, gamma, NULL);
84 }
85
86 FltkImgbuf::FltkImgbuf (Type type, int width, int height, double gamma,
87 FltkImgbuf *root)
88 {
89 DBG_OBJ_CREATE ("dw::fltk::FltkImgbuf");
90
4291 _MSG("FltkImgbuf: new scaled %p, root is %p\n", this, root);
43 init (type, width, height, root);
44 }
45
46 void FltkImgbuf::init (Type type, int width, int height, FltkImgbuf *root)
47 {
48 this->root = root;
49 this->type = type;
50 this->width = width;
51 this->height = height;
52
53 // TODO: Maybe this is only for root buffers
54 switch (type) {
92 init (type, width, height, gamma, root);
93 }
94
95 void FltkImgbuf::init (Type type, int width, int height, double gamma,
96 FltkImgbuf *root)
97 {
98 if (excessiveImageDimensions (width, height)) {
99 // Excessive image sizes which would cause crashes due to too
100 // big allocations for the image buffer (for root buffers, when
101 // the image was specially prepared). In this case we use a 1 x
102 // 1 size.
103 MSG("FltkImgbuf::init: suspicious image size request %d x %d\n",
104 width, height);
105 init (type, 1, 1, gamma, root);
106 } else if (width > MAX_WIDTH) {
107 // Too large dimensions cause dangerous overflow errors, so we
108 // limit dimensions to harmless values.
109 //
110 // Example: 65535 * 65536 / 65536 (see scaling below) results in
111 // the negative value -1.
112
113 MSG("FltkImgbuf::init: cannot handle large width %d\n", width);
114 init (type, MAX_WIDTH, height, gamma, root);
115 } else if (height > MAX_HEIGHT) {
116 MSG("FltkImgbuf::init: cannot handle large height %d\n", height);
117 init (type, width, MAX_HEIGHT, gamma, root);
118 } else if (gamma <= 0) {
119 MSG("FltkImgbuf::init: non-positive gamma %g\n", gamma);
120 init (type, width, height, 1, root);
121 } else {
122 this->root = root;
123 this->type = type;
124 this->width = width;
125 this->height = height;
126 this->gamma = gamma;
127
128 DBG_OBJ_SET_NUM ("width", width);
129 DBG_OBJ_SET_NUM ("height", height);
130
131 // TODO: Maybe this is only for root buffers
132 switch (type) {
55133 case RGBA: bpp = 4; break;
56134 case RGB: bpp = 3; break;
57135 default: bpp = 1; break;
58 }
59 _MSG("FltkImgbuf::init width=%d height=%d bpp=%d\n", width, height, bpp);
60 rawdata = new uchar[bpp * width * height];
61 // Set light-gray as interim background color.
62 memset(rawdata, 222, width*height*bpp);
63
64 refCount = 1;
65 deleteOnUnref = true;
66 copiedRows = new lout::misc::BitSet (height);
67
68 // The list is only used for root buffers.
69 if (isRoot())
70 scaledBuffers = new lout::container::typed::List <FltkImgbuf> (true);
71 else
72 scaledBuffers = NULL;
73
74 if (!isRoot()) {
75 // Scaling
76 for (int row = 0; row < root->height; row++) {
77 if (root->copiedRows->get (row))
78 scaleRow (row, root->rawdata + row*root->width*root->bpp);
136 }
137 _MSG("FltkImgbuf::init width=%d height=%d bpp=%d gamma=%g\n",
138 width, height, bpp, gamma);
139 rawdata = new uchar[bpp * width * height];
140 // Set light-gray as interim background color.
141 memset(rawdata, 222, width*height*bpp);
142
143 refCount = 1;
144 deleteOnUnref = true;
145 copiedRows = new lout::misc::BitSet (height);
146
147 // The list is only used for root buffers.
148 if (isRoot())
149 scaledBuffers = new lout::container::typed::List <FltkImgbuf> (true);
150 else
151 scaledBuffers = NULL;
152
153 if (!isRoot()) {
154 // Scaling
155 for (int row = 0; row < root->height; row++) {
156 if (root->copiedRows->get (row))
157 scaleRow (row, root->rawdata + row*root->width*root->bpp);
158 }
79159 }
80160 }
81161 }
82162
83163 FltkImgbuf::~FltkImgbuf ()
84164 {
85 _MSG("~FltkImgbuf[%s %p] deleted\n", isRoot() ? "root":"scaled", this);
86
87165 if (!isRoot())
88166 root->detachScaledBuf (this);
89167
92170
93171 if (scaledBuffers)
94172 delete scaledBuffers;
173
174 DBG_OBJ_DELETE ();
95175 }
96176
97177 /**
117197 }
118198
119199 inline void FltkImgbuf::scaleRow (int row, const core::byte *data)
200 {
201 if (row < root->height) {
202 if (scaleMode == SIMPLE)
203 scaleRowSimple (row, data);
204 else
205 scaleRowBeautiful (row, data);
206 }
207 }
208
209 inline void FltkImgbuf::scaleRowSimple (int row, const core::byte *data)
120210 {
121211 int sr1 = scaledY (row);
122212 int sr2 = scaledY (row + 1);
140230 }
141231 }
142232
233 inline void FltkImgbuf::scaleRowBeautiful (int row, const core::byte *data)
234 {
235 int sr1 = scaledY (row);
236 int sr2 = scaledY (row + 1);
237 bool allRootRows = false;
238
239 // Don't rescale rows!
240 if (copiedRows->get(sr1)) return;
241
242 if (height > root->height) {
243 scaleBuffer (data, root->width, 1,
244 rawdata + sr1 * width * bpp, width, sr2 - sr1,
245 bpp, gamma);
246 // Mark scaled rows done
247 for (int sr = sr1; sr < sr2 || sr == sr1; sr++)
248 copiedRows->set (sr, true);
249 } else {
250 assert (sr1 == sr2 || sr1 + 1 == sr2);
251 int row1 = backscaledY(sr1), row2 = backscaledY(sr1 + 1);
252
253 // Check all the necessary root lines already arrived,
254 // a larger area than a single row may be accessed here.
255 for (int r=row1; (allRootRows=root->copiedRows->get(r)) && ++r < row2; );
256 if (allRootRows) {
257 scaleBuffer (root->rawdata + row1 * root->width * bpp,
258 root->width, row2 - row1,
259 rawdata + sr1 * width * bpp, width, 1,
260 bpp, gamma);
261 // Mark scaled row done
262 copiedRows->set (sr1, true);
263 }
264 }
265 }
266
267 /**
268 * General method to scale an image buffer. Used to scale single lines
269 * in scaleRowBeautiful.
270 *
271 * The algorithm is rather simple. If the scaled buffer is smaller
272 * (both width and height) than the original buffer, each pixel in the
273 * scaled buffer is assigned a rectangle of pixels in the original
274 * buffer; the resulting pixel value (red, green, blue) is simply the
275 * average of all pixel values. This is pretty fast and leads to
276 * rather good results.
277 *
278 * Nothing special (like interpolation) is done when scaling up.
279 *
280 * If scaleMode is set to BEAUTIFUL_GAMMA, gamma correction is
281 * considered, see <http://www.4p8.com/eric.brasseur/gamma.html>.
282 *
283 * TODO Could be optimized as in scaleRowSimple: when the destination
284 * image is larger, calculate only one row/column, and copy it to the
285 * other rows/columns.
286 */
287 inline void FltkImgbuf::scaleBuffer (const core::byte *src, int srcWidth,
288 int srcHeight, core::byte *dest,
289 int destWidth, int destHeight, int bpp,
290 double gamma)
291 {
292 uchar *gammaMap1, *gammaMap2;
293
294 if (scaleMode == BEAUTIFUL_GAMMA) {
295 gammaMap1 = findGammaCorrectionTable (gamma);
296 gammaMap2 = findGammaCorrectionTable (1 / gamma);
297 }
298
299 for(int x = 0; x < destWidth; x++)
300 for(int y = 0; y < destHeight; y++) {
301 int xo1 = x * srcWidth / destWidth;
302 int xo2 = lout::misc::max ((x + 1) * srcWidth / destWidth, xo1 + 1);
303 int yo1 = y * srcHeight / destHeight;
304 int yo2 = lout::misc::max ((y + 1) * srcHeight / destHeight, yo1 + 1);
305 int n = (xo2 - xo1) * (yo2 - yo1);
306
307 int v[bpp];
308 for(int i = 0; i < bpp; i++)
309 v[i] = 0;
310
311 for(int xo = xo1; xo < xo2; xo++)
312 for(int yo = yo1; yo < yo2; yo++) {
313 const core::byte *ps = src + bpp * (yo * srcWidth + xo);
314 for(int i = 0; i < bpp; i++)
315 v[i] +=
316 (scaleMode == BEAUTIFUL_GAMMA ? gammaMap2[ps[i]] : ps[i]);
317 }
318
319 core::byte *pd = dest + bpp * (y * destWidth + x);
320 for(int i = 0; i < bpp; i++)
321 pd[i] =
322 scaleMode == BEAUTIFUL_GAMMA ? gammaMap1[v[i] / n] : v[i] / n;
323 }
324 }
325
143326 void FltkImgbuf::copyRow (int row, const core::byte *data)
144327 {
145328 assert (isRoot());
146329
147 // Flag the row done and copy its data.
148 copiedRows->set (row, true);
149 memcpy(rawdata + row * width * bpp, data, width * bpp);
150
151 // Update all the scaled buffers of this root image.
152 for (Iterator <FltkImgbuf> it = scaledBuffers->iterator(); it.hasNext(); ) {
153 FltkImgbuf *sb = it.getNext ();
154 sb->scaleRow(row, data);
330 if (row < height) {
331 // Flag the row done and copy its data.
332 copiedRows->set (row, true);
333 memcpy(rawdata + row * width * bpp, data, width * bpp);
334
335 // Update all the scaled buffers of this root image.
336 for (Iterator <FltkImgbuf> it = scaledBuffers->iterator();
337 it.hasNext(); ) {
338 FltkImgbuf *sb = it.getNext ();
339 sb->scaleRow (row, data);
340 }
155341 }
156342 }
157343
169355 {
170356 if (!isRoot())
171357 return root->getScaledBuf (width, height);
358
359 if (width > MAX_WIDTH) {
360 // Similar to init.
361 MSG("FltkImgbuf::getScaledBuf: cannot handle large width %d\n", width);
362 return getScaledBuf (MAX_WIDTH, height);
363 }
364 if (height > MAX_HEIGHT) {
365 MSG("FltkImgbuf::getScaledBuf: cannot handle large height %d\n", height);
366 return getScaledBuf (width, MAX_HEIGHT);
367 }
172368
173369 if (width == this->width && height == this->height) {
174370 ref ();
183379 }
184380 }
185381
186 /* Check for excessive image sizes which would cause crashes due to
187 * too big allocations for the image buffer.
188 * In this case we return a pointer to the unscaled image buffer.
189 */
190 if (width <= 0 || height <= 0 ||
191 width > IMAGE_MAX_AREA / height) {
382 // Check for excessive image sizes which would cause crashes due to
383 // too big allocations for the image buffer. In this case we return
384 // a pointer to the unscaled image buffer.
385 if (excessiveImageDimensions (width, height)) {
192386 MSG("FltkImgbuf::getScaledBuf: suspicious image size request %d x %d\n",
193387 width, height);
194388 ref ();
195389 return this;
196390 }
197391
198 /* This size is not yet used, so a new buffer has to be created. */
199 FltkImgbuf *sb = new FltkImgbuf (type, width, height, this);
392 // This size is not yet used, so a new buffer has to be created.
393 FltkImgbuf *sb = new FltkImgbuf (type, width, height, gamma, this);
200394 scaledBuffers->append (sb);
395 DBG_OBJ_ASSOC_CHILD (sb);
396
201397 return sb;
202398 }
203399
214410 _MSG("::getRowArea: area x=%d y=%d width=%d height=%d\n",
215411 area->x, area->y, area->width, area->height);
216412 } else {
217 // scaled buffer
218 int sr1 = scaledY (row);
219 int sr2 = scaledY (row + 1);
220
221 area->x = 0;
222 area->y = sr1;
223 area->width = width;
224 area->height = sr2 - sr1;
225 _MSG("::getRowArea: area x=%d y=%d width=%d height=%d\n",
226 area->x, area->y, area->width, area->height);
413 if (row > root->height)
414 area->x = area->y = area->width = area->height = 0;
415 else {
416 // scaled buffer
417 int sr1 = scaledY (row);
418 int sr2 = scaledY (row + 1);
419
420 area->x = 0;
421 area->y = sr1;
422 area->width = width;
423 area->height = sr2 - sr1;
424 _MSG("::getRowArea: area x=%d y=%d width=%d height=%d\n",
425 area->x, area->y, area->width, area->height);
426 }
227427 }
228428 }
229429
235435 int FltkImgbuf::getRootHeight ()
236436 {
237437 return root ? root->height : height;
438 }
439
440 core::Imgbuf *FltkImgbuf::createSimilarBuf (int width, int height)
441 {
442 return new FltkImgbuf (type, width, height, gamma);
443 }
444
445 void FltkImgbuf::copyTo (Imgbuf *dest, int xDestRoot, int yDestRoot,
446 int xSrc, int ySrc, int widthSrc, int heightSrc)
447 {
448 FltkImgbuf *fDest = (FltkImgbuf*)dest;
449 assert (bpp == fDest->bpp);
450
451 int xSrc2 = lout::misc::min (xSrc + widthSrc, fDest->width - xDestRoot);
452 int ySrc2 = lout::misc::min (ySrc + heightSrc, fDest->height - yDestRoot);
453
454 //printf ("copying from (%d, %d), %d x %d to (%d, %d) (root) => "
455 // "xSrc2 = %d, ySrc2 = %d\n",
456 // xSrc, ySrc, widthSrc, heightSrc, xDestRoot, yDestRoot,
457 // xSrc2, ySrc2);
458
459 for (int x = xSrc; x < xSrc2; x++)
460 for (int y = ySrc; y < ySrc2; y++) {
461 int iSrc = x + width * y;
462 int iDest = xDestRoot + x + fDest->width * (yDestRoot + y);
463
464 //printf (" (%d, %d): %d -> %d\n", x, y, iSrc, iDest);
465
466 for (int b = 0; b < bpp; b++)
467 fDest->rawdata[bpp * iDest + b] = rawdata[bpp * iSrc + b];
468 }
238469 }
239470
240471 void FltkImgbuf::ref ()
298529 return ySrc * height / root->height;
299530 }
300531
532 int FltkImgbuf::backscaledY(int yScaled)
533 {
534 assert (root != NULL);
535
536 // Notice that rounding errors because of integers do not play a
537 // role. This method cannot be the exact inverse of scaledY, since
538 // scaleY is not bijective, and so not invertible. Instead, both
539 // values always return the smallest value.
540 return yScaled * root->height / height;
541 }
542
301543 void FltkImgbuf::draw (Fl_Widget *target, int xRoot, int yRoot,
302544 int x, int y, int width, int height)
303545 {
1010 class FltkImgbuf: public core::Imgbuf
1111 {
1212 private:
13 class GammaCorrectionTable: public lout::object::Object
14 {
15 public:
16 double gamma;
17 uchar map[256];
18 };
19
1320 FltkImgbuf *root;
1421 int refCount;
1522 bool deleteOnUnref;
1724
1825 int width, height;
1926 Type type;
27 double gamma;
2028
2129 //{
2230 int bpp;
2735 // the image buffer.
2836 lout::misc::BitSet *copiedRows;
2937
30 FltkImgbuf (Type type, int width, int height, FltkImgbuf *root);
31 void init (Type type, int width, int height, FltkImgbuf *root);
38 static lout::container::typed::Vector <GammaCorrectionTable>
39 *gammaCorrectionTables;
40
41 static uchar *findGammaCorrectionTable (double gamma);
42 static bool excessiveImageDimensions (int width, int height);
43
44 FltkImgbuf (Type type, int width, int height, double gamma,
45 FltkImgbuf *root);
46 void init (Type type, int width, int height, double gamma, FltkImgbuf *root);
3247 int scaledY(int ySrc);
48 int backscaledY(int yScaled);
3349 int isRoot() { return (root == NULL); }
3450 void detachScaledBuf (FltkImgbuf *scaledBuf);
3551
3753 ~FltkImgbuf ();
3854
3955 public:
40 FltkImgbuf (Type type, int width, int height);
56 FltkImgbuf (Type type, int width, int height, double gamma);
57
58 static void freeall ();
4159
4260 void setCMap (int *colors, int num_colors);
4361 inline void scaleRow (int row, const core::byte *data);
62 inline void scaleRowSimple (int row, const core::byte *data);
63 inline void scaleRowBeautiful (int row, const core::byte *data);
64 inline static void scaleBuffer (const core::byte *src, int srcWidth,
65 int srcHeight, core::byte *dest,
66 int destWidth, int destHeight, int bpp,
67 double gamma);
68
4469 void newScan ();
4570 void copyRow (int row, const core::byte *data);
4671 core::Imgbuf* getScaledBuf (int width, int height);
4772 void getRowArea (int row, dw::core::Rectangle *area);
4873 int getRootWidth ();
4974 int getRootHeight ();
75 core::Imgbuf *createSimilarBuf (int width, int height);
76 void copyTo (Imgbuf *dest, int xDestRoot, int yDestRoot,
77 int xSrc, int ySrc, int widthSrc, int heightSrc);
5078 void ref ();
5179 void unref ();
5280
1919 #include <stdio.h>
2020
2121 #include "../lout/msg.h"
22 #include "../lout/debug.hh"
2223 #include "fltkcore.hh"
2324
2425 #include <FL/fl_draw.H>
453454
454455 FltkPlatform::FltkPlatform ()
455456 {
457 DBG_OBJ_CREATE ("dw::fltk::FltkPlatform");
458
456459 layout = NULL;
457460 idleQueue = new container::typed::List <IdleFunc> (true);
458461 idleFuncRunning = false;
470473 Fl::remove_idle (generalStaticIdle, (void*)this);
471474 delete idleQueue;
472475 delete resources;
476
477 DBG_OBJ_DELETE ();
473478 }
474479
475480 void FltkPlatform::setLayout (core::Layout *layout)
476481 {
477482 this->layout = layout;
483 DBG_OBJ_ASSOC_CHILD (layout);
478484 }
479485
480486
703709 }
704710
705711 core::Imgbuf *FltkPlatform::createImgbuf (core::Imgbuf::Type type,
706 int width, int height)
707 {
708 return new FltkImgbuf (type, width, height);
712 int width, int height, double gamma)
713 {
714 return new FltkImgbuf (type, width, height, gamma);
709715 }
710716
711717 core::ui::ResourceFactory *FltkPlatform::getResourceFactory ()
168168 core::style::Tooltip *createTooltip (const char *text);
169169 void cancelTooltip();
170170
171 core::Imgbuf *createImgbuf (core::Imgbuf::Type type, int width, int height);
171 core::Imgbuf *createImgbuf (core::Imgbuf::Type type, int width, int height,
172 double gamma);
172173
173174 void copySelection(const char *text);
174175
3131 #include <FL/Fl_Check_Button.H>
3232 #include <FL/Fl_Round_Button.H>
3333 #include <FL/Fl_Choice.H>
34 #include <FL/Fl_Tree.H>
34 #include <FL/Fl_Browser.H>
3535
3636 #include <stdio.h>
3737
880880
881881
882882 template <class I>
883 bool FltkToggleButtonResource<I>::FltkToggleButtonResource::isActivated ()
883 bool FltkToggleButtonResource<I>::isActivated ()
884884 {
885885 return ((Fl_Button*)this->widget)->value ();
886886 }
10551055 menu = new Fl_Menu_Item[itemsAllocated];
10561056 memset(menu, 0, itemsAllocated * sizeof(Fl_Menu_Item));
10571057 itemsUsed = 1; // menu[0].text == NULL, which is an end-of-menu marker.
1058 visibleItems = 0;
10591058
10601059 init (platform);
10611060 }
11671166 Fl_Menu_Item *item = newItem();
11681167
11691168 item->text = strdup(str);
1170 item->argument(visibleItems++);
11711169
11721170 if (enabled == false)
11731171 item->flags = FL_MENU_INACTIVE;
11891187 Fl_Menu_Item *item = newItem();
11901188
11911189 item->text = strdup(name);
1192 item->argument(visibleItems++);
11931190
11941191 if (enabled == false)
11951192 item->flags = FL_MENU_INACTIVE;
12081205
12091206 bool FltkOptionMenuResource::isSelected (int index)
12101207 {
1211 return index == (long) ((Fl_Choice *)widget)->mvalue()->user_data();
1208 return index == ((Fl_Choice *)widget)->value();
12121209 }
12131210
12141211 int FltkOptionMenuResource::getNumberOfItems()
12171214 }
12181215
12191216 // ----------------------------------------------------------------------
1217
1218 class CustBrowser : public Fl_Browser {
1219 public:
1220 CustBrowser(int x, int y, int w, int h) : Fl_Browser(x, y, w, h) {};
1221 int full_width() const;
1222 int full_height() const {return Fl_Browser::full_height();}
1223 int avg_height() {return size() ? Fl_Browser_::incr_height() : 0;}
1224 };
1225
1226 /*
1227 * Fl_Browser_ has a full_width(), but it has a tendency to contain 0, so...
1228 */
1229 int CustBrowser::full_width() const
1230 {
1231 int max = 0;
1232 void *item = item_first();
1233
1234 while (item) {
1235 int w = item_width(item);
1236
1237 if (w > max)
1238 max = w;
1239
1240 item = item_next(item);
1241 }
1242 return max;
1243 }
12201244
12211245 FltkListResource::FltkListResource (FltkPlatform *platform,
12221246 core::ui::ListResource::SelectionMode
12231247 selectionMode, int rowCount):
12241248 FltkSelectionResource <dw::core::ui::ListResource> (platform),
1225 itemsSelected(8)
1249 currDepth(0)
12261250 {
12271251 mode = selectionMode;
12281252 showRows = rowCount;
12361260
12371261 Fl_Widget *FltkListResource::createNewWidget (core::Allocation *allocation)
12381262 {
1239 Fl_Tree *tree =
1240 new Fl_Tree (allocation->x, allocation->y, allocation->width,
1241 allocation->ascent + allocation->descent);
1242
1243 tree->selectmode((mode == SELECTION_MULTIPLE) ? FL_TREE_SELECT_MULTI
1244 : FL_TREE_SELECT_SINGLE);
1245 tree->showroot(0);
1246 tree->connectorstyle(FL_TREE_CONNECTOR_NONE);
1247 tree->margintop(0);
1248 tree->marginleft(-14);
1249 tree->callback(widgetCallback,this);
1250 tree->when(FL_WHEN_CHANGED);
1251
1252 currParent = tree->root();
1253 return tree;
1263 CustBrowser *b =
1264 new CustBrowser (allocation->x, allocation->y, allocation->width,
1265 allocation->ascent + allocation->descent);
1266
1267 b->type((mode == SELECTION_MULTIPLE) ? FL_MULTI_BROWSER : FL_HOLD_BROWSER);
1268 b->callback(widgetCallback, this);
1269 b->when(FL_WHEN_CHANGED);
1270 b->column_widths(colWidths);
1271 b->column_char('\a'); // I just chose a nonprinting character.
1272
1273 return b;
12541274 }
12551275
12561276 void FltkListResource::setWidgetStyle (Fl_Widget *widget,
12571277 core::style::Style *style)
12581278 {
1259 Fl_Tree *t = (Fl_Tree *)widget;
1279 Fl_Browser *b = (Fl_Browser *)widget;
12601280
12611281 FltkResource::setWidgetStyle(widget, style);
12621282
1263 t->item_labelfont(widget->labelfont());
1264 t->item_labelsize(widget->labelsize());
1265 t->item_labelfgcolor(widget->labelcolor());
1266 t->item_labelbgcolor(widget->color());
1283 b->textfont(widget->labelfont());
1284 b->textsize(widget->labelsize());
1285 b->textcolor(widget->labelcolor());
1286
1287 colWidths[0] = b->textsize();
1288 colWidths[1] = colWidths[0];
1289 colWidths[2] = colWidths[0];
1290 colWidths[3] = 0;
12671291 }
12681292
12691293 void FltkListResource::widgetCallback (Fl_Widget *widget, void *data)
12701294 {
1271 Fl_Tree_Item *fltkItem = ((Fl_Tree *) widget)->callback_item ();
1272 int index = -1;
1273
1274 if (fltkItem)
1275 index = (long) (fltkItem->user_data ());
1276 if (index > -1) {
1277 bool selected = fltkItem->is_selected ();
1278
1279 if (selected && fltkItem->has_children()) {
1280 /* Don't permit a group to be selected. */
1281 fltkItem->deselect();
1295 Fl_Browser *b = (Fl_Browser *) widget;
1296
1297 if (b->selected(b->value())) {
1298 /* If it shouldn't be selectable, deselect it again. It would be nice to
1299 * have a less unpleasant way to do this.
1300 */
1301 const char *inactive_code;
1302 if ((inactive_code = strstr(b->text(b->value()), "@N"))) {
1303 const char *ignore_codes = strstr(b->text(b->value()), "@.");
1304
1305 if (inactive_code < ignore_codes)
1306 b->select(b->value(), 0);
1307 }
1308 }
1309 }
1310
1311 void *FltkListResource::newItem (const char *str, bool enabled, bool selected)
1312 {
1313 Fl_Browser *b = (Fl_Browser *) widget;
1314 int index = b->size() + 1;
1315 char *label = (char *)malloc(strlen(str) + 1 + currDepth + 4),
1316 *s = label;
1317
1318 memset(s, '\a', currDepth);
1319 s += currDepth;
1320 if (!enabled) {
1321 // FL_INACTIVE_COLOR
1322 *s++ = '@';
1323 *s++ = 'N';
1324 }
1325 // ignore further '@' chars
1326 *s++ = '@';
1327 *s++ = '.';
1328
1329 strcpy(s, str);
1330
1331 b->add(label);
1332 free(label);
1333
1334 if (selected) {
1335 b->select(index, selected);
1336 if (b->type() == FL_HOLD_BROWSER) {
1337 /* Left to its own devices, it sometimes has some suboptimal ideas
1338 * about how to scroll, and sometimes doesn't seem to show everything
1339 * where it thinks it is.
1340 */
1341 if (index > showRows) {
1342 /* bottomline() and middleline() don't work because the widget is
1343 * too tiny at this point for the bbox() call in
1344 * Fl_Browser::lineposition() to do what one would want.
1345 */
1346 b->topline(index - showRows + 1);
1347 } else {
1348 b->topline(1);
1349 }
1350 }
1351 }
1352 queueResize (true);
1353 return NULL;
1354 }
1355
1356 void FltkListResource::addItem (const char *str, bool enabled, bool selected)
1357 {
1358 // Fl_Browser_::incr_height() for item height won't do the right thing if
1359 // the first item doesn't have anything to it.
1360 if (!str || !*str)
1361 str = " ";
1362 newItem(str, enabled, selected);
1363 }
1364
1365 void FltkListResource::setItem (int index, bool selected)
1366 {
1367 Fl_Browser *b = (Fl_Browser *) widget;
1368
1369 b->select(index + 1, selected);
1370 }
1371
1372 void FltkListResource::pushGroup (const char *name, bool enabled)
1373 {
1374 bool en = false;
1375 bool selected = false;
1376
1377 // Fl_Browser_::incr_height() for item height won't do the right thing if
1378 // the first item doesn't have anything to it.
1379 if (!name || !*name)
1380 name = " ";
1381
1382 // TODO: Proper disabling of item groups
1383 newItem(name, en, selected);
1384
1385 if (currDepth < 3)
1386 currDepth++;
1387 }
1388
1389 void FltkListResource::popGroup ()
1390 {
1391 CustBrowser *b = (CustBrowser *) widget;
1392
1393 newItem(" ", false, false);
1394 b->hide(b->size());
1395
1396 if (currDepth)
1397 currDepth--;
1398 }
1399
1400 int FltkListResource::getMaxItemWidth()
1401 {
1402 return ((CustBrowser *) widget)->full_width();
1403 }
1404
1405 void FltkListResource::sizeRequest (core::Requisition *requisition)
1406 {
1407 if (style) {
1408 CustBrowser *b = (CustBrowser *) widget;
1409 int height = b->full_height();
1410 requisition->width = getMaxItemWidth() + 4;
1411
1412 if (showRows * b->avg_height() < height) {
1413 height = showRows * b->avg_height();
1414 b->has_scrollbar(Fl_Browser_::VERTICAL_ALWAYS);
1415 requisition->width += Fl::scrollbar_size();
12821416 } else {
1283 FltkListResource *res = (FltkListResource *) data;
1284 res->itemsSelected.set (index, selected);
1417 b->has_scrollbar(0);
12851418 }
1286 }
1287 }
1288
1289 void *FltkListResource::newItem (const char *str, bool enabled, bool selected)
1290 {
1291 Fl_Tree *tree = (Fl_Tree *) widget;
1292 Fl_Tree_Item *parent = (Fl_Tree_Item *)currParent;
1293 Fl_Tree_Item *item = tree->add(parent, str);
1294 int index = itemsSelected.size();
1295
1296 enabled &= parent->is_active();
1297 item->activate(enabled);
1298 item->user_data((void*)(long)index);
1299 itemsSelected.increase ();
1300 itemsSelected.set (itemsSelected.size() - 1, selected);
1301
1302 return item;
1303 }
1304
1305 void FltkListResource::addItem (const char *str, bool enabled, bool selected)
1306 {
1307 Fl_Tree *tree = (Fl_Tree *) widget;
1308 Fl_Tree_Item *item = (Fl_Tree_Item *) newItem(str, enabled, selected);
1309
1310 if (selected) {
1311 if (mode == SELECTION_MULTIPLE) {
1312 item->select(selected);
1313 } else {
1314 const bool do_callback = true;
1315 tree->select_only(item, do_callback);
1316 }
1317 }
1318 queueResize (true);
1319 }
1320
1321 void FltkListResource::setItem (int index, bool selected)
1322 {
1323 Fl_Tree *tree = (Fl_Tree *) widget;
1324 Fl_Tree_Item *item = tree->root()->next();
1325
1326 for (int i = 0; item && i < index; i++)
1327 item = item->next();
1328
1329 if (item) {
1330 bool do_callback = false;
1331 itemsSelected.set (index, selected);
1332 if (selected) {
1333 if (mode == SELECTION_MULTIPLE) {
1334 tree->select(item, do_callback);
1335 } else {
1336 /* callback to deselect other selected item */
1337 do_callback = true;
1338 tree->select_only(item, do_callback);
1339 }
1340 } else {
1341 tree->deselect(item, do_callback);
1342 }
1343 }
1344 }
1345
1346 void FltkListResource::pushGroup (const char *name, bool enabled)
1347 {
1348 bool selected = false;
1349
1350 currParent = (Fl_Tree_Item *) newItem(name, enabled, selected);
1351 queueResize (true);
1352 }
1353
1354 void FltkListResource::popGroup ()
1355 {
1356 Fl_Tree_Item *p = (Fl_Tree_Item *)currParent;
1357
1358 if (p->parent())
1359 currParent = p->parent();
1360 }
1361
1362 int FltkListResource::getMaxItemWidth()
1363 {
1364 Fl_Tree *tree = (Fl_Tree *)widget;
1365 int max = 0;
1366
1367 for (Fl_Tree_Item *i = tree->first(); i; i = tree->next(i)) {
1368 int width = 0;
1369
1370 if (i == tree->root())
1371 continue;
1372
1373 for (Fl_Tree_Item *p = i->parent(); p != tree->root(); p = p->parent())
1374 width += tree->connectorwidth();
1375
1376 if (i->label())
1377 width += fl_width(i->label());
1378
1379 if (width > max)
1380 max = width;
1381 }
1382 return max;
1383 }
1384
1385 void FltkListResource::sizeRequest (core::Requisition *requisition)
1386 {
1387 if (style) {
1388 FltkFont *font = (FltkFont*)style->font;
1389 fl_font(font->font,font->size);
1390 int rows = getNumberOfItems();
1391 if (showRows < rows) {
1392 rows = showRows;
1393 }
1394 requisition->width = getMaxItemWidth() + 5 + Fl::scrollbar_size();
1395 requisition->descent = font->descent + 2;
1396 requisition->ascent = (rows * (font->size + font->descent + 1)) + 4 -
1397 requisition->descent;
1419
1420 requisition->descent = style->font->descent + 2;
1421 requisition->ascent = height - style->font->descent + 2;
13981422 } else {
13991423 requisition->width = 1;
14001424 requisition->ascent = 1;
14021426 }
14031427 }
14041428
1429 int FltkListResource::getNumberOfItems()
1430 {
1431 return ((Fl_Browser*)widget)->size();
1432 }
1433
14051434 bool FltkListResource::isSelected (int index)
14061435 {
1407 return itemsSelected.get (index);
1436 Fl_Browser *b = (Fl_Browser *) widget;
1437
1438 return b->selected(index + 1) ? true : false;
14081439 }
14091440
14101441 } // namespace ui
484484 Fl_Menu_Item *newItem();
485485 Fl_Menu_Item *menu;
486486 int itemsAllocated, itemsUsed;
487 int visibleItems; /* not counting the invisible ones that close a group */
488487 public:
489488 FltkOptionMenuResource (FltkPlatform *platform);
490489 ~FltkOptionMenuResource ();
504503 protected:
505504 Fl_Widget *createNewWidget (core::Allocation *allocation);
506505 void setWidgetStyle (Fl_Widget *widget, core::style::Style *style);
507
508 int getNumberOfItems () {return itemsSelected.size();};
506 int getNumberOfItems();
509507 int getMaxItemWidth ();
510
511508 private:
512509 static void widgetCallback (Fl_Widget *widget, void *data);
513510 void *newItem (const char *str, bool enabled, bool selected);
514 void *currParent;
515 lout::misc::SimpleVector <bool> itemsSelected;
511 int currDepth;
512 int colWidths[4];
516513 int showRows;
517514 ListResource::SelectionMode mode;
518515 public:
2626
2727 #include <stdio.h>
2828 #include "../lout/msg.h"
29 #include "../lout/debug.hh"
2930
3031 using namespace lout;
3132 using namespace lout::object;
5253 FltkViewport::FltkViewport (int X, int Y, int W, int H, const char *label):
5354 FltkWidgetView (X, Y, W, H, label)
5455 {
56 DBG_OBJ_CREATE ("dw::fltk::FltkViewport");
57
5558 hscrollbar = new CustScrollbar (x (), y (), 1, 1);
5659 hscrollbar->type(FL_HORIZONTAL);
5760 hscrollbar->callback (hscrollbarCallback, this);
8184 FltkViewport::~FltkViewport ()
8285 {
8386 delete gadgets;
87 DBG_OBJ_DELETE ();
8488 }
8589
8690 void FltkViewport::adjustScrollbarsAndGadgetsAllocation ()
388392 }
389393
390394 /* multiple calls to scroll can happen before a redraw occurs.
391 * scrollDX / scrollDY can therefore be non-zero here.
395 * scrollDX and scrollDY can therefore be non-zero here.
392396 */
393397 updateCanvasWidgets (x - scrollX, y - scrollY);
394398 scrollDX += x - scrollX;
00 /*
11 * Dillo Widget
22 *
3 * Copyright 2012-2013 Sebastian Geerken <sgeerken@dillo.org>,
3 * Copyright 2012-2013 Sebastian Geerken <sgeerken@dillo.org>,
44 * Johannes Hofmann <Johannes.Hofmann@gmx.de>
55 *
66 * This program is free software; you can redistribute it and/or modify
4848 {
4949 trie = NULL; // As long we are not sure whether a pattern file can be read.
5050
51 char buf[PATH_MAX + 1];
52 snprintf(buf, sizeof (buf), "%s.trie", patFile);
51 int bufLen = strlen (patFile) + 5 + 1;
52 char *buf = new char[bufLen];
53 snprintf(buf, bufLen, "%s.trie", patFile);
5354 FILE *trieF = fopen (buf, "r");
55 delete[] buf;
5456
5557 if (trieF) {
5658 trie = new Trie ();
117119 if (hyphenator)
118120 delete langString;
119121 else {
120 char patFile [PATH_MAX];
121 snprintf (patFile, sizeof (patFile), "%s/hyphenation/%s.pat",
122 int patFileLen = strlen (DILLO_LIBDIR) + 13 + strlen (lang) + 4 + 1;
123 char *patFile = new char[patFileLen];
124 snprintf (patFile, patFileLen, "%s/hyphenation/%s.pat",
122125 DILLO_LIBDIR, lang);
123 char excFile [PATH_MAX];
124 snprintf (excFile, sizeof(excFile), "%s/hyphenation/%s.exc",
126 int excFileLen = strlen (DILLO_LIBDIR) + 13 + strlen (lang) + 4 + 1;
127 char *excFile = new char[excFileLen];
128 snprintf (excFile, excFileLen, "%s/hyphenation/%s.exc",
125129 DILLO_LIBDIR, lang);
126130
127131 //printf ("Loading hyphenation patterns for language '%s' from '%s' and "
129133
130134 hyphenator = new Hyphenator (patFile, excFile);
131135 hyphenators->put (langString, hyphenator);
136 delete[] patFile;
137 delete[] excFile;
132138 }
133139
134140 //lout::misc::StringBuffer sb;
143149 // Convert the a pattern like 'a1bc3d4' into a string of chars 'abcd'
144150 // and a list of points [ 0, 1, 0, 3, 4 ].
145151 int l = strlen (s);
146 char chars [l + 1];
152 char *chars = new char[l + 1];
147153 SimpleVector<char> points (1);
148154
149155 // TODO numbers consisting of multiple digits?
170176 //printf("insertPattern %s\n", chars);
171177
172178 trieBuilder->insert (chars, points.getArray ());
179 delete[] chars;
173180 }
174181
175182 void Hyphenator::insertException (char *s)
181188 if((unsigned char)s[i] == 0xc2 && (unsigned char)s[i + 1] == 0xad)
182189 breaks->put (new Integer (i - 2 * breaks->size()));
183190
184 char noHyphens[len - 2 * breaks->size() + 1];
191 char *noHyphens = new char[len - 2 * breaks->size() + 1];
185192 int j = 0;
186193 for (int i = 0; i < len; ) {
187194 if(i < len - 1 &&
193200 noHyphens[j] = 0;
194201
195202 exceptions->put (new String (noHyphens), breaks);
203 delete[] noHyphens;
196204 }
197205
198206 /**
252260 while (true) {
253261 while (wordLc[start] && !isCharPartOfActualWord (wordLc + start))
254262 start = platform->nextGlyph (wordLc, start);
255
263
256264 if (wordLc[start] == 0)
257265 break;
258266
312320 if (trie == NULL)
313321 return;
314322
315 char work[strlen (wordLc) + 3];
323 char *work = new char[strlen (wordLc) + 3];
316324 strcpy (work, ".");
317325 strcat (work, wordLc);
318326 strcat (work, ".");
334342 }
335343 }
336344 }
345
346 delete[] work;
337347
338348 // No hyphens in the first two chars or the last two.
339349 // Characters are not bytes, so UTF-8 characters must be counted.
2121 #include "image.hh"
2222 #include "../lout/msg.h"
2323 #include "../lout/misc.hh"
24 #include "../lout/debug.hh"
2425
2526 namespace dw {
2627
142143
143144 Image::Image(const char *altText)
144145 {
146 DBG_OBJ_CREATE ("dw::Image");
145147 registerName ("dw::Image", &CLASS_ID);
146148 this->altText = altText ? strdup (altText) : NULL;
147149 altTextWidth = -1; // not yet calculated
161163 buffer->unref ();
162164 if (mapKey)
163165 delete mapKey;
166
167 DBG_OBJ_DELETE ();
164168 }
165169
166170 void Image::sizeRequestImpl (core::Requisition *requisition)
432436 buffer->ref ();
433437 }
434438
439 DBG_OBJ_ASSOC_CHILD (this->buffer);
440
435441 if (oldBuf)
436442 oldBuf->unref ();
437443 }
449455 area.width, area.height);
450456 }
451457
458 void Image::finish ()
459 {
460 // Nothing to do; images are always drawn line by line.
461 }
462
463 void Image::fatal ()
464 {
465 // Could display an error.
466 }
467
452468
453469 /**
454470 * \brief Sets image as server side image map.
115115 *
116116 * \sa\ref dw-images-and-backgrounds
117117 */
118 class Image: public core::Widget
118 class Image: public core::Widget, public core::ImgRenderer
119119 {
120120 private:
121121 char *altText;
156156
157157 void drawRow (int row);
158158
159 void finish ();
160 void fatal ();
161
159162 void setIsMap ();
160163 void setUseMap (ImageMapsList *list, Object *key);
161164
33 #ifndef __INCLUDED_FROM_DW_CORE_HH__
44 # error Do not include this file directly, use "core.hh" instead.
55 #endif
6
7 #include "../lout/debug.hh"
68
79 namespace dw {
810 namespace core {
160162 public:
161163 enum Type { RGB, RGBA, GRAY, INDEXED, INDEXED_ALPHA };
162164
165 inline Imgbuf () {
166 DBG_OBJ_CREATE ("dw::core::Imgbuf");
167 DBG_OBJ_BASECLASS (lout::object::Object);
168 DBG_OBJ_BASECLASS (lout::signal::ObservedObject);
169 }
170
163171 /*
164172 * Methods called from the image decoding
165173 */
177185 virtual int getRootWidth () = 0;
178186 virtual int getRootHeight () = 0;
179187
188
189 /**
190 * Creates an image buffer with same parameters (type, gamma etc.)
191 * except size.
192 */
193 virtual Imgbuf *createSimilarBuf (int width, int height) = 0;
194
195 /**
196 * Copies another image buffer into this image buffer.
197 */
198 virtual void copyTo (Imgbuf *dest, int xDestRoot, int yDestRoot,
199 int xSrc, int ySrc, int widthSrc, int heightSrc) = 0;
200
180201 /*
181202 * Reference counting.
182203 */
0 #include "core.hh"
1
2 namespace dw {
3 namespace core {
4
5 using namespace lout::container;
6 using namespace lout::object;
7
8 void ImgRendererDist::setBuffer (core::Imgbuf *buffer, bool resize)
9 {
10 for (typed::Iterator <TypedPointer <ImgRenderer> > it =
11 children->iterator (); it.hasNext (); ) {
12 TypedPointer <ImgRenderer> *tp = it.getNext ();
13 tp->getTypedValue()->setBuffer (buffer, resize);
14 }
15 }
16
17 void ImgRendererDist::drawRow (int row)
18 {
19 for (typed::Iterator <TypedPointer <ImgRenderer> > it =
20 children->iterator (); it.hasNext (); ) {
21 TypedPointer <ImgRenderer> *tp = it.getNext ();
22 tp->getTypedValue()->drawRow (row);
23 }
24 }
25
26
27 void ImgRendererDist::finish ()
28 {
29 for (typed::Iterator <TypedPointer <ImgRenderer> > it =
30 children->iterator (); it.hasNext (); ) {
31 TypedPointer <ImgRenderer> *tp = it.getNext ();
32 tp->getTypedValue()->finish ();
33 }
34 }
35
36 void ImgRendererDist::fatal ()
37 {
38 for (typed::Iterator <TypedPointer <ImgRenderer> > it =
39 children->iterator (); it.hasNext (); ) {
40 TypedPointer <ImgRenderer> *tp = it.getNext ();
41 tp->getTypedValue()->fatal ();
42 }
43 }
44
45
46 } // namespace core
47 } // namespace dw
0 #ifndef __DW_IMGRENDERER_HH__
1 #define __DW_IMGRENDERER_HH__
2
3 #ifndef __INCLUDED_FROM_DW_CORE_HH__
4 # error Do not include this file directly, use "core.hh" instead.
5 #endif
6
7 namespace dw {
8 namespace core {
9
10 /**
11 * \brief ...
12 *
13 * \sa \ref dw-images-and-backgrounds
14 */
15 class ImgRenderer
16 {
17 public:
18 virtual ~ImgRenderer () { }
19
20 /**
21 * \brief Called, when an image buffer is attached.
22 *
23 * This is typically the case when all meta data (size, depth) has been read.
24 */
25 virtual void setBuffer (core::Imgbuf *buffer, bool resize = false) = 0;
26
27 /**
28 * \brief Called, when data from a row is available and has been copied into
29 * the image buffer.
30 *
31 * The implementation will typically queue the respective area for drawing.
32 */
33 virtual void drawRow (int row) = 0;
34
35 /**
36 * \brief Called, when all image data has been retrieved.
37 *
38 * The implementation may use this instead of "drawRow" for drawing, to
39 * limit the number of draws.
40 */
41 virtual void finish () = 0;
42
43 /**
44 * \brief Called, when there are problems with the retrieval of image data.
45 *
46 * The implementation may use this to indicate an error.
47 */
48 virtual void fatal () = 0;
49 };
50
51 /**
52 * \brief Implementation of ImgRenderer, which distributes all calls
53 * to a set of other implementations of ImgRenderer.
54 *
55 * The order of the call children is not defined, especially not
56 * identical to the order in which they have been added.
57 */
58 class ImgRendererDist: public ImgRenderer
59 {
60 lout::container::typed::HashSet <lout::object::TypedPointer <ImgRenderer> >
61 *children;
62
63 public:
64 inline ImgRendererDist ()
65 { children = new lout::container::typed::HashSet
66 <lout::object::TypedPointer <ImgRenderer> > (true); }
67 ~ImgRendererDist () { delete children; }
68
69 void setBuffer (core::Imgbuf *buffer, bool resize);
70 void drawRow (int row);
71 void finish ();
72 void fatal ();
73
74 void put (ImgRenderer *child)
75 { children->put (new lout::object::TypedPointer <ImgRenderer> (child)); }
76 void remove (ImgRenderer *child)
77 { lout::object::TypedPointer <ImgRenderer> tp (child);
78 children->remove (&tp); }
79 };
80
81 } // namespace core
82 } // namespace dw
83
84 #endif // __DW_IMGRENDERER_HH__
85
86
3131 namespace dw {
3232 namespace core {
3333
34 bool Layout::LayoutImgRenderer::readyToDraw ()
35 {
36 return true;
37 }
38
39 void Layout::LayoutImgRenderer::getBgArea (int *x, int *y, int *width,
40 int *height)
41 {
42 // TODO Actually not padding area, but visible area?
43 getRefArea (x, y, width, height);
44 }
45
46 void Layout::LayoutImgRenderer::getRefArea (int *xRef, int *yRef, int *widthRef,
47 int *heightRef)
48 {
49 *xRef = 0;
50 *yRef = 0;
51 *widthRef = misc::max (layout->viewportWidth
52 - (layout->canvasHeightGreater ?
53 layout->vScrollbarThickness : 0),
54 layout->canvasWidth);
55 *heightRef = misc::max (layout->viewportHeight
56 - layout->hScrollbarThickness,
57 layout->canvasAscent + layout->canvasDescent);
58 }
59
60 style::StyleImage *Layout::LayoutImgRenderer::getBackgroundImage ()
61 {
62 return layout->bgImage;
63 }
64
65 style::BackgroundRepeat Layout::LayoutImgRenderer::getBackgroundRepeat ()
66 {
67 return layout->bgRepeat;
68 }
69
70 style::BackgroundAttachment
71 Layout::LayoutImgRenderer::getBackgroundAttachment ()
72 {
73 return layout->bgAttachment;
74 }
75
76 style::Length Layout::LayoutImgRenderer::getBackgroundPositionX ()
77 {
78 return layout->bgPositionX;
79 }
80
81 style::Length Layout::LayoutImgRenderer::getBackgroundPositionY ()
82 {
83 return layout->bgPositionY;
84 }
85
86 void Layout::LayoutImgRenderer::draw (int x, int y, int width, int height)
87 {
88 layout->queueDraw (x, y, width, height);
89 }
90
91 // ----------------------------------------------------------------------
92
3493 void Layout::Receiver::canvasSizeChanged (int width, int ascent, int descent)
3594 {
3695 }
185244 topLevel = NULL;
186245 widgetAtPoint = NULL;
187246
188 DBG_OBJ_CREATE (this, "DwRenderLayout");
247 DBG_OBJ_CREATE ("dw::core::Layout");
189248
190249 bgColor = NULL;
250 bgImage = NULL;
191251 cursor = style::CURSOR_DEFAULT;
192252
193253 canvasWidth = canvasAscent = canvasDescent = 0;
209269
210270 textZone = new misc::ZoneAllocator (16 * 1024);
211271
212 DBG_OBJ_ASSOC (&findtextState, this);
213 DBG_OBJ_ASSOC (&selectionState, this);
272 DBG_OBJ_ASSOC_CHILD (&findtextState);
273 DBG_OBJ_ASSOC_CHILD (&selectionState);
214274
215275 platform->setLayout (this);
216276
217277 selectionState.setLayout(this);
278
279 layoutImgRenderer = NULL;
218280 }
219281
220282 Layout::~Layout ()
221283 {
222284 widgetAtPoint = NULL;
285
286 if (layoutImgRenderer) {
287 if (bgImage)
288 bgImage->removeExternalImgRenderer (layoutImgRenderer);
289 delete layoutImgRenderer;
290 }
223291
224292 if (scrollIdleId != -1)
225293 platform->removeIdle (scrollIdleId);
227295 platform->removeIdle (resizeIdleId);
228296 if (bgColor)
229297 bgColor->unref ();
298 if (bgImage)
299 bgImage->unref ();
230300 if (topLevel) {
231301 Widget *w = topLevel;
232302 topLevel = NULL;
236306 delete view;
237307 delete anchorsTable;
238308 delete textZone;
309
310 DBG_OBJ_DELETE ();
239311 }
240312
241313 void Layout::addWidget (Widget *widget)
283355
284356 void Layout::setWidget (Widget *widget)
285357 {
358 DBG_OBJ_ASSOC_CHILD (widget);
359
286360 widgetAtPoint = NULL;
287361 if (topLevel) {
288362 Widget *w = topLevel;
305379 {
306380 if (this->view)
307381 MSG_ERR("attachView: Multiple views for layout!\n");
382
383 DBG_OBJ_ASSOC_CHILD (view);
308384
309385 this->view = view;
310386 platform->attachView (view);
507583 {
508584 Rectangle widgetArea, intersection, widgetDrawArea;
509585
586 // First of all, draw background image. (Unlike background *color*,
587 // this is not a feature of the views.)
588 if (bgImage != NULL && bgImage->getImgbufSrc() != NULL)
589 style::drawBackgroundImage (view, bgImage, bgRepeat, bgAttachment,
590 bgPositionX, bgPositionY,
591 area->x, area->y, area->width,
592 area->height, 0, 0,
593 // Reference area: maximum of canvas size and
594 // viewport size.
595 misc::max (viewportWidth
596 - (canvasHeightGreater ?
597 vScrollbarThickness : 0),
598 canvasWidth),
599 misc::max (viewportHeight
600 - hScrollbarThickness,
601 canvasAscent + canvasDescent));
602
510603 if (scrollIdleId != -1) {
511604 /* scroll is pending, defer draw until after scrollIdle() */
512605 drawAfterScrollReq = true;
649742 view->setBgColor (bgColor);
650743 }
651744
745 void Layout::setBgImage (style::StyleImage *bgImage,
746 style::BackgroundRepeat bgRepeat,
747 style::BackgroundAttachment bgAttachment,
748 style::Length bgPositionX, style::Length bgPositionY)
749 {
750 if (layoutImgRenderer && this->bgImage)
751 this->bgImage->removeExternalImgRenderer (layoutImgRenderer);
752
753 if (bgImage)
754 bgImage->ref ();
755
756 if (this->bgImage)
757 this->bgImage->unref ();
758
759 this->bgImage = bgImage;
760 this->bgRepeat = bgRepeat;
761 this->bgAttachment = bgAttachment;
762 this->bgPositionX = bgPositionX;
763 this->bgPositionY = bgPositionY;
764
765 if (bgImage) {
766 // Create instance of LayoutImgRenderer when needed. Until this
767 // layout is deleted, "layoutImgRenderer" will be kept, since it
768 // is not specific to the style, but only to this layout.
769 if (layoutImgRenderer == NULL)
770 layoutImgRenderer = new LayoutImgRenderer (this);
771 bgImage->putExternalImgRenderer (layoutImgRenderer);
772 }
773 }
774
775
652776 void Layout::resizeIdle ()
653777 {
654778 //static int calls = 0;
655779 //MSG(" Layout::resizeIdle calls = %d\n", ++calls);
656780
657 while (resizeIdleId != -1) {
658 // Reset already here, since in this function, queueResize() may be
659 // called again.
660 resizeIdleId = -1;
661
662 if (topLevel) {
663 Requisition requisition;
664 Allocation allocation;
665
666 topLevel->sizeRequest (&requisition);
667
668 allocation.x = allocation.y = 0;
669 allocation.width = requisition.width;
670 allocation.ascent = requisition.ascent;
671 allocation.descent = requisition.descent;
672 topLevel->sizeAllocate (&allocation);
673
674 canvasWidth = requisition.width;
675 canvasAscent = requisition.ascent;
676 canvasDescent = requisition.descent;
677
678 emitter.emitCanvasSizeChanged (
679 canvasWidth, canvasAscent, canvasDescent);
680
681 // Tell the view about the new world size.
682 view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
683 // view->queueDrawTotal (false);
684
685 if (usesViewport) {
686 int currHThickness = currHScrollbarThickness();
687 int currVThickness = currVScrollbarThickness();
688
689 if (!canvasHeightGreater &&
690 canvasAscent + canvasDescent
691 > viewportHeight - currHThickness) {
692 canvasHeightGreater = true;
693 setSizeHints ();
694 /* May queue a new resize. */
781 assert (resizeIdleId != -1);
782
783 // Reset already here, since in this function, queueResize() may be
784 // called again.
785 resizeIdleId = -1;
786
787 if (topLevel) {
788 Requisition requisition;
789 Allocation allocation;
790
791 topLevel->sizeRequest (&requisition);
792
793 allocation.x = allocation.y = 0;
794 allocation.width = requisition.width;
795 allocation.ascent = requisition.ascent;
796 allocation.descent = requisition.descent;
797 topLevel->sizeAllocate (&allocation);
798
799 canvasWidth = requisition.width;
800 canvasAscent = requisition.ascent;
801 canvasDescent = requisition.descent;
802
803 emitter.emitCanvasSizeChanged (canvasWidth, canvasAscent, canvasDescent);
804
805 // Tell the view about the new world size.
806 view->setCanvasSize (canvasWidth, canvasAscent, canvasDescent);
807 // view->queueDrawTotal (false);
808
809 if (usesViewport) {
810 int currHThickness = currHScrollbarThickness();
811 int currVThickness = currVScrollbarThickness();
812
813 if (!canvasHeightGreater &&
814 canvasAscent + canvasDescent
815 > viewportHeight - currHThickness) {
816 canvasHeightGreater = true;
817 setSizeHints ();
818 /* May queue a new resize. */
695819 }
696820
697 // Set viewport sizes.
698 view->setViewportSize (viewportWidth, viewportHeight,
699 currHThickness, currVThickness);
700 }
821 // Set viewport sizes.
822 view->setViewportSize (viewportWidth, viewportHeight,
823 currHThickness, currVThickness);
701824 }
702825
703 // views are redrawn via Widget::resizeDrawImpl ()
826 // views are redrawn via Widget::resizeDrawImpl ()
704827
705828 }
706829
1616 {
1717 friend class Widget;
1818
19 private:
20 class LayoutImgRenderer: public style::StyleImage::ExternalImgRenderer
21 {
22 Layout *layout;
23
24 public:
25 LayoutImgRenderer (Layout *layout) { this->layout = layout; }
26
27 bool readyToDraw ();
28 void getBgArea (int *x, int *y, int *width, int *height);
29 void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef);
30 style::StyleImage *getBackgroundImage ();
31 style::BackgroundRepeat getBackgroundRepeat ();
32 style::BackgroundAttachment getBackgroundAttachment ();
33 style::Length getBackgroundPositionX ();
34 style::Length getBackgroundPositionY ();
35 void draw (int x, int y, int width, int height);
36 };
37
38 LayoutImgRenderer *layoutImgRenderer;
39
1940 public:
2041 /**
2142 * \brief Receiver interface different signals.
134155
135156 /* The state, which must be projected into the view. */
136157 style::Color *bgColor;
158 style::StyleImage *bgImage;
159 style::BackgroundRepeat bgRepeat;
160 style::BackgroundAttachment bgAttachment;
161 style::Length bgPositionX, bgPositionY;
162
137163 style::Cursor cursor;
138164 int canvasWidth, canvasAscent, canvasDescent;
139165
357383 return platform->cancelTooltip ();
358384 }
359385
360 inline Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height)
361 {
362 return platform->createImgbuf (type, width, height);
386 inline Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height,
387 double gamma)
388 {
389 return platform->createImgbuf (type, width, height, gamma);
363390 }
364391
365392 inline void copySelection(const char *text)
384411 inline void resetSearch () { findtextState.resetSearch (); }
385412
386413 void setBgColor (style::Color *color);
414 void setBgImage (style::StyleImage *bgImage,
415 style::BackgroundRepeat bgRepeat,
416 style::BackgroundAttachment bgAttachment,
417 style::Length bgPositionX, style::Length bgPositionY);
387418
388419 inline style::Color* getBgColor () { return bgColor; }
420 inline style::StyleImage* getBgImage () { return bgImage; }
389421 };
390422
391423 } // namespace core
1919
2020
2121 #include "listitem.hh"
22 #include "../lout/debug.hh"
2223 #include <stdio.h>
2324
2425 namespace dw {
2829 ListItem::ListItem (ListItem *ref, bool limitTextWidth):
2930 AlignedTextblock (limitTextWidth)
3031 {
32 DBG_OBJ_CREATE ("dw::ListItem");
3133 registerName ("dw::ListItem", &CLASS_ID);
3234 setRefTextblock (ref);
3335 }
3436
3537 ListItem::~ListItem()
3638 {
39 DBG_OBJ_DELETE ();
3740 }
3841
3942 void ListItem::initWithWidget (core::Widget *widget,
145145 */
146146 virtual void cancelTooltip () = 0;
147147
148 /*
149 * --------------------
150 * Image Buffers
151 * --------------------
148 /**
149 * \brief Create a (platform speficic) image buffer.
150 *
151 * "gamma" is the value by which the image data is gamma-encoded.
152152 */
153 virtual Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height) = 0;
153 virtual Imgbuf *createImgbuf (Imgbuf::Type type, int width, int height,
154 double gamma) = 0;
154155
155156 /**
156157 * \brief Copy selected text (0-terminated).
1919
2020
2121 #include "core.hh"
22 #include "../lout/debug.hh"
2223
2324 #include <string.h>
2425
4445
4546 SelectionState::SelectionState ()
4647 {
48 DBG_OBJ_CREATE ("dw::core::SelectionState");
49
4750 layout = NULL;
4851
4952 selectionState = NONE;
5760 SelectionState::~SelectionState ()
5861 {
5962 reset ();
63 DBG_OBJ_DELETE ();
6064 }
6165
6266 void SelectionState::reset ()
3333 namespace core {
3434 namespace style {
3535
36 const bool drawBackgroundLineByLine = false;
37
38 const int MIN_BG_IMG_W = 10;
39 const int MIN_BG_IMG_H = 10;
40 const int OPT_BG_IMG_W = 50;
41 const int OPT_BG_IMG_H = 50;
42
43 static void calcBackgroundRelatedValues (StyleImage *backgroundImage,
44 BackgroundRepeat backgroundRepeat,
45 BackgroundAttachment
46 backgroundAttachment,
47 Length backgroundPositionX,
48 Length backgroundPositionY,
49 int xDraw, int yDraw, int widthDraw,
50 int heightDraw, int xRef, int yRef,
51 int widthRef, int heightRef,
52 bool *repeatX, bool *repeatY,
53 int *origX, int *origY,
54 int *tileX1, int *tileX2, int *tileY1,
55 int *tileY2, bool *doDraw);
56
3657 void StyleAttrs::initValues ()
3758 {
3859 x_link = -1;
4768 listStyleType = LIST_STYLE_TYPE_DISC;
4869 valign = VALIGN_BASELINE;
4970 backgroundColor = NULL;
71 backgroundImage = NULL;
72 backgroundRepeat = BACKGROUND_REPEAT;
73 backgroundAttachment = BACKGROUND_ATTACHMENT_SCROLL;
74 backgroundPositionX = createPerLength (0);
75 backgroundPositionY = createPerLength (0);
5076 width = height = lineHeight = LENGTH_AUTO;
5177 textIndent = 0;
5278 margin.setVal (0);
75101 valign = VALIGN_BASELINE;
76102 textAlignChar = '.';
77103 backgroundColor = NULL;
104 backgroundImage = NULL;
105 backgroundRepeat = BACKGROUND_REPEAT;
106 backgroundAttachment = BACKGROUND_ATTACHMENT_SCROLL;
107 backgroundPositionX = createPerLength (0);
108 backgroundPositionY = createPerLength (0);
78109 width = LENGTH_AUTO;
79110 height = LENGTH_AUTO;
80111
115146 textDecoration == otherAttrs->textDecoration &&
116147 color == otherAttrs->color &&
117148 backgroundColor == otherAttrs->backgroundColor &&
149 backgroundImage == otherAttrs->backgroundImage &&
150 backgroundRepeat == otherAttrs->backgroundRepeat &&
151 backgroundAttachment == otherAttrs->backgroundAttachment &&
152 backgroundPositionX == otherAttrs->backgroundPositionX &&
153 backgroundPositionY == otherAttrs->backgroundPositionY &&
118154 textAlign == otherAttrs->textAlign &&
119155 valign == otherAttrs->valign &&
120156 textAlignChar == otherAttrs->textAlignChar &&
155191 textDecoration +
156192 (intptr_t) color +
157193 (intptr_t) backgroundColor +
194 (intptr_t) backgroundImage +
195 backgroundRepeat +
196 backgroundAttachment +
197 backgroundPositionX +
198 backgroundPositionY +
158199 textAlign +
159200 valign +
160201 textAlignChar +
195236
196237 Style::Style (StyleAttrs *attrs)
197238 {
239 DBG_OBJ_CREATE ("dw::core::style::Style");
240
198241 copyAttrs (attrs);
242
243 DBG_OBJ_ASSOC_CHILD (font);
244 DBG_OBJ_ASSOC_CHILD (color);
245 DBG_OBJ_ASSOC_CHILD (backgroundColor);
246 DBG_OBJ_ASSOC_CHILD (backgroundImage);
247 DBG_OBJ_ASSOC_CHILD (borderColor.top);
248 DBG_OBJ_ASSOC_CHILD (borderColor.bottom);
249 DBG_OBJ_ASSOC_CHILD (borderColor.left);
250 DBG_OBJ_ASSOC_CHILD (borderColor.right);
251 //DBG_OBJ_ASSOC_CHILD (x_tooltip);
199252
200253 refCount = 1;
201254
204257 color->ref ();
205258 if (backgroundColor)
206259 backgroundColor->ref ();
260 if (backgroundImage)
261 backgroundImage->ref ();
207262 if (borderColor.top)
208263 borderColor.top->ref();
209264 if (borderColor.bottom)
226281 color->unref ();
227282 if (backgroundColor)
228283 backgroundColor->unref ();
284 if (backgroundImage)
285 backgroundImage->unref ();
229286 if (borderColor.top)
230287 borderColor.top->unref();
231288 if (borderColor.bottom)
239296
240297 styleTable->remove (this);
241298 totalRef--;
299
300 DBG_OBJ_DELETE ();
242301 }
243302
244303 void Style::copyAttrs (StyleAttrs *attrs)
247306 textDecoration = attrs->textDecoration;
248307 color = attrs->color;
249308 backgroundColor = attrs->backgroundColor;
309 backgroundImage = attrs->backgroundImage;
310 backgroundRepeat = attrs->backgroundRepeat;
311 backgroundAttachment = attrs->backgroundAttachment;
312 backgroundPositionX = attrs->backgroundPositionX;
313 backgroundPositionY = attrs->backgroundPositionY;
250314 textAlign = attrs->textAlign;
251315 valign = attrs->valign;
252316 textAlignChar = attrs->textAlignChar;
305369 Font::~Font ()
306370 {
307371 free ((char*)name);
372 DBG_OBJ_DELETE ();
308373 }
309374
310375 void Font::copyAttrs (FontAttrs *attrs)
348413
349414 Color::~Color ()
350415 {
416 DBG_OBJ_DELETE ();
351417 }
352418
353419 int Color::shadeColor (int color, int d)
417483 Tooltip *Tooltip::create (Layout *layout, const char *text)
418484 {
419485 return layout->createTooltip (text);
486 }
487
488 // ----------------------------------------------------------------------
489
490 void StyleImage::StyleImgRenderer::setBuffer (core::Imgbuf *buffer, bool resize)
491 {
492 if (image->imgbufSrc)
493 image->imgbufSrc->unref ();
494 if (image->imgbufTiled)
495 image->imgbufTiled->unref ();
496
497 image->imgbufTiled = NULL;
498
499 image->imgbufSrc = buffer;
500 DBG_OBJ_ASSOC (image, image->imgbufSrc);
501
502 if (image->imgbufSrc) {
503 image->imgbufSrc->ref ();
504
505 // If the image is too small, drawing a background will cause
506 // many calls of View::drawImgbuf. For this reason, we create
507 // another image buffer, the "tiled" image buffer, which is
508 // larger (the "optimal" size is defined as OPT_BG_IMG_W *
509 // OPT_BG_IMG_H) and contains the "source" buffer several times.
510 //
511 // This "tiled" buffer is not used when 'background-repeat' has
512 // another value than 'repeat', for obvious reasons. Image
513 // buffers only "tiled" in one dimension (to optimize 'repeat-x'
514 // and 'repeat-y') are not supported.
515
516 if (image->imgbufSrc->getRootWidth() * image->imgbufSrc->getRootHeight()
517 < MIN_BG_IMG_W * MIN_BG_IMG_H) {
518 image->tilesX =
519 misc::max (OPT_BG_IMG_W / image->imgbufSrc->getRootWidth(), 1);
520 image->tilesY =
521 misc::max (OPT_BG_IMG_H / image->imgbufSrc->getRootHeight(), 1);
522 image->imgbufTiled =
523 image->imgbufSrc->createSimilarBuf
524 (image->tilesX * image->imgbufSrc->getRootWidth(),
525 image->tilesY * image->imgbufSrc->getRootHeight());
526
527 DBG_OBJ_ASSOC (image, image->imgbufTiled);
528 }
529 }
530 }
531
532 void StyleImage::StyleImgRenderer::drawRow (int row)
533 {
534 if (image->imgbufTiled) {
535 // A row of data has been copied to the source buffer, here it
536 // is copied into the tiled buffer.
537
538 // Unfortunately, this code may be called *after* some other
539 // implementations of ImgRenderer::drawRow, which actually
540 // *draw* the tiled buffer, which is so not up to date
541 // (ImgRendererDist does not define an order). OTOH, these
542 // drawing implementations calle Widget::queueResize, so the
543 // actual drawing (and so access to the tiled buffer) is done
544 // later.
545
546 int w = image->imgbufSrc->getRootWidth ();
547 int h = image->imgbufSrc->getRootHeight ();
548
549 for (int x = 0; x < image->tilesX; x++)
550 for (int y = 0; y < image->tilesX; y++)
551 image->imgbufSrc->copyTo (image->imgbufTiled, x * w, y * h,
552 0, row, w, 1);
553 }
554 }
555
556 void StyleImage::StyleImgRenderer::finish ()
557 {
558 // Nothing to do.
559 }
560
561 void StyleImage::StyleImgRenderer::fatal ()
562 {
563 // Nothing to do.
564 }
565
566 StyleImage::StyleImage ()
567 {
568 DBG_OBJ_CREATE ("dw::core::style::StyleImage");
569
570 refCount = 0;
571 imgbufSrc = NULL;
572 imgbufTiled = NULL;
573
574 imgRendererDist = new ImgRendererDist ();
575 styleImgRenderer = new StyleImgRenderer (this);
576 imgRendererDist->put (styleImgRenderer);
577 }
578
579 StyleImage::~StyleImage ()
580 {
581 if (imgbufSrc)
582 imgbufSrc->unref ();
583 if (imgbufTiled)
584 imgbufTiled->unref ();
585
586 delete imgRendererDist;
587 delete styleImgRenderer;
588
589 DBG_OBJ_DELETE ();
590 }
591
592 void StyleImage::ExternalImgRenderer::setBuffer (core::Imgbuf *buffer,
593 bool resize)
594 {
595 // Nothing to do?
596 }
597
598 void StyleImage::ExternalImgRenderer::drawRow (int row)
599 {
600 if (drawBackgroundLineByLine) {
601 StyleImage *backgroundImage;
602 if (readyToDraw () && (backgroundImage = getBackgroundImage ())) {
603 // All single rows are drawn.
604
605 Imgbuf *imgbuf = backgroundImage->getImgbufSrc();
606 int imgWidth = imgbuf->getRootWidth ();
607 int imgHeight = imgbuf->getRootHeight ();
608
609 int x, y, width, height;
610 getBgArea (&x, &y, &width, &height);
611
612 int xRef, yRef, widthRef, heightRef;
613 getRefArea (&xRef, &yRef, &widthRef, &heightRef);
614
615 bool repeatX, repeatY, doDraw;
616 int origX, origY, tileX1, tileX2, tileY1, tileY2;
617
618 calcBackgroundRelatedValues (backgroundImage,
619 getBackgroundRepeat (),
620 getBackgroundAttachment (),
621 getBackgroundPositionX (),
622 getBackgroundPositionY (),
623 x, y, width, height, xRef, yRef, widthRef,
624 heightRef, &repeatX, &repeatY, &origX,
625 &origY, &tileX1, &tileX2, &tileY1,
626 &tileY2, &doDraw);
627
628 //printf ("tileX1 = %d, tileX2 = %d, tileY1 = %d, tileY2 = %d\n",
629 // tileX1, tileX2, tileY1, tileY2);
630
631 if (doDraw)
632 // Only iterate over y, because the rows can be combined
633 // horizontally.
634 for (int tileY = tileY1; tileY <= tileY2; tileY++) {
635 int x1 = misc::max (origX + tileX1 * imgWidth, x);
636 int x2 = misc::min (origX + (tileX2 + 1) * imgWidth, x + width);
637
638 int yt = origY + tileY * imgHeight + row;
639 if (yt >= y && yt < y + height)
640 draw (x1, yt, x2 - x1, 1);
641 }
642 }
643 }
644 }
645
646 void StyleImage::ExternalImgRenderer::finish ()
647 {
648 if (!drawBackgroundLineByLine) {
649 if (readyToDraw ()) {
650 // Draw total area, as a whole.
651 int x, y, width, height;
652 getBgArea (&x, &y, &width, &height);
653 draw (x, y, width, height);
654 }
655 }
656 }
657
658 void StyleImage::ExternalImgRenderer::fatal ()
659 {
660 // Nothing to do.
661 }
662
663 // ----------------------------------------------------------------------
664
665 StyleImage *StyleImage::ExternalWidgetImgRenderer::getBackgroundImage ()
666 {
667 Style *style = getStyle ();
668 return style ? style->backgroundImage : NULL;
669 }
670
671 BackgroundRepeat StyleImage::ExternalWidgetImgRenderer::getBackgroundRepeat ()
672 {
673 Style *style = getStyle ();
674 return style ? style->backgroundRepeat : BACKGROUND_REPEAT;
675 }
676
677 BackgroundAttachment
678 StyleImage::ExternalWidgetImgRenderer::getBackgroundAttachment ()
679 {
680 Style *style = getStyle ();
681 return style ? style->backgroundAttachment : BACKGROUND_ATTACHMENT_SCROLL;
682 }
683
684 Length StyleImage::ExternalWidgetImgRenderer::getBackgroundPositionX ()
685 {
686 Style *style = getStyle ();
687 return style ? style->backgroundPositionX : createPerLength (0);
688 }
689
690 Length StyleImage::ExternalWidgetImgRenderer::getBackgroundPositionY ()
691 {
692 Style *style = getStyle ();
693 return style ? style->backgroundPositionY : createPerLength (0);
420694 }
421695
422696 // ----------------------------------------------------------------------
8221096 * \brief Draw the border of a region in window, according to style.
8231097 *
8241098 * Used by dw::core::Widget::drawBox and dw::core::Widget::drawWidgetBox.
1099 *
1100 * "area" is the area to be drawn, "x", "y", "width" and "height"
1101 * define the box itself. All are given in canvas coordinates.
8251102 */
826 void drawBorder (View *view, Rectangle *area,
1103 void drawBorder (View *view, Layout *layout, Rectangle *area,
8271104 int x, int y, int width, int height,
8281105 Style *style, bool inverse)
8291106 {
8601137 * according to style.
8611138 *
8621139 * Used by dw::core::Widget::drawBox and dw::core::Widget::drawWidgetBox.
1140 *
1141 * "area" is the area to be drawn, "x", "y", "width" and "height"
1142 * define the box itself (padding box). "xRef", "yRef", "widthRef" and
1143 * "heightRef" define the reference area, which is important for the
1144 * tiling of background images (for position 0%/0%, a tile is set at
1145 * xRef/yRef; for position 100%/100%, a tile is set at xRef +
1146 * widthRef/yRef + widthRef). See calls for more informations; in most
1147 * cases, these boxes are identical (padding box). All these
1148 * coordinates are given in canvas coordinates.
1149 *
1150 * "atTop" should be true, only if the area is drawn directly on the
1151 * canvas, not on top of other areas; this is only true for the
1152 * toplevel widget itself (not parts of its contents). Toplevel widget
1153 * background colors are already set as viewport background color, so
1154 * that drawing again is is not neccessary, but some time can be
1155 * saved.
1156 *
1157 * Otherwise, the caller should not try to increase the performance by
1158 * doing some tests before; this is all done in this method.
8631159 */
864 void drawBackground (View *view, Rectangle *area,
1160 void drawBackground (View *view, Layout *layout, Rectangle *area,
8651161 int x, int y, int width, int height,
866 Style *style, bool inverse)
867 {
868 Rectangle bgArea, intersection;
869
870 if (style->backgroundColor) {
871 bgArea.x = x + style->margin.left + style->borderWidth.left;
872 bgArea.y = y + style->margin.top + style->borderWidth.top;
873 bgArea.width =
874 width - style->margin.left - style->borderWidth.left -
875 style->margin.right - style->borderWidth.right;
876 bgArea.height =
877 height - style->margin.top - style->borderWidth.top -
878 style->margin.bottom - style->borderWidth.bottom;
879
880 if (area->intersectsWith (&bgArea, &intersection))
881 view->drawRectangle (style->backgroundColor,
882 inverse ?
883 Color::SHADING_INVERSE : Color::SHADING_NORMAL,
884 true, intersection.x, intersection.y,
885 intersection.width, intersection.height);
1162 int xRef, int yRef, int widthRef, int heightRef,
1163 Style *style, bool inverse, bool atTop)
1164 {
1165 bool bgColor = style->backgroundColor != NULL &&
1166 // The test for background colors is rather simple, since only the color
1167 // has to be compared, ...
1168 (!atTop || layout->getBgColor () != style->backgroundColor);
1169 bool bgImage = (style->backgroundImage != NULL &&
1170 style->backgroundImage->getImgbufSrc() != NULL) &&
1171 // ... but for backgrounds, it would be rather complicated. To handle the
1172 // two cases (normal HTML in a viewport, where the layout background
1173 // image is set, and contents of <button> within a flat view, where the
1174 // background image of the toplevel widget is set), only the background
1175 // images are compared. A full test, which also deals with all other
1176 // attributes related to background images (repeat, position etc.) would
1177 // be complicated and useless, so not worth the work.
1178 (!atTop || layout->getBgImage () != style->backgroundImage);
1179
1180 // Since widgets are always drawn from top to bottom, it is *not*
1181 // necessary to draw the background if background color and image
1182 // are not set (NULL), i. e. shining through.
1183
1184 if (bgColor || bgImage) {
1185 Rectangle bgArea, intersection;
1186 bgArea.x = x;
1187 bgArea.y = y;
1188 bgArea.width = width;
1189 bgArea.height = height;
1190
1191 if (area->intersectsWith (&bgArea, &intersection)) {
1192 if (bgColor)
1193 view->drawRectangle (style->backgroundColor,
1194 inverse ?
1195 Color::SHADING_INVERSE : Color::SHADING_NORMAL,
1196 true, intersection.x, intersection.y,
1197 intersection.width, intersection.height);
1198
1199 if (bgImage)
1200 drawBackgroundImage (view, style->backgroundImage,
1201 style->backgroundRepeat,
1202 style->backgroundAttachment,
1203 style->backgroundPositionX,
1204 style->backgroundPositionY,
1205 intersection.x, intersection.y,
1206 intersection.width, intersection.height,
1207 xRef, yRef, widthRef, heightRef);
1208
1209 }
1210 }
1211 }
1212
1213 void drawBackgroundImage (View *view, StyleImage *backgroundImage,
1214 BackgroundRepeat backgroundRepeat,
1215 BackgroundAttachment backgroundAttachment,
1216 Length backgroundPositionX,
1217 Length backgroundPositionY,
1218 int x, int y, int width, int height,
1219 int xRef, int yRef, int widthRef, int heightRef)
1220 {
1221 //printf ("drawBackgroundImage (..., [img: %d, %d], ..., (%d, %d), %d x %d, "
1222 // "(%d, %d), %d x %d)\n", imgWidth, imgHeight, x, y, width, height,
1223 // xRef, yRef, widthRef, heightRef);
1224
1225 bool repeatX, repeatY, doDraw;
1226 int origX, origY, tileX1, tileX2, tileY1, tileY2;
1227
1228 calcBackgroundRelatedValues (backgroundImage, backgroundRepeat,
1229 backgroundAttachment, backgroundPositionX,
1230 backgroundPositionY, x, y, width, height,
1231 xRef, yRef, widthRef, heightRef,
1232 &repeatX, &repeatY, &origX, &origY,
1233 &tileX1, &tileX2, &tileY1, &tileY2, &doDraw);
1234
1235 //printf ("tileX1 = %d, tileX2 = %d, tileY1 = %d, tileY2 = %d\n",
1236 // tileX1, tileX2, tileY1, tileY2);
1237
1238 if (doDraw) {
1239 // Drawing is done with the "tiled" buffer, but all calculations
1240 // before have been done with the "source" buffer.
1241
1242 Imgbuf *imgbufS = backgroundImage->getImgbufSrc();
1243 int imgWidthS = imgbufS->getRootWidth ();
1244 int imgHeightS = imgbufS->getRootHeight ();
1245
1246 Imgbuf *imgbufT = backgroundImage->getImgbufTiled(repeatX, repeatY);
1247 int imgWidthT = imgbufT->getRootWidth ();
1248 int imgHeightT = imgbufT->getRootHeight ();
1249 int tilesX = backgroundImage->getTilesX (repeatX, repeatY);
1250 int tilesY = backgroundImage->getTilesY (repeatX, repeatY);
1251
1252 for (int tileX = tileX1; tileX <= tileX2; tileX += tilesX)
1253 for (int tileY = tileY1; tileY <= tileY2; tileY += tilesY) {
1254 int xt = origX + tileX * imgWidthS;
1255 int x1 = misc::max (xt, x);
1256 int x2 = misc::min (xt + imgWidthT, x + width);
1257 int yt = origY + tileY * imgHeightS;
1258 int y1 = misc::max (yt, y);
1259 int y2 = misc::min (yt + imgHeightT, y + height);
1260
1261 view->drawImage (imgbufT, xt, yt, x1 - xt, y1 - yt,
1262 x2 - x1, y2 - y1);
1263 }
1264 }
1265 }
1266
1267 void calcBackgroundRelatedValues (StyleImage *backgroundImage,
1268 BackgroundRepeat backgroundRepeat,
1269 BackgroundAttachment backgroundAttachment,
1270 Length backgroundPositionX,
1271 Length backgroundPositionY,
1272 int xDraw, int yDraw, int widthDraw,
1273 int heightDraw, int xRef, int yRef,
1274 int widthRef, int heightRef, bool *repeatX,
1275 bool *repeatY, int *origX, int *origY,
1276 int *tileX1, int *tileX2, int *tileY1,
1277 int *tileY2, bool *doDraw)
1278 {
1279 Imgbuf *imgbuf = backgroundImage->getImgbufSrc();
1280 int imgWidth = imgbuf->getRootWidth ();
1281 int imgHeight = imgbuf->getRootHeight ();
1282
1283 *repeatX = backgroundRepeat == BACKGROUND_REPEAT ||
1284 backgroundRepeat == BACKGROUND_REPEAT_X;
1285 *repeatY = backgroundRepeat == BACKGROUND_REPEAT ||
1286 backgroundRepeat == BACKGROUND_REPEAT_Y;
1287
1288 *origX = xRef +
1289 (isPerLength (backgroundPositionX) ?
1290 multiplyWithPerLength (widthRef - imgWidth, backgroundPositionX) :
1291 absLengthVal (backgroundPositionX));
1292 *origY = yRef +
1293 (isPerLength (backgroundPositionY) ?
1294 multiplyWithPerLength (heightRef - imgHeight, backgroundPositionY) :
1295 absLengthVal (backgroundPositionY));
1296
1297 *tileX1 = xDraw < *origX ?
1298 - (*origX - xDraw + imgWidth - 1) / imgWidth :
1299 (xDraw - *origX) / imgWidth;
1300 *tileX2 = *origX < xDraw + widthDraw ?
1301 (xDraw + widthDraw - *origX - 1) / imgWidth :
1302 - (*origX - (xDraw + widthDraw) + imgWidth - 1) / imgWidth;
1303 *tileY1 = yDraw < *origY ?
1304 - (*origY - yDraw + imgHeight - 1) / imgHeight :
1305 (yDraw - *origY) / imgHeight;
1306 *tileY2 = *origY < yDraw + heightDraw ?
1307 (yDraw + heightDraw - *origY - 1) / imgHeight :
1308 - (*origY - (yDraw + heightDraw) + imgHeight - 1) / imgHeight;
1309
1310 *doDraw = true;
1311 if (!*repeatX) {
1312 // Only center tile (tileX = 0) is drawn, ...
1313 if (*tileX1 <= 0 && *tileX2 >= 0)
1314 // ... and is visible.
1315 *tileX1 = *tileX2 = 0;
1316 else
1317 // ... but is not visible.
1318 *doDraw = false;
1319 }
1320
1321 if (!*repeatY) {
1322 // Analogue.
1323 if (*tileY1 <= 0 && *tileY2 >= 0)
1324 *tileY1 = *tileY2 = 0;
1325 else
1326 *doDraw = false;
8861327 }
8871328 }
8881329
55 #ifndef __INCLUDED_FROM_DW_CORE_HH__
66 # error Do not include this file directly, use "core.hh" instead.
77 #endif
8
9 #include "../lout/signal.hh"
10 #include "../lout/debug.hh"
811
912 namespace dw {
1013 namespace core {
225228 BORDER_RIDGE,
226229 BORDER_INSET,
227230 BORDER_OUTSET
231 };
232
233 enum BackgroundRepeat {
234 BACKGROUND_REPEAT,
235 BACKGROUND_REPEAT_X,
236 BACKGROUND_REPEAT_Y,
237 BACKGROUND_NO_REPEAT
238 };
239
240 enum BackgroundAttachment {
241 BACKGROUND_ATTACHMENT_SCROLL,
242 BACKGROUND_ATTACHMENT_FIXED
228243 };
229244
230245 enum TextAlignType {
395410 /** \brief Returns the value of a length in pixels, as an integer. */
396411 inline int absLengthVal(Length l) { return l >> 2; }
397412
398 /** \brief Returns the value of a percentage, relative to 1, as a double. */
413 /** \brief Returns the value of a percentage, relative to 1, as a double.
414 *
415 * When possible, do not use this function directly; it may be removed
416 * soon. Instead, use multiplyWithPerLength or multiplyWithPerLengthRounded.
417 */
399418 inline double perLengthVal(Length l) { return (double)(l & ~3) / (1 << 18); }
400419
401 /** \brief Returns the value of a relative length, as a float. */
420 /** \brief Returns the value of a relative length, as a float.
421 *
422 * When possible, do not use this function directly; it may be removed
423 * soon.
424 */
402425 inline double relLengthVal(Length l) { return (double)(l & ~3) / (1 << 18); }
426
427 /**
428 * \brief Multiply an int with a percentage length, returning int.
429 *
430 * Use this instead of perLengthVal, when possible.
431 */
432 inline int multiplyWithPerLength(int x, Length l) {
433 return x * perLengthVal(l);
434 }
435
436 /**
437 * \brief Like multiplyWithPerLength, but rounds to nearest integer
438 * instead of down.
439 *
440 * (This function exists for backward compatibility.)
441 */
442 inline int multiplyWithPerLengthRounded (int x, Length l) {
443 return lout::misc::roundInt (x * perLengthVal(l));
444 }
445
446 inline int multiplyWithRelLength(int x, Length l) {
447 return x * relLengthVal(l);
448 }
449
403450
404451 enum {
405452 /** \brief Represents "auto" lengths. */
430477 }
431478 };
432479
480 class Tooltip;
433481 class Font;
434482 class Color;
435 class Tooltip;
483 class StyleImage;
436484
437485 /**
438486 * \sa dw::core::style
444492 int textDecoration; /* No TextDecoration because of problems converting
445493 * TextDecoration <-> int */
446494 Color *color, *backgroundColor;
495 StyleImage *backgroundImage;
496 BackgroundRepeat backgroundRepeat;
497 BackgroundAttachment backgroundAttachment;
498 Length backgroundPositionX; // "left" defined by "0%" etc. (see CSS spec)
499 Length backgroundPositionY; // "top" defined by "0%" etc. (see CSS spec)
447500
448501 TextAlignType textAlign;
449502 VAlignType valign;
503556 }
504557 inline int boxDiffHeight () { return boxOffsetY () + boxRestHeight (); }
505558
506 inline bool hasBackground () { return backgroundColor != NULL; }
559 inline bool hasBackground ()
560 { return backgroundColor != NULL || backgroundImage != NULL; }
507561
508562 bool equals (lout::object::Object *other);
509563 int hashValue ();
606660 static Font *create0 (Layout *layout, FontAttrs *attrs, bool tryEverything);
607661
608662 protected:
609 inline Font () { refCount = 0; }
663 inline Font () {
664 DBG_OBJ_CREATE ("dw::core::style::Font");
665 refCount = 0;
666 }
610667 virtual ~Font ();
611668
612669 void copyAttrs (FontAttrs *attrs);
658715
659716 protected:
660717 inline Color (int color): ColorAttrs (color) {
661 refCount = 0; }
718 DBG_OBJ_CREATE ("dw::core::style::Color");
719 refCount = 0;
720 }
662721 virtual ~Color ();
663722
664723 public:
676735 { if (--refCount == 0) delete this; }
677736 };
678737
679 void drawBorder (View *view, Rectangle *area,
738
739 class StyleImage: public lout::signal::ObservedObject
740 {
741 private:
742 class StyleImgRenderer: public ImgRenderer
743 {
744 private:
745 StyleImage *image;
746
747 public:
748 inline StyleImgRenderer (StyleImage *image) { this->image = image; }
749
750 void setBuffer (core::Imgbuf *buffer, bool resize);
751 void drawRow (int row);
752 void finish ();
753 void fatal ();
754 };
755
756 int refCount, tilesX, tilesY;
757 Imgbuf *imgbufSrc, *imgbufTiled;
758 ImgRendererDist *imgRendererDist;
759 StyleImgRenderer *styleImgRenderer;
760
761 StyleImage ();
762 ~StyleImage ();
763
764 public:
765 /**
766 * \brief Useful (but not mandatory) base class for updates of
767 * areas with background images.
768 */
769 class ExternalImgRenderer: public ImgRenderer
770 {
771 public:
772 void setBuffer (core::Imgbuf *buffer, bool resize);
773 void drawRow (int row);
774 void finish ();
775 void fatal ();
776
777 /**
778 * \brief If this method returns false, nothing is done at all.
779 */
780 virtual bool readyToDraw () = 0;
781
782 /**
783 * \brief Return the area covered by the background image.
784 */
785 virtual void getBgArea (int *x, int *y, int *width, int *height) = 0;
786
787 /**
788 * \brief Return the "reference area".
789 *
790 * See comment of "drawBackground".
791 */
792 virtual void getRefArea (int *xRef, int *yRef, int *widthRef,
793 int *heightRef) = 0;
794
795 virtual StyleImage *getBackgroundImage () = 0;
796 virtual BackgroundRepeat getBackgroundRepeat () = 0;
797 virtual BackgroundAttachment getBackgroundAttachment () = 0;
798 virtual Length getBackgroundPositionX () = 0;
799 virtual Length getBackgroundPositionY () = 0;
800
801 /**
802 * \brief Draw (or queue for drawing) an area, which is given in
803 * canvas coordinates.
804 */
805 virtual void draw (int x, int y, int width, int height) = 0;
806 };
807
808 /**
809 * \brief Suitable for widgets and parts of widgets.
810 */
811 class ExternalWidgetImgRenderer: public ExternalImgRenderer
812 {
813 public:
814 void getPaddingArea (int *x, int *y, int *width, int *height);
815
816 StyleImage *getBackgroundImage ();
817 BackgroundRepeat getBackgroundRepeat ();
818 BackgroundAttachment getBackgroundAttachment ();
819 Length getBackgroundPositionX ();
820 Length getBackgroundPositionY ();
821
822 /**
823 * \brief Return the style this background image is part of.
824 */
825 virtual Style *getStyle () = 0;
826 };
827
828 static StyleImage *create () { return new StyleImage (); }
829
830 inline void ref () { refCount++; }
831 inline void unref ()
832 { if (--refCount == 0) delete this; }
833
834 inline Imgbuf *getImgbufSrc () { return imgbufSrc; }
835 inline Imgbuf *getImgbufTiled (bool repeatX, bool repeatY)
836 { return (imgbufTiled && repeatX && repeatY) ? imgbufTiled : imgbufSrc; }
837 inline int getTilesX (bool repeatX, bool repeatY)
838 { return (imgbufTiled && repeatX && repeatY) ? tilesX : 1; }
839 inline int getTilesY (bool repeatX, bool repeatY)
840 { return (imgbufTiled && repeatX && repeatY) ? tilesY : 1; }
841 inline ImgRenderer *getMainImgRenderer () { return imgRendererDist; }
842
843 /**
844 * \brief Add an additional ImgRenderer, especially used for
845 * drawing.
846 */
847 inline void putExternalImgRenderer (ImgRenderer *ir)
848 { imgRendererDist->put (ir); }
849
850 /**
851 * \brief Remove a previously added additional ImgRenderer.
852 */
853 inline void removeExternalImgRenderer (ImgRenderer *ir)
854 { imgRendererDist->remove (ir); }
855 };
856
857 void drawBorder (View *view, Layout *layout, Rectangle *area,
680858 int x, int y, int width, int height,
681859 Style *style, bool inverse);
682 void drawBackground (View *view, Rectangle *area,
860 void drawBackground (View *view, Layout *layout, Rectangle *area,
683861 int x, int y, int width, int height,
684 Style *style, bool inverse);
862 int xRef, int yRef, int widthRef, int heightRef,
863 Style *style, bool inverse, bool atTop);
864 void drawBackgroundImage (View *view, StyleImage *backgroundImage,
865 BackgroundRepeat backgroundRepeat,
866 BackgroundAttachment backgroundAttachment,
867 Length backgroundPositionX,
868 Length backgroundPositionY,
869 int x, int y, int width, int height,
870 int xRef, int yRef, int widthRef, int heightRef);
685871 void numtostr (int num, char *buf, int buflen, ListStyleType listStyleType);
686872
687873 } // namespace style
2121 #include "table.hh"
2222 #include "../lout/msg.h"
2323 #include "../lout/misc.hh"
24
25 #define MAX misc::max
24 #include "../lout/debug.hh"
2625
2726 using namespace lout;
2827
3231
3332 Table::Table(bool limitTextWidth)
3433 {
34 DBG_OBJ_CREATE ("dw::Table");
3535 registerName ("dw::Table", &CLASS_ID);
3636 setFlags (BLOCK_LEVEL);
3737 setFlags (USES_HINTS);
6161 rowStyle = new misc::SimpleVector <core::style::Style*> (8);
6262
6363 hasColPercent = 0;
64 colPercents = new misc::SimpleVector <float> (8);
64 colPercents = new misc::SimpleVector <core::style::Length> (8);
6565
6666 redrawX = 0;
6767 redrawY = 0;
9797 delete baseline;
9898 delete rowStyle;
9999 delete colPercents;
100
101 DBG_OBJ_DELETE ();
100102 }
101103
102104 void Table::sizeRequestImpl (core::Requisition *requisition)
136138 }
137139 if (core::style::isAbsLength (getStyle()->width)) {
138140 extremes->minWidth =
139 MAX (extremes->minWidth,
140 core::style::absLengthVal(getStyle()->width));
141 misc::max (extremes->minWidth,
142 core::style::absLengthVal(getStyle()->width));
141143 extremes->maxWidth =
142 MAX (extremes->maxWidth,
143 core::style::absLengthVal(getStyle()->width));
144 misc::max (extremes->maxWidth,
145 core::style::absLengthVal(getStyle()->width));
144146 }
145147
146148 _MSG(" Table::getExtremesImpl, {%d, %d} numCols=%d\n",
296298 }
297299
298300 if (colspan == 0) {
299 colspanEff = MAX (numCols - curCol, 1);
301 colspanEff = misc::max (numCols - curCol, 1);
300302 rowClosed = true;
301303 } else
302304 colspanEff = colspan;
502504 * as defined by CSS2.)
503505 */
504506 totalWidth =
505 (int)(availWidth
506 * misc::min (core::style::perLengthVal (getStyle()->width),
507 1.0));
507 misc::min (core::style::multiplyWithPerLength (availWidth,
508 getStyle()->width),
509 availWidth);
508510 } else if (getStyle()->width == core::style::LENGTH_AUTO) {
509511 totalWidth = availWidth;
510512 forceTotalWidth = 0;
556558 children->get(n)->cell.widget->sizeRequest (&childRequisition);
557559 childHeight = childRequisition.ascent + childRequisition.descent;
558560 if (children->get(n)->cell.rowspan == 1) {
559 rowHeight = MAX (rowHeight, childHeight);
561 rowHeight = misc::max (rowHeight, childHeight);
560562 } else {
561563 rowSpanCells->increase();
562564 rowSpanCells->set(rowSpanCells->size()-1, n);
659661 for (int col = 0; col < numCols; col++) {
660662 colExtremes->getRef(col)->minWidth = 0;
661663 colExtremes->getRef(col)->maxWidth = 0;
662 colPercents->set(col, LEN_AUTO);
664 colPercents->set(col, core::style::LENGTH_AUTO);
663665
664666 for (int row = 0; row < numRows; row++) {
665667 int n = row * numCols + col;
676678 if (core::style::isAbsLength (width)) {
677679 // Fixed lengths include table padding, border and margin.
678680 cellMinW = cellExtremes.minWidth;
679 cellMaxW = MAX (cellMinW,
680 core::style::absLengthVal(width) - pbm);
681 cellMaxW = misc::max (cellMinW,
682 core::style::absLengthVal(width) - pbm);
681683 } else {
682684 cellMinW = cellExtremes.minWidth;
683685 cellMaxW = cellExtremes.maxWidth;
690692 cellMinW, cellMaxW);
691693
692694 colExtremes->getRef(col)->minWidth =
693 MAX (colExtremes->getRef(col)->minWidth, cellMinW);
695 misc::max (colExtremes->getRef(col)->minWidth, cellMinW);
694696 colExtremes->getRef(col)->maxWidth =
695 MAX (colExtremes->getRef(col)->minWidth, MAX (
696 colExtremes->getRef(col)->maxWidth,
697 cellMaxW));
697 misc::max (colExtremes->getRef(col)->minWidth, misc::max (
698 colExtremes->getRef(col)->maxWidth,
699 cellMaxW));
698700
699701 // Also fill the colPercents array in this pass
700702 if (core::style::isPerLength (width)) {
701703 hasColPercent = 1;
702 if (colPercents->get(col) == LEN_AUTO)
703 colPercents->set(col, core::style::perLengthVal(width));
704 if (colPercents->get(col) == core::style::LENGTH_AUTO)
705 colPercents->set(col, width);
704706 } else if (core::style::isAbsLength (width)) {
705707 // We treat LEN_ABS as a special case of LEN_AUTO.
706708 /*
707709 * if (colPercents->get(col) == LEN_AUTO)
708710 * colPercents->set(col, LEN_ABS);
711 *
712 * (Hint: that's old code!)
709713 */
710714 }
711715 } else {
731735 if (core::style::isAbsLength (width)) {
732736 // Fixed lengths include table padding, border and margin.
733737 cellMinW = cellExtremes.minWidth;
734 cellMaxW = MAX (cellMinW, core::style::absLengthVal(width) - pbm);
738 cellMaxW =
739 misc::max (cellMinW, core::style::absLengthVal(width) - pbm);
735740 } else {
736741 cellMinW = cellExtremes.minWidth;
737742 cellMaxW = cellExtremes.maxWidth;
749754 continue;
750755
751756 // Cell size is too small; apportion {min,max} for this colspan.
752 int spanMinW = MAX (MAX(cs, minSumCols),
753 cellMinW - (cs-1) * getStyle()->hBorderSpacing),
754 spanMaxW = MAX (MAX(cs, maxSumCols),
755 cellMaxW - (cs-1) * getStyle()->hBorderSpacing);
757 int spanMinW = misc::max (misc::max (cs, minSumCols),
758 cellMinW - (cs-1) * getStyle()->hBorderSpacing),
759 spanMaxW = misc::max (misc::max (cs, maxSumCols),
760 cellMaxW - (cs-1) * getStyle()->hBorderSpacing);
756761
757762 if (minSumCols == 0) {
758763 // No single cells defined for this span => pre-apportion equally
766771 }
767772 }
768773
769 // This numbers will help if the span has percents.
774 // These values will help if the span has percents.
770775 int spanHasColPercent = 0;
771776 int availSpanMinW = spanMinW;
772777 float cumSpanPercent = 0.0f;
773778 for (int i = col; i < col + cs; ++i) {
774 if (colPercents->get(i) > 0.0f) {
775 cumSpanPercent += colPercents->get(i);
779 if (core::style::isPerLength (colPercents->get(i))) {
780 cumSpanPercent += core::style::perLengthVal (colPercents->get(i));
776781 ++spanHasColPercent;
777782 } else
778783 availSpanMinW -= colExtremes->getRef(i)->minWidth;
797802 curExtraW -= d_w;
798803 curAppW -= d_a;
799804 } else {
800 if (colPercents->get(i) > 0.0f) {
801 wMin = MAX (colExtremes->getRef(i)->minWidth,
802 (int)(availSpanMinW
803 * colPercents->get(i)/cumSpanPercent));
805 if (core::style::isPerLength (colPercents->get(i))) {
806 // multiplyWithPerLength would cause rounding errors,
807 // therefore the deprecated way, using perLengthVal:
808 wMin = misc::max (colExtremes->getRef(i)->minWidth,
809 (int)(availSpanMinW *
810 core::style::perLengthVal
811 (colPercents->get (i))
812 / cumSpanPercent));
804813 colExtremes->getRef(i)->minWidth = wMin;
805814 }
806815 }
809818 (int)((float)(goalMaxW-cumMaxWnew)
810819 * colExtremes->getRef(i)->maxWidth
811820 / (maxSumCols-cumMaxWold));
812 wMax = MAX (wMin, wMax);
821 wMax = misc::max (wMin, wMax);
813822 cumMaxWnew += wMax;
814823 cumMaxWold += colExtremes->getRef(i)->maxWidth;
815824 colExtremes->getRef(i)->maxWidth = wMax;
849858 #endif
850859 int minAutoWidth = 0, maxAutoWidth = 0, availAutoWidth = totalWidth;
851860 for (int col = 0; col < numCols; col++) {
852 if (colPercents->get(col) == LEN_ABS) { // set absolute lengths
861 if (core::style::isAbsLength (colPercents->get(col))) {
862 // set absolute lengths
853863 setColWidth (col, colExtremes->get(col).minWidth);
854864 }
855 if (colPercents->get(col) == LEN_AUTO) {
865 if (colPercents->get(col) == core::style::LENGTH_AUTO) {
856866 maxAutoWidth += colExtremes->get(col).maxWidth;
857867 minAutoWidth += colExtremes->get(col).minWidth;
858868 } else
859869 availAutoWidth -= colWidths->get(col);
860870 }
861871
862 if (!maxAutoWidth) // no LEN_AUTO cols!
872 if (!maxAutoWidth) // no core::style::LENGTH_AUTO cols!
863873 return;
864874
865875 colWidths->setSize (colExtremes->size (), 0);
870880 }
871881
872882 // General case.
873 int curTargetWidth = MAX (availAutoWidth, minAutoWidth);
883 int curTargetWidth = misc::max (availAutoWidth, minAutoWidth);
874884 int curExtraWidth = curTargetWidth - minAutoWidth;
875885 int curMaxWidth = maxAutoWidth;
876886 int curNewWidth = minAutoWidth;
879889 col, colExtremes->getRef(col)->minWidth,
880890 colExtremes->get(col).maxWidth);
881891
882 if (colPercents->get(col) != LEN_AUTO)
892 if (colPercents->get(col) != core::style::LENGTH_AUTO)
883893 continue;
884894
885895 int colMinWidth = colExtremes->getRef(col)->minWidth;
936946 // It has only a table-wide percentage. Apportion non-absolute widths.
937947 int sumMaxWidth = 0, perAvailWidth = totalWidth;
938948 for (int col = 0; col < numCols; col++) {
939 if (colPercents->get(col) == LEN_ABS)
949 if (core::style::isAbsLength (colPercents->get(col)))
940950 perAvailWidth -= colExtremes->getRef(col)->maxWidth;
941951 else
942952 sumMaxWidth += colExtremes->getRef(col)->maxWidth;
947957
948958 for (int col = 0; col < numCols; col++) {
949959 int max_wi = colExtremes->getRef(col)->maxWidth, new_wi;
950 if (colPercents->get(col) != LEN_ABS) {
951 new_wi = MAX (colExtremes->getRef(col)->minWidth,
960 if (!core::style::isAbsLength (colPercents->get(col))) {
961 new_wi =
962 misc::max (colExtremes->getRef(col)->minWidth,
952963 (int)((float)max_wi * perAvailWidth/sumMaxWidth));
953964 setColWidth (col, new_wi);
954965 perAvailWidth -= new_wi;
971982 int hasAutoCol = 0;
972983 int sumMinWidth = 0, sumMaxWidth = 0, sumMinNonPer = 0, sumMaxNonPer = 0;
973984 for (int col = 0; col < numCols; col++) {
974 if (colPercents->get(col) > 0.0f) {
975 cumPercent += colPercents->get(col);
985 if (core::style::isPerLength (colPercents->get(col))) {
986 cumPercent += core::style::perLengthVal (colPercents->get(col));
976987 } else {
977988 sumMinNonPer += colExtremes->getRef(col)->minWidth;
978989 sumMaxNonPer += colExtremes->getRef(col)->maxWidth;
979 hasAutoCol += (colPercents->get(col) == LEN_AUTO);
990 if (colPercents->get(col) == core::style::LENGTH_AUTO)
991 hasAutoCol++;
980992 }
981993 sumMinWidth += colExtremes->getRef(col)->minWidth;
982994 sumMaxWidth += colExtremes->getRef(col)->maxWidth;
9891001 if (!forceTotalWidth) {
9901002 if (sumMaxNonPer == 0 || cumPercent < 0.99f) {
9911003 // only percentage columns, or cumPercent < 100% => restrict width
992 int totW = (int)(sumMaxNonPer/(1.0f-cumPercent));
1004 int totW = (int)(sumMaxNonPer / (1.0f - cumPercent));
9931005 for (int col = 0; col < numCols; col++) {
994 totW = MAX (totW, (int)(colExtremes->getRef(col)->maxWidth
995 / colPercents->get(col)));
1006 totW = misc::max
1007 (totW,
1008 (int)(colExtremes->getRef(col)->maxWidth
1009 / core::style::perLengthVal (colPercents->get(col))));
9961010 }
9971011 totalWidth = misc::min (totW, totalWidth);
9981012 }
9991013 }
10001014
10011015 // make sure there's enough space
1002 totalWidth = MAX (totalWidth, sumMinWidth);
1016 totalWidth = misc::max (totalWidth, sumMinWidth);
10031017 // extraWidth is always >= 0
10041018 int extraWidth = totalWidth - sumMinWidth;
10051019 int sumMinWidthPer = sumMinWidth - sumMinNonPer;
10181032
10191033 for (int col = 0; col < numCols; col++) {
10201034 int colMinWidth = colExtremes->getRef(col)->minWidth;
1021 if (colPercents->get(col) >= 0.0f) {
1022 int w = (int)(workingWidth * colPercents->get(col));
1035 if (core::style::isPerLength (colPercents->get(col))) {
1036 int w = core::style::multiplyWithPerLength (workingWidth,
1037 colPercents->get(col));
10231038 if (w < colMinWidth)
10241039 w = colMinWidth;
10251040 else if (curPerWidth - colMinWidth + w > workingWidth)
10431058 #endif
10441059 curPerWidth -= sumMinNonPer;
10451060 int perWidth = (int)(curPerWidth/cumPercent);
1046 totalWidth = MAX (totalWidth, perWidth);
1061 totalWidth = misc::max (totalWidth, perWidth);
10471062 totalWidth = misc::min (totalWidth, oldTotalWidth);
10481063
10491064 _MSG("APP_P, curPerWidth=%d perWidth=%d, totalWidth=%d\n",
10541069 // We'll honor totalWidth by expanding the percentage cols.
10551070 int extraWidth = totalWidth - curPerWidth - sumMinNonPer;
10561071 for (int col = 0; col < numCols; col++) {
1057 if (colPercents->get(col) >= 0.0f) {
1058 int d = (int)(extraWidth * colPercents->get(col)/cumPercent);
1072 if (core::style::isPerLength (colPercents->get(col))) {
1073 // This could cause rounding errors:
1074 //
1075 // int d =
1076 // core::dw::multiplyWithPerLength (extraWidth,
1077 // colPercents->get(col))
1078 // / cumPercent;
1079 //
1080 // Thus the "old" way:
1081 int d =
1082 (int)(extraWidth *
1083 core::style::perLengthVal (colPercents->get(col))
1084 / cumPercent);
10591085 setColWidth (col, colWidths->get(col) + d);
10601086 }
10611087 }
10721098 #ifdef DBG
10731099 MSG("APP_P, percent={");
10741100 for (int col = 0; col < numCols; col++)
1075 MSG("%f ", colPercents->get(col));
1101 MSG("%f ", core::dw::perLengthVal (colPercents->get(col)));
10761102 MSG("}\n");
10771103 MSG("APP_P, result ={ ");
10781104 for (int col = 0; col < numCols; col++)
392392
393393 /**
394394 * hasColPercent becomes true when any cell specifies a percentage width.
395 * A negative value in colPercents means LEN_AUTO or LEN_ABS.
396 */
397 enum { LEN_AUTO = -1, LEN_ABS = -2};
395 */
398396 int hasColPercent;
399 lout::misc::SimpleVector<float> *colPercents;
397 lout::misc::SimpleVector<core::style::Length> *colPercents;
400398
401399 inline bool childDefined(int n)
402400 {
1919
2020
2121 #include "tablecell.hh"
22 #include "../lout/debug.hh"
2223 #include <stdio.h>
2324
2425 namespace dw {
2829 TableCell::TableCell (TableCell *ref, bool limitTextWidth):
2930 AlignedTextblock (limitTextWidth)
3031 {
32 DBG_OBJ_CREATE ("dw::TableCell");
3133 registerName ("dw::TableCell", &CLASS_ID);
3234
3335 /** \bug ignoreLine1OffsetSometimes does not work? */
3941
4042 TableCell::~TableCell()
4143 {
44 DBG_OBJ_DELETE ();
4245 }
4346
44 void TableCell::wordWrap(int wordIndex, bool wrapAll)
47 bool TableCell::wordWrap(int wordIndex, bool wrapAll)
4548 {
4649 Textblock::Word *word;
4750 const char *p;
4851
49 Textblock::wordWrap (wordIndex, wrapAll);
52 bool ret = Textblock::wordWrap (wordIndex, wrapAll);
5053
5154 if (charWordIndex == -1) {
5255 word = words->getRef (wordIndex);
6568
6669 if (wordIndex == charWordIndex)
6770 updateValue ();
71
72 return ret;
6873 }
6974
7075 int TableCell::getValue ()
1111 int charWordIndex, charWordPos;
1212
1313 protected:
14 void wordWrap (int wordIndex, bool wrapAll);
14 bool wordWrap (int wordIndex, bool wrapAll);
1515
1616 int getValue ();
1717 void setMaxValue (int maxValue, int value);
2121 #include "../lout/msg.h"
2222 #include "../lout/misc.hh"
2323 #include "../lout/unicode.hh"
24 #include "../lout/debug.hh"
2425
2526 #include <stdio.h>
2627 #include <math.h>
3940 namespace dw {
4041
4142 int Textblock::CLASS_ID = -1;
43
44 Textblock::WordImgRenderer::WordImgRenderer (Textblock *textblock,
45 int wordNo)
46 {
47 //printf ("new WordImgRenderer %p\n", this);
48
49 this->textblock = textblock;
50 this->wordNo = wordNo;
51 dataSet = false;
52 }
53
54 Textblock::WordImgRenderer::~WordImgRenderer ()
55 {
56 //printf ("delete WordImgRenderer %p\n", this);
57 }
58
59 void Textblock::WordImgRenderer::setData (int xWordWidget, int lineNo)
60 {
61 dataSet = true;
62 this->xWordWidget = xWordWidget;
63 this->lineNo = lineNo;
64 }
65
66 bool Textblock::WordImgRenderer::readyToDraw ()
67 {
68 //print ();
69 //printf ("\n");
70
71 return dataSet && textblock->wasAllocated ()
72 && wordNo < textblock->words->size()
73 && lineNo < textblock->lines->size();
74 }
75
76 void Textblock::WordImgRenderer::getBgArea (int *x, int *y, int *width,
77 int *height)
78 {
79 // TODO Subtract margin and border (padding box)?
80 Line *line = textblock->lines->getRef (lineNo);
81 *x = textblock->allocation.x + this->xWordWidget;
82 *y = textblock->lineYOffsetCanvas (line);
83 *width = textblock->words->getRef(wordNo)->size.width;
84 *height = line->boxAscent + line->boxDescent;
85 }
86
87 void Textblock::WordImgRenderer::getRefArea (int *xRef, int *yRef,
88 int *widthRef, int *heightRef)
89 {
90 // See comment in Widget::drawBox about the reference area.
91 textblock->getPaddingArea (xRef, yRef, widthRef, heightRef);
92 }
93
94 core::style::Style *Textblock::WordImgRenderer::getStyle ()
95 {
96 return textblock->words->getRef(wordNo)->style;
97 }
98
99 void Textblock::WordImgRenderer::draw (int x, int y, int width, int height)
100 {
101 textblock->queueDrawArea (x - textblock->allocation.x,
102 y - textblock->allocation.y, width, height);
103
104 }
105
106 void Textblock::WordImgRenderer::print ()
107 {
108 printf ("%p: word #%d, ", this, wordNo);
109 if (wordNo < textblock->words->size())
110 textblock->printWordShort (textblock->words->getRef(wordNo));
111 else
112 printf ("<word %d does not exist>", wordNo);
113 printf (", data set: %s", dataSet ? "yes" : "no");
114 }
115
116 void Textblock::SpaceImgRenderer::getBgArea (int *x, int *y, int *width,
117 int *height)
118 {
119 WordImgRenderer::getBgArea (x, y, width, height);
120 *x += *width;
121 *width = textblock->words->getRef(wordNo)->effSpace;
122 }
123
124 core::style::Style *Textblock::SpaceImgRenderer::getStyle ()
125 {
126 return textblock->words->getRef(wordNo)->spaceStyle;
127 }
128
129 void Textblock::SpaceImgRenderer::print ()
130 {
131 printf ("%p: word FOR SPACE #%d, ", this, wordNo);
132 if (wordNo < textblock->words->size())
133 textblock->printWordShort (textblock->words->getRef(wordNo));
134 else
135 printf ("<word %d does not exist>", wordNo);
136 printf (", data set: %s", dataSet ? "yes" : "no");
137 }
138
139 // ----------------------------------------------------------------------
42140
43141 Textblock::DivChar Textblock::divChars[NUM_DIV_CHARS] = {
44142 // soft hyphen (U+00AD)
78176 { 100, 800 }
79177 };
80178
179 int Textblock::stretchabilityFactor = 100;
180
81181 /**
82182 * The character which is used to draw a hyphen at the end of a line,
83183 * either caused by automatic hyphenation, or by soft hyphens.
114214 penalties[PENALTY_EM_DASH_RIGHT][1] = penaltyRightEmDash2;
115215 }
116216
217 void Textblock::setStretchabilityFactor (int stretchabilityFactor)
218 {
219 Textblock::stretchabilityFactor = stretchabilityFactor;
220 }
221
117222 Textblock::Textblock (bool limitTextWidth)
118223 {
224 DBG_OBJ_CREATE ("dw::Textblock");
119225 registerName ("dw::Textblock", &CLASS_ID);
120226 setFlags (BLOCK_LEVEL);
121227 setFlags (USES_HINTS);
180286
181287 for (int i = 0; i < words->size(); i++) {
182288 Word *word = words->getRef (i);
289
183290 if (word->content.type == core::Content::WIDGET)
184291 delete word->content.widget;
292
293 removeWordImgRenderer (i);
294 removeSpaceImgRenderer (i);
295
185296 word->style->unref ();
186297 word->spaceStyle->unref ();
187298 }
201312 parent class destructor. (???) */
202313 words = NULL;
203314
204 //DBG_OBJ_SET_NUM(this, "num_lines", lines->size ());
315 DBG_OBJ_DELETE ();
205316 }
206317
207318 /**
799910 size->width = core::style::absLengthVal (wstyle->width)
800911 + wstyle->boxDiffWidth ();
801912 else
802 size->width = (int) (core::style::perLengthVal (wstyle->width)
803 * availWidth);
913 size->width =
914 core::style::multiplyWithPerLength (availWidth, wstyle->width);
804915
805916 if (wstyle->height == core::style::LENGTH_AUTO) {
806917 size->ascent = requisition.ascent;
812923 + wstyle->boxDiffHeight ();
813924 size->descent = 0;
814925 } else {
815 double len = core::style::perLengthVal (wstyle->height);
816 size->ascent = (int) (len * availAscent);
817 size->descent = (int) (len * availDescent);
926 size->ascent =
927 core::style::multiplyWithPerLength (wstyle->height, availAscent);
928 size->descent =
929 core::style::multiplyWithPerLength (wstyle->height, availDescent);
818930 }
819931 }
820932
13451457 short flags, core::style::Style *style)
13461458 {
13471459 words->increase ();
1348 Word *word = words->getLastRef ();
1349 fillWord (word, width, ascent, descent, flags, style);
1350 return word;
1351 }
1352
1353 void Textblock::fillWord (Word *word, int width, int ascent, int descent,
1460 int wordNo = words->size () - 1;
1461 initWord (wordNo);
1462 fillWord (wordNo, width, ascent, descent, flags, style);
1463 return words->getRef (wordNo);;
1464 }
1465
1466 /**
1467 * Basic initialization, which is neccessary before fillWord.
1468 */
1469 void Textblock::initWord (int wordNo)
1470 {
1471 Word *word = words->getRef (wordNo);
1472
1473 word->style = word->spaceStyle = NULL;
1474 word->wordImgRenderer = NULL;
1475 word->spaceImgRenderer = NULL;
1476 }
1477
1478 void Textblock::removeWordImgRenderer (int wordNo)
1479 {
1480 Word *word = words->getRef (wordNo);
1481
1482 if (word->style && word->wordImgRenderer) {
1483 word->style->backgroundImage->removeExternalImgRenderer
1484 (word->wordImgRenderer);
1485 delete word->wordImgRenderer;
1486 word->wordImgRenderer = NULL;
1487 }
1488 }
1489
1490 void Textblock::setWordImgRenderer (int wordNo)
1491 {
1492 Word *word = words->getRef (wordNo);
1493
1494 if (word->style->backgroundImage) {
1495 word->wordImgRenderer = new WordImgRenderer (this, wordNo);
1496 word->style->backgroundImage->putExternalImgRenderer
1497 (word->wordImgRenderer);
1498 } else
1499 word->wordImgRenderer = NULL;
1500 }
1501
1502 void Textblock::removeSpaceImgRenderer (int wordNo)
1503 {
1504 Word *word = words->getRef (wordNo);
1505
1506 if (word->spaceStyle && word->spaceImgRenderer) {
1507 word->spaceStyle->backgroundImage->removeExternalImgRenderer
1508 (word->spaceImgRenderer);
1509 delete word->spaceImgRenderer;
1510 word->spaceImgRenderer = NULL;
1511 }
1512 }
1513
1514 void Textblock::setSpaceImgRenderer (int wordNo)
1515 {
1516 Word *word = words->getRef (wordNo);
1517
1518 if (word->spaceStyle->backgroundImage) {
1519 word->spaceImgRenderer = new SpaceImgRenderer (this, wordNo);
1520 word->spaceStyle->backgroundImage->putExternalImgRenderer
1521 (word->spaceImgRenderer);
1522 } else
1523 word->spaceImgRenderer = NULL;
1524 }
1525
1526 void Textblock::fillWord (int wordNo, int width, int ascent, int descent,
13541527 short flags, core::style::Style *style)
13551528 {
1529 Word *word = words->getRef (wordNo);
1530
13561531 word->size.width = width;
13571532 word->size.ascent = ascent;
13581533 word->size.descent = descent;
13621537 word->content.space = false;
13631538 word->flags = flags;
13641539
1540 removeWordImgRenderer (wordNo);
1541 removeSpaceImgRenderer (wordNo);
1542
13651543 word->style = style;
13661544 word->spaceStyle = style;
1545
1546 setWordImgRenderer (wordNo);
1547 setSpaceImgRenderer (wordNo);
1548
13671549 style->ref ();
13681550 style->ref ();
13691551 }
14651647 if (core::style::isAbsLength (style->lineHeight))
14661648 height = core::style::absLengthVal(style->lineHeight);
14671649 else
1468 height = lout::misc::roundInt (
1469 core::style::perLengthVal(style->lineHeight) *
1470 style->font->size);
1650 height =
1651 core::style::multiplyWithPerLengthRounded (style->font->size,
1652 style->lineHeight);
14711653 leading = height - style->font->size;
14721654
14731655 size->ascent += leading / 2;
14771659 /* In case of a sub or super script we increase the word's height and
14781660 * potentially the line's height.
14791661 */
1480 if (style->valign == core::style::VALIGN_SUB)
1481 size->descent += (style->font->ascent / 3);
1482 else if (style->valign == core::style::VALIGN_SUPER)
1483 size->ascent += (style->font->ascent / 2);
1662 if (style->valign == core::style::VALIGN_SUB) {
1663 int requiredDescent = style->font->descent + style->font->ascent / 3;
1664 size->descent = misc::max (size->descent, requiredDescent);
1665 } else if (style->valign == core::style::VALIGN_SUPER) {
1666 int requiredAscent = style->font->ascent + style->font->ascent / 2;
1667 size->ascent = misc::max (size->ascent, requiredAscent);
1668 }
14841669 }
14851670
14861671 /**
16781863 Word *word = words->getLastRef();
16791864
16801865 setBreakOption (word, style, penalties[partPenaltyIndex[i]][0],
1681 penalties[partPenaltyIndex[i]][1]);
1866 penalties[partPenaltyIndex[i]][1], false);
16821867
16831868 if (charRemoved[i])
16841869 // Currently, only unconditional hyphens (UTF-8:
17461931
17471932 Word *word = addWord (size->width, size->ascent, size->descent,
17481933 flags, style);
1934 DBG_OBJ_ASSOC_CHILD (style);
17491935 word->content.type = core::Content::TEXT;
17501936 word->content.text = layout->textZone->strndup(text, len);
17511937
18382024 {
18392025 int wordIndex = words->size () - 1;
18402026 if (wordIndex >= 0) {
1841 fillSpace (words->getRef(wordIndex), style);
2027 fillSpace (wordIndex, style);
18422028 accumulateWordData (wordIndex);
18432029 correctLastWordExtremes ();
18442030 }
18472033 /**
18482034 * Add a break option (see setBreakOption() for details). Used instead
18492035 * of addStyle for ideographic characters.
1850 */
1851 void Textblock::addBreakOption (core::style::Style *style)
2036 *
2037 * When "forceBreak" is true, a break is even possible within PRE etc.
2038 */
2039 void Textblock::addBreakOption (core::style::Style *style, bool forceBreak)
18522040 {
18532041 int wordIndex = words->size () - 1;
18542042 if (wordIndex >= 0) {
1855 setBreakOption (words->getRef(wordIndex), style, 0, 0);
2043 setBreakOption (words->getRef(wordIndex), style, 0, 0, forceBreak);
18562044 // Call of accumulateWordData() is not needed here.
18572045 correctLastWordExtremes ();
18582046 }
18592047 }
18602048
1861 void Textblock::fillSpace (Word *word, core::style::Style *style)
2049 void Textblock::fillSpace (int wordNo, core::style::Style *style)
18622050 {
18632051 // Old comment:
18642052 //
18742062 //
18752063 // TODO: Re-evaluate again.
18762064
2065 Word *word = words->getRef (wordNo);
2066
18772067 // TODO: This line does not work: addBreakOption (word, style);
18782068
18792069 // Do not override a previously set break penalty.
18802070 if (!word->content.space) {
1881 setBreakOption (word, style, 0, 0);
2071 setBreakOption (word, style, 0, 0, false);
18822072
18832073 word->content.space = true;
18842074 word->effSpace = word->origSpace = style->font->spaceWidth +
18912081 //DBG_OBJ_ARRSET_NUM (this, "words.%d.content.space", wordIndex,
18922082 // word->content.space);
18932083
2084
2085 removeSpaceImgRenderer (wordNo);
2086
18942087 word->spaceStyle->unref ();
18952088 word->spaceStyle = style;
18962089 style->ref ();
2090
2091 setSpaceImgRenderer (wordNo);
18972092 }
18982093 }
18992094
19032098 * alternative, e. g. for ideographic characters.
19042099 */
19052100 void Textblock::setBreakOption (Word *word, core::style::Style *style,
1906 int breakPenalty1, int breakPenalty2)
2101 int breakPenalty1, int breakPenalty2,
2102 bool forceBreak)
19072103 {
19082104 // TODO: lineMustBeBroken should be independent of the penalty
19092105 // index? Otherwise, examine the last line.
19102106 if (!word->badnessAndPenalty.lineMustBeBroken(0)) {
1911 switch (style->whiteSpace) {
1912 case core::style::WHITE_SPACE_NORMAL:
1913 case core::style::WHITE_SPACE_PRE_LINE:
1914 case core::style::WHITE_SPACE_PRE_WRAP:
2107 if (forceBreak || isBreakAllowed (word))
19152108 word->badnessAndPenalty.setPenalties (breakPenalty1, breakPenalty2);
1916 break;
1917
1918 case core::style::WHITE_SPACE_PRE:
1919 case core::style::WHITE_SPACE_NOWRAP:
2109 else
19202110 word->badnessAndPenalty.setPenalty (PENALTY_PROHIBIT_BREAK);
1921 break;
1922 }
1923 }
2111 }
2112 }
2113
2114 bool Textblock::isBreakAllowed (Word *word)
2115 {
2116 switch (word->style->whiteSpace) {
2117 case core::style::WHITE_SPACE_NORMAL:
2118 case core::style::WHITE_SPACE_PRE_LINE:
2119 case core::style::WHITE_SPACE_PRE_WRAP:
2120 return true;
2121
2122 case core::style::WHITE_SPACE_PRE:
2123 case core::style::WHITE_SPACE_NOWRAP:
2124 return false;
2125 }
2126
2127 // compiler happiness
2128 lout::misc::assertNotReached ();
2129 return false;
19242130 }
19252131
19262132
19942200 }
19952201
19962202 word = addWord (0, 0, 0, 0, style);
2203 DBG_OBJ_ASSOC_CHILD (style);
19972204 word->content.type = core::Content::BREAK;
19982205 word->badnessAndPenalty.setPenalty (PENALTY_FORCE_BREAK);
19992206 word->content.breakSpace = space;
20162223 else
20172224 // ... otherwise, it has no size (and does not enlarge the line).
20182225 word = addWord (0, 0, 0, 0, style);
2226
2227 DBG_OBJ_ASSOC_CHILD (style);
20192228
20202229 word->content.type = core::Content::BREAK;
20212230 word->badnessAndPenalty.setPenalty (PENALTY_FORCE_BREAK);
236236 static const char *hyphenDrawChar;
237237
238238 protected:
239 /**
240 * \brief Implementation used for words.
241 */
242 class WordImgRenderer:
243 public core::style::StyleImage::ExternalWidgetImgRenderer
244 {
245 protected:
246 Textblock *textblock;
247 int wordNo, xWordWidget, lineNo;
248 bool dataSet;
249
250 public:
251 WordImgRenderer (Textblock *textblock, int wordNo);
252 ~WordImgRenderer ();
253
254 void setData (int xWordWidget, int lineNo);
255
256 bool readyToDraw ();
257 void getBgArea (int *x, int *y, int *width, int *height);
258 void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef);
259 core::style::Style *getStyle ();
260 void draw (int x, int y, int width, int height);
261
262 virtual void print ();
263 };
264
265 class SpaceImgRenderer: public WordImgRenderer
266 {
267 public:
268 inline SpaceImgRenderer (Textblock *textblock, int wordNo) :
269 WordImgRenderer (textblock, wordNo) { }
270
271 void getBgArea (int *x, int *y, int *width, int *height);
272 core::style::Style *getStyle ();
273
274 void print ();
275 };
276
239277 struct Paragraph
240278 {
241279 int firstWord; /* first word's index in word vector */
242280 int lastWord; /* last word's index in word vector */
243
244 // TODO Adjust comments. Short note: maxParMin/maxParMax is
245 // is never smaller than parMin/parMax.
246281
247282 /*
248283 * General remark: all values include the last hyphen width, but
255290 */
256291
257292 int parMin; /* The sum of all word minima (plus spaces,
258 hyphen width etc.) of the last c */
293 hyphen width etc.) since the last possible
294 break within this paragraph. */
259295 int parMax; /* The sum of all word maxima in this
260296 * paragraph (plus spaces, hyphen width
261297 * etc.). */
262298
263 int maxParMin; /* Maximum of all paragraph minima, including
264 * this line. */
265 int maxParMax; /* Maximum of all paragraph maxima (value of "parMax"),
266 * including this one. */
299 int maxParMin; /* Maximum of all paragraph minima (value of
300 * "parMin), including this paragraph. */
301 int maxParMax; /* Maximum of all paragraph maxima (value of
302 * "parMax"), including this paragraph. */
267303 };
268304
269305 struct Line
342378 words: the value compared to the
343379 ideal width of the line, if the line
344380 would be broken after this word. */
345 int totalStretchability; // includes all *before* current word
346 int totalShrinkability; // includes all *before* current word
381 int maxAscent, maxDescent;
382 int totalSpaceStretchability; // includes all *before* current word
383 int totalSpaceShrinkability; // includes all *before* current word
347384 BadnessAndPenalty badnessAndPenalty; /* when line is broken after this
348385 * word */
349386
350387 core::style::Style *style;
351388 core::style::Style *spaceStyle; /* initially the same as of the word,
352389 later set by a_Dw_page_add_space */
390
391 // These two are used rarely, so there is perhaps a way to store
392 // them which is consuming less memory.
393 WordImgRenderer *wordImgRenderer;
394 SpaceImgRenderer *spaceImgRenderer;
353395 };
354396
355397 void printWordShort (Word *word);
422464 * details. Set from preferences.
423465 */
424466 static int penalties[PENALTY_NUM][2];
467
468 /**
469 * ...
470 */
471 static int stretchabilityFactor;
425472
426473 bool limitTextWidth; /* from preferences */
427474
478525
479526 Word *addWord (int width, int ascent, int descent, short flags,
480527 core::style::Style *style);
481 void fillWord (Word *word, int width, int ascent, int descent,
528 void initWord (int wordNo);
529 void removeWordImgRenderer (int wordNo);
530 void setWordImgRenderer (int wordNo);
531 void removeSpaceImgRenderer (int wordNo);
532 void setSpaceImgRenderer (int wordNo);
533 void fillWord (int wordNo, int width, int ascent, int descent,
482534 short flags, core::style::Style *style);
483 void fillSpace (Word *word, core::style::Style *style);
535 void fillSpace (int wordNo, core::style::Style *style);
484536 void setBreakOption (Word *word, core::style::Style *style,
485 int breakPenalty1, int breakPenalty2);
537 int breakPenalty1, int breakPenalty2, bool forceBreak);
538 bool isBreakAllowed (Word *word);
486539 int textWidth (const char *text, int start, int len,
487540 core::style::Style *style, bool isStart, bool isEnd);
488541 void calcTextSize (const char *text, size_t len, core::style::Style *style,
564617 void accumulateWordExtremes (int firstWord, int lastWord,
565618 int *maxOfMinWidth, int *sumOfMaxWidth);
566619 void processWord (int wordIndex);
567 virtual void wordWrap (int wordIndex, bool wrapAll);
620 virtual bool wordWrap (int wordIndex, bool wrapAll);
621 int searchMinBap (int firstWord, int lastWordm, int penaltyIndex,
622 bool correctAtEnd);
623 int considerHyphenation (int firstIndex, int breakPos);
624 bool isHyphenationCandidate (Word *word);
625
568626 void handleWordExtremes (int wordIndex);
569627 void correctLastWordExtremes ();
570628
571 static int getShrinkability(struct Word *word);
572 static int getStretchability(struct Word *word);
629 static int getSpaceShrinkability(struct Word *word);
630 static int getSpaceStretchability(struct Word *word);
631 static int getLineShrinkability(Word *lastWord);
632 static int getLineStretchability(Word *lastWord);
573633 int hyphenateWord (int wordIndex);
574634 void accumulateWordForLine (int lineIndex, int wordIndex);
575635 void accumulateWordData (int wordIndex);
612672 static void setPenaltyEmDashLeft (int penaltyLeftEmDash);
613673 static void setPenaltyEmDashRight (int penaltyRightEmDash);
614674 static void setPenaltyEmDashRight2 (int penaltyRightEmDash2);
675 static void setStretchabilityFactor (int stretchabilityFactor);
615676
616677 Textblock(bool limitTextWidth);
617678 ~Textblock();
628689 void addWidget (core::Widget *widget, core::style::Style *style);
629690 bool addAnchor (const char *name, core::style::Style *style);
630691 void addSpace (core::style::Style *style);
631 void addBreakOption (core::style::Style *style);
692 void addBreakOption (core::style::Style *style, bool forceBreak);
632693 void addParbreak (int space, core::style::Style *style);
633694 void addLinebreak (core::style::Style *style);
634695
9090 badness = ratio * ratio * ratio;
9191 }
9292 }
93 } else { // if (word->totalWidth > availWidth)
93 } else { // if (totalWidth > availWidth)
9494 if (totalShrinkability == 0)
9595 badnessState = TOO_TIGHT;
9696 else {
273273 printWordWithFlags (word);
274274
275275 printf (" [%d / %d + %d - %d => %d + %d - %d] => ",
276 word->size.width, word->origSpace, getStretchability(word),
277 getShrinkability(word), word->totalWidth, word->totalStretchability,
278 word->totalShrinkability);
276 word->size.width, word->origSpace, getSpaceStretchability(word),
277 getSpaceShrinkability(word), word->totalWidth,
278 word->totalSpaceStretchability, word->totalSpaceShrinkability);
279279 word->badnessAndPenalty.print ();
280280 }
281281
290290 * values. */
291291
292292 if (diff > 0) {
293 int stretchabilitySum = 0;
293 int spaceStretchabilitySum = 0;
294294 for (int i = line->firstWord; i < line->lastWord; i++)
295 stretchabilitySum += getStretchability(words->getRef(i));
296
297 if (stretchabilitySum > 0) {
298 int stretchabilityCum = 0;
295 spaceStretchabilitySum += getSpaceStretchability(words->getRef(i));
296
297 if (spaceStretchabilitySum > 0) {
298 int spaceStretchabilityCum = 0;
299299 int spaceDiffCum = 0;
300300 for (int i = line->firstWord; i < line->lastWord; i++) {
301301 Word *word = words->getRef (i);
302 stretchabilityCum += getStretchability(word);
302 spaceStretchabilityCum += getSpaceStretchability(word);
303303 int spaceDiff =
304 stretchabilityCum * diff / stretchabilitySum - spaceDiffCum;
304 spaceStretchabilityCum * diff / spaceStretchabilitySum
305 - spaceDiffCum;
305306 spaceDiffCum += spaceDiff;
306307
307308 PRINTF (" %d (of %d): diff = %d\n", i, words->size (),
311312 }
312313 }
313314 } else if (diff < 0) {
314 int shrinkabilitySum = 0;
315 int spaceShrinkabilitySum = 0;
315316 for (int i = line->firstWord; i < line->lastWord; i++)
316 shrinkabilitySum += getShrinkability(words->getRef(i));
317
318 if (shrinkabilitySum > 0) {
319 int shrinkabilityCum = 0;
317 spaceShrinkabilitySum += getSpaceShrinkability(words->getRef(i));
318
319 if (spaceShrinkabilitySum > 0) {
320 int spaceShrinkabilityCum = 0;
320321 int spaceDiffCum = 0;
321322 for (int i = line->firstWord; i < line->lastWord; i++) {
322323 Word *word = words->getRef (i);
323 shrinkabilityCum += getShrinkability(word);
324 spaceShrinkabilityCum += getSpaceShrinkability(word);
324325 int spaceDiff =
325 shrinkabilityCum * diff / shrinkabilitySum - spaceDiffCum;
326 spaceShrinkabilityCum * diff / spaceShrinkabilitySum
327 - spaceDiffCum;
326328 spaceDiffCum += spaceDiff;
327329
328330 word->effSpace = word->origSpace + spaceDiff;
417419 //printf (": ");
418420 //words->getRef(line->lastWord)->badnessAndPenalty.print ();
419421 //printf ("\n");
422
423 int xWidget = lineXOffsetWidget(line);
424 for (int i = firstWord; i <= lastWord; i++) {
425 Word *word = words->getRef (i);
426 if (word->wordImgRenderer)
427 word->wordImgRenderer->setData (xWidget, lines->size () - 1);
428 if (word->spaceImgRenderer)
429 word->spaceImgRenderer->setData (xWidget, lines->size () - 1);
430 xWidget += word->size.width + word->effSpace;
431 }
420432
421433 return line;
422434 }
461473
462474 void Textblock::processWord (int wordIndex)
463475 {
464 wordWrap (wordIndex, false);
476 bool wordListChanged = wordWrap (wordIndex, false);
477
478 if (wordListChanged) {
479 // If wordWrap has called hyphenateWord here, this has an effect
480 // on the call of handleWordExtremes. To avoid adding values
481 // more than one time (original un-hyphenated word, plus all
482 // parts of the hyphenated word, except the first one), the
483 // whole paragraph is recalculated again.
484
485 int firstWord;
486 if (paragraphs->size() > 0) {
487 firstWord = paragraphs->getLastRef()->firstWord;
488 paragraphs->setSize (paragraphs->size() - 1);
489 } else
490 firstWord = 0;
491
492 for (int i = firstWord; i <= wordIndex - 1; i++)
493 handleWordExtremes (i);
494 }
495
465496 handleWordExtremes (wordIndex);
466497 }
467498
469500 * This method is called in two cases: (i) when a word is added
470501 * (ii) when a page has to be (partially) rewrapped. It does word wrap,
471502 * and adds new lines if necessary.
503 *
504 * Returns whether the words list has changed at, or before, the word
505 * index.
472506 */
473 void Textblock::wordWrap (int wordIndex, bool wrapAll)
507 bool Textblock::wordWrap (int wordIndex, bool wrapAll)
474508 {
475509 PRINTF ("[%p] WORD_WRAP (%d, %s)\n",
476510 this, wordIndex, wrapAll ? "true" : "false");
477511
478512 Word *word;
513 bool wordListChanged = false;
479514
480515 if (!wrapAll)
481516 removeTemporaryLines ();
545580
546581 bool lineAdded;
547582 do {
548 PRINTF (" searching from %d to %d\n", firstIndex, searchUntil);
549
550 int breakPos = -1;
551 for (int i = firstIndex; i <= searchUntil; i++) {
552 Word *w = words->getRef(i);
553
554 //printf (" %d (of %d): ", i, words->size ());
555 //printWord (w);
556 //printf ("\n");
557
558 if (breakPos == -1 ||
559 w->badnessAndPenalty.compareTo
560 (penaltyIndex,
561 &words->getRef(breakPos)->badnessAndPenalty) <= 0)
562 // "<=" instead of "<" in the next lines tends to result in
563 // more words per line -- theoretically. Practically, the
564 // case "==" will never occur.
565 breakPos = i;
566 }
567
568 PRINTF (" breakPos = %d\n", breakPos);
569
570 if (wrapAll && searchUntil == words->size () - 1) {
571 // Since no break and no space is added, the last word
572 // will have a penalty of inf. Actually, it should be
573 // less, since it is the last word. However, since more
574 // words may follow, the penalty is not changesd, but
575 // here, the search is corrected (maybe only
576 // temporary).
577
578 // (Notice that it was once (temporally) set to -inf,
579 // not 0, but this will make e.g. test/table-1.html not
580 // work.)
581 Word *lastWord = words->getRef (searchUntil);
582 BadnessAndPenalty correctedBap = lastWord->badnessAndPenalty;
583 correctedBap.setPenalty (0);
584 if (correctedBap.compareTo
585 (penaltyIndex,
586 &words->getRef(breakPos)->badnessAndPenalty) <= 0) {
587 breakPos = searchUntil;
588 PRINTF (" corrected: breakPos = %d\n", breakPos);
589 }
590 }
591
592 int hyphenatedWord = -1;
593 Word *word1 = words->getRef(breakPos);
594 PRINTF ("[%p] line (broken at word %d): ", this, breakPos);
595 //word1->badnessAndPenalty.print ();
596 PRINTF ("\n");
597
598 if (word1->badnessAndPenalty.lineTight () &&
599 (word1->flags & Word::CAN_BE_HYPHENATED) &&
600 word1->style->x_lang[0] &&
601 word1->content.type == core::Content::TEXT &&
602 Hyphenator::isHyphenationCandidate (word1->content.text))
603 hyphenatedWord = breakPos;
604
605 if (word1->badnessAndPenalty.lineLoose () &&
606 breakPos + 1 < words->size ()) {
607 Word *word2 = words->getRef(breakPos + 1);
608 if ((word2->flags & Word::CAN_BE_HYPHENATED) &&
609 word2->style->x_lang[0] &&
610 word2->content.type == core::Content::TEXT &&
611 Hyphenator::isHyphenationCandidate (word2->content.text))
612 hyphenatedWord = breakPos + 1;
613 }
614
615 PRINTF ("[%p] breakPos = %d, hyphenatedWord = %d\n",
616 this, breakPos, hyphenatedWord);
583 int breakPos =
584 searchMinBap (firstIndex, searchUntil, penaltyIndex, wrapAll);
585 int hyphenatedWord = considerHyphenation (firstIndex, breakPos);
586
587 //printf ("[%p] breakPos = %d (", this, breakPos);
588 //printWordShort (words->getRef (breakPos));
589 //printf ("), hyphenatedWord = %d", hyphenatedWord);
590 //if (hyphenatedWord != -1) {
591 // printf (" (");
592 // printWordShort (words->getRef (hyphenatedWord));
593 // printf (")");
594 //}
595 //printf ("\n");
617596
618597 if(hyphenatedWord == -1) {
619598 addLine (firstIndex, breakPos, tempNewLine);
639618 // update word pointer as hyphenateWord() can trigger a
640619 // reorganization of the words structure
641620 word = words->getRef (wordIndex);
621
622 if (n > 0 && hyphenatedWord <= wordIndex)
623 wordListChanged = true;
642624 }
643625
644626 PRINTF ("[%p] accumulating again from %d to %d\n",
673655 word->content.widget->parentRef);
674656 }
675657 }
676 }
658
659 return wordListChanged;
660 }
661
662 int Textblock::searchMinBap (int firstWord, int lastWord, int penaltyIndex,
663 bool correctAtEnd)
664 {
665 PRINTF (" searching from %d to %d\n", firstWord, lastWord);
666
667 int pos = -1;
668
669 for (int i = firstWord; i <= lastWord; i++) {
670 Word *w = words->getRef(i);
671
672 //printf (" %d (of %d): ", i, words->size ());
673 //printWord (w);
674 //printf ("\n");
675
676 if (pos == -1 ||
677 w->badnessAndPenalty.compareTo (penaltyIndex,
678 &words->getRef(pos)
679 ->badnessAndPenalty) <= 0)
680 // "<=" instead of "<" in the next lines tends to result in
681 // more words per line -- theoretically. Practically, the
682 // case "==" will never occur.
683 pos = i;
684 }
685
686 PRINTF (" found at %d\n", pos);
687
688 if (correctAtEnd && lastWord == words->size () - 1) {
689 // Since no break and no space is added, the last word will have
690 // a penalty of inf. Actually, it should be less, since it is
691 // the last word. However, since more words may follow, the
692 // penalty is not changed, but here, the search is corrected
693 // (maybe only temporary).
694
695 // (Notice that it was once (temporally) set to -inf, not 0, but
696 // this will make e.g. test/table-1.html not work.)
697 Word *w = words->getRef (lastWord);
698 BadnessAndPenalty correctedBap = w->badnessAndPenalty;
699 correctedBap.setPenalty (0);
700
701 //printf (" corrected bap: ");
702 //correctedBap.print ();
703 //printf ("\n");
704
705 if (correctedBap.compareTo(penaltyIndex,
706 &words->getRef(pos)->badnessAndPenalty) <= 0) {
707 pos = lastWord;
708 PRINTF (" corrected => %d\n", pos);
709 }
710 }
711
712 return pos;
713 }
714
715
716 /**
717 * Suggest a word to hyphenate, when breaking at breakPos is
718 * planned. Return a word index or -1, when hyphenation makes no
719 * sense.
720 */
721 int Textblock::considerHyphenation (int firstIndex, int breakPos)
722 {
723 int hyphenatedWord = -1;
724
725 Word *wordBreak = words->getRef(breakPos);
726 //printf ("[%p] line (broken at word %d): ", this, breakPos);
727 //printWord (wordBreak);
728 //printf ("\n");
729
730 // A tight line: maybe, after hyphenation, some parts of the last
731 // word of this line can be put into the next line.
732 if (wordBreak->badnessAndPenalty.lineTight ()) {
733 // Sometimes, it is not the last word, which must be hyphenated,
734 // but some word before. Here, we search for the first word
735 // which can be hyphenated, *and* makes the line too tight.
736 for (int i = breakPos; i >= firstIndex; i--) {
737 Word *word1 = words->getRef (i);
738 if (word1->badnessAndPenalty.lineTight () &&
739 isHyphenationCandidate (word1))
740 hyphenatedWord = i;
741 }
742 }
743
744 // A loose line: maybe, after hyphenation, some parts of the first
745 // word of the next line can be put into this line.
746 if (wordBreak->badnessAndPenalty.lineLoose () &&
747 breakPos + 1 < words->size ()) {
748 Word *word2 = words->getRef(breakPos + 1);
749 if (isHyphenationCandidate (word2))
750 hyphenatedWord = breakPos + 1;
751 }
752
753 return hyphenatedWord;
754 }
755
756 bool Textblock::isHyphenationCandidate (Word *word)
757 {
758 return (word->flags & Word::CAN_BE_HYPHENATED) &&
759 word->style->x_lang[0] &&
760 isBreakAllowed(word) &&
761 word->content.type == core::Content::TEXT &&
762 Hyphenator::isHyphenationCandidate (word->content.text);
763 }
764
677765
678766 /**
679767 * Counter part to wordWrap(), but for extremes, not size calculation.
793881
794882 PRINTF ("[%p] %d words ...\n", this, words->size ());
795883 words->insert (wordIndex, numBreaks);
884 for (int i = 0; i < numBreaks; i++)
885 initWord (wordIndex + i);
796886 PRINTF ("[%p] ... => %d words\n", this, words->size ());
797887
798888 // Adjust anchor indexes.
804894
805895 for (int i = 0; i < numBreaks + 1; i++) {
806896 Word *w = words->getRef (wordIndex + i);
807
808 fillWord (w, wordSize[i].width, wordSize[i].ascent,
897 fillWord (wordIndex + i, wordSize[i].width, wordSize[i].ascent,
809898 wordSize[i].descent, false, origWord.style);
810899
811900 // TODO There should be a method fillText0.
844933 PRINTF (" [%d] + hyphen\n", wordIndex + i);
845934 } else {
846935 if (origWord.content.space) {
847 fillSpace (w, origWord.spaceStyle);
936 fillSpace (wordIndex + i, origWord.spaceStyle);
848937 PRINTF (" [%d] + space\n", wordIndex + i);
849938 } else {
850939 PRINTF (" [%d] + nothing\n", wordIndex + i);
9571046 if (wordIndex == firstWordOfLine) {
9581047 // first word of the (not neccessarily yet existing) line
9591048 word->totalWidth = word->size.width + word->hyphenWidth;
960 word->totalStretchability = 0;
961 word->totalShrinkability = 0;
1049 word->maxAscent = word->size.ascent;
1050 word->maxDescent = word->size.descent;
1051 word->totalSpaceStretchability = 0;
1052 word->totalSpaceShrinkability = 0;
9621053 } else {
9631054 Word *prevWord = words->getRef (wordIndex - 1);
9641055
9651056 word->totalWidth = prevWord->totalWidth
9661057 + prevWord->origSpace - prevWord->hyphenWidth
9671058 + word->size.width + word->hyphenWidth;
968 word->totalStretchability =
969 prevWord->totalStretchability + getStretchability(prevWord);
970 word->totalShrinkability =
971 prevWord->totalShrinkability + getShrinkability(prevWord);
972 }
973
1059 word->maxAscent = misc::max (prevWord->size.ascent, word->size.ascent);
1060 word->maxDescent = misc::max (prevWord->size.descent, word->size.descent);
1061 word->totalSpaceStretchability =
1062 prevWord->totalSpaceStretchability + getSpaceStretchability(prevWord);
1063 word->totalSpaceShrinkability =
1064 prevWord->totalSpaceShrinkability + getSpaceShrinkability(prevWord);
1065 }
1066
1067 int totalStretchability =
1068 word->totalSpaceStretchability + getLineStretchability (word);
1069 int totalShrinkability =
1070 word->totalSpaceShrinkability + getLineShrinkability (word);
9741071 word->badnessAndPenalty.calcBadness (word->totalWidth, availWidth,
975 word->totalStretchability,
976 word->totalShrinkability);
1072 totalStretchability,
1073 totalShrinkability);
9771074
9781075 //printf (" => ");
9791076 //printWord (word);
10151112 /* don't use text-indent when nesting blocks */
10161113 } else {
10171114 if (core::style::isPerLength(getStyle()->textIndent)) {
1018 indent = misc::roundInt(this->availWidth *
1019 core::style::perLengthVal (getStyle()->textIndent));
1115 indent = core::style::multiplyWithPerLengthRounded
1116 (this->availWidth, getStyle()->textIndent);
10201117 } else {
10211118 indent = core::style::absLengthVal (getStyle()->textIndent);
10221119 }
10501147 break;
10511148 case core::style::TEXT_ALIGN_JUSTIFY: /* see some lines above */
10521149 line->leftOffset = 0;
1053 if(lastWord->content.type != core::Content::BREAK &&
1054 line->lastWord != words->size () - 1) {
1055 PRINTF (" justifyLine => %d vs. %d\n",
1056 lastWord->totalWidth, availWidth);
1150 // Do not justify the last line of a paragraph (which ends on a
1151 // BREAK or with the last word of the page).
1152 if(!(lastWord->content.type == core::Content::BREAK ||
1153 line->lastWord == words->size () - 1) ||
1154 // In some cases, however, an unjustified line would be too wide:
1155 // when the line would be shrunken otherwise. (This solution is
1156 // far from perfect, but a better solution would make changes in
1157 // the line breaking algorithm necessary.)
1158 availWidth < lastWord->totalWidth)
10571159 justifyLine (line, availWidth - lastWord->totalWidth);
1058 }
10591160 break;
10601161 case core::style::TEXT_ALIGN_RIGHT:
10611162 line->leftOffset = availWidth - lastWord->totalWidth;
11841285 lines->setSize (nonTemporaryLines);
11851286 }
11861287
1187 int Textblock::getShrinkability(struct Word *word)
1288 int Textblock::getSpaceShrinkability(struct Word *word)
11881289 {
11891290 if (word->spaceStyle->textAlign == core::style::TEXT_ALIGN_JUSTIFY)
11901291 return word->origSpace / 3;
11921293 return 0;
11931294 }
11941295
1195 int Textblock::getStretchability(struct Word *word)
1196 {
1197 return word->origSpace / 2;
1296 int Textblock::getSpaceStretchability(struct Word *word)
1297 {
1298 if (word->spaceStyle->textAlign == core::style::TEXT_ALIGN_JUSTIFY)
1299 return word->origSpace / 2;
1300 else
1301 return 0;
1302
1303 // Alternative: return word->origSpace / 2;
1304 }
1305
1306 int Textblock::getLineShrinkability(Word *lastWord)
1307 {
1308 return 0;
1309 }
1310
1311 int Textblock::getLineStretchability(Word *lastWord)
1312 {
1313 if (lastWord->spaceStyle->textAlign == core::style::TEXT_ALIGN_JUSTIFY)
1314 return 0;
1315 else
1316 return stretchabilityFactor * (lastWord->maxAscent
1317 + lastWord->maxDescent) / 100;
1318
1319 // Alternative: return 0;
11981320 }
11991321
12001322 } // namespace dw
1919
2020
2121 #include "core.hh"
22 #include "../lout/debug.hh"
2223
2324 #include <stdio.h>
2425
3334
3435 Embed::Embed(Resource *resource)
3536 {
37 DBG_OBJ_CREATE ("dw::core::ui::Embed");
3638 registerName ("dw::core::ui::Embed", &CLASS_ID);
3739 this->resource = resource;
3840 resource->setEmbed (this);
4143 Embed::~Embed()
4244 {
4345 delete resource;
46 DBG_OBJ_DELETE ();
4447 }
4548
4649 void Embed::sizeRequestImpl (Requisition *requisition)
3131
3232 // ----------------------------------------------------------------------
3333
34 bool Widget::WidgetImgRenderer::readyToDraw ()
35 {
36 return widget->wasAllocated ();
37 }
38
39 void Widget::WidgetImgRenderer::getBgArea (int *x, int *y, int *width,
40 int *height)
41 {
42 widget->getPaddingArea (x, y, width, height);
43 }
44
45 void Widget::WidgetImgRenderer::getRefArea (int *xRef, int *yRef, int *widthRef,
46 int *heightRef)
47 {
48 widget->getPaddingArea (xRef, yRef, widthRef, heightRef);
49 }
50
51 style::Style *Widget::WidgetImgRenderer::getStyle ()
52 {
53 return widget->getStyle ();
54 }
55
56 void Widget::WidgetImgRenderer::draw (int x, int y, int width, int height)
57 {
58 widget->queueDrawArea (x - widget->allocation.x, y - widget->allocation.y,
59 width, height);
60 }
61
62 // ----------------------------------------------------------------------
63
3464 int Widget::CLASS_ID = -1;
3565
3666 Widget::Widget ()
3767 {
68 DBG_OBJ_CREATE ("dw::core::Widget");
3869 registerName ("dw::core::Widget", &CLASS_ID);
3970
4071 flags = (Flags)(NEEDS_RESIZE | EXTREMES_CHANGED | HAS_CONTENTS);
5485
5586 deleteCallbackData = NULL;
5687 deleteCallbackFunc = NULL;
88
89 widgetImgRenderer = NULL;
5790 }
5891
5992 Widget::~Widget ()
6093 {
6194 if (deleteCallbackFunc)
6295 deleteCallbackFunc (deleteCallbackData);
96
97 if (widgetImgRenderer) {
98 if (style && style->backgroundImage)
99 style->backgroundImage->removeExternalImgRenderer (widgetImgRenderer);
100 delete widgetImgRenderer;
101 }
63102
64103 if (style)
65104 style->unref ();
68107 parent->removeChild (this);
69108 else
70109 layout->removeWidget ();
110
111 DBG_OBJ_DELETE ();
71112 }
72113
73114
107148 if (!buttonSensitiveSet)
108149 buttonSensitive = parent->buttonSensitive;
109150
110 //DBG_OBJ_ASSOC (widget, parent);
151 DBG_OBJ_ASSOC_PARENT (parent);
152
111153 //printf ("The %s %p becomes a child of the %s %p\n",
112154 // getClassName(), this, parent->getClassName(), parent);
113155 }
173215 this->requisition = *requisition;
174216 unsetFlags (NEEDS_RESIZE);
175217
176 DBG_OBJ_SET_NUM (this, "requisition->width", requisition->width);
177 DBG_OBJ_SET_NUM (this, "requisition->ascent", requisition->ascent);
178 DBG_OBJ_SET_NUM (this, "requisition->descent", requisition->descent);
218 DBG_OBJ_SET_NUM ("requisition.width", requisition->width);
219 DBG_OBJ_SET_NUM ("requisition.ascent", requisition->ascent);
220 DBG_OBJ_SET_NUM ("requisition.descent", requisition->descent);
179221 } else
180222 *requisition = this->requisition;
181223 }
190232 this->extremes = *extremes;
191233 unsetFlags (EXTREMES_CHANGED);
192234
193 DBG_OBJ_SET_NUM (this, "extremes->minWidth", extremes->minWidth);
194 DBG_OBJ_SET_NUM (this, "extremes->maxWidth", extremes->maxWidth);
235 DBG_OBJ_SET_NUM ("extremes.minWidth", extremes->minWidth);
236 DBG_OBJ_SET_NUM ("extremes.maxWidth", extremes->maxWidth);
195237 } else
196238 *extremes = this->extremes;
197239 }
234276
235277 resizeDrawImpl ();
236278
237 DBG_OBJ_SET_NUM (this, "allocation.x", this->allocation.x);
238 DBG_OBJ_SET_NUM (this, "allocation.y", this->allocation.y);
239 DBG_OBJ_SET_NUM (this, "allocation.width", this->allocation.width);
240 DBG_OBJ_SET_NUM (this, "allocation.ascent", this->allocation.ascent);
241 DBG_OBJ_SET_NUM (this, "allocation.descent", this->allocation.descent);
279 DBG_OBJ_SET_NUM ("allocation.x", this->allocation.x);
280 DBG_OBJ_SET_NUM ("allocation.y", this->allocation.y);
281 DBG_OBJ_SET_NUM ("allocation.width", this->allocation.width);
282 DBG_OBJ_SET_NUM ("allocation.ascent", this->allocation.ascent);
283 DBG_OBJ_SET_NUM ("allocation.descent", this->allocation.descent);
242284 }
243285
244286 /*unsetFlags (NEEDS_RESIZE);*/
279321 void Widget::setStyle (style::Style *style)
280322 {
281323 bool sizeChanged;
324
325 if (widgetImgRenderer && this->style && this->style->backgroundImage)
326 this->style->backgroundImage->removeExternalImgRenderer
327 (widgetImgRenderer);
282328
283329 style->ref ();
284330
290336
291337 this->style = style;
292338
339 DBG_OBJ_ASSOC_CHILD (style);
340
341 if (style && style->backgroundImage) {
342 // Create instance of WidgetImgRenderer when needed. Until this
343 // widget is deleted, "widgetImgRenderer" will be kept, since it
344 // is not specific to the style, but only to this widget.
345 if (widgetImgRenderer == NULL)
346 widgetImgRenderer = new WidgetImgRenderer (this);
347 style->backgroundImage->putExternalImgRenderer (widgetImgRenderer);
348 }
349
293350 if (layout != NULL) {
294351 layout->updateCursor ();
295352 }
339396 void Widget::drawBox (View *view, style::Style *style, Rectangle *area,
340397 int x, int y, int width, int height, bool inverse)
341398 {
342 Rectangle viewArea;
343 viewArea.x = area->x + allocation.x;
344 viewArea.y = area->y + allocation.y;
345 viewArea.width = area->width;
346 viewArea.height = area->height;
347
348 style::drawBorder (view, &viewArea, allocation.x + x, allocation.y + y,
399 Rectangle canvasArea;
400 canvasArea.x = area->x + allocation.x;
401 canvasArea.y = area->y + allocation.y;
402 canvasArea.width = area->width;
403 canvasArea.height = area->height;
404
405 style::drawBorder (view, layout, &canvasArea,
406 allocation.x + x, allocation.y + y,
349407 width, height, style, inverse);
350408
351 /** \todo Background images? */
352 if (style->backgroundColor)
353 style::drawBackground (view, &viewArea,
354 allocation.x + x, allocation.y + y, width, height,
355 style, inverse);
409 // This method is used for inline elements, where the CSS 2 specification
410 // does not define what here is called "reference area". To make it look
411 // smoothly, the widget padding box is used.
412
413 int xPad, yPad, widthPad, heightPad;
414 getPaddingArea (&xPad, &yPad, &widthPad, &heightPad);
415 style::drawBackground
416 (view, layout, &canvasArea,
417 allocation.x + x + style->margin.left + style->borderWidth.left,
418 allocation.y + y + style->margin.top + style->borderWidth.top,
419 width - style->margin.left - style->borderWidth.left
420 - style->margin.right - style->borderWidth.right,
421 height - style->margin.top - style->borderWidth.top
422 - style->margin.bottom - style->borderWidth.bottom,
423 xPad, yPad, widthPad, heightPad, style, inverse, false);
356424 }
357425
358426 /**
363431 */
364432 void Widget::drawWidgetBox (View *view, Rectangle *area, bool inverse)
365433 {
366 Rectangle viewArea;
367 viewArea.x = area->x + allocation.x;
368 viewArea.y = area->y + allocation.y;
369 viewArea.width = area->width;
370 viewArea.height = area->height;
371
372 style::drawBorder (view, &viewArea, allocation.x, allocation.y,
434 Rectangle canvasArea;
435 canvasArea.x = area->x + allocation.x;
436 canvasArea.y = area->y + allocation.y;
437 canvasArea.width = area->width;
438 canvasArea.height = area->height;
439
440 style::drawBorder (view, layout, &canvasArea, allocation.x, allocation.y,
373441 allocation.width, getHeight (), style, inverse);
374442
375 /** \todo Adjust following comment from the old dw sources. */
376 /*
377 * - Toplevel widget background colors are set as viewport
378 * background color. This is not crucial for the rendering, but
379 * looks a bit nicer when scrolling. Furthermore, the viewport
380 * does anything else in this case.
381 *
382 * - Since widgets are always drawn from top to bottom, it is
383 * *not* necessary to draw the background if
384 * widget->style->background_color is NULL (shining through).
385 */
386 /** \todo Background images? */
387
388 if (style->backgroundColor &&
389 (parent || layout->getBgColor () != style->backgroundColor))
390 style::drawBackground (view, &viewArea, allocation.x, allocation.y,
391 allocation.width, getHeight (), style, inverse);
443 int xPad, yPad, widthPad, heightPad;
444 getPaddingArea (&xPad, &yPad, &widthPad, &heightPad);
445 style::drawBackground (view, layout, &canvasArea,
446 xPad, yPad, widthPad, heightPad,
447 xPad, yPad, widthPad, heightPad,
448 style, inverse, parent == NULL);
392449 }
393450
394451 /*
532589 x + allocation.x, y + allocation.y, width, height);
533590 }
534591
592 /**
593 * \brief Return the padding area (content plus padding).
594 *
595 * Used as "reference area" (ee comment of "style::drawBackground")
596 * for backgrounds.
597 */
598 void Widget::getPaddingArea (int *xPad, int *yPad, int *widthPad,
599 int *heightPad)
600 {
601 *xPad = allocation.x + style->margin.left + style->borderWidth.left;
602 *yPad = allocation.y + style->margin.top + style->borderWidth.top;
603 *widthPad = allocation.width - style->margin.left - style->borderWidth.left
604 - style->margin.right - style->borderWidth.right;
605 *heightPad = getHeight () - style->margin.top - style->borderWidth.top
606 - style->margin.bottom - style->borderWidth.bottom;
607 }
608
535609 void Widget::getExtremesImpl (Extremes *extremes)
536610 {
537611 /* Simply return the requisition width */
7272 */
7373 BLOCK_LEVEL = 1 << 6,
7474 };
75
76 /**
77 * \brief Implementation which represents the whole widget.
78 *
79 * The only instance is set created needed.
80 */
81 class WidgetImgRenderer: public style::StyleImage::ExternalWidgetImgRenderer
82 {
83 private:
84 Widget *widget;
85
86 public:
87 inline WidgetImgRenderer (Widget *widget) { this->widget = widget; }
88
89 bool readyToDraw ();
90 void getBgArea (int *x, int *y, int *width, int *height);
91 void getRefArea (int *xRef, int *yRef, int *widthRef, int *heightRef);
92 style::Style *getStyle ();
93 void draw (int x, int y, int width, int height);
94 };
95
96 WidgetImgRenderer *widgetImgRenderer;
7597
7698 private:
7799 /**
288310 void scrollTo (HPosition hpos, VPosition vpos,
289311 int x, int y, int width, int height);
290312
313 void getPaddingArea (int *xPad, int *yPad, int *widthPad, int *heightPad);
314
291315 /**
292316 * \brief Return an iterator for this widget.
293317 *
00 #!/bin/sh
11 # install - install a program, script, or datafile
22
3 scriptversion=2011-01-19.21; # UTC
3 scriptversion=2011-11-20.07; # UTC
44
55 # This originates from X11R5 (mit/util/scripts/install.sh), which was
66 # later released in X11R6 (xc/config/util/install.sh) with the
3434 # FSF changes to this file are in the public domain.
3535 #
3636 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
37 # 'make' implicit rules from creating a file called install from it
3838 # when there is no Makefile.
3939 #
4040 # This script is compatible with the BSD install script, but was written
155155 -s) stripcmd=$stripprog;;
156156
157157 -t) dst_arg=$2
158 # Protect names problematic for `test' and other utilities.
158 # Protect names problematic for 'test' and other utilities.
159159 case $dst_arg in
160160 -* | [=\(\)!]) dst_arg=./$dst_arg;;
161161 esac
189189 fi
190190 shift # arg
191191 dst_arg=$arg
192 # Protect names problematic for `test' and other utilities.
192 # Protect names problematic for 'test' and other utilities.
193193 case $dst_arg in
194194 -* | [=\(\)!]) dst_arg=./$dst_arg;;
195195 esac
201201 echo "$0: no input file specified." >&2
202202 exit 1
203203 fi
204 # It's OK to call `install-sh -d' without argument.
204 # It's OK to call 'install-sh -d' without argument.
205205 # This can happen when creating conditional directories.
206206 exit 0
207207 fi
239239
240240 for src
241241 do
242 # Protect names problematic for `test' and other utilities.
242 # Protect names problematic for 'test' and other utilities.
243243 case $src in
244244 -* | [=\(\)!]) src=./$src;;
245245 esac
353353 if test -z "$dir_arg" || {
354354 # Check for POSIX incompatibilities with -m.
355355 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
356 # other-writeable bit of parent directory when it shouldn't.
356 # other-writable bit of parent directory when it shouldn't.
357357 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
358358 ls_ld_tmpdir=`ls -ld "$tmpdir"`
359359 case $ls_ld_tmpdir in
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5279 host_triplet = @host@
5380 target_triplet = @target@
5481 subdir = lout
55 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp
5684 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5785 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
5886 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6492 LIBRARIES = $(noinst_LIBRARIES)
6593 AR = ar
6694 ARFLAGS = cru
95 AM_V_AR = $(am__v_AR_@AM_V@)
96 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
97 am__v_AR_0 = @echo " AR " $@;
98 am__v_AR_1 =
6799 liblout_a_AR = $(AR) $(ARFLAGS)
68100 liblout_a_LIBADD =
69101 am_liblout_a_OBJECTS = container.$(OBJEXT) identity.$(OBJEXT) \
70102 misc.$(OBJEXT) object.$(OBJEXT) signal.$(OBJEXT) \
71103 unicode.$(OBJEXT)
72104 liblout_a_OBJECTS = $(am_liblout_a_OBJECTS)
105 AM_V_P = $(am__v_P_@AM_V@)
106 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
107 am__v_P_0 = false
108 am__v_P_1 = :
109 AM_V_GEN = $(am__v_GEN_@AM_V@)
110 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
111 am__v_GEN_0 = @echo " GEN " $@;
112 am__v_GEN_1 =
113 AM_V_at = $(am__v_at_@AM_V@)
114 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
115 am__v_at_0 = @
116 am__v_at_1 =
73117 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
74118 depcomp = $(SHELL) $(top_srcdir)/depcomp
75119 am__depfiles_maybe = depfiles
76120 am__mv = mv -f
77121 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
78122 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
123 AM_V_CXX = $(am__v_CXX_@AM_V@)
124 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
125 am__v_CXX_0 = @echo " CXX " $@;
126 am__v_CXX_1 =
79127 CXXLD = $(CXX)
80128 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
81129 -o $@
130 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
131 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
132 am__v_CXXLD_0 = @echo " CXXLD " $@;
133 am__v_CXXLD_1 =
82134 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
83135 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
136 AM_V_CC = $(am__v_CC_@AM_V@)
137 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
138 am__v_CC_0 = @echo " CC " $@;
139 am__v_CC_1 =
84140 CCLD = $(CC)
85141 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
142 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
143 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
144 am__v_CCLD_0 = @echo " CCLD " $@;
145 am__v_CCLD_1 =
86146 SOURCES = $(liblout_a_SOURCES)
87147 DIST_SOURCES = $(liblout_a_SOURCES)
88148 am__can_run_installinfo = \
90150 n|no|NO) false;; \
91151 *) (install-info --version) >/dev/null 2>&1;; \
92152 esac
153 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
154 # Read a list of newline-separated strings from the standard input,
155 # and print each of them once, without duplicates. Input order is
156 # *not* preserved.
157 am__uniquify_input = $(AWK) '\
158 BEGIN { nonempty = 0; } \
159 { items[$$0] = 1; nonempty = 1; } \
160 END { if (nonempty) { for (i in items) print i; }; } \
161 '
162 # Make sure the list of sources is unique. This is necessary because,
163 # e.g., the same source file might be shared among _SOURCES variables
164 # for different programs/libraries.
165 am__define_uniq_tagged_files = \
166 list='$(am__tagged_files)'; \
167 unique=`for i in $$list; do \
168 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
169 done | $(am__uniquify_input)`
93170 ETAGS = etags
94171 CTAGS = ctags
95172 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
96173 ACLOCAL = @ACLOCAL@
97174 AMTAR = @AMTAR@
175 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
98176 AUTOCONF = @AUTOCONF@
99177 AUTOHEADER = @AUTOHEADER@
100178 AUTOMAKE = @AUTOMAKE@
136214 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
137215 LIBS = @LIBS@
138216 LIBSSL_LIBS = @LIBSSL_LIBS@
217 LIBX11_LIBS = @LIBX11_LIBS@
139218 LIBZ_LIBS = @LIBZ_LIBS@
140219 LTLIBOBJS = @LTLIBOBJS@
141220 MAKEINFO = @MAKEINFO@
266345
267346 clean-noinstLIBRARIES:
268347 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
348
269349 liblout.a: $(liblout_a_OBJECTS) $(liblout_a_DEPENDENCIES) $(EXTRA_liblout_a_DEPENDENCIES)
270 -rm -f liblout.a
271 $(liblout_a_AR) liblout.a $(liblout_a_OBJECTS) $(liblout_a_LIBADD)
272 $(RANLIB) liblout.a
350 $(AM_V_at)-rm -f liblout.a
351 $(AM_V_AR)$(liblout_a_AR) liblout.a $(liblout_a_OBJECTS) $(liblout_a_LIBADD)
352 $(AM_V_at)$(RANLIB) liblout.a
273353
274354 mostlyclean-compile:
275355 -rm -f *.$(OBJEXT)
285365 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode.Po@am__quote@
286366
287367 .cc.o:
288 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
289 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
290 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
368 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
369 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
370 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
291371 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
292 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
372 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
293373
294374 .cc.obj:
295 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
296 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
297 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
375 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
376 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
377 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
298378 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
299 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
300
301 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
302 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
303 unique=`for i in $$list; do \
304 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
305 done | \
306 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
307 END { if (nonempty) { for (i in files) print i; }; }'`; \
308 mkid -fID $$unique
309 tags: TAGS
310
311 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
312 $(TAGS_FILES) $(LISP)
379 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
380
381 ID: $(am__tagged_files)
382 $(am__define_uniq_tagged_files); mkid -fID $$unique
383 tags: tags-am
384 TAGS: tags
385
386 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
313387 set x; \
314388 here=`pwd`; \
315 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
316 unique=`for i in $$list; do \
317 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
318 done | \
319 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
320 END { if (nonempty) { for (i in files) print i; }; }'`; \
389 $(am__define_uniq_tagged_files); \
321390 shift; \
322391 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
323392 test -n "$$unique" || unique=$$empty_fix; \
329398 $$unique; \
330399 fi; \
331400 fi
332 ctags: CTAGS
333 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
334 $(TAGS_FILES) $(LISP)
335 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
336 unique=`for i in $$list; do \
337 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
338 done | \
339 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
340 END { if (nonempty) { for (i in files) print i; }; }'`; \
401 ctags: ctags-am
402
403 CTAGS: ctags
404 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
405 $(am__define_uniq_tagged_files); \
341406 test -z "$(CTAGS_ARGS)$$unique" \
342407 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
343408 $$unique
346411 here=`$(am__cd) $(top_builddir) && pwd` \
347412 && $(am__cd) $(top_srcdir) \
348413 && gtags -i $(GTAGS_ARGS) "$$here"
414 cscopelist: cscopelist-am
415
416 cscopelist-am: $(am__tagged_files)
417 list='$(am__tagged_files)'; \
418 case "$(srcdir)" in \
419 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
420 *) sdir=$(subdir)/$(srcdir) ;; \
421 esac; \
422 for i in $$list; do \
423 if test -f "$$i"; then \
424 echo "$(subdir)/$$i"; \
425 else \
426 echo "$$sdir/$$i"; \
427 fi; \
428 done >> $(top_builddir)/cscope.files
349429
350430 distclean-tags:
351431 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
485565
486566 .MAKE: install-am install-strip
487567
488 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
489 clean-noinstLIBRARIES ctags distclean distclean-compile \
490 distclean-generic distclean-tags distdir dvi dvi-am html \
491 html-am info info-am install install-am install-data \
492 install-data-am install-dvi install-dvi-am install-exec \
493 install-exec-am install-html install-html-am install-info \
494 install-info-am install-man install-pdf install-pdf-am \
495 install-ps install-ps-am install-strip installcheck \
496 installcheck-am installdirs maintainer-clean \
568 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
569 clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
570 distclean-compile distclean-generic distclean-tags distdir dvi \
571 dvi-am html html-am info info-am install install-am \
572 install-data install-data-am install-dvi install-dvi-am \
573 install-exec install-exec-am install-html install-html-am \
574 install-info install-info-am install-man install-pdf \
575 install-pdf-am install-ps install-ps-am install-strip \
576 installcheck installcheck-am installdirs maintainer-clean \
497577 maintainer-clean-generic mostlyclean mostlyclean-compile \
498 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
578 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
499579 uninstall-am
500580
501581
207207 // new implementation.
208208 if (numElements == 0)
209209 return mustExist ? -1 : 0;
210
210
211211 int high = numElements - 1, low = 0;
212212
213213 while (true) {
229229 low = index + 1;
230230 }
231231 }
232
232
233233
234234 /*
235235 void *result = ::bsearch (&key, array, numElements, sizeof (Object*),
411411 }
412412 }
413413
414 HashSet::Node *HashSet::findNode(Object *object)
414 HashSet::Node *HashSet::findNode(Object *object) const
415415 {
416416 int h = calcHashValue(object);
417417 for (Node *node = table[h]; node; node = node->next) {
445445 insertNode (object);
446446 }
447447
448 bool HashSet::contains(Object *object)
448 bool HashSet::contains(Object *object) const
449449 {
450450 int h = calcHashValue(object);
451451 for (Node *n = table[h]; n; n = n->next) {
561561 PRINTF ("- deleting value: %s\n", value->toString());
562562 delete value;
563563 }
564 }
564 }
565565 }
566566 }
567567 }
595595 node->object->intoStringBuffer(sb);
596596
597597 sb->append(" => ");
598
598
599599 Object *value = ((KeyValuePair*)node)->value;
600600 if (value)
601601 value->intoStringBuffer(sb);
615615 node->value = value;
616616 }
617617
618 Object *HashTable::get(Object *key)
618 Object *HashTable::get(Object *key) const
619619 {
620620 Node *node = findNode(key);
621621 if (node)
113113 private:
114114 Vector *vector;
115115 int index;
116
116
117117 public:
118118 VectorIterator(Vector *vector) { this->vector = vector; index = -1; }
119119 bool hasNext();
140140 { insert (newElement, bsearch (newElement, false)); }
141141
142142 void remove(int pos);
143 inline object::Object *get(int pos)
143 inline object::Object *get(int pos) const
144144 { return (pos >= 0 && pos < numElements) ? array[pos] : NULL; }
145145 inline int size() { return numElements; }
146146 void clear();
195195 { return remove0(element, true, false); }
196196 inline bool detachRef(object::Object *element)
197197 { return remove0(element, false, true); }
198 inline int size() { return numElements; }
199 inline bool isEmpty() { return numElements == 0; }
200 inline object::Object *getFirst() { return first->object; }
201 inline object::Object *getLast() { return last->object; }
198 inline int size() const { return numElements; }
199 inline bool isEmpty() const { return numElements == 0; }
200 inline object::Object *getFirst() const { return first->object; }
201 inline object::Object *getLast() const { return last->object; }
202202 };
203203
204204
220220 int tableSize;
221221 bool ownerOfObjects;
222222
223 inline int calcHashValue(object::Object *object)
223 inline int calcHashValue(object::Object *object) const
224224 {
225225 return abs(object->hashValue()) % tableSize;
226226 }
228228 virtual Node *createNode();
229229 virtual void clearNode(Node *node);
230230
231 Node *findNode(object::Object *object);
231 Node *findNode(object::Object *object) const;
232232 Node *insertNode(object::Object *object);
233233
234234 AbstractIterator* createIterator();
254254 ~HashSet();
255255
256256 void put (object::Object *object);
257 bool contains (object::Object *key);
257 bool contains (object::Object *key) const;
258258 bool remove (object::Object *key);
259259 //Object *getReference (object::Object *object);
260260 };
283283 void intoStringBuffer(misc::StringBuffer *sb);
284284
285285 void put (object::Object *key, object::Object *value);
286 object::Object *get (object::Object *key);
286 object::Object *get (object::Object *key) const;
287287 };
288288
289289 /**
327327
328328 void push (object::Object *object);
329329 void pushUnder (object::Object *object);
330 inline object::Object *getTop () { return top ? top->object : NULL; }
330 inline object::Object *getTop () const { return top ? top->object : NULL; }
331331 void pop ();
332 inline int size() { return numElements; }
332 inline int size() const { return numElements; }
333333 };
334334
335335 } // namespace untyped
408408 inline void insertSorted(T *newElement)
409409 { ((untyped::Vector*)this->base)->insertSorted(newElement); }
410410 inline void remove(int pos) { ((untyped::Vector*)this->base)->remove(pos); }
411 inline T *get(int pos)
411 inline T *get(int pos) const
412412 { return (T*)((untyped::Vector*)this->base)->get(pos); }
413 inline int size() { return ((untyped::Vector*)this->base)->size(); }
413 inline int size() const { return ((untyped::Vector*)this->base)->size(); }
414414 inline void clear() { ((untyped::Vector*)this->base)->clear(); }
415415 inline void sort() { ((untyped::Vector*)this->base)->sort(); }
416416 inline int bsearch(T *key, bool mustExist)
437437 inline bool detachRef(T *element) {
438438 return ((untyped::List*)this->base)->detachRef(element); }
439439
440 inline int size() { return ((untyped::List*)this->base)->size(); }
441 inline bool isEmpty()
440 inline int size() const { return ((untyped::List*)this->base)->size(); }
441 inline bool isEmpty() const
442442 { return ((untyped::List*)this->base)->isEmpty(); }
443 inline T *getFirst()
443 inline T *getFirst() const
444444 { return (T*)((untyped::List*)this->base)->getFirst(); }
445 inline T *getLast()
445 inline T *getLast() const
446446 { return (T*)((untyped::List*)this->base)->getLast(); }
447447 };
448448
460460
461461 inline void put(T *object)
462462 { return ((untyped::HashSet*)this->base)->put(object); }
463 inline bool contains(T *object)
463 inline bool contains(T *object) const
464464 { return ((untyped::HashSet*)this->base)->contains(object); }
465465 inline bool remove(T *object)
466466 { return ((untyped::HashSet*)this->base)->remove(object); }
480480
481481 inline void put(K *key, V *value)
482482 { return ((untyped::HashTable*)this->base)->put(key, value); }
483 inline V *get(K *key)
483 inline V *get(K *key) const
484484 { return (V*)((untyped::HashTable*)this->base)->get(key); }
485485 };
486486
497497 ((untyped::Stack*)this->base)->push (object); }
498498 inline void pushUnder (T *object)
499499 { ((untyped::Stack*)this->base)->pushUnder (object); }
500 inline T *getTop ()
500 inline T *getTop () const
501501 { return (T*)((untyped::Stack*)this->base)->getTop (); }
502502 inline void pop () { ((untyped::Stack*)this->base)->pop (); }
503 inline int size() { return ((untyped::Stack*)this->base)->size(); }
503 inline int size() const { return ((untyped::Stack*)this->base)->size(); }
504504 };
505505
506506 } // namespace untyped
2929
3030
3131 /*
32 * Following is experimental, and will be explained soon.
32 * See <http://www.dillo.org/~sgeerken/rtfl/>.
3333 */
3434
3535 #ifdef DBG_RTFL
3737 #include <unistd.h>
3838 #include <stdio.h>
3939
40 #define DBG_MSG(obj, aspect, prio, msg) \
40 // "\n" at the beginning just in case that the previous line is not finished
41 // yet.
42 #define RTFL_PREFIX_FMT "\n[rtfl]%s:%d:%d:"
43 #define RTFL_PREFIX_ARGS __FILE__, __LINE__, getpid()
44
45 #define DBG_OBJ_MSG(aspect, prio, msg) \
4146 D_STMT_START { \
42 printf ("[rtfl]%s:%d:%d:msg:%p:%s:%d:%s\n", \
43 __FILE__, __LINE__, getpid(), obj, aspect, prio, msg); \
47 printf (RTFL_PREFIX_FMT "obj-msg:%p:%s:%d:%s\n", \
48 RTFL_PREFIX_ARGS, this, aspect, prio, msg); \
4449 fflush (stdout); \
4550 } D_STMT_END
4651
47 #define DBG_MSGF(obj, aspect, prio, fmt, ...) \
52 #define DBG_OBJ_MSGF(aspect, prio, fmt, ...) \
4853 D_STMT_START { \
49 printf ("[rtfl]%s:%d:%d:msg:%p:%s:%d:" fmt "\n", \
50 __FILE__, __LINE__, getpid(), obj, aspect, prio, __VA_ARGS__); \
54 printf (RTFL_PREFIX_FMT "obj-msg:%p:%s:%d:" fmt "\n", \
55 RTFL_PREFIX_ARGS, this, aspect, prio, __VA_ARGS__); \
5156 fflush (stdout); \
5257 } D_STMT_END
5358
54 #define DBG_MSG_START(obj) \
59 #define DBG_OBJ_MSG_START() \
5560 D_STMT_START { \
56 printf ("[rtfl]%s:%d:%d:msg-start:%p\n", \
57 __FILE__, __LINE__, getpid(), obj); \
61 printf (RTFL_PREFIX_FMT "obj-msg-start:%p\n", \
62 RTFL_PREFIX_ARGS, this); \
5863 fflush (stdout); \
5964 } D_STMT_END
6065
61 #define DBG_MSG_END(obj) \
66 #define DBG_OBJ_MSG_END() \
6267 D_STMT_START { \
63 printf ("[rtfl]%s:%d:%d:msg-end:%p\n", \
64 __FILE__, __LINE__, getpid(), obj); \
68 printf (RTFL_PREFIX_FMT "obj-msg-end:%p\n", \
69 RTFL_PREFIX_ARGS, this); \
6570 fflush (stdout); \
6671 } D_STMT_END
6772
68 #define DBG_OBJ_CREATE(obj, klass) \
73 #define DBG_OBJ_CREATE(klass) \
6974 D_STMT_START { \
70 printf ("[rtfl]%s:%d:%d:obj-create:%p:%s\n", \
71 __FILE__, __LINE__, getpid(), obj, klass); \
75 printf (RTFL_PREFIX_FMT "obj-create:%p:%s\n", \
76 RTFL_PREFIX_ARGS, this, klass); \
7277 fflush (stdout); \
7378 } D_STMT_END
7479
75 #define DBG_OBJ_ASSOC(child, parent) \
80 #define DBG_OBJ_DELETE() \
7681 D_STMT_START { \
77 printf ("[rtfl]%s:%d:%d:obj-assoc:%p:%p\n", \
78 __FILE__, __LINE__, getpid(), child, parent); \
82 printf (RTFL_PREFIX_FMT "obj-delete:%p\n", \
83 RTFL_PREFIX_ARGS, this); \
7984 fflush (stdout); \
8085 } D_STMT_END
8186
82 #define DBG_OBJ_SET_NUM(obj, var, val) \
87 #define DBG_OBJ_BASECLASS(klass) \
8388 D_STMT_START { \
84 printf ("[rtfl]%s:%d:%d:obj-set:%p:%s:%d\n", \
85 __FILE__, __LINE__, getpid(), obj, var, val); \
89 printf (RTFL_PREFIX_FMT "obj-ident:%p:%p\n", \
90 RTFL_PREFIX_ARGS, this, (klass*)this); \
8691 fflush (stdout); \
8792 } D_STMT_END
8893
89 #define DBG_OBJ_SET_STR(obj, var, val) \
94 #define DBG_OBJ_ASSOC(parent, child) \
9095 D_STMT_START { \
91 printf ("[rtfl]%s:%d:%d:obj-set:%p:%s:%s\n", \
92 __FILE__, __LINE__, getpid(), obj, var, val); \
96 if (child) { \
97 printf (RTFL_PREFIX_FMT "obj-assoc:%p:%p\n", \
98 RTFL_PREFIX_ARGS, parent, child); \
99 fflush (stdout); \
100 } \
101 } D_STMT_END
102
103 #define DBG_OBJ_ASSOC_PARENT(parent) \
104 D_STMT_START { \
105 printf (RTFL_PREFIX_FMT "obj-assoc:%p:%p\n", \
106 RTFL_PREFIX_ARGS, parent, this); \
93107 fflush (stdout); \
94108 } D_STMT_END
95109
96 #define DBG_OBJ_SET_PTR(obj, var, val) \
110 #define DBG_OBJ_ASSOC_CHILD(child) \
97111 D_STMT_START { \
98 printf ("[rtfl]%s:%d:%d:obj-set:%p:%s:%p\n", \
99 __FILE__, __LINE__, getpid(), obj, var, val); \
112 if (child) { \
113 printf (RTFL_PREFIX_FMT "obj-assoc:%p:%p\n", \
114 RTFL_PREFIX_ARGS, this, child); \
115 fflush (stdout); \
116 } \
117 } D_STMT_END
118
119 #define DBG_OBJ_SET_NUM(var, val) \
120 D_STMT_START { \
121 printf (RTFL_PREFIX_FMT "obj-set:%p:%s:%d\n", \
122 RTFL_PREFIX_ARGS, this, var, val); \
100123 fflush (stdout); \
101124 } D_STMT_END
102125
103 #define DBG_OBJ_ARRSET_NUM(obj, var, ind, val) \
126 #define DBG_OBJ_SET_STR(var, val) \
104127 D_STMT_START { \
105 printf ("[rtfl]%s:%d:%d:obj-set:%p:" var ":%d\n", \
106 __FILE__, __LINE__, getpid(), obj, ind, val); \
128 printf (RTFL_PREFIX_FMT "obj-set:%p:%s:%s\n", \
129 RTFL_PREFIX_ARGS, this, var, val); \
107130 fflush (stdout); \
108131 } D_STMT_END
109132
110 #define DBG_OBJ_ARRSET_STR(obj, var, ind, val) \
133 #define DBG_OBJ_SET_PTR(var, val) \
111134 D_STMT_START { \
112 printf ("[rtfl]%s:%d:%d:obj-set:%p:" var ":%s\n", \
113 __FILE__, __LINE__, getpid(), obj, ind, val); \
135 printf (RTFL_PREFIX_FMT "obj-set:%p:%s:%p\n", \
136 RTFL_PREFIX_ARGS, this, var, val); \
114137 fflush (stdout); \
115138 } D_STMT_END
116139
117 #define DBG_OBJ_ARRSET_PTR(obj, var, ind, val) \
140 #define DBG_OBJ_ARRSET_NUM(var, ind, val) \
118141 D_STMT_START { \
119 printf ("[rtfl]%s:%d:%d:obj-set:%p:" var ":%p\n", \
120 __FILE__, __LINE__, getpid(), obj, ind, val); \
142 printf (RTFL_PREFIX_FMT "obj-set:%p:" var ".%d:%d\n", \
143 RTFL_PREFIX_ARGS, this, ind, val); \
121144 fflush (stdout); \
122145 } D_STMT_END
123146
124 #define DBG_OBJ_COLOR(klass, color) \
147 #define DBG_OBJ_ARRSET_STR(var, ind, val) \
125148 D_STMT_START { \
126 printf ("[rtfl]%s:%d:%d:obj-color:%s:%s\n", \
127 __FILE__, __LINE__, getpid(), klass, color); \
149 printf (RTFL_PREFIX_FMT "obj-set:%p:" var ".%d:%s\n", \
150 RTFL_PREFIX_ARGS, this, ind, val); \
151 fflush (stdout); \
152 } D_STMT_END
153
154 #define DBG_OBJ_ARRSET_PTR(var, ind, val) \
155 D_STMT_START { \
156 printf (RTFL_PREFIX_FMT "obj-set:%p:" var ".%d:%p\n", \
157 RTFL_PREFIX_ARGS, this, ind, val); \
158 fflush (stdout); \
159 } D_STMT_END
160
161 #define DBG_OBJ_COLOR(color, klass) \
162 D_STMT_START { \
163 printf (RTFL_PREFIX_FMT "obj-color:%s:%s\n", \
164 RTFL_PREFIX_ARGS, color, klass); \
128165 fflush (stdout); \
129166 } D_STMT_END
130167
131168 #else /* DBG_RTFL */
132169
133 #define DBG_MSG(obj, aspect, prio, msg)
134 #define DBG_MSGF(obj, aspect, prio, fmt, ...)
135 #define DBG_MSG_START(obj)
136 #define DBG_MSG_END(obj)
137 #define DBG_OBJ_CREATE(obj, klass)
138 #define DBG_OBJ_ASSOC(child, parent)
139 #define DBG_OBJ_SET_NUM(obj, var, val)
140 #define DBG_OBJ_SET_STR(obj, var, val)
141 #define DBG_OBJ_SET_PTR(obj, var, val)
142 #define DBG_OBJ_ARRSET_NUM(obj, var, ind, val)
143 #define DBG_OBJ_ARRSET_STR(obj, var, ind, val)
144 #define DBG_OBJ_ARRSET_PTR(obj, var, ind, val)
170 #define DBG_OBJ_MSG(aspect, prio, msg)
171 #define DBG_OBJ_MSGF(aspect, prio, fmt, ...)
172 #define DBG_OBJ_MSG_START()
173 #define DBG_OBJ_MSG_END()
174 #define DBG_OBJ_CREATE(klass)
175 #define DBG_OBJ_DELETE()
176 #define DBG_OBJ_BASECLASS(klass)
177 #define DBG_OBJ_ASSOC_PARENT(parent)
178 #define DBG_OBJ_ASSOC_CHILD(child)
179 #define DBG_OBJ_ASSOC(parent, child)
180 #define DBG_OBJ_SET_NUM(var, val)
181 #define DBG_OBJ_SET_STR(var, val)
182 #define DBG_OBJ_SET_PTR(var, val)
183 #define DBG_OBJ_ARRSET_NUM(var, ind, val)
184 #define DBG_OBJ_ARRSET_STR(var, ind, val)
185 #define DBG_OBJ_ARRSET_PTR(var, ind, val)
145186 #define DBG_OBJ_COLOR(klass, color)
146187
147188 #endif /* DBG_RTFL */
9595
9696 if (otherClass == NULL) {
9797 fprintf (stderr,
98 "WARNING: Something got wrong here, it seems that a "
98 "WARNING: Something got wrong here, it seems that a "
9999 "CLASS_ID was not initialized properly.\n");
100100 return false;
101101 }
150150 sb->append("]");
151151 }
152152
153 bool BitSet::get(int i)
153 bool BitSet::get(int i) const
154154 {
155155 if (8 * i >= numBytes)
156156 return false;
9191 }
9292
9393 public:
94 inline SimpleVector (int initAlloc)
94 inline SimpleVector (int initAlloc = 1)
9595 {
9696 this->num = 0;
9797 this->numAlloc = initAlloc;
115115 /**
116116 * \brief Return the number of elements put into this vector.
117117 */
118 inline int size() { return this->num; }
119
120 inline T* getArray() { return array; }
118 inline int size() const { return this->num; }
119
120 inline T* getArray() const { return array; }
121121
122122 inline T* detachArray() {
123123 T* arr = array;
162162 *
163163 * \sa misc::SimpleVector::get
164164 */
165 inline T* getRef (int i) {
165 inline T* getRef (int i) const {
166166 assert (i >= 0 && this->num - i > 0);
167167 return array + i;
168168 }
173173 * The element is copied, so for complex elements, you should rather used
174174 * misc::SimpleVector::getRef.
175175 */
176 inline T get (int i) {
176 inline T get (int i) const {
177177 assert (i >= 0 && this->num - i > 0);
178178 return this->array[i];
179179 }
181181 /**
182182 * \brief Return the reference of the first element (convenience method).
183183 */
184 inline T* getFirstRef () {
184 inline T* getFirstRef () const {
185185 assert (this->num > 0);
186186 return this->array;
187187 }
189189 /**
190190 * \brief Return the first element, explicitly.
191191 */
192 inline T getFirst () {
192 inline T getFirst () const {
193193 assert (this->num > 0);
194194 return this->array[0];
195195 }
197197 /**
198198 * \brief Return the reference of the last element (convenience method).
199199 */
200 inline T* getLastRef () {
200 inline T* getLastRef () const {
201201 assert (this->num > 0);
202202 return this->array + this->num - 1;
203203 }
205205 /**
206206 * \brief Return the last element, explicitly.
207207 */
208 inline T getLast () {
208 inline T getLast () const {
209209 assert (this->num > 0);
210210 return this->array[this->num - 1];
211211 }
351351 free (this->arrayExtra2);
352352 }
353353
354 inline int size() { return this->numMain + this->numExtra; }
354 inline int size() const { return this->numMain + this->numExtra; }
355355
356356 inline void increase() { setSize(size() + 1); }
357357
418418 *
419419 * \sa misc::SimpleVector::get
420420 */
421 inline T* getRef (int i)
421 inline T* getRef (int i) const
422422 {
423423 if (this->startExtra == -1)
424424 return this->arrayMain + i;
438438 * The element is copied, so for complex elements, you should rather used
439439 * misc::SimpleVector::getRef.
440440 */
441 inline T get (int i)
441 inline T get (int i) const
442442 {
443443 return *(this->getRef(i));
444444 }
446446 /**
447447 * \brief Return the reference of the first element (convenience method).
448448 */
449 inline T* getFirstRef () {
449 inline T* getFirstRef () const {
450450 assert (size () > 0);
451451 return this->getRef(0);
452452 }
454454 /**
455455 * \brief Return the first element, explicitly.
456456 */
457 inline T getFirst () {
457 inline T getFirst () const {
458458 return *(this->getFirstRef());
459459 }
460460
461461 /**
462462 * \brief Return the reference of the last element (convenience method).
463463 */
464 inline T* getLastRef () {
464 inline T* getLastRef () const {
465465 assert (size () > 0);
466466 return this->getRef(size () - 1);
467467 }
469469 /**
470470 * \brief Return the last element, explicitly.
471471 */
472 inline T getLast () {
472 inline T getLast () const {
473473 return *(this->getLastRef());
474474 }
475475
535535 BitSet(int initBits);
536536 ~BitSet();
537537 void intoStringBuffer(misc::StringBuffer *sb);
538 bool get(int i);
538 bool get(int i) const;
539539 void set(int i, bool val);
540540 void clear();
541541 };
9191 const char *r;
9292
9393 if (s == NULL || s[0] == 0)
94 r = NULL;
94 r = NULL;
9595 else if((s[0] & 0x80) == 0)
9696 r = s + 1;
9797 else if((s[0] & 0xe0) == 0xc0 && (s[1] & 0xc0) == 0x80)
117117 const char *r;
118118
119119 if (s == NULL || len <= 0)
120 r = NULL;
120 r = NULL;
121121 else if(len >= 1 && (s[0] & 0x80) == 0)
122122 r = s + 1;
123123 else if(len >= 2 && (s[0] & 0xe0) == 0xc0 && (s[1] & 0xc0) == 0x80)
+155
-271
missing less more
00 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2012-01-06.13; # UTC
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
6 # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
7 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
1 # Common wrapper for a few potentially missing GNU programs.
2
3 scriptversion=2012-06-26.16; # UTC
4
5 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
6 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
87
98 # This program is free software; you can redistribute it and/or modify
109 # it under the terms of the GNU General Public License as published by
2524 # the same distribution terms that you use for the rest of that program.
2625
2726 if test $# -eq 0; then
28 echo 1>&2 "Try \`$0 --help' for more information"
27 echo 1>&2 "Try '$0 --help' for more information"
2928 exit 1
3029 fi
3130
32 run=:
33 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
34 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
35
36 # In the cases where this matters, `missing' is being run in the
37 # srcdir already.
38 if test -f configure.ac; then
39 configure_ac=configure.ac
40 else
41 configure_ac=configure.in
42 fi
43
44 msg="missing on your system"
45
4631 case $1 in
47 --run)
48 # Try to run requested program, and just exit if it succeeds.
49 run=
50 shift
51 "$@" && exit 0
52 # Exit code 63 means version mismatch. This often happens
53 # when the user try to use an ancient version of a tool on
54 # a file that requires a minimum version. In this case we
55 # we should proceed has if the program had been absent, or
56 # if --run hadn't been passed.
57 if test $? = 63; then
58 run=:
59 msg="probably too old"
60 fi
61 ;;
32
33 --is-lightweight)
34 # Used by our autoconf macros to check whether the available missing
35 # script is modern enough.
36 exit 0
37 ;;
38
39 --run)
40 # Back-compat with the calling convention used by older automake.
41 shift
42 ;;
6243
6344 -h|--h|--he|--hel|--help)
6445 echo "\
6546 $0 [OPTION]... PROGRAM [ARGUMENT]...
6647
67 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
68 error status if there is no known handling for PROGRAM.
48 Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
49 to PROGRAM being missing or too old.
6950
7051 Options:
7152 -h, --help display this help and exit
7253 -v, --version output version information and exit
73 --run try to run the given command, and emulate it if it fails
7454
7555 Supported PROGRAM values:
76 aclocal touch file \`aclocal.m4'
77 autoconf touch file \`configure'
78 autoheader touch file \`config.h.in'
79 autom4te touch the output file, or create a stub one
80 automake touch all \`Makefile.in' files
81 bison create \`y.tab.[ch]', if possible, from existing .[ch]
82 flex create \`lex.yy.c', if possible, from existing .c
83 help2man touch the output file
84 lex create \`lex.yy.c', if possible, from existing .c
85 makeinfo touch the output file
86 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
87
88 Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
89 \`g' are ignored when checking the name.
56 aclocal autoconf autoheader autom4te automake makeinfo
57 bison yacc flex lex help2man
58
59 Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
60 'g' are ignored when checking the name.
9061
9162 Send bug reports to <bug-automake@gnu.org>."
9263 exit $?
9869 ;;
9970
10071 -*)
101 echo 1>&2 "$0: Unknown \`$1' option"
102 echo 1>&2 "Try \`$0 --help' for more information"
72 echo 1>&2 "$0: unknown '$1' option"
73 echo 1>&2 "Try '$0 --help' for more information"
10374 exit 1
10475 ;;
10576
10677 esac
10778
108 # normalize program name to check for.
109 program=`echo "$1" | sed '
110 s/^gnu-//; t
111 s/^gnu//; t
112 s/^g//; t'`
113
114 # Now exit if we have it, but it failed. Also exit now if we
115 # don't have it and --version was passed (most likely to detect
116 # the program). This is about non-GNU programs, so use $1 not
117 # $program.
118 case $1 in
119 lex*|yacc*)
120 # Not GNU programs, they don't have --version.
121 ;;
122
123 *)
124 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
125 # We have it, but it failed.
126 exit 1
127 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
128 # Could not run --version or --help. This is probably someone
129 # running `$TOOL --version' or `$TOOL --help' to check whether
130 # $TOOL exists and not knowing $TOOL uses missing.
131 exit 1
132 fi
133 ;;
134 esac
135
136 # If it does not exist, or fails to run (possibly an outdated version),
137 # try to emulate it.
138 case $program in
139 aclocal*)
140 echo 1>&2 "\
141 WARNING: \`$1' is $msg. You should only need it if
142 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
143 to install the \`Automake' and \`Perl' packages. Grab them from
144 any GNU archive site."
145 touch aclocal.m4
146 ;;
147
148 autoconf*)
149 echo 1>&2 "\
150 WARNING: \`$1' is $msg. You should only need it if
151 you modified \`${configure_ac}'. You might want to install the
152 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
153 archive site."
154 touch configure
155 ;;
156
157 autoheader*)
158 echo 1>&2 "\
159 WARNING: \`$1' is $msg. You should only need it if
160 you modified \`acconfig.h' or \`${configure_ac}'. You might want
161 to install the \`Autoconf' and \`GNU m4' packages. Grab them
162 from any GNU archive site."
163 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
164 test -z "$files" && files="config.h"
165 touch_files=
166 for f in $files; do
167 case $f in
168 *:*) touch_files="$touch_files "`echo "$f" |
169 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
170 *) touch_files="$touch_files $f.in";;
171 esac
172 done
173 touch $touch_files
174 ;;
175
176 automake*)
177 echo 1>&2 "\
178 WARNING: \`$1' is $msg. You should only need it if
179 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
180 You might want to install the \`Automake' and \`Perl' packages.
181 Grab them from any GNU archive site."
182 find . -type f -name Makefile.am -print |
183 sed 's/\.am$/.in/' |
184 while read f; do touch "$f"; done
185 ;;
186
187 autom4te*)
188 echo 1>&2 "\
189 WARNING: \`$1' is needed, but is $msg.
190 You might have modified some files without having the
191 proper tools for further handling them.
192 You can get \`$1' as part of \`Autoconf' from any GNU
193 archive site."
194
195 file=`echo "$*" | sed -n "$sed_output"`
196 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
197 if test -f "$file"; then
198 touch $file
199 else
200 test -z "$file" || exec >$file
201 echo "#! /bin/sh"
202 echo "# Created by GNU Automake missing as a replacement of"
203 echo "# $ $@"
204 echo "exit 0"
205 chmod +x $file
206 exit 1
207 fi
208 ;;
209
210 bison*|yacc*)
211 echo 1>&2 "\
212 WARNING: \`$1' $msg. You should only need it if
213 you modified a \`.y' file. You may need the \`Bison' package
214 in order for those modifications to take effect. You can get
215 \`Bison' from any GNU archive site."
216 rm -f y.tab.c y.tab.h
217 if test $# -ne 1; then
218 eval LASTARG=\${$#}
219 case $LASTARG in
220 *.y)
221 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
222 if test -f "$SRCFILE"; then
223 cp "$SRCFILE" y.tab.c
224 fi
225 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
226 if test -f "$SRCFILE"; then
227 cp "$SRCFILE" y.tab.h
228 fi
229 ;;
230 esac
231 fi
232 if test ! -f y.tab.h; then
233 echo >y.tab.h
234 fi
235 if test ! -f y.tab.c; then
236 echo 'main() { return 0; }' >y.tab.c
237 fi
238 ;;
239
240 lex*|flex*)
241 echo 1>&2 "\
242 WARNING: \`$1' is $msg. You should only need it if
243 you modified a \`.l' file. You may need the \`Flex' package
244 in order for those modifications to take effect. You can get
245 \`Flex' from any GNU archive site."
246 rm -f lex.yy.c
247 if test $# -ne 1; then
248 eval LASTARG=\${$#}
249 case $LASTARG in
250 *.l)
251 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
252 if test -f "$SRCFILE"; then
253 cp "$SRCFILE" lex.yy.c
254 fi
255 ;;
256 esac
257 fi
258 if test ! -f lex.yy.c; then
259 echo 'main() { return 0; }' >lex.yy.c
260 fi
261 ;;
262
263 help2man*)
264 echo 1>&2 "\
265 WARNING: \`$1' is $msg. You should only need it if
266 you modified a dependency of a manual page. You may need the
267 \`Help2man' package in order for those modifications to take
268 effect. You can get \`Help2man' from any GNU archive site."
269
270 file=`echo "$*" | sed -n "$sed_output"`
271 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
272 if test -f "$file"; then
273 touch $file
274 else
275 test -z "$file" || exec >$file
276 echo ".ab help2man is required to generate this page"
277 exit $?
278 fi
279 ;;
280
281 makeinfo*)
282 echo 1>&2 "\
283 WARNING: \`$1' is $msg. You should only need it if
284 you modified a \`.texi' or \`.texinfo' file, or any other file
285 indirectly affecting the aspect of the manual. The spurious
286 call might also be the consequence of using a buggy \`make' (AIX,
287 DU, IRIX). You might want to install the \`Texinfo' package or
288 the \`GNU make' package. Grab either from any GNU archive site."
289 # The file to touch is that specified with -o ...
290 file=`echo "$*" | sed -n "$sed_output"`
291 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
292 if test -z "$file"; then
293 # ... or it is the one specified with @setfilename ...
294 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
295 file=`sed -n '
296 /^@setfilename/{
297 s/.* \([^ ]*\) *$/\1/
298 p
299 q
300 }' $infile`
301 # ... or it is derived from the source name (dir/f.texi becomes f.info)
302 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
303 fi
304 # If the file does not exist, the user really needs makeinfo;
305 # let's fail without touching anything.
306 test -f $file || exit 1
307 touch $file
308 ;;
309
310 *)
311 echo 1>&2 "\
312 WARNING: \`$1' is needed, and is $msg.
313 You might have modified some files without having the
314 proper tools for further handling them. Check the \`README' file,
315 it often tells you about the needed prerequisites for installing
316 this package. You may also peek at any GNU archive site, in case
317 some other package would contain this missing \`$1' program."
318 exit 1
319 ;;
320 esac
321
322 exit 0
79 # Run the given program, remember its exit status.
80 "$@"; st=$?
81
82 # If it succeeded, we are done.
83 test $st -eq 0 && exit 0
84
85 # Also exit now if we it failed (or wasn't found), and '--version' was
86 # passed; such an option is passed most likely to detect whether the
87 # program is present and works.
88 case $2 in --version|--help) exit $st;; esac
89
90 # Exit code 63 means version mismatch. This often happens when the user
91 # tries to use an ancient version of a tool on a file that requires a
92 # minimum version.
93 if test $st -eq 63; then
94 msg="probably too old"
95 elif test $st -eq 127; then
96 # Program was missing.
97 msg="missing on your system"
98 else
99 # Program was found and executed, but failed. Give up.
100 exit $st
101 fi
102
103 perl_URL=http://www.perl.org/
104 flex_URL=http://flex.sourceforge.net/
105 gnu_software_URL=http://www.gnu.org/software
106
107 program_details ()
108 {
109 case $1 in
110 aclocal|automake)
111 echo "The '$1' program is part of the GNU Automake package:"
112 echo "<$gnu_software_URL/automake>"
113 echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
114 echo "<$gnu_software_URL/autoconf>"
115 echo "<$gnu_software_URL/m4/>"
116 echo "<$perl_URL>"
117 ;;
118 autoconf|autom4te|autoheader)
119 echo "The '$1' program is part of the GNU Autoconf package:"
120 echo "<$gnu_software_URL/autoconf/>"
121 echo "It also requires GNU m4 and Perl in order to run:"
122 echo "<$gnu_software_URL/m4/>"
123 echo "<$perl_URL>"
124 ;;
125 esac
126 }
127
128 give_advice ()
129 {
130 # Normalize program name to check for.
131 normalized_program=`echo "$1" | sed '
132 s/^gnu-//; t
133 s/^gnu//; t
134 s/^g//; t'`
135
136 printf '%s\n' "'$1' is $msg."
137
138 configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
139 case $normalized_program in
140 autoconf*)
141 echo "You should only need it if you modified 'configure.ac',"
142 echo "or m4 files included by it."
143 program_details 'autoconf'
144 ;;
145 autoheader*)
146 echo "You should only need it if you modified 'acconfig.h' or"
147 echo "$configure_deps."
148 program_details 'autoheader'
149 ;;
150 automake*)
151 echo "You should only need it if you modified 'Makefile.am' or"
152 echo "$configure_deps."
153 program_details 'automake'
154 ;;
155 aclocal*)
156 echo "You should only need it if you modified 'acinclude.m4' or"
157 echo "$configure_deps."
158 program_details 'aclocal'
159 ;;
160 autom4te*)
161 echo "You might have modified some maintainer files that require"
162 echo "the 'automa4te' program to be rebuilt."
163 program_details 'autom4te'
164 ;;
165 bison*|yacc*)
166 echo "You should only need it if you modified a '.y' file."
167 echo "You may want to install the GNU Bison package:"
168 echo "<$gnu_software_URL/bison/>"
169 ;;
170 lex*|flex*)
171 echo "You should only need it if you modified a '.l' file."
172 echo "You may want to install the Fast Lexical Analyzer package:"
173 echo "<$flex_URL>"
174 ;;
175 help2man*)
176 echo "You should only need it if you modified a dependency" \
177 "of a man page."
178 echo "You may want to install the GNU Help2man package:"
179 echo "<$gnu_software_URL/help2man/>"
180 ;;
181 makeinfo*)
182 echo "You should only need it if you modified a '.texi' file, or"
183 echo "any other file indirectly affecting the aspect of the manual."
184 echo "You might want to install the Texinfo package:"
185 echo "<$gnu_software_URL/texinfo/>"
186 echo "The spurious makeinfo call might also be the consequence of"
187 echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
188 echo "want to install GNU make:"
189 echo "<$gnu_software_URL/make/>"
190 ;;
191 *)
192 echo "You might have modified some files without having the proper"
193 echo "tools for further handling them. Check the 'README' file, it"
194 echo "often tells you about the needed prerequisites for installing"
195 echo "this package. You may also peek at any GNU archive site, in"
196 echo "case some other package contains this missing '$1' program."
197 ;;
198 esac
199 }
200
201 give_advice "$1" | sed -e '1s/^/WARNING: /' \
202 -e '2,$s/^/ /' >&2
203
204 # Propagate the correct exit status (expected to be 127 for a program
205 # not found, 63 for a program that failed due to version mismatch).
206 exit $st
323207
324208 # Local variables:
325209 # eval: (add-hook 'write-file-hooks 'time-stamp)
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5279 host_triplet = @host@
5380 target_triplet = @target@
5481 subdir = src/IO
55 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
82 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
83 $(top_srcdir)/depcomp
5684 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
5785 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
5886 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
6492 LIBRARIES = $(noinst_LIBRARIES)
6593 AR = ar
6694 ARFLAGS = cru
95 AM_V_AR = $(am__v_AR_@AM_V@)
96 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
97 am__v_AR_0 = @echo " AR " $@;
98 am__v_AR_1 =
6799 libDiof_a_AR = $(AR) $(ARFLAGS)
68100 libDiof_a_LIBADD =
69101 am_libDiof_a_OBJECTS = mime.$(OBJEXT) about.$(OBJEXT) http.$(OBJEXT) \
70102 dpi.$(OBJEXT) IO.$(OBJEXT) iowatch.$(OBJEXT)
71103 libDiof_a_OBJECTS = $(am_libDiof_a_OBJECTS)
104 AM_V_P = $(am__v_P_@AM_V@)
105 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
106 am__v_P_0 = false
107 am__v_P_1 = :
108 AM_V_GEN = $(am__v_GEN_@AM_V@)
109 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
110 am__v_GEN_0 = @echo " GEN " $@;
111 am__v_GEN_1 =
112 AM_V_at = $(am__v_at_@AM_V@)
113 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
114 am__v_at_0 = @
115 am__v_at_1 =
72116 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
73117 depcomp = $(SHELL) $(top_srcdir)/depcomp
74118 am__depfiles_maybe = depfiles
75119 am__mv = mv -f
76120 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
77121 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
122 AM_V_CC = $(am__v_CC_@AM_V@)
123 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
124 am__v_CC_0 = @echo " CC " $@;
125 am__v_CC_1 =
78126 CCLD = $(CC)
79127 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
128 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
129 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
130 am__v_CCLD_0 = @echo " CCLD " $@;
131 am__v_CCLD_1 =
80132 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
81133 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
134 AM_V_CXX = $(am__v_CXX_@AM_V@)
135 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
136 am__v_CXX_0 = @echo " CXX " $@;
137 am__v_CXX_1 =
82138 CXXLD = $(CXX)
83139 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
84140 -o $@
141 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
142 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
143 am__v_CXXLD_0 = @echo " CXXLD " $@;
144 am__v_CXXLD_1 =
85145 SOURCES = $(libDiof_a_SOURCES)
86146 DIST_SOURCES = $(libDiof_a_SOURCES)
87147 am__can_run_installinfo = \
89149 n|no|NO) false;; \
90150 *) (install-info --version) >/dev/null 2>&1;; \
91151 esac
152 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
153 # Read a list of newline-separated strings from the standard input,
154 # and print each of them once, without duplicates. Input order is
155 # *not* preserved.
156 am__uniquify_input = $(AWK) '\
157 BEGIN { nonempty = 0; } \
158 { items[$$0] = 1; nonempty = 1; } \
159 END { if (nonempty) { for (i in items) print i; }; } \
160 '
161 # Make sure the list of sources is unique. This is necessary because,
162 # e.g., the same source file might be shared among _SOURCES variables
163 # for different programs/libraries.
164 am__define_uniq_tagged_files = \
165 list='$(am__tagged_files)'; \
166 unique=`for i in $$list; do \
167 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
168 done | $(am__uniquify_input)`
92169 ETAGS = etags
93170 CTAGS = ctags
94171 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
95172 ACLOCAL = @ACLOCAL@
96173 AMTAR = @AMTAR@
174 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
97175 AUTOCONF = @AUTOCONF@
98176 AUTOHEADER = @AUTOHEADER@
99177 AUTOMAKE = @AUTOMAKE@
135213 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
136214 LIBS = @LIBS@
137215 LIBSSL_LIBS = @LIBSSL_LIBS@
216 LIBX11_LIBS = @LIBX11_LIBS@
138217 LIBZ_LIBS = @LIBZ_LIBS@
139218 LTLIBOBJS = @LTLIBOBJS@
140219 MAKEINFO = @MAKEINFO@
264343
265344 clean-noinstLIBRARIES:
266345 -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
346
267347 libDiof.a: $(libDiof_a_OBJECTS) $(libDiof_a_DEPENDENCIES) $(EXTRA_libDiof_a_DEPENDENCIES)
268 -rm -f libDiof.a
269 $(libDiof_a_AR) libDiof.a $(libDiof_a_OBJECTS) $(libDiof_a_LIBADD)
270 $(RANLIB) libDiof.a
348 $(AM_V_at)-rm -f libDiof.a
349 $(AM_V_AR)$(libDiof_a_AR) libDiof.a $(libDiof_a_OBJECTS) $(libDiof_a_LIBADD)
350 $(AM_V_at)$(RANLIB) libDiof.a
271351
272352 mostlyclean-compile:
273353 -rm -f *.$(OBJEXT)
283363 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mime.Po@am__quote@
284364
285365 .c.o:
286 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
287 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
288 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
366 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
367 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
368 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
289369 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
290 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
370 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
291371
292372 .c.obj:
293 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
294 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
295 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
373 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
374 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
375 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
296376 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
297 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
377 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
298378
299379 .cc.o:
300 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
301 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
302 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
380 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
381 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
382 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
303383 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
304 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
384 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
305385
306386 .cc.obj:
307 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
308 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
309 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
387 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
388 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
389 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
310390 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
311 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
312
313 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
314 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
315 unique=`for i in $$list; do \
316 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
317 done | \
318 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
319 END { if (nonempty) { for (i in files) print i; }; }'`; \
320 mkid -fID $$unique
321 tags: TAGS
322
323 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
324 $(TAGS_FILES) $(LISP)
391 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
392
393 ID: $(am__tagged_files)
394 $(am__define_uniq_tagged_files); mkid -fID $$unique
395 tags: tags-am
396 TAGS: tags
397
398 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
325399 set x; \
326400 here=`pwd`; \
327 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
328 unique=`for i in $$list; do \
329 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
330 done | \
331 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
332 END { if (nonempty) { for (i in files) print i; }; }'`; \
401 $(am__define_uniq_tagged_files); \
333402 shift; \
334403 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
335404 test -n "$$unique" || unique=$$empty_fix; \
341410 $$unique; \
342411 fi; \
343412 fi
344 ctags: CTAGS
345 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
346 $(TAGS_FILES) $(LISP)
347 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
348 unique=`for i in $$list; do \
349 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
350 done | \
351 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
352 END { if (nonempty) { for (i in files) print i; }; }'`; \
413 ctags: ctags-am
414
415 CTAGS: ctags
416 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
417 $(am__define_uniq_tagged_files); \
353418 test -z "$(CTAGS_ARGS)$$unique" \
354419 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
355420 $$unique
358423 here=`$(am__cd) $(top_builddir) && pwd` \
359424 && $(am__cd) $(top_srcdir) \
360425 && gtags -i $(GTAGS_ARGS) "$$here"
426 cscopelist: cscopelist-am
427
428 cscopelist-am: $(am__tagged_files)
429 list='$(am__tagged_files)'; \
430 case "$(srcdir)" in \
431 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
432 *) sdir=$(subdir)/$(srcdir) ;; \
433 esac; \
434 for i in $$list; do \
435 if test -f "$$i"; then \
436 echo "$(subdir)/$$i"; \
437 else \
438 echo "$$sdir/$$i"; \
439 fi; \
440 done >> $(top_builddir)/cscope.files
361441
362442 distclean-tags:
363443 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
497577
498578 .MAKE: install-am install-strip
499579
500 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
501 clean-noinstLIBRARIES ctags distclean distclean-compile \
502 distclean-generic distclean-tags distdir dvi dvi-am html \
503 html-am info info-am install install-am install-data \
504 install-data-am install-dvi install-dvi-am install-exec \
505 install-exec-am install-html install-html-am install-info \
506 install-info-am install-man install-pdf install-pdf-am \
507 install-ps install-ps-am install-strip installcheck \
508 installcheck-am installdirs maintainer-clean \
580 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
581 clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
582 distclean-compile distclean-generic distclean-tags distdir dvi \
583 dvi-am html html-am info info-am install install-am \
584 install-data install-data-am install-dvi install-dvi-am \
585 install-exec install-exec-am install-html install-html-am \
586 install-info install-info-am install-man install-pdf \
587 install-pdf-am install-ps install-ps-am install-strip \
588 installcheck installcheck-am installdirs maintainer-clean \
509589 maintainer-clean-generic mostlyclean mostlyclean-compile \
510 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
590 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
511591 uninstall-am
512592
513593
1818 char *a_Http_make_connect_str(const DilloUrl *url);
1919 const char *a_Http_get_proxy_urlstr();
2020 Dstr *a_Http_make_query_str(const DilloUrl *url, const DilloUrl *requester,
21 bool_t use_proxy);
21 int web_flags, bool_t use_proxy);
2222
2323 void a_Http_ccc (int Op, int Branch, int Dir, ChainLink *Info,
2424 void *Data1, void *Data2);
491491 }
492492 }
493493
494 _MSG("Dpi_check_dpid:: %s\n",
494 _MSG("Dpi_check_dpid: %s\n",
495495 (ret == 0) ? "OK" : (ret == 1 ? "EAGAIN" : "ERROR"));
496496 return ret;
497497 }
530530 socklen_t sin_sz;
531531
532532 dReturn_val_if_fail (server_name != NULL, dpi_port);
533 _MSG("Dpi_get_server_port:: server_name = [%s]\n", server_name);
533 _MSG("Dpi_get_server_port: server_name = [%s]\n", server_name);
534534
535535 /* Read dpid's port from saved file */
536536 if (Dpi_read_comm_keys(&dpid_port) != -1) {
607607
608608 /* Query dpid for the port number for this server */
609609 if ((dpi_port = Dpi_get_server_port(server_name)) == -1) {
610 _MSG("Dpi_connect_socket:: can't get port number for %s\n", server_name);
610 _MSG("Dpi_connect_socket: can't get port number for %s\n", server_name);
611611 return -1;
612612 }
613613 _MSG("Dpi_connect_socket: server=%s port=%d\n", server_name, dpi_port);
619619 sin.sin_port = htons(dpi_port);
620620
621621 if ((sock_fd = Dpi_make_socket_fd()) == -1) {
622 perror("[dpi::socket]");
622 MSG_ERR("[Dpi_connect_socket] %s\n", dStrerror(errno));
623623 } else if (connect(sock_fd, (void*)&sin, sizeof(sin)) == -1) {
624 MSG("[dpi::connect] errno:%d %s\n", errno, dStrerror(errno));
624 MSG_ERR("[Dpi_connect_socket] errno:%d %s\n", errno, dStrerror(errno));
625625
626626 /* send authentication Key (the server closes sock_fd on auth error) */
627627 } else if (!(cmd = a_Dpip_build_cmd("cmd=%s msg=%s", "auth", SharedKey))) {
238238 Dstr *dstr;
239239
240240 if (URL_FLAGS(url) & URL_MultipartEnc) {
241 MSG("submitting multipart/form-data!\n");
241 _MSG("submitting multipart/form-data!\n");
242242 dstr = dStr_new("multipart/form-data; boundary=\"");
243243 if (URL_DATA(url)->len > 2) {
244244 /* boundary lines have "--" prepended. Skip that. */
261261 * Make the http query string
262262 */
263263 Dstr *a_Http_make_query_str(const DilloUrl *url, const DilloUrl *requester,
264 bool_t use_proxy)
264 int web_flags, bool_t use_proxy)
265265 {
266266 char *ptr, *cookies, *referer, *auth;
267267 Dstr *query = dStr_new(""),
268268 *request_uri = dStr_new(""),
269269 *proxy_auth = dStr_new("");
270
271 /* BUG: dillo doesn't actually understand application/xml yet */
272 const char *accept_hdr_value =
273 web_flags & WEB_Image ? "image/png,image/*;q=0.8,*/*;q=0.5" :
274 web_flags & WEB_Stylesheet ? "text/css,*/*;q=0.1" :
275 "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
270276
271277 if (use_proxy) {
272278 dStr_sprintfa(request_uri, "%s%s",
293299 dStr_sprintfa(
294300 query,
295301 "POST %s HTTP/1.1\r\n"
302 "Host: %s\r\n"
303 "User-Agent: %s\r\n"
304 "Accept: %s\r\n"
305 "%s" /* language */
306 "Accept-Encoding: gzip, deflate\r\n"
307 "%s" /* auth */
308 "DNT: 1\r\n"
309 "%s" /* proxy auth */
310 "%s" /* referer */
296311 "Connection: close\r\n"
297 "Accept: text/*,image/*,*/*;q=0.2\r\n"
298 "Accept-Charset: utf-8,*;q=0.8\r\n"
299 "Accept-Encoding: gzip\r\n"
300 "%s" /* language */
301 "%s" /* auth */
302 "Host: %s\r\n"
303 "%s"
304 "%s"
305 "User-Agent: %s\r\n"
312 "Content-Type: %s\r\n"
306313 "Content-Length: %ld\r\n"
307 "Content-Type: %s\r\n"
308314 "%s" /* cookies */
309315 "\r\n",
310 request_uri->str, HTTP_Language_hdr, auth ? auth : "",
311 URL_AUTHORITY(url), proxy_auth->str, referer, prefs.http_user_agent,
312 (long)URL_DATA(url)->len, content_type->str,
316 request_uri->str, URL_AUTHORITY(url), prefs.http_user_agent,
317 accept_hdr_value, HTTP_Language_hdr, auth ? auth : "",
318 proxy_auth->str, referer, content_type->str, (long)URL_DATA(url)->len,
313319 cookies);
314320 dStr_append_l(query, URL_DATA(url)->str, URL_DATA(url)->len);
315321 dStr_free(content_type, TRUE);
317323 dStr_sprintfa(
318324 query,
319325 "GET %s HTTP/1.1\r\n"
320 "%s"
326 "Host: %s\r\n"
327 "User-Agent: %s\r\n"
328 "Accept: %s\r\n"
329 "%s" /* language */
330 "Accept-Encoding: gzip, deflate\r\n"
331 "%s" /* auth */
332 "DNT: 1\r\n"
333 "%s" /* proxy auth */
334 "%s" /* referer */
321335 "Connection: close\r\n"
322 "Accept: text/*,image/*,*/*;q=0.2\r\n"
323 "Accept-Charset: utf-8,*;q=0.8\r\n"
324 "Accept-Encoding: gzip\r\n"
325 "%s" /* language */
326 "%s" /* auth */
327 "Host: %s\r\n"
328 "%s"
329 "%s"
330 "User-Agent: %s\r\n"
336 "%s" /* cache control */
331337 "%s" /* cookies */
332338 "\r\n",
333 request_uri->str,
339 request_uri->str, URL_AUTHORITY(url), prefs.http_user_agent,
340 accept_hdr_value, HTTP_Language_hdr, auth ? auth : "",
341 proxy_auth->str, referer,
334342 (URL_FLAGS(url) & URL_E2EQuery) ?
335 "Cache-Control: no-cache\r\nPragma: no-cache\r\n" : "",
336 HTTP_Language_hdr, auth ? auth : "", URL_AUTHORITY(url),
337 proxy_auth->str, referer, prefs.http_user_agent, cookies);
343 "Pragma: no-cache\r\nCache-Control: no-cache\r\n" : "",
344 cookies);
338345 }
339346 dFree(referer);
340347 dFree(cookies);
355362 DataBuf *dbuf;
356363
357364 /* Create the query */
358 query = a_Http_make_query_str(S->web->url, S->web->requester,
365 query = a_Http_make_query_str(S->web->url, S->web->requester, S->web->flags,
359366 S->flags & HTTP_SOCKET_USE_PROXY);
360367 dbuf = a_Chain_dbuf_new(query->str, query->len, 0);
361368
1818 $(top_builddir)/dw/libDw-core.a \
1919 $(top_builddir)/lout/liblout.a \
2020 @LIBJPEG_LIBS@ @LIBPNG_LIBS@ @LIBFLTK_LIBS@ @LIBZ_LIBS@ \
21 @LIBICONV_LIBS@ @LIBPTHREAD_LIBS@
21 @LIBICONV_LIBS@ @LIBPTHREAD_LIBS@ @LIBX11_LIBS@
2222
2323 dillo_SOURCES = \
2424 dillo.cc \
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1615
1716
1817 VPATH = @srcdir@
19 am__make_dryrun = \
20 { \
21 am__dry=no; \
18 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
19 am__make_running_with_option = \
20 case $${target_option-} in \
21 ?) ;; \
22 *) echo "am__make_running_with_option: internal error: invalid" \
23 "target option '$${target_option-}' specified" >&2; \
24 exit 1;; \
25 esac; \
26 has_opt=no; \
27 sane_makeflags=$$MAKEFLAGS; \
28 if $(am__is_gnu_make); then \
29 sane_makeflags=$$MFLAGS; \
30 else \
2231 case $$MAKEFLAGS in \
2332 *\\[\ \ ]*) \
24 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
25 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
26 *) \
27 for am__flg in $$MAKEFLAGS; do \
28 case $$am__flg in \
29 *=*|--*) ;; \
30 *n*) am__dry=yes; break;; \
31 esac; \
32 done;; \
33 bs=\\; \
34 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
35 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3336 esac; \
34 test $$am__dry = yes; \
35 }
37 fi; \
38 skip_next=no; \
39 strip_trailopt () \
40 { \
41 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
42 }; \
43 for flg in $$sane_makeflags; do \
44 test $$skip_next = yes && { skip_next=no; continue; }; \
45 case $$flg in \
46 *=*|--*) continue;; \
47 -*I) strip_trailopt 'I'; skip_next=yes;; \
48 -*I?*) strip_trailopt 'I';; \
49 -*O) strip_trailopt 'O'; skip_next=yes;; \
50 -*O?*) strip_trailopt 'O';; \
51 -*l) strip_trailopt 'l'; skip_next=yes;; \
52 -*l?*) strip_trailopt 'l';; \
53 -[dEDm]) skip_next=yes;; \
54 -[JT]) skip_next=yes;; \
55 esac; \
56 case $$flg in \
57 *$$target_option*) has_opt=yes; break;; \
58 esac; \
59 done; \
60 test $$has_opt = yes
61 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
62 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3663 pkgdatadir = $(datadir)/@PACKAGE@
3764 pkgincludedir = $(includedir)/@PACKAGE@
3865 pkglibdir = $(libdir)/@PACKAGE@
5481 target_triplet = @target@
5582 bin_PROGRAMS = dillo$(EXEEXT)
5683 subdir = src
57 DIST_COMMON = $(dist_sysconf_DATA) $(srcdir)/Makefile.am \
58 $(srcdir)/Makefile.in
84 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
85 $(top_srcdir)/depcomp $(dist_sysconf_DATA)
5986 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
6087 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
6188 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
86113 $(top_builddir)/dw/libDw-widgets.a \
87114 $(top_builddir)/dw/libDw-fltk.a \
88115 $(top_builddir)/dw/libDw-core.a $(top_builddir)/lout/liblout.a
116 AM_V_P = $(am__v_P_@AM_V@)
117 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
118 am__v_P_0 = false
119 am__v_P_1 = :
120 AM_V_GEN = $(am__v_GEN_@AM_V@)
121 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
122 am__v_GEN_0 = @echo " GEN " $@;
123 am__v_GEN_1 =
124 AM_V_at = $(am__v_at_@AM_V@)
125 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
126 am__v_at_0 = @
127 am__v_at_1 =
89128 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
90129 depcomp = $(SHELL) $(top_srcdir)/depcomp
91130 am__depfiles_maybe = depfiles
92131 am__mv = mv -f
93132 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
94133 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
134 AM_V_CC = $(am__v_CC_@AM_V@)
135 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
136 am__v_CC_0 = @echo " CC " $@;
137 am__v_CC_1 =
95138 CCLD = $(CC)
96139 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
140 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
141 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
142 am__v_CCLD_0 = @echo " CCLD " $@;
143 am__v_CCLD_1 =
97144 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
98145 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
146 AM_V_CXX = $(am__v_CXX_@AM_V@)
147 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
148 am__v_CXX_0 = @echo " CXX " $@;
149 am__v_CXX_1 =
99150 CXXLD = $(CXX)
100151 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
101152 -o $@
153 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
154 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
155 am__v_CXXLD_0 = @echo " CXXLD " $@;
156 am__v_CXXLD_1 =
102157 SOURCES = $(dillo_SOURCES)
103158 DIST_SOURCES = $(dillo_SOURCES)
104 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
105 html-recursive info-recursive install-data-recursive \
106 install-dvi-recursive install-exec-recursive \
107 install-html-recursive install-info-recursive \
108 install-pdf-recursive install-ps-recursive install-recursive \
109 installcheck-recursive installdirs-recursive pdf-recursive \
110 ps-recursive uninstall-recursive
159 RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
160 ctags-recursive dvi-recursive html-recursive info-recursive \
161 install-data-recursive install-dvi-recursive \
162 install-exec-recursive install-html-recursive \
163 install-info-recursive install-pdf-recursive \
164 install-ps-recursive install-recursive installcheck-recursive \
165 installdirs-recursive pdf-recursive ps-recursive \
166 tags-recursive uninstall-recursive
111167 am__can_run_installinfo = \
112168 case $$AM_UPDATE_INFO_DIR in \
113169 n|no|NO) false;; \
143199 DATA = $(dist_sysconf_DATA)
144200 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
145201 distclean-recursive maintainer-clean-recursive
146 AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
147 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
202 am__recursive_targets = \
203 $(RECURSIVE_TARGETS) \
204 $(RECURSIVE_CLEAN_TARGETS) \
205 $(am__extra_recursive_targets)
206 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
148207 distdir
208 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
209 # Read a list of newline-separated strings from the standard input,
210 # and print each of them once, without duplicates. Input order is
211 # *not* preserved.
212 am__uniquify_input = $(AWK) '\
213 BEGIN { nonempty = 0; } \
214 { items[$$0] = 1; nonempty = 1; } \
215 END { if (nonempty) { for (i in items) print i; }; } \
216 '
217 # Make sure the list of sources is unique. This is necessary because,
218 # e.g., the same source file might be shared among _SOURCES variables
219 # for different programs/libraries.
220 am__define_uniq_tagged_files = \
221 list='$(am__tagged_files)'; \
222 unique=`for i in $$list; do \
223 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
224 done | $(am__uniquify_input)`
149225 ETAGS = etags
150226 CTAGS = ctags
151227 DIST_SUBDIRS = $(SUBDIRS)
177253 reldir="$$dir2"
178254 ACLOCAL = @ACLOCAL@
179255 AMTAR = @AMTAR@
256 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
180257 AUTOCONF = @AUTOCONF@
181258 AUTOHEADER = @AUTOHEADER@
182259 AUTOMAKE = @AUTOMAKE@
218295 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
219296 LIBS = @LIBS@
220297 LIBSSL_LIBS = @LIBSSL_LIBS@
298 LIBX11_LIBS = @LIBX11_LIBS@
221299 LIBZ_LIBS = @LIBZ_LIBS@
222300 LTLIBOBJS = @LTLIBOBJS@
223301 MAKEINFO = @MAKEINFO@
309387 $(top_builddir)/dw/libDw-core.a \
310388 $(top_builddir)/lout/liblout.a \
311389 @LIBJPEG_LIBS@ @LIBPNG_LIBS@ @LIBFLTK_LIBS@ @LIBZ_LIBS@ \
312 @LIBICONV_LIBS@ @LIBPTHREAD_LIBS@
390 @LIBICONV_LIBS@ @LIBPTHREAD_LIBS@ @LIBX11_LIBS@
313391
314392 dillo_SOURCES = \
315393 dillo.cc \
460538 fi; \
461539 for p in $$list; do echo "$$p $$p"; done | \
462540 sed 's/$(EXEEXT)$$//' | \
463 while read p p1; do if test -f $$p; \
464 then echo "$$p"; echo "$$p"; else :; fi; \
541 while read p p1; do if test -f $$p \
542 ; then echo "$$p"; echo "$$p"; else :; fi; \
465543 done | \
466 sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
544 sed -e 'p;s,.*/,,;n;h' \
545 -e 's|.*|.|' \
467546 -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
468547 sed 'N;N;N;s,\n, ,g' | \
469548 $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
484563 @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
485564 files=`for p in $$list; do echo "$$p"; done | \
486565 sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
487 -e 's/$$/$(EXEEXT)/' `; \
566 -e 's/$$/$(EXEEXT)/' \
567 `; \
488568 test -n "$$list" || exit 0; \
489569 echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
490570 cd "$(DESTDIR)$(bindir)" && rm -f $$files
491571
492572 clean-binPROGRAMS:
493573 -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
574
494575 dillo$(EXEEXT): $(dillo_OBJECTS) $(dillo_DEPENDENCIES) $(EXTRA_dillo_DEPENDENCIES)
495576 @rm -f dillo$(EXEEXT)
496 $(CXXLINK) $(dillo_OBJECTS) $(dillo_LDADD) $(LIBS)
577 $(AM_V_CXXLD)$(CXXLINK) $(dillo_OBJECTS) $(dillo_LDADD) $(LIBS)
497578
498579 mostlyclean-compile:
499580 -rm -f *.$(OBJEXT)
551632 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xembed.Po@am__quote@
552633
553634 .c.o:
554 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
555 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
556 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
635 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
636 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
637 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
557638 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
558 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
639 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
559640
560641 .c.obj:
561 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
562 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
563 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
642 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
643 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
644 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
564645 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
565 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
646 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
566647
567648 .cc.o:
568 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
569 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
570 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
649 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
650 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
651 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
571652 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
572 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
653 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
573654
574655 .cc.obj:
575 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
576 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
577 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
656 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
657 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
658 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
578659 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
579 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
660 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
580661 install-dist_sysconfDATA: $(dist_sysconf_DATA)
581662 @$(NORMAL_INSTALL)
582663 @list='$(dist_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
600681 dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
601682
602683 # This directory's subdirectories are mostly independent; you can cd
603 # into them and run `make' without going through this Makefile.
604 # To change the values of `make' variables: instead of editing Makefiles,
605 # (1) if the variable is set in `config.status', edit `config.status'
606 # (which will cause the Makefiles to be regenerated when you run `make');
607 # (2) otherwise, pass the desired values on the `make' command line.
608 $(RECURSIVE_TARGETS):
609 @fail= failcom='exit 1'; \
610 for f in x $$MAKEFLAGS; do \
611 case $$f in \
612 *=* | --[!k]*);; \
613 *k*) failcom='fail=yes';; \
614 esac; \
615 done; \
684 # into them and run 'make' without going through this Makefile.
685 # To change the values of 'make' variables: instead of editing Makefiles,
686 # (1) if the variable is set in 'config.status', edit 'config.status'
687 # (which will cause the Makefiles to be regenerated when you run 'make');
688 # (2) otherwise, pass the desired values on the 'make' command line.
689 $(am__recursive_targets):
690 @fail=; \
691 if $(am__make_keepgoing); then \
692 failcom='fail=yes'; \
693 else \
694 failcom='exit 1'; \
695 fi; \
616696 dot_seen=no; \
617697 target=`echo $@ | sed s/-recursive//`; \
618 list='$(SUBDIRS)'; for subdir in $$list; do \
698 case "$@" in \
699 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
700 *) list='$(SUBDIRS)' ;; \
701 esac; \
702 for subdir in $$list; do \
619703 echo "Making $$target in $$subdir"; \
620704 if test "$$subdir" = "."; then \
621705 dot_seen=yes; \
630714 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
631715 fi; test -z "$$fail"
632716
633 $(RECURSIVE_CLEAN_TARGETS):
634 @fail= failcom='exit 1'; \
635 for f in x $$MAKEFLAGS; do \
636 case $$f in \
637 *=* | --[!k]*);; \
638 *k*) failcom='fail=yes';; \
639 esac; \
640 done; \
641 dot_seen=no; \
642 case "$@" in \
643 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
644 *) list='$(SUBDIRS)' ;; \
645 esac; \
646 rev=''; for subdir in $$list; do \
647 if test "$$subdir" = "."; then :; else \
648 rev="$$subdir $$rev"; \
649 fi; \
650 done; \
651 rev="$$rev ."; \
652 target=`echo $@ | sed s/-recursive//`; \
653 for subdir in $$rev; do \
654 echo "Making $$target in $$subdir"; \
655 if test "$$subdir" = "."; then \
656 local_target="$$target-am"; \
657 else \
658 local_target="$$target"; \
659 fi; \
660 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
661 || eval $$failcom; \
662 done && test -z "$$fail"
663 tags-recursive:
664 list='$(SUBDIRS)'; for subdir in $$list; do \
665 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
666 done
667 ctags-recursive:
668 list='$(SUBDIRS)'; for subdir in $$list; do \
669 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
670 done
671
672 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
673 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
674 unique=`for i in $$list; do \
675 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
676 done | \
677 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
678 END { if (nonempty) { for (i in files) print i; }; }'`; \
679 mkid -fID $$unique
680 tags: TAGS
681
682 TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
683 $(TAGS_FILES) $(LISP)
717 ID: $(am__tagged_files)
718 $(am__define_uniq_tagged_files); mkid -fID $$unique
719 tags: tags-recursive
720 TAGS: tags
721
722 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
684723 set x; \
685724 here=`pwd`; \
686725 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
696735 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
697736 fi; \
698737 done; \
699 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
700 unique=`for i in $$list; do \
701 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
702 done | \
703 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
704 END { if (nonempty) { for (i in files) print i; }; }'`; \
738 $(am__define_uniq_tagged_files); \
705739 shift; \
706740 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
707741 test -n "$$unique" || unique=$$empty_fix; \
713747 $$unique; \
714748 fi; \
715749 fi
716 ctags: CTAGS
717 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
718 $(TAGS_FILES) $(LISP)
719 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
720 unique=`for i in $$list; do \
721 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
722 done | \
723 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
724 END { if (nonempty) { for (i in files) print i; }; }'`; \
750 ctags: ctags-recursive
751
752 CTAGS: ctags
753 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
754 $(am__define_uniq_tagged_files); \
725755 test -z "$(CTAGS_ARGS)$$unique" \
726756 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
727757 $$unique
730760 here=`$(am__cd) $(top_builddir) && pwd` \
731761 && $(am__cd) $(top_srcdir) \
732762 && gtags -i $(GTAGS_ARGS) "$$here"
763 cscopelist: cscopelist-recursive
764
765 cscopelist-am: $(am__tagged_files)
766 list='$(am__tagged_files)'; \
767 case "$(srcdir)" in \
768 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
769 *) sdir=$(subdir)/$(srcdir) ;; \
770 esac; \
771 for i in $$list; do \
772 if test -f "$$i"; then \
773 echo "$(subdir)/$$i"; \
774 else \
775 echo "$$sdir/$$i"; \
776 fi; \
777 done >> $(top_builddir)/cscope.files
733778
734779 distclean-tags:
735780 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
896941
897942 uninstall-am: uninstall-binPROGRAMS uninstall-dist_sysconfDATA
898943
899 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
900 install-am install-strip tags-recursive
901
902 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
903 all all-am check check-am clean clean-binPROGRAMS \
904 clean-generic ctags ctags-recursive distclean \
905 distclean-compile distclean-generic distclean-tags distdir dvi \
906 dvi-am html html-am info info-am install install-am \
907 install-binPROGRAMS install-data install-data-am \
908 install-dist_sysconfDATA install-dvi install-dvi-am \
909 install-exec install-exec-am install-html install-html-am \
910 install-info install-info-am install-man install-pdf \
911 install-pdf-am install-ps install-ps-am install-strip \
912 installcheck installcheck-am installdirs installdirs-am \
913 maintainer-clean maintainer-clean-generic mostlyclean \
914 mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
915 tags tags-recursive uninstall uninstall-am \
944 .MAKE: $(am__recursive_targets) install-am install-strip
945
946 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
947 check-am clean clean-binPROGRAMS clean-generic cscopelist-am \
948 ctags ctags-am distclean distclean-compile distclean-generic \
949 distclean-tags distdir dvi dvi-am html html-am info info-am \
950 install install-am install-binPROGRAMS install-data \
951 install-data-am install-dist_sysconfDATA install-dvi \
952 install-dvi-am install-exec install-exec-am install-html \
953 install-html-am install-info install-info-am install-man \
954 install-pdf install-pdf-am install-ps install-ps-am \
955 install-strip installcheck installcheck-am installdirs \
956 installdirs-am maintainer-clean maintainer-clean-generic \
957 mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
958 ps ps-am tags tags-am uninstall uninstall-am \
916959 uninstall-binPROGRAMS uninstall-dist_sysconfDATA
917960
918961
300300 if (strcmp(server, "proto.https") == 0) {
301301 /* Let's be kind and make the HTTP query string for the dpi */
302302 char *proxy_connect = a_Http_make_connect_str(web->url);
303 Dstr *http_query = a_Http_make_query_str(web->url, web->requester,FALSE);
303 Dstr *http_query = a_Http_make_query_str(web->url, web->requester,
304 web->flags, FALSE);
304305
305306 if ((uint_t) http_query->len > strlen(http_query->str)) {
306307 /* Can't handle NULLs embedded in query data */
241241 * Parsed color if successful,
242242 * default_color on error.
243243 *
244 * "err" argument:
244 * "err" argument:
245245 * 0 if a color beginning with '#' is successfully parsed
246246 * or the color is a recognized word.
247247 * 1 if the color is bare hex or can't be parsed at all.
00 /*
11 * File: css.cc
22 *
3 * Copyright 2008-2009 Johannes Hofmann <Johannes.Hofmann@gmx.de>
3 * Copyright 2008-2014 Johannes Hofmann <Johannes.Hofmann@gmx.de>
44 *
55 * This program is free software; you can redistribute it and/or modify
66 * it under the terms of the GNU General Public License as published by
8787 for (int i = 0; i < size (); i++) {
8888 CssPropertyValue value = getRef (i)->value;
8989
90 if (props->ownerOfStrings &&
90 if (props->ownerOfStrings &&
9191 (getRef (i)->type == CSS_TYPE_STRING ||
9292 getRef (i)->type == CSS_TYPE_SYMBOL))
9393 value.strVal = strdup(value.strVal);
107107 struct CombinatorAndSelector *cs;
108108
109109 refCount = 0;
110 selectorList = new lout::misc::SimpleVector
111 <struct CombinatorAndSelector> (1);
112 selectorList->increase ();
113 cs = selectorList->getRef (selectorList->size () - 1);
114
115 cs->notMatchingBefore = -1;
110 matchCacheOffset = -1;
111 selectorList.increase ();
112 cs = selectorList.getRef (selectorList.size () - 1);
113
116114 cs->combinator = COMB_NONE;
117115 cs->selector = new CssSimpleSelector ();
118116 }
119117
120118 CssSelector::~CssSelector () {
121 for (int i = selectorList->size () - 1; i >= 0; i--)
122 delete selectorList->getRef (i)->selector;
123 delete selectorList;
119 for (int i = selectorList.size () - 1; i >= 0; i--)
120 delete selectorList.getRef (i)->selector;
124121 }
125122
126123 /**
127124 * \brief Return whether selector matches at a given node in the document tree.
128125 */
129126 bool CssSelector::match (Doctree *docTree, const DoctreeNode *node,
130 int i, Combinator comb) {
127 int i, Combinator comb, MatchCache *matchCache) {
128 int *matchCacheEntry;
131129 assert (node);
132130
133131 if (i < 0)
134132 return true;
135133
136 struct CombinatorAndSelector *cs = selectorList->getRef (i);
134 struct CombinatorAndSelector *cs = selectorList.getRef (i);
137135 CssSimpleSelector *sel = cs->selector;
138136
139137 switch (comb) {
147145 break;
148146 case COMB_DESCENDANT:
149147 node = docTree->parent (node);
148 matchCacheEntry = matchCache->getRef(matchCacheOffset + i);
150149
151150 for (const DoctreeNode *n = node;
152 n && n->num > cs->notMatchingBefore; n = docTree->parent (n))
153 if (sel->match (n) && match (docTree, n, i - 1, cs->combinator))
151 n && n->num > *matchCacheEntry; n = docTree->parent (n))
152 if (sel->match (n) &&
153 match (docTree, n, i - 1, cs->combinator, matchCache))
154154 return true;
155155
156156 if (node) // remember that it didn't match to avoid future tests
157 cs->notMatchingBefore = node->num;
157 *matchCacheEntry = node->num;
158158
159159 return false;
160160 break;
166166 return false;
167167
168168 // tail recursion should be optimized by the compiler
169 return match (docTree, node, i - 1, cs->combinator);
169 return match (docTree, node, i - 1, cs->combinator, matchCache);
170170 }
171171
172172 void CssSelector::addSimpleSelector (Combinator c) {
173173 struct CombinatorAndSelector *cs;
174174
175 selectorList->increase ();
176 cs = selectorList->getRef (selectorList->size () - 1);
175 assert (matchCacheOffset == -1);
176 selectorList.increase ();
177 cs = selectorList.getRef (selectorList.size () - 1);
177178
178179 cs->combinator = c;
179 cs->notMatchingBefore = -1;
180180 cs->selector = new CssSimpleSelector ();
181181 }
182182
183183 bool CssSelector::checksPseudoClass () {
184 for (int i = 0; i < selectorList->size (); i++)
185 if (selectorList->getRef (i)->selector->getPseudoClass ())
184 for (int i = 0; i < selectorList.size (); i++)
185 if (selectorList.getRef (i)->selector->getPseudoClass ())
186186 return true;
187187 return false;
188188 }
196196 int CssSelector::specificity () {
197197 int spec = 0;
198198
199 for (int i = 0; i < selectorList->size (); i++)
200 spec += selectorList->getRef (i)->selector->specificity ();
199 for (int i = 0; i < selectorList.size (); i++)
200 spec += selectorList.getRef (i)->selector->specificity ();
201201
202202 return spec;
203203 }
204204
205205 void CssSelector::print () {
206 for (int i = 0; i < selectorList->size (); i++) {
207 selectorList->getRef (i)->selector->print ();
208
209 if (i < selectorList->size () - 1) {
210 switch (selectorList->getRef (i + 1)->combinator) {
206 for (int i = 0; i < selectorList.size (); i++) {
207 selectorList.getRef (i)->selector->print ();
208
209 if (i < selectorList.size () - 1) {
210 switch (selectorList.getRef (i + 1)->combinator) {
211211 case COMB_CHILD:
212212 fprintf (stderr, "> ");
213213 break;
229229
230230 CssSimpleSelector::CssSimpleSelector () {
231231 element = ELEMENT_ANY;
232 klass = NULL;
233232 id = NULL;
234233 pseudo = NULL;
235234 }
236235
237236 CssSimpleSelector::~CssSimpleSelector () {
238 if (klass) {
239 for (int i = 0; i < klass->size (); i++)
240 dFree (klass->get (i));
241 delete klass;
242 }
237 for (int i = 0; i < klass.size (); i++)
238 dFree (klass.get (i));
243239 dFree (id);
244240 dFree (pseudo);
245241 }
247243 void CssSimpleSelector::setSelect (SelectType t, const char *v) {
248244 switch (t) {
249245 case SELECT_CLASS:
250 if (klass == NULL)
251 klass = new lout::misc::SimpleVector <char *> (1);
252 klass->increase ();
253 klass->set (klass->size () - 1, dStrdup (v));
246 klass.increase ();
247 klass.set (klass.size () - 1, dStrdup (v));
254248 break;
255249 case SELECT_PSEUDO_CLASS:
256250 if (pseudo == NULL)
278272 return false;
279273 if (id != NULL && (n->id == NULL || dStrAsciiCasecmp (id, n->id) != 0))
280274 return false;
281 if (klass != NULL) {
282 for (int i = 0; i < klass->size (); i++) {
283 bool found = false;
284 if (n->klass != NULL) {
285 for (int j = 0; j < n->klass->size (); j++) {
286 if (dStrAsciiCasecmp (klass->get(i), n->klass->get(j)) == 0) {
287 found = true;
288 break;
289 }
275 for (int i = 0; i < klass.size (); i++) {
276 bool found = false;
277 if (n->klass != NULL) {
278 for (int j = 0; j < n->klass->size (); j++) {
279 if (dStrAsciiCasecmp (klass.get(i), n->klass->get(j)) == 0) {
280 found = true;
281 break;
290282 }
291283 }
292 if (! found)
293 return false;
294 }
284 }
285 if (! found)
286 return false;
295287 }
296288
297289 return true;
307299
308300 if (id)
309301 spec += 1 << 20;
310 if (klass)
311 spec += klass->size() << 10;
302 spec += klass.size() << 10;
312303 if (pseudo)
313304 spec += 1 << 10;
314305 if (element != ELEMENT_ANY)
320311 void CssSimpleSelector::print () {
321312 fprintf (stderr, "Element %d, pseudo %s, id %s ",
322313 element, pseudo, id);
323 if (klass != NULL) {
324 fprintf (stderr, "class ");
325 for (int i = 0; i < klass->size (); i++)
326 fprintf (stderr, ".%s", klass->get (i));
327 }
314 fprintf (stderr, "class ");
315 for (int i = 0; i < klass.size (); i++)
316 fprintf (stderr, ".%s", klass.get (i));
328317 }
329318
330319 CssRule::CssRule (CssSelector *selector, CssPropertyList *props, int pos) {
343332 props->unref ();
344333 }
345334
346 void CssRule::apply (CssPropertyList *props,
347 Doctree *docTree, const DoctreeNode *node) {
348 if (selector->match (docTree, node))
335 void CssRule::apply (CssPropertyList *props, Doctree *docTree,
336 const DoctreeNode *node, MatchCache *matchCache) const {
337 if (selector->match (docTree, node, matchCache))
349338 this->props->apply (props);
350339 }
351340
410399
411400 if (ruleList) {
412401 ruleList->insert (rule);
402 if (rule->selector->getRequiredMatchCache () > requiredMatchCache)
403 requiredMatchCache = rule->selector->getRequiredMatchCache ();
413404 } else {
414405 assert (top->getElement () == CssSimpleSelector::ELEMENT_NONE);
415406 delete rule;
422413 * The properties are set as defined by the rules in the stylesheet that
423414 * match at the given node in the document tree.
424415 */
425 void CssStyleSheet::apply (CssPropertyList *props,
426 Doctree *docTree, const DoctreeNode *node) {
416 void CssStyleSheet::apply (CssPropertyList *props, Doctree *docTree,
417 const DoctreeNode *node, MatchCache *matchCache) const {
427418 static const int maxLists = 32;
428 RuleList *ruleList[maxLists];
419 const RuleList *ruleList[maxLists];
429420 int numLists = 0, index[maxLists] = {0};
430421
431422 if (node->id) {
469460 int minSpecIndex = -1;
470461
471462 for (int i = 0; i < numLists; i++) {
472 RuleList *rl = ruleList[i];
463 const RuleList *rl = ruleList[i];
473464
474465 if (rl && rl->size () > index[i] &&
475466 (rl->get(index[i])->specificity () < minSpec ||
483474 }
484475
485476 if (minSpecIndex >= 0) {
486 ruleList[minSpecIndex]->get (index[minSpecIndex])->apply
487 (props, docTree, node);
477 CssRule *rule = ruleList[minSpecIndex]->get (index[minSpecIndex]);
478 rule->apply(props, docTree, node, matchCache);
488479 index[minSpecIndex]++;
489480 } else {
490481 break;
492483 }
493484 }
494485
486 CssStyleSheet CssContext::userAgentSheet;
487
495488 CssContext::CssContext () {
496489 pos = 0;
490 matchCache.setSize (userAgentSheet.getRequiredMatchCache (), -1);
497491 }
498492
499493 /**
510504 CssPropertyList *tagStyle, CssPropertyList *tagStyleImportant,
511505 CssPropertyList *nonCssHints) {
512506
513 sheet[CSS_PRIMARY_USER_AGENT].apply (props, docTree, node);
514 sheet[CSS_PRIMARY_USER].apply (props, docTree, node);
507 userAgentSheet.apply (props, docTree, node, &matchCache);
508
509 sheet[CSS_PRIMARY_USER].apply (props, docTree, node, &matchCache);
515510
516511 if (nonCssHints)
517512 nonCssHints->apply (props);
518513
519 sheet[CSS_PRIMARY_AUTHOR].apply (props, docTree, node);
514 sheet[CSS_PRIMARY_AUTHOR].apply (props, docTree, node, &matchCache);
520515
521516 if (tagStyle)
522517 tagStyle->apply (props);
523518
524 sheet[CSS_PRIMARY_AUTHOR_IMPORTANT].apply (props, docTree, node);
519 sheet[CSS_PRIMARY_AUTHOR_IMPORTANT].apply (props, docTree, node,
520 &matchCache);
525521
526522 if (tagStyleImportant)
527523 tagStyleImportant->apply (props);
528524
529 sheet[CSS_PRIMARY_USER_IMPORTANT].apply (props, docTree, node);
525 sheet[CSS_PRIMARY_USER_IMPORTANT].apply (props, docTree, node, &matchCache);
530526 }
531527
532528 void CssContext::addRule (CssSelector *sel, CssPropertyList *props,
541537 MSG_WARN ("Ignoring unsafe author style that might reveal browsing history\n");
542538 delete rule;
543539 } else {
544 sheet[order].addRule (rule);
545 }
546 }
547 }
540 rule->selector->setMatchCacheOffset(matchCache.size ());
541 if (rule->selector->getRequiredMatchCache () > matchCache.size ())
542 matchCache.setSize (rule->selector->getRequiredMatchCache (), -1);
543
544 if (order == CSS_PRIMARY_USER_AGENT) {
545 userAgentSheet.addRule (rule);
546 } else {
547 sheet[order].addRule (rule);
548 }
549 }
550 }
551 }
3636 'margin-*-width'). */
3737 CSS_TYPE_SIGNED_LENGTH, /* As CSS_TYPE_LENGTH but may be negative. */
3838 CSS_TYPE_LENGTH_PERCENTAGE_NUMBER, /* <length> or <percentage>, or <number> */
39 CSS_TYPE_AUTO, /* Represented as CssLength of type
40 CSS_LENGTH_TYPE_AUTO */
3941 CSS_TYPE_COLOR, /* Represented as integer. */
4042 CSS_TYPE_FONT_WEIGHT, /* this very special and only used by
4143 'font-weight' */
4446 opposed to CSS_TYPE_ENUM and
4547 CSS_TYPE_MULTI_ENUM). Used for
4648 'font-family'. */
49 CSS_TYPE_URI, /* <uri> */
50 CSS_TYPE_BACKGROUND_POSITION,
4751 CSS_TYPE_UNUSED /* Not yet used. Will itself get unused some
4852 day. */
4953 } CssValueType;
138142 }
139143
140144 typedef enum {
145 CSS_PROPERTY_END = -1, // used as terminator in CssShorthandInfo
141146 CSS_PROPERTY_BACKGROUND_ATTACHMENT,
142147 CSS_PROPERTY_BACKGROUND_COLOR,
143148 CSS_PROPERTY_BACKGROUND_IMAGE,
228233 CSS_PROPERTY_LAST
229234 } CssPropertyName;
230235
236 typedef struct {
237 int32_t posX;
238 int32_t posY;
239 } CssBackgroundPosition;
240
231241 typedef union {
232242 int32_t intVal;
233243 char *strVal;
244 CssBackgroundPosition *posVal;
234245 } CssPropertyValue;
235246
236247 typedef enum {
282293 switch (type) {
283294 case CSS_TYPE_STRING:
284295 case CSS_TYPE_SYMBOL:
296 case CSS_TYPE_URI:
285297 dFree (value.strVal);
286298 break;
299 case CSS_TYPE_BACKGROUND_POSITION:
300 dFree (value.posVal);
287301 default:
288302 break;
289303 }
322336 private:
323337 int element;
324338 char *pseudo, *id;
325 lout::misc::SimpleVector <char *> *klass;
339 lout::misc::SimpleVector <char *> klass;
326340
327341 public:
328342 enum {
341355 ~CssSimpleSelector ();
342356 inline void setElement (int e) { element = e; };
343357 void setSelect (SelectType t, const char *v);
344 inline lout::misc::SimpleVector <char *> *getClass () { return klass; };
358 inline lout::misc::SimpleVector <char *> *getClass () { return &klass; };
345359 inline const char *getPseudoClass () { return pseudo; };
346360 inline const char *getId () { return id; };
347361 inline int getElement () { return element; };
350364 void print ();
351365 };
352366
367 class MatchCache : public lout::misc::SimpleVector <int> {
368 public:
369 MatchCache() : lout::misc::SimpleVector <int> (0) {};
370 };
371
353372 /**
354373 * \brief CSS selector class.
355374 *
366385
367386 private:
368387 struct CombinatorAndSelector {
369 int notMatchingBefore; // used for optimizing CSS selector matching
370388 Combinator combinator;
371389 CssSimpleSelector *selector;
372390 };
373391
374 int refCount;
375 lout::misc::SimpleVector <struct CombinatorAndSelector> *selectorList;
376
377 bool match (Doctree *dt, const DoctreeNode *node, int i, Combinator comb);
392 int refCount, matchCacheOffset;
393 lout::misc::SimpleVector <struct CombinatorAndSelector> selectorList;
394
395 bool match (Doctree *dt, const DoctreeNode *node, int i, Combinator comb,
396 MatchCache *matchCache);
378397
379398 public:
380399 CssSelector ();
381400 ~CssSelector ();
382401 void addSimpleSelector (Combinator c);
383402 inline CssSimpleSelector *top () {
384 return selectorList->getRef (selectorList->size () - 1)->selector;
385 };
386 inline int size () { return selectorList->size (); };
387 inline bool match (Doctree *dt, const DoctreeNode *node) {
388 return match (dt, node, selectorList->size () - 1, COMB_NONE);
389 };
403 return selectorList.getRef (selectorList.size () - 1)->selector;
404 }
405 inline int size () { return selectorList.size (); };
406 inline bool match (Doctree *dt, const DoctreeNode *node,
407 MatchCache *matchCache) {
408 return match (dt, node, selectorList.size () - 1, COMB_NONE,
409 matchCache);
410 }
411 inline void setMatchCacheOffset (int mo) {
412 if (matchCacheOffset == -1)
413 matchCacheOffset = mo;
414 }
415 inline int getRequiredMatchCache () {
416 return matchCacheOffset + size ();
417 }
390418 int specificity ();
391419 bool checksPseudoClass ();
392420 void print ();
410438 CssRule (CssSelector *selector, CssPropertyList *props, int pos);
411439 ~CssRule ();
412440
413 void apply (CssPropertyList *props,
414 Doctree *docTree, const DoctreeNode *node);
441 void apply (CssPropertyList *props, Doctree *docTree,
442 const DoctreeNode *node, MatchCache *matchCache) const;
415443 inline bool isSafe () {
416444 return !selector->checksPseudoClass () || props->isSafe ();
417445 };
450478 <lout::object::ConstString, RuleList > (true, true, 256) {};
451479 };
452480
453 static const int ntags = 90; // \todo replace 90
481 static const int ntags = 90 + 14; // \todo don't hardcode
482 /* 90 is the full number of html4 elements, including those which we have
483 * implemented. From html5, let's add: article, header, footer, mark,
484 * nav, section, aside, figure, figcaption, wbr, audio, video, source,
485 * embed.
486 */
454487
455488 RuleList elementTable[ntags], anyTable;
456489 RuleMap idTable, classTable;
457
458 public:
490 int requiredMatchCache;
491
492 public:
493 CssStyleSheet () { requiredMatchCache = 0; }
459494 void addRule (CssRule *rule);
460 void apply (CssPropertyList *props,
461 Doctree *docTree, const DoctreeNode *node);
495 void apply (CssPropertyList *props, Doctree *docTree,
496 const DoctreeNode *node, MatchCache *matchCache) const;
497 int getRequiredMatchCache () { return requiredMatchCache; }
462498 };
463499
464500 /**
466502 */
467503 class CssContext {
468504 private:
505 static CssStyleSheet userAgentSheet;
469506 CssStyleSheet sheet[CSS_PRIMARY_USER_IMPORTANT + 1];
507 MatchCache matchCache;
470508 int pos;
471509
472510 public:
1818 #include <stdlib.h>
1919 #include <stdio.h>
2020
21 #include "lout/debug.hh"
2122 #include "msg.h"
2223 #include "colors.h"
2324 #include "html_common.hh"
2627
2728 using namespace dw::core::style;
2829
29 #define DEBUG_MSG(A, B, ...) _MSG(B, __VA_ARGS__)
3030 #define MSG_CSS(A, ...) MSG(A, __VA_ARGS__)
3131 #define DEBUG_TOKEN_LEVEL 0
3232 #define DEBUG_PARSE_LEVEL 0
4545 const CssValueType type[3];
4646 const char *const *enum_symbols;
4747 } CssPropertyInfo;
48
49 static const char *const Css_background_attachment_enum_vals[] = {
50 "scroll", "fixed", NULL
51 };
52
53 static const char *const Css_background_repeat_enum_vals[] = {
54 "repeat", "repeat-x", "repeat-y", "no-repeat", NULL
55 };
4856
4957 static const char *const Css_border_collapse_enum_vals[] = {
5058 "separate", "collapse", NULL
138146 };
139147
140148 const CssPropertyInfo Css_property_info[CSS_PROPERTY_LAST] = {
141 {"background-attachment", {CSS_TYPE_UNUSED}, NULL},
149 {"background-attachment", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED},
150 Css_background_attachment_enum_vals},
142151 {"background-color", {CSS_TYPE_COLOR, CSS_TYPE_UNUSED}, NULL},
143 {"background-image", {CSS_TYPE_UNUSED}, NULL},
144 {"background-position", {CSS_TYPE_UNUSED}, NULL},
145 {"background-repeat", {CSS_TYPE_UNUSED}, NULL},
152 {"background-image", {CSS_TYPE_URI, CSS_TYPE_UNUSED}, NULL},
153 {"background-position", {CSS_TYPE_BACKGROUND_POSITION, CSS_TYPE_UNUSED},
154 NULL},
155 {"background-repeat", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED},
156 Css_background_repeat_enum_vals},
146157 {"border-bottom-color", {CSS_TYPE_ENUM, CSS_TYPE_COLOR, CSS_TYPE_UNUSED},
147158 Css_border_color_enum_vals},
148159 {"border-bottom-style", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED},
193204 Css_font_variant_enum_vals},
194205 {"font-weight", {CSS_TYPE_ENUM, CSS_TYPE_FONT_WEIGHT, CSS_TYPE_UNUSED},
195206 Css_font_weight_enum_vals},
196 {"height", {CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_UNUSED}, NULL},
207 {"height", {CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_AUTO, CSS_TYPE_UNUSED}, NULL},
197208 {"left", {CSS_TYPE_UNUSED}, NULL},
198209 {"letter-spacing", {CSS_TYPE_ENUM, CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED},
199210 Css_letter_spacing_enum_vals},
205216 Css_list_style_position_enum_vals},
206217 {"list-style-type", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED},
207218 Css_list_style_type_enum_vals},
208 {"margin-bottom", {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED}, NULL},
209 {"margin-left", {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED}, NULL},
210 {"margin-right", {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED}, NULL},
211 {"margin-top", {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED}, NULL},
219 {"margin-bottom",
220 {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_AUTO, CSS_TYPE_UNUSED}, NULL},
221 {"margin-left",
222 {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_AUTO, CSS_TYPE_UNUSED}, NULL},
223 {"margin-right",
224 {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_AUTO, CSS_TYPE_UNUSED}, NULL},
225 {"margin-top",
226 {CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_AUTO, CSS_TYPE_UNUSED}, NULL},
212227 {"marker-offset", {CSS_TYPE_UNUSED}, NULL},
213228 {"marks", {CSS_TYPE_UNUSED}, NULL},
214229 {"max-height", {CSS_TYPE_UNUSED}, NULL},
238253 {"vertical-align",{CSS_TYPE_ENUM, CSS_TYPE_UNUSED},Css_vertical_align_vals},
239254 {"visibility", {CSS_TYPE_UNUSED}, NULL},
240255 {"white-space", {CSS_TYPE_ENUM, CSS_TYPE_UNUSED}, Css_white_space_vals},
241 {"width", {CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_UNUSED}, NULL},
256 {"width", {CSS_TYPE_LENGTH_PERCENTAGE, CSS_TYPE_AUTO, CSS_TYPE_UNUSED}, NULL},
242257 {"word-spacing", {CSS_TYPE_ENUM, CSS_TYPE_SIGNED_LENGTH, CSS_TYPE_UNUSED},
243258 Css_word_spacing_enum_vals},
244259 {"z-index", {CSS_TYPE_UNUSED}, NULL},
259274 CSS_SHORTHAND_BORDER, /* special, used for 'border' */
260275 CSS_SHORTHAND_FONT, /* special, used for 'font' */
261276 } type;
262 const CssPropertyName * properties;/* CSS_SHORTHAND_MULTIPLE:
263 * must be terminated by -1
277 const CssPropertyName *properties; /* CSS_SHORTHAND_MULTIPLE:
278 * must be terminated by
279 * CSS_PROPERTY_END
264280 * CSS_SHORTHAND_DIRECTIONS:
265281 * must have length 4
266282 * CSS_SHORTHAND_BORDERS:
275291 CSS_PROPERTY_BACKGROUND_REPEAT,
276292 CSS_PROPERTY_BACKGROUND_ATTACHMENT,
277293 CSS_PROPERTY_BACKGROUND_POSITION,
278 (CssPropertyName) - 1
294 CSS_PROPERTY_END
279295 };
280296
281297 const CssPropertyName Css_border_bottom_properties[] = {
282298 CSS_PROPERTY_BORDER_BOTTOM_WIDTH,
283299 CSS_PROPERTY_BORDER_BOTTOM_STYLE,
284300 CSS_PROPERTY_BORDER_BOTTOM_COLOR,
285 (CssPropertyName) - 1
301 CSS_PROPERTY_END
286302 };
287303
288304 const CssPropertyName Css_border_color_properties[4] = {
296312 CSS_PROPERTY_BORDER_LEFT_WIDTH,
297313 CSS_PROPERTY_BORDER_LEFT_STYLE,
298314 CSS_PROPERTY_BORDER_LEFT_COLOR,
299 (CssPropertyName) - 1
315 CSS_PROPERTY_END
300316 };
301317
302318 const CssPropertyName Css_border_right_properties[] = {
303319 CSS_PROPERTY_BORDER_RIGHT_WIDTH,
304320 CSS_PROPERTY_BORDER_RIGHT_STYLE,
305321 CSS_PROPERTY_BORDER_RIGHT_COLOR,
306 (CssPropertyName) - 1
322 CSS_PROPERTY_END
307323 };
308324
309325 const CssPropertyName Css_border_style_properties[] = {
317333 CSS_PROPERTY_BORDER_TOP_WIDTH,
318334 CSS_PROPERTY_BORDER_TOP_STYLE,
319335 CSS_PROPERTY_BORDER_TOP_COLOR,
320 (CssPropertyName) - 1
336 CSS_PROPERTY_END
321337 };
322338
323339 const CssPropertyName Css_border_width_properties[] = {
331347 CSS_PROPERTY_LIST_STYLE_TYPE,
332348 CSS_PROPERTY_LIST_STYLE_POSITION,
333349 CSS_PROPERTY_LIST_STYLE_IMAGE,
334 (CssPropertyName) - 1
350 CSS_PROPERTY_END
335351 };
336352
337353 const CssPropertyName Css_margin_properties[] = {
345361 CSS_PROPERTY_OUTLINE_COLOR,
346362 CSS_PROPERTY_OUTLINE_STYLE,
347363 CSS_PROPERTY_OUTLINE_WIDTH,
348 (CssPropertyName) - 1
364 CSS_PROPERTY_END
349365 };
350366
351367 const CssPropertyName Css_padding_properties[] = {
376392 CSS_PROPERTY_FONT_VARIANT,
377393 CSS_PROPERTY_FONT_WEIGHT,
378394 CSS_PROPERTY_FONT_FAMILY,
379 (CssPropertyName) - 1
395 CSS_PROPERTY_END
380396 };
381397
382398 static const CssShorthandInfo Css_shorthand_info[] = {
418434 * ---------------------------------------------------------------------- */
419435
420436 CssParser::CssParser(CssContext *context, CssOrigin origin,
437 const DilloUrl *baseUrl,
421438 const char *buf, int buflen)
422439 {
423440 this->context = context;
427444 this->bufptr = 0;
428445 this->spaceSeparated = false;
429446 this->withinBlock = false;
447 this->baseUrl = baseUrl;
430448
431449 nextToken ();
432450 }
693711 }
694712 break;
695713
714 case CSS_TYPE_BACKGROUND_POSITION:
715 if (ttype == CSS_TK_SYMBOL &&
716 (dStrAsciiCasecmp(tval, "center") == 0 ||
717 dStrAsciiCasecmp(tval, "left") == 0 ||
718 dStrAsciiCasecmp(tval, "right") == 0 ||
719 dStrAsciiCasecmp(tval, "top") == 0 ||
720 dStrAsciiCasecmp(tval, "bottom") == 0))
721 return true;
722 // Fall Through (lenght and percentage)
696723 case CSS_TYPE_LENGTH_PERCENTAGE:
697724 case CSS_TYPE_LENGTH_PERCENTAGE_NUMBER:
698725 case CSS_TYPE_LENGTH:
700727 return false;
701728 // Fall Through
702729 case CSS_TYPE_SIGNED_LENGTH:
703 if (ttype == CSS_TK_DECINT ||
704 ttype == CSS_TK_FLOAT ||
705 (ttype == CSS_TK_SYMBOL && dStrAsciiCasecmp(tval, "auto") == 0))
730 if (ttype == CSS_TK_DECINT || ttype == CSS_TK_FLOAT)
731 return true;
732 break;
733
734 case CSS_TYPE_AUTO:
735 if (ttype == CSS_TK_SYMBOL && dStrAsciiCasecmp(tval, "auto") == 0)
706736 return true;
707737 break;
708738
733763 }
734764 break;
735765
766 case CSS_TYPE_URI:
767 if (ttype == CSS_TK_SYMBOL &&
768 dStrAsciiCasecmp(tval, "url") == 0)
769 return true;
770 break;
771
736772 case CSS_TYPE_UNUSED:
737773 case CSS_TYPE_INTEGER:
738774 /* Not used for parser values. */
825861
826862 bool CssParser::parseValue(CssPropertyName prop,
827863 CssValueType type,
828 CssPropertyValue * val)
864 CssPropertyValue *val)
829865 {
830866 CssLengthType lentype;
831867 bool found, ret = false;
926962 ret = true;
927963
928964 val->intVal = CSS_CREATE_LENGTH(fval, lentype);
929 } else if (ttype == CSS_TK_SYMBOL && !dStrAsciiCasecmp(tval, "auto")) {
930 ret = true;
931 val->intVal = CSS_LENGTH_TYPE_AUTO;
932 nextToken();
933 }
965 }
966 break;
967
968 case CSS_TYPE_AUTO:
969 assert (ttype == CSS_TK_SYMBOL && !dStrAsciiCasecmp(tval, "auto"));
970 ret = true;
971 val->intVal = CSS_LENGTH_TYPE_AUTO;
972 nextToken();
934973 break;
935974
936975 case CSS_TYPE_COLOR:
10031042 }
10041043 break;
10051044
1045 case CSS_TYPE_URI:
1046 if (ttype == CSS_TK_SYMBOL &&
1047 dStrAsciiCasecmp(tval, "url") == 0) {
1048 val->strVal = parseUrl();
1049 nextToken();
1050 if (val->strVal)
1051 ret = true;
1052 }
1053 break;
1054
1055 case CSS_TYPE_BACKGROUND_POSITION:
1056 // 'background-position' consists of one or two values: vertical and
1057 // horizontal position; in most cases in this order. However, as long it
1058 // is unambigous, the order can be switched: "10px left" and "left 10px"
1059 // are both possible and have the same effect. For this reason, all
1060 // possibilities are tested in parallel.
1061
1062 bool h[2], v[2];
1063 int pos[2];
1064 h[0] = v[0] = h[1] = v[1] = false;
1065
1066 // First: collect values in pos[0] and pos[1], and determine whether
1067 // they can be used for a horizontal (h[i]) or vertical (v[i]) position
1068 // (or both). When neither h[i] or v[i] is set, pos[i] is undefined.
1069 for (i = 0; i < 2; i++) {
1070 CssValueType typeTmp;
1071 // tokenMatchesProperty will, for CSS_PROPERTY_BACKGROUND_POSITION,
1072 // work on both parts, since they are exchangable.
1073 if (tokenMatchesProperty (CSS_PROPERTY_BACKGROUND_POSITION,
1074 &typeTmp)) {
1075 h[i] = ttype != CSS_TK_SYMBOL ||
1076 (dStrAsciiCasecmp(tval, "top") != 0 &&
1077 dStrAsciiCasecmp(tval, "bottom") != 0);
1078 v[i] = ttype != CSS_TK_SYMBOL ||
1079 (dStrAsciiCasecmp(tval, "left") != 0 &&
1080 dStrAsciiCasecmp(tval, "right") != 0);
1081 } else
1082 // No match.
1083 h[i] = v[i] = false;
1084
1085 if (h[i] || v[i]) {
1086 // Calculate values.
1087 if (ttype == CSS_TK_SYMBOL) {
1088 if (dStrAsciiCasecmp(tval, "top") == 0 ||
1089 dStrAsciiCasecmp(tval, "left") == 0) {
1090 pos[i] = CSS_CREATE_LENGTH (0.0, CSS_LENGTH_TYPE_PERCENTAGE);
1091 nextToken();
1092 } else if (dStrAsciiCasecmp(tval, "center") == 0) {
1093 pos[i] = CSS_CREATE_LENGTH (0.5, CSS_LENGTH_TYPE_PERCENTAGE);
1094 nextToken();
1095 } else if (dStrAsciiCasecmp(tval, "bottom") == 0 ||
1096 dStrAsciiCasecmp(tval, "right") == 0) {
1097 pos[i] = CSS_CREATE_LENGTH (1.0, CSS_LENGTH_TYPE_PERCENTAGE);
1098 nextToken();
1099 } else
1100 // tokenMatchesProperty should have returned "false" already.
1101 lout::misc::assertNotReached ();
1102 } else {
1103 // We can assume <length> or <percentage> here ...
1104 CssPropertyValue valTmp;
1105 if (parseValue(prop, CSS_TYPE_LENGTH_PERCENTAGE, &valTmp)) {
1106 pos[i] = valTmp.intVal;
1107 ret = true;
1108 } else
1109 // ... but something may still fail.
1110 h[i] = v[i] = false;
1111 }
1112 }
1113
1114 // If the first value cannot be read, do not read the second.
1115 if (!h[i] && !v[i])
1116 break;
1117 }
1118
1119 // Second: Create the final value. Order will be determined here.
1120 if (v[0] || h[0]) {
1121 // If second value is not set, it is set to "center", i. e. 50%, (see
1122 // CSS specification), which is suitable for both dimensions.
1123 if (!h[1] && !v[1]) {
1124 pos[1] = CSS_CREATE_LENGTH (0.5, CSS_LENGTH_TYPE_PERCENTAGE);
1125 h[1] = v[1] = true;
1126 }
1127
1128 // Only valid, when a combination h/v or v/h is possible.
1129 if ((h[0] && v[1]) || (v[0] && h[1])) {
1130 ret = true;
1131 val->posVal = dNew(CssBackgroundPosition, 1);
1132
1133 // Prefer combination h/v:
1134 if (h[0] && v[1]) {
1135 val->posVal->posX = pos[0];
1136 val->posVal->posY = pos[1];
1137 } else {
1138 // This should be v/h:
1139 val->posVal->posX = pos[1];
1140 val->posVal->posY = pos[0];
1141 }
1142 }
1143 }
1144 break;
1145
10061146 case CSS_TYPE_UNUSED:
10071147 /* nothing */
10081148 break;
10491189 ((CssShorthandInfo *) b)->symbol);
10501190 }
10511191
1052 void CssParser::parseDeclaration(CssPropertyList * props,
1053 CssPropertyList * importantProps)
1192 void CssParser::parseDeclaration(CssPropertyList *props,
1193 CssPropertyList *importantProps)
10541194 {
10551195 CssPropertyInfo pi = {NULL, {CSS_TYPE_UNUSED}, NULL}, *pip;
10561196 CssShorthandInfo *sip;
11101250 do {
11111251 for (found = false, i = 0;
11121252 !found &&
1113 Css_shorthand_info[sh_index].properties[i] != -1;
1253 Css_shorthand_info[sh_index].properties[i] !=
1254 CSS_PROPERTY_END;
11141255 i++)
11151256 if (tokenMatchesProperty(Css_shorthand_info[sh_index].
11161257 properties[i], &type)) {
14181559 }
14191560
14201561 if (urlStr) {
1421 char *url = urlStr->str;
1422 dStr_free(urlStr, 0);
1562 DilloUrl *dilloUrl = a_Url_new(urlStr->str, a_Url_str(this->baseUrl));
1563 char *url = dStrdup(a_Url_str(dilloUrl));
1564 a_Url_free(dilloUrl);
1565 dStr_free(urlStr, 1);
14231566 return url;
14241567 } else {
14251568 return NULL;
14261569 }
14271570 }
14281571
1429 void CssParser::parseImport(DilloHtml *html, DilloUrl *baseUrl)
1572 void CssParser::parseImport(DilloHtml *html)
14301573 {
14311574 char *urlStr = NULL;
14321575 bool importSyntaxIsOK = false;
14721615 if (urlStr) {
14731616 if (importSyntaxIsOK && mediaIsSelected) {
14741617 MSG("CssParser::parseImport(): @import %s\n", urlStr);
1475 DilloUrl *url = a_Html_url_new (html, urlStr, a_Url_str(baseUrl),
1476 baseUrl ? 1 : 0);
1618 DilloUrl *url = a_Html_url_new (html, urlStr, a_Url_str(this->baseUrl),
1619 this->baseUrl ? 1 : 0);
14771620 a_Html_load_stylesheet(html, url);
14781621 a_Url_free(url);
14791622 }
15651708 }
15661709 }
15671710
1568 void CssParser::parse(DilloHtml *html, DilloUrl *url, CssContext * context,
1711 void CssParser::parse(DilloHtml *html, const DilloUrl *baseUrl,
1712 CssContext *context,
15691713 const char *buf,
15701714 int buflen, CssOrigin origin)
15711715 {
1572 CssParser parser (context, origin, buf, buflen);
1716 CssParser parser (context, origin, baseUrl, buf, buflen);
15731717 bool importsAreAllowed = true;
15741718
15751719 while (parser.ttype != CSS_TK_END) {
15801724 if (dStrAsciiCasecmp(parser.tval, "import") == 0 &&
15811725 html != NULL &&
15821726 importsAreAllowed) {
1583 parser.parseImport(html, url);
1727 parser.parseImport(html);
15841728 } else if (dStrAsciiCasecmp(parser.tval, "media") == 0) {
15851729 parser.parseMedia();
15861730 } else {
15961740 }
15971741 }
15981742
1599 void CssParser::parseDeclarationBlock(const char *buf, int buflen,
1743 void CssParser::parseDeclarationBlock(const DilloUrl *baseUrl,
1744 const char *buf, int buflen,
16001745 CssPropertyList *props,
16011746 CssPropertyList *propsImortant)
16021747 {
1603 CssParser parser (NULL, CSS_ORIGIN_AUTHOR, buf, buflen);
1748 CssParser parser (NULL, CSS_ORIGIN_AUTHOR, baseUrl, buf, buflen);
16041749
16051750 parser.withinBlock = true;
16061751
11 #define __CSSPARSER_HH__
22
33 #include "css.hh"
4 #include "html_common.hh"
4
5 class DilloHtml;
56
67 class CssParser {
78 private:
1314 static const int maxStrLen = 256;
1415 CssContext *context;
1516 CssOrigin origin;
17 const DilloUrl *baseUrl;
1618
1719 const char *buf;
1820 int buflen, bufptr;
2224 bool withinBlock;
2325 bool spaceSeparated; /* used when parsing CSS selectors */
2426
25 CssParser(CssContext *context, CssOrigin origin,
27 CssParser(CssContext *context, CssOrigin origin, const DilloUrl *baseUrl,
2628 const char *buf, int buflen);
2729 int getChar();
2830 void ungetChar();
3840 CssPropertyList * importantProps);
3941 bool parseSimpleSelector(CssSimpleSelector *selector);
4042 char *parseUrl();
41 void parseImport(DilloHtml *html, DilloUrl *url);
43 void parseImport(DilloHtml *html);
4244 void parseMedia();
4345 CssSelector *parseSelector();
4446 void parseRuleset();
4648 void ignoreStatement();
4749
4850 public:
49 static void parseDeclarationBlock(const char *buf, int buflen,
51 static void parseDeclarationBlock(const DilloUrl *baseUrl,
52 const char *buf, int buflen,
5053 CssPropertyList *props,
5154 CssPropertyList *propsImortant);
52 static void parse(DilloHtml *html, DilloUrl *url, CssContext *context,
55 static void parse(DilloHtml *html, const DilloUrl *baseUrl, CssContext *context,
5356 const char *buf, int buflen, CssOrigin origin);
5457 static const char *propertyNameString(CssPropertyName name);
5558 };
8585 dStr_free(dc->leftover, 1);
8686 }
8787
88 static void Decode_compression_free(Decode *dc)
89 {
90 (void)inflateEnd((z_stream *)dc->state);
91
92 dFree(dc->state);
93 dFree(dc->buffer);
94 }
95
96 /*
97 * BUG: A fair amount of duplicated code exists in the gzip/deflate decoding,
98 * but an attempt to pull out the common code left everything too contorted
99 * for what it accomplished.
100 */
101
88102 /*
89103 * Decode gzipped data
90104 */
121135 return output;
122136 }
123137
124 static void Decode_gzip_free(Decode *dc)
125 {
126 (void)inflateEnd((z_stream *)dc->state);
127
128 dFree(dc->state);
129 dFree(dc->buffer);
138 /*
139 * Decode (raw) deflated data
140 */
141 static Dstr *Decode_raw_deflate(Decode *dc, const char *instr, int inlen)
142 {
143 int rc = Z_OK;
144
145 z_stream *zs = (z_stream *)dc->state;
146
147 int inputConsumed = 0;
148 Dstr *output = dStr_new("");
149
150 while ((rc == Z_OK) && (inputConsumed < inlen)) {
151 zs->next_in = (Bytef *)instr + inputConsumed;
152 zs->avail_in = inlen - inputConsumed;
153
154 zs->next_out = (Bytef *)dc->buffer;
155 zs->avail_out = bufsize;
156
157 rc = inflate(zs, Z_SYNC_FLUSH);
158
159 dStr_append_l(output, dc->buffer, zs->total_out);
160
161 if ((rc == Z_OK) || (rc == Z_STREAM_END)) {
162 // Z_STREAM_END at end of file
163
164 inputConsumed += zs->total_in;
165 zs->total_out = 0;
166 zs->total_in = 0;
167 } else if (rc == Z_DATA_ERROR) {
168 MSG_ERR("raw deflate decompression also failed\n");
169 }
170 }
171 return output;
172 }
173
174 /*
175 * Decode deflated data, initially presuming that the required zlib wrapper
176 * is there. On data error, switch to Decode_raw_deflate().
177 */
178 static Dstr *Decode_deflate(Decode *dc, const char *instr, int inlen)
179 {
180 int rc = Z_OK;
181
182 z_stream *zs = (z_stream *)dc->state;
183
184 int inputConsumed = 0;
185 Dstr *output = dStr_new("");
186
187 while ((rc == Z_OK) && (inputConsumed < inlen)) {
188 zs->next_in = (Bytef *)instr + inputConsumed;
189 zs->avail_in = inlen - inputConsumed;
190
191 zs->next_out = (Bytef *)dc->buffer;
192 zs->avail_out = bufsize;
193
194 rc = inflate(zs, Z_SYNC_FLUSH);
195
196 dStr_append_l(output, dc->buffer, zs->total_out);
197
198 if ((rc == Z_OK) || (rc == Z_STREAM_END)) {
199 // Z_STREAM_END at end of file
200
201 inputConsumed += zs->total_in;
202 zs->total_out = 0;
203 zs->total_in = 0;
204 } else if (rc == Z_DATA_ERROR) {
205 MSG_WARN("Deflate decompression error. Certain servers illegally fail"
206 " to send data in a zlib wrapper. Let's try raw deflate.\n");
207 dStr_free(output, 1);
208 (void)inflateEnd(zs);
209 dFree(dc->state);
210 dc->state = zs = dNew(z_stream, 1);;
211 zs->zalloc = NULL;
212 zs->zfree = NULL;
213 zs->next_in = NULL;
214 zs->avail_in = 0;
215 dc->decode = Decode_raw_deflate;
216
217 // Negative value means that we want raw deflate.
218 inflateInit2(zs, -MAX_WBITS);
219
220 return Decode_raw_deflate(dc, instr, inlen);
221 }
222 }
223 return output;
130224 }
131225
132226 /*
203297 return dc;
204298 }
205299
206 /*
207 * Initialize content decoder. Currently handles gzip.
208 *
209 * zlib is also capable of handling "deflate"/zlib-encoded data, but web
210 * servers have not standardized on whether to send such data with a header.
300 static Decode *Decode_content_init_common()
301 {
302 z_stream *zs = dNew(z_stream, 1);
303 Decode *dc = dNew(Decode, 1);
304
305 zs->zalloc = NULL;
306 zs->zfree = NULL;
307 zs->next_in = NULL;
308 zs->avail_in = 0;
309 dc->state = zs;
310 dc->buffer = dNew(char, bufsize);
311
312 dc->free = Decode_compression_free;
313 dc->leftover = NULL; /* not used */
314 return dc;
315 }
316
317 /*
318 * Initialize content decoder. Currently handles 'gzip' and 'deflate'.
211319 */
212320 Decode *a_Decode_content_init(const char *format)
213321 {
322 z_stream *zs;
214323 Decode *dc = NULL;
215324
216325 if (format && *format) {
217326 if (!dStrAsciiCasecmp(format, "gzip") ||
218327 !dStrAsciiCasecmp(format, "x-gzip")) {
219 z_stream *zs;
220328 _MSG("gzipped data!\n");
221329
222 dc = dNew(Decode, 1);
223 dc->buffer = dNew(char, bufsize);
224 dc->state = zs = dNew(z_stream, 1);
225 zs->zalloc = NULL;
226 zs->zfree = NULL;
227 zs->next_in = NULL;
228 zs->avail_in = 0;
229
330 dc = Decode_content_init_common();
331 zs = (z_stream *)dc->state;
230332 /* 16 is a magic number for gzip decoding */
231333 inflateInit2(zs, MAX_WBITS+16);
232334
233335 dc->decode = Decode_gzip;
234 dc->free = Decode_gzip_free;
235 dc->leftover = NULL; /* not used */
336 } else if (!dStrAsciiCasecmp(format, "deflate")) {
337 MSG("deflated data!\n");
338
339 dc = Decode_content_init_common();
340 zs = (z_stream *)dc->state;
341 inflateInit(zs);
342
343 dc->decode = Decode_deflate;
236344 } else {
237345 MSG("Content-Encoding '%s' not recognized.\n", format);
238346 }
361361 Fl_Group *ib = new Fl_Group(0, 0, window->w(), window->h());
362362 ib->begin();
363363 window->resizable(ib);
364
364
365365 /* '?' Icon */
366366 Fl_Box *o = new Fl_Box(10, (wh - bh - ih) / 2, ih, ih);
367367 o->box(FL_THIN_UP_BOX);
371371 o->labelcolor(FL_BLUE);
372372 o->label("?");
373373 o->show();
374
374
375375 if (msg != NULL){
376376 Fl_Box *box = new Fl_Box(60, 0, ww - 60, wh - bh, msg);
377377 box->labelfont(FL_HELVETICA);
378378 box->labelsize(14);
379379 box->align(FL_ALIGN_WRAP);
380380 }
381
381
382382 int xpos = gap;
383383 va_start(ap, msg);
384384 for (i = 1; i <= n; i++) {
258258 * (By now, we'll use the image information despite the html tags --Jcid)
259259 */
260260 void a_Dicache_set_parms(DilloUrl *url, int version, DilloImage *Image,
261 uint_t width, uint_t height, DilloImgType type)
261 uint_t width, uint_t height, DilloImgType type,
262 double gamma)
262263 {
263264 DICacheEntry *DicEntry;
264265
274275
275276 /* BUG: there's just one image-type now */
276277 #define I_RGB 0
277 DicEntry->v_imgbuf = a_Imgbuf_new(Image->dw, I_RGB, width, height);
278 DicEntry->v_imgbuf =
279 a_Imgbuf_new(Image->layout, I_RGB, width, height, gamma);
278280
279281 DicEntry->TotalSize = width * height * 3;
280282 DicEntry->width = width;
400402 dReturn_val_if_fail(MimeType && Ptr, NULL);
401403
402404 if (!web->Image) {
403 web->Image = a_Image_new(NULL, web->bgColor);
405 web->Image =
406 a_Image_new_with_dw(web->bw->render_layout, NULL, web->bgColor);
404407 a_Image_ref(web->Image);
405408 }
406409
427430 *Data = DicEntry->DecoderData;
428431 *Call = (CA_Callback_t) a_Dicache_callback;
429432
430 return (web->Image->dw);
433 return (a_Image_get_dw (web->Image));
431434 }
432435
433436 /*
514517 Image->ScanNumber = DicEntry->ScanNumber;
515518 }
516519 }
517 } else if (Op == CA_Close || Op == CA_Abort) {
520 } else if (Op == CA_Close) {
518521 a_Image_close(Image);
522 a_Bw_close_client(Web->bw, Client->Key);
523 } else if (Op == CA_Abort) {
524 a_Image_abort(Image);
519525 a_Bw_close_client(Web->bw, Client->Key);
520526 }
521527 }
5858 void a_Dicache_callback(int Op, CacheClient_t *Client);
5959
6060 void a_Dicache_set_parms(DilloUrl *url, int version, DilloImage *Image,
61 uint_t width, uint_t height, DilloImgType type);
61 uint_t width, uint_t height, DilloImgType type,
62 double gamma);
6263 void a_Dicache_set_cmap(DilloUrl *url, int version, DilloImage *Image,
6364 const uchar_t *cmap, uint_t num_colors,
6465 int num_colors_max, int bg_index);
2020 #include <unistd.h>
2121 #include <stdlib.h>
2222 #include <time.h>
23 #include <sys/types.h>
24 #include <sys/wait.h>
2325 #include <signal.h>
2426 #include <locale.h>
27 #include <errno.h>
2528
2629 #include <FL/Fl.H>
2730 #include <FL/Fl_Window.H>
4851 #include "cookies.h"
4952 #include "domain.h"
5053 #include "auth.h"
51
54 #include "styleengine.hh"
55
56 #include "lout/debug.hh"
5257 #include "dw/fltkcore.hh"
5358 #include "dw/textblock.hh"
5459
9499 {NULL, NULL, 0, DILLO_CLI_NONE, NULL}
95100 };
96101
102
103 /*
104 * SIGCHLD handling ----------------------------------------------------------
105 */
106
107 /*
108 * Avoid our children (Dpid) to become zombies. :-)
109 * Notes:
110 * . We let sigaction block SIGCHLD while in the handler.
111 * . Portability is not simple. e.g.
112 * http://www.faqs.org/faqs/unix-faq/faq/part3/section-13.html
113 * man sigaction, waitpid
114 */
115 static void raw_sigchld2(int signum)
116 {
117 pid_t pid;
118 int status;
119
120 while (1) {
121 pid = waitpid(-1, &status, WNOHANG);
122 if (pid > 0) {
123 if (WIFEXITED(status)) /* normal exit */
124 printf("[dpid]: terminated normally (%d)\n", WEXITSTATUS(status));
125 else if (WIFSIGNALED(status)) /* terminated by signal */
126 printf("[dpid]: terminated by signal %d\n", WTERMSIG(status));
127 } else if (pid == 0 || errno == ECHILD) {
128 break;
129 } else {
130 if (errno == EINTR)
131 continue;
132 perror("waitpid");
133 break;
134 }
135 }
136 ++signum; /* compiler happiness */
137 }
138
139 /*
140 * Establish SIGCHLD handler
141 */
142 static void est_sigchld(void)
143 {
144 struct sigaction sigact;
145 sigset_t set;
146
147 (void) sigemptyset(&set);
148 sigact.sa_handler = raw_sigchld2; /* our custom handler */
149 sigact.sa_mask = set; /* no aditional signal blocks */
150 sigact.sa_flags = SA_NOCLDSTOP; /* ignore stop/resume states */
151 if (sigaction(SIGCHLD, &sigact, NULL) == -1) {
152 perror("sigaction");
153 exit(1);
154 }
155 }
156
157 //----------------------------------------------------------------------------
158
97159 /*
98160 * Print help text generated from the options structure
99161 */
276338 setUIColorWdef(PREFS_UI_TAB_ACTIVE_FG_COLOR, prefs.ui_tab_active_fg_color,
277339 Fl::get_color(FL_FOREGROUND_COLOR));
278340 setUIColorWdef(PREFS_UI_TAB_FG_COLOR, prefs.ui_tab_fg_color,
279 Fl::get_color(FL_FOREGROUND_COLOR));
341 Fl::get_color(FL_FOREGROUND_COLOR));
280342 }
281343
282344 /*
314376 */
315377 int main(int argc, char **argv)
316378 {
379 DBG_OBJ_COLOR("#c0ff80", "dw::*");
380 DBG_OBJ_COLOR("#c0c0ff", "dw::fltk::*");
381 DBG_OBJ_COLOR("#ffa0a0", "dw::core::*");
382 DBG_OBJ_COLOR("#ffe0a0", "dw::core::style::*");
383
317384 uint_t opt_id;
318385 uint_t options_got = 0;
319386 uint32_t xid = 0;
328395
329396 // Some OSes exit dillo without this (not GNU/Linux).
330397 signal(SIGPIPE, SIG_IGN);
398 // Establish our custom SIGCHLD handler
399 est_sigchld();
331400
332401 /* Handle command line options */
333402 opt_argv = dNew0(char*, numOptions(Options) + 1);
403472 a_Cookies_init();
404473 a_Auth_init();
405474 a_UIcmd_init();
475 StyleEngine::init();
406476
407477 dw::Textblock::setPenaltyHyphen (prefs.penalty_hyphen);
408478 dw::Textblock::setPenaltyHyphen2 (prefs.penalty_hyphen_2);
409479 dw::Textblock::setPenaltyEmDashLeft (prefs.penalty_em_dash_left);
410480 dw::Textblock::setPenaltyEmDashRight (prefs.penalty_em_dash_right);
411481 dw::Textblock::setPenaltyEmDashRight2 (prefs.penalty_em_dash_right_2);
482 dw::Textblock::setStretchabilityFactor (prefs.stretchability_factor);
412483
413484 /* command line options override preferences */
414485 if (options_got & DILLO_CLI_FULLWINDOW)
426497 Fl::scheme(prefs.theme);
427498 setColors();
428499
429 if (!prefs.show_tooltip) {
430 // turn off UI tooltips
500 if (!prefs.show_ui_tooltip) {
431501 Fl::option(Fl::OPTION_SHOW_TOOLTIPS, false);
432502 }
433503
515585 a_Prefs_freeall();
516586 Keys::free();
517587 Paths::free();
588 dw::core::freeall();
589 dw::fltk::freeall();
518590 /* TODO: auth, css */
519591
520592 //a_Dpi_dillo_exit();
124124 source_host = URL_HOST(source);
125125 dest_host = URL_HOST(dest);
126126
127 if (dest_host[0] == '\0')
128 return source_host[0] == '\0' ||
129 !dStrAsciiCasecmp(URL_SCHEME(dest), "data");
127 if (dest_host[0] == '\0') {
128 ret = source_host[0] == '\0' ||
129 !dStrAsciiCasecmp(URL_SCHEME(dest), "data");
130 if (ret == FALSE)
131 MSG("Domain: DENIED from %s to %s.\n", source_host, URL_STR(dest));
132 return ret;
133 }
130134
131135 if (a_Url_same_organization(source, dest))
132136 return TRUE;
143147 }
144148 }
145149
146 if (ret == FALSE)
147 MSG("Domain: DENIED from %s to %s.\n", source_host, dest_host);
150 if (ret == FALSE) {
151 const char *src = source_host[0] ? source_host : URL_STR(source);
148152
153 MSG("Domain: DENIED from %s to %s.\n", src, dest_host);
154 }
149155 return ret;
150156 }
3535
3636 class DilloHtmlReceiver;
3737 class DilloHtmlSelect;
38 class DilloHtmlOption;
3938
4039 static Embed *Html_input_image(DilloHtml *html, const char *tag, int tagsize);
4140
165164 void setEnabled(bool enabled) {if (embed) embed->setEnabled(enabled); };
166165 };
167166
167 class DilloHtmlOptbase
168 {
169 public:
170 virtual ~DilloHtmlOptbase () {};
171 virtual bool isSelected() {return false;}
172 virtual bool select() {return false;}
173 virtual const char *getValue() {return NULL;}
174 virtual void setContent(const char *str, int len)
175 {MSG_ERR("Form: Optbase setContent()\n");}
176 virtual void addSelf(SelectionResource *res) = 0;
177 };
178
179 class DilloHtmlOptgroup : public DilloHtmlOptbase {
180 private:
181 char *label;
182 bool enabled;
183 public:
184 DilloHtmlOptgroup (char *label, bool enabled);
185 virtual ~DilloHtmlOptgroup ();
186 void addSelf (SelectionResource *res)
187 {res->pushGroup(label, enabled);}
188 };
189
190 class DilloHtmlOptgroupClose : public DilloHtmlOptbase {
191 public:
192 virtual ~DilloHtmlOptgroupClose () {};
193 void addSelf (SelectionResource *res)
194 {res->popGroup();}
195 };
196
197 class DilloHtmlOption : public DilloHtmlOptbase {
198 friend class DilloHtmlSelect;
199 public:
200 char *value, *label, *content;
201 bool selected, enabled;
202 DilloHtmlOption (char *value, char *label, bool selected, bool enabled);
203 virtual ~DilloHtmlOption ();
204 bool isSelected() {return selected;}
205 bool select() {return (selected = true);}
206 const char *getValue() {return value ? value : content;}
207 void setContent(const char *str, int len) {content = dStrndup(str, len);}
208 void addSelf (SelectionResource *res)
209 {res->addItem(label ? label : content, enabled, selected);}
210 };
211
168212 class DilloHtmlSelect {
169213 friend class DilloHtmlInput;
170214 private:
171 lout::misc::SimpleVector<DilloHtmlOption *> *options;
215 lout::misc::SimpleVector<DilloHtmlOptbase *> *opts;
172216 DilloHtmlSelect ();
173217 ~DilloHtmlSelect ();
174218 public:
175 DilloHtmlOption *getCurrentOption ();
176 void addOption (char *value, bool selected, bool enabled);
219 DilloHtmlOptbase *getCurrentOpt ();
220 void addOpt (DilloHtmlOptbase *opt);
177221 void ensureSelection ();
178 void addOptionsTo (SelectionResource *res);
222 void addOptsTo (SelectionResource *res);
179223 void reset (SelectionResource *res);
180224 void appendValuesTo (Dlist *values, SelectionResource *res);
181 };
182
183 class DilloHtmlOption {
184 friend class DilloHtmlSelect;
185 public:
186 char *value, *content;
187 bool selected, enabled;
188 private:
189 DilloHtmlOption (char *value, bool selected, bool enabled);
190 ~DilloHtmlOption ();
191225 };
192226
193227 /*
305339 char *charset, *first;
306340 const char *attrbuf;
307341
308 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
342 HT2TB(html)->addParbreak (9, html->wordStyle ());
309343
310344 if (html->InFlags & IN_FORM) {
311345 BUG_MSG("nested forms\n");
327361 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "action")))
328362 action = a_Html_url_new(html, attrbuf, NULL, 0);
329363 else {
330 BUG_MSG("action attribute is required for <form>\n");
364 if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f)
365 BUG_MSG("action attribute is required for <form>\n");
331366 action = a_Url_dup(html->base_url);
332367 }
333368 content_type = DILLO_HTML_ENC_URLENCODED;
495530 } else {
496531 /* Text input, which also is the default */
497532 inp_type = DILLO_HTML_INPUT_TEXT;
498 if (*type && dStrAsciiCasecmp(type, "text"))
499 BUG_MSG("Unknown input type: \"%s\"\n", type);
500533 attrbuf = a_Html_get_attr(html, tag, tagsize, "size");
501534 int size = Html_input_get_size(html, attrbuf);
502535 resource = factory->createEntryResource(size, false, NULL);
533566 html->styleEngine->setNonCssHint (PROPERTY_X_TOOLTIP, CSS_TYPE_STRING,
534567 attrbuf);
535568 }
536 HT2TB(html)->addWidget (embed, html->styleEngine->backgroundStyle());
569 HT2TB(html)->addWidget (embed, html->backgroundStyle());
537570 }
538571 dFree(type);
539572 dFree(name);
566599 html->charset);
567600 html->InFlags |= IN_FORM;
568601
569 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
602 HT2TB(html)->addParbreak (9, html->wordStyle ());
570603
571604 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "prompt")))
572 HT2TB(html)->addText(attrbuf, html->styleEngine->wordStyle ());
605 HT2TB(html)->addText(attrbuf, html->wordStyle ());
573606
574607 ResourceFactory *factory = HT2LT(html)->getResourceFactory();
575608 EntryResource *entryResource = factory->createEntryResource (20,false,NULL);
576609 embed = new Embed (entryResource);
577610 Html_add_input(html, DILLO_HTML_INPUT_INDEX, embed, NULL, NULL, FALSE);
578611
579 HT2TB(html)->addWidget (embed, html->styleEngine->backgroundStyle ());
612 HT2TB(html)->addWidget (embed, html->backgroundStyle ());
580613
581614 a_Url_free(action);
582615 html->InFlags &= ~IN_FORM;
584617
585618 void Html_tag_open_textarea(DilloHtml *html, const char *tag, int tagsize)
586619 {
587 if (html->InFlags & IN_TEXTAREA) {
588 BUG_MSG("nested <textarea>\n");
589 html->ReqTagClose = TRUE;
590 return;
591 }
592 if (html->InFlags & IN_SELECT) {
593 BUG_MSG("<textarea> element inside <select>\n");
594 return;
595 }
620 assert((html->InFlags & (IN_BUTTON | IN_SELECT | IN_TEXTAREA)) == 0);
596621
597622 html->InFlags |= IN_TEXTAREA;
598623 }
614639 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cols"))) {
615640 cols = strtol(attrbuf, NULL, 10);
616641 } else {
617 BUG_MSG("cols attribute is required for <textarea>\n");
642 if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f)
643 BUG_MSG("cols attribute is required for <textarea>\n");
618644 cols = 20;
619645 }
620646 if (cols < 1 || cols > MAX_COLS) {
625651 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "rows"))) {
626652 rows = strtol(attrbuf, NULL, 10);
627653 } else {
628 BUG_MSG("rows attribute is required for <textarea>\n");
654 if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f)
655 BUG_MSG("rows attribute is required for <textarea>\n");
629656 rows = 10;
630657 }
631658 if (rows < 1 || rows > MAX_ROWS) {
647674 textres->setEditable(false);
648675 Html_add_input(html, DILLO_HTML_INPUT_TEXTAREA, embed, name, NULL, false);
649676
650 HT2TB(html)->addWidget (embed, html->styleEngine->backgroundStyle ());
677 HT2TB(html)->addWidget (embed, html->backgroundStyle ());
651678 dFree(name);
652679 }
653680
687714 ((MultiLineTextResource *)input->embed->getResource ())->setText(str);
688715 }
689716
690 html->InFlags &= ~IN_TEXTAREA;
691 }
717 }
718 html->InFlags &= ~IN_TEXTAREA;
692719 }
693720
694721 /*
700727 const char *attrbuf;
701728 int rows = 0;
702729
703 if (html->InFlags & IN_SELECT) {
704 BUG_MSG("nested <select>\n");
705 return;
706 }
730 assert((html->InFlags & (IN_BUTTON | IN_SELECT | IN_TEXTAREA)) == 0);
731
707732 html->InFlags |= IN_SELECT;
708733 html->InFlags &= ~IN_OPTION;
709734
740765 html->styleEngine->setNonCssHint (PROPERTY_X_TOOLTIP, CSS_TYPE_STRING,
741766 attrbuf);
742767 }
743 HT2TB(html)->addWidget (embed, html->styleEngine->backgroundStyle ());
768 HT2TB(html)->addWidget (embed, html->backgroundStyle ());
744769
745770 Html_add_input(html, type, embed, name, NULL, false);
746771 a_Html_stash_init(html);
759784 html->InFlags &= ~IN_OPTION;
760785
761786 DilloHtmlInput *input = Html_get_current_input(html);
762 DilloHtmlSelect *select = input->select;
763
764 if (input->type == DILLO_HTML_INPUT_SELECT) {
765 // option menu interface requires that something be selected */
766 select->ensureSelection ();
767 }
768 SelectionResource *res = (SelectionResource*)input->embed->getResource();
769 select->addOptionsTo (res);
787 if (input) {
788 DilloHtmlSelect *select = input->select;
789 if (input->type == DILLO_HTML_INPUT_SELECT) {
790 // option menu interface requires that something be selected */
791 select->ensureSelection ();
792 }
793 select->addOptsTo ((SelectionResource*)input->embed->getResource());
794 }
795 }
796 }
797
798 void Html_tag_open_optgroup(DilloHtml *html, const char *tag, int tagsize)
799 {
800 if (!(html->InFlags & IN_SELECT)) {
801 BUG_MSG("<optgroup> element outside <select>\n");
802 return;
803 }
804 if (html->InFlags & IN_OPTGROUP) {
805 BUG_MSG("nested <optgroup>\n");
806 return;
807 }
808 if (html->InFlags & IN_OPTION) {
809 Html_option_finish(html);
810 html->InFlags &= ~IN_OPTION;
811 }
812
813 html->InFlags |= IN_OPTGROUP;
814
815 DilloHtmlInput *input = Html_get_current_input(html);
816 if (input &&
817 (input->type == DILLO_HTML_INPUT_SELECT ||
818 input->type == DILLO_HTML_INPUT_SEL_LIST)) {
819 char *label = a_Html_get_attr_wdef(html, tag, tagsize, "label", NULL);
820 bool enabled = (a_Html_get_attr(html, tag, tagsize, "disabled") == NULL);
821
822 if (!label) {
823 BUG_MSG("label attribute is required for <optgroup>\n");
824 label = strdup("");
825 }
826
827 DilloHtmlOptgroup *opt =
828 new DilloHtmlOptgroup (label, enabled);
829
830 input->select->addOpt(opt);
831 }
832 }
833
834 void Html_tag_close_optgroup(DilloHtml *html)
835 {
836 if (html->InFlags & IN_OPTGROUP) {
837 html->InFlags &= ~IN_OPTGROUP;
838
839 if (html->InFlags & IN_OPTION) {
840 Html_option_finish(html);
841 html->InFlags &= ~IN_OPTION;
842 }
843
844 DilloHtmlInput *input = Html_get_current_input(html);
845 if (input &&
846 (input->type == DILLO_HTML_INPUT_SELECT ||
847 input->type == DILLO_HTML_INPUT_SEL_LIST)) {
848 DilloHtmlOptgroupClose *opt = new DilloHtmlOptgroupClose ();
849
850 input->select->addOpt(opt);
851 }
770852 }
771853 }
772854
784866 html->InFlags |= IN_OPTION;
785867
786868 DilloHtmlInput *input = Html_get_current_input(html);
787
788 if (input->type == DILLO_HTML_INPUT_SELECT ||
789 input->type == DILLO_HTML_INPUT_SEL_LIST) {
869 if (input &&
870 (input->type == DILLO_HTML_INPUT_SELECT ||
871 input->type == DILLO_HTML_INPUT_SEL_LIST)) {
790872 char *value = a_Html_get_attr_wdef(html, tag, tagsize, "value", NULL);
873 char *label = a_Html_get_attr_wdef(html, tag, tagsize, "label", NULL);
791874 bool selected = (a_Html_get_attr(html, tag, tagsize,"selected") != NULL);
792875 bool enabled = (a_Html_get_attr(html, tag, tagsize, "disabled") == NULL);
793 input->select->addOption(value, selected, enabled);
876
877 DilloHtmlOption *option =
878 new DilloHtmlOption (value, label, selected, enabled);
879
880 input->select->addOpt(option);
794881 }
795882
796883 a_Html_stash_init(html);
816903 DilloHtmlInputType inp_type;
817904 char *type;
818905
819 if (html->InFlags & IN_BUTTON) {
820 BUG_MSG("nested <button>\n");
821 return;
822 }
823 if (html->InFlags & IN_SELECT) {
824 BUG_MSG("<button> element inside <select>\n");
825 return;
826 }
906 assert((html->InFlags & (IN_BUTTON | IN_SELECT | IN_TEXTAREA)) == 0);
907
827908 html->InFlags |= IN_BUTTON;
828
829909 type = a_Html_get_attr_wdef(html, tag, tagsize, "type", "");
830910
831911 if (!dStrAsciiCasecmp(type, "button")) {
857937 * but it caused 100% CPU usage.
858938 */
859939 page = new Textblock (false);
860 page->setStyle (html->styleEngine->backgroundStyle ());
940 page->setStyle (html->backgroundStyle ());
861941
862942 ResourceFactory *factory = HT2LT(html)->getResourceFactory();
863943 Resource *resource = factory->createComplexButtonResource(page, true);
864944 embed = new Embed(resource);
865945 // a_Dw_button_set_sensitive (DW_BUTTON (button), FALSE);
866946
867 HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ());
868 HT2TB(html)->addWidget (embed, html->styleEngine->backgroundStyle ());
869 HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ());
947 HT2TB(html)->addParbreak (5, html->wordStyle ());
948 HT2TB(html)->addWidget (embed, html->backgroundStyle ());
949 HT2TB(html)->addParbreak (5, html->wordStyle ());
870950
871951 S_TOP(html)->textblock = html->dw = page;
872952
17911871 */
17921872 DilloHtmlSelect::DilloHtmlSelect ()
17931873 {
1794 options = new misc::SimpleVector<DilloHtmlOption *> (4);
1874 opts = new misc::SimpleVector<DilloHtmlOptbase *> (4);
17951875 }
17961876
17971877 /*
17991879 */
18001880 DilloHtmlSelect::~DilloHtmlSelect ()
18011881 {
1802 int size = options->size ();
1882 int size = opts->size ();
18031883 for (int k = 0; k < size; k++)
1804 delete options->get (k);
1805 delete options;
1806 }
1807
1808 DilloHtmlOption *DilloHtmlSelect::getCurrentOption ()
1809 {
1810 return options->get (options->size() - 1);
1811 }
1812
1813 void DilloHtmlSelect::addOption (char *value, bool selected, bool enabled)
1814 {
1815 DilloHtmlOption *option =
1816 new DilloHtmlOption (value, selected, enabled);
1817 int size = options->size ();
1818 options->increase ();
1819 options->set (size, option);
1884 delete opts->get (k);
1885 delete opts;
1886 }
1887
1888 DilloHtmlOptbase *DilloHtmlSelect::getCurrentOpt ()
1889 {
1890 return opts->get (opts->size() - 1);
1891 }
1892
1893 void DilloHtmlSelect::addOpt (DilloHtmlOptbase *opt)
1894 {
1895 int size = opts->size ();
1896 opts->increase ();
1897 opts->set (size, opt);
18201898 }
18211899
18221900 /*
18241902 */
18251903 void DilloHtmlSelect::ensureSelection()
18261904 {
1827 int size = options->size ();
1905 int size = opts->size ();
18281906 if (size > 0) {
18291907 for (int i = 0; i < size; i++) {
1830 DilloHtmlOption *option = options->get (i);
1831 if (option->selected)
1908 DilloHtmlOptbase *opt = opts->get (i);
1909 if (opt->isSelected())
18321910 return;
18331911 }
1834 DilloHtmlOption *option = options->get (0);
1835 option->selected = true;
1836 }
1837 }
1838
1839 void DilloHtmlSelect::addOptionsTo (SelectionResource *res)
1840 {
1841 int size = options->size ();
1912 for (int i = 0; i < size; i++) {
1913 DilloHtmlOptbase *opt = opts->get (i);
1914 if (opt->select())
1915 break;
1916 }
1917 }
1918 }
1919
1920 void DilloHtmlSelect::addOptsTo (SelectionResource *res)
1921 {
1922 int size = opts->size ();
18421923 for (int i = 0; i < size; i++) {
1843 DilloHtmlOption *option = options->get (i);
1844 res->addItem(option->content, option->enabled, option->selected);
1924 DilloHtmlOptbase *opt = opts->get (i);
1925 opt->addSelf(res);
18451926 }
18461927 }
18471928
18481929 void DilloHtmlSelect::reset (SelectionResource *res)
18491930 {
1850 int size = options->size ();
1931 int size = opts->size ();
18511932 for (int i = 0; i < size; i++) {
1852 DilloHtmlOption *option = options->get (i);
1853 res->setItem(i, option->selected);
1933 DilloHtmlOptbase *opt = opts->get (i);
1934 res->setItem(i, opt->isSelected());
18541935 }
18551936 }
18561937
18571938 void DilloHtmlSelect::appendValuesTo (Dlist *values, SelectionResource *res)
18581939 {
1859 int size = options->size ();
1940 int size = opts->size ();
18601941 for (int i = 0; i < size; i++) {
18611942 if (res->isSelected (i)) {
1862 DilloHtmlOption *option = options->get (i);
1863 char *val = option->value ? option->value : option->content;
1864 dList_append(values, dStr_new(val));
1865 }
1866 }
1943 DilloHtmlOptbase *opt = opts->get (i);
1944 const char *val = opt->getValue();
1945
1946 if (val)
1947 dList_append(values, dStr_new(val));
1948 }
1949 }
1950 }
1951
1952 DilloHtmlOptgroup::DilloHtmlOptgroup (char *label, bool enabled)
1953 {
1954 this->label = label;
1955 this->enabled = enabled;
1956 }
1957
1958 DilloHtmlOptgroup::~DilloHtmlOptgroup ()
1959 {
1960 dFree(label);
18671961 }
18681962
18691963 /*
18731967 /*
18741968 * Constructor
18751969 */
1876 DilloHtmlOption::DilloHtmlOption (char *value2,
1877 bool selected2,
1970 DilloHtmlOption::DilloHtmlOption (char *value2, char *label2, bool selected2,
18781971 bool enabled2)
18791972 {
18801973 value = value2;
1974 label = label2;
18811975 content = NULL;
18821976 selected = selected2;
18831977 enabled = enabled2;
18891983 DilloHtmlOption::~DilloHtmlOption ()
18901984 {
18911985 dFree(value);
1986 dFree(label);
18921987 dFree(content);
18931988 }
18941989
19072002 html->styleEngine->setPseudoLink ();
19082003
19092004 /* create new image and add it to the button */
1910 a_Html_image_attrs(html, tag, tagsize);
2005 a_Html_common_image_attrs(html, tag, tagsize);
19112006 if ((Image = a_Html_image_new(html, tag, tagsize))) {
1912 IM2DW(Image)->setStyle (html->styleEngine->backgroundStyle ());
2007 // At this point, we know that Image->ir represents an image
2008 // widget. Notice that the order of the casts matters, because
2009 // of multiple inheritance.
2010 dw::Image *dwi = (dw::Image*)(dw::core::ImgRenderer*)Image->img_rndr;
2011 dwi->setStyle (html->backgroundStyle ());
19132012 ResourceFactory *factory = HT2LT(html)->getResourceFactory();
19142013 ComplexButtonResource *complex_b_r =
1915 factory->createComplexButtonResource(IM2DW(Image), false);
2014 factory->createComplexButtonResource(dwi, false);
19162015 button = new Embed(complex_b_r);
1917 HT2TB(html)->addWidget (button, html->styleEngine->style ());
2016 HT2TB(html)->addWidget (button, html->style ());
19182017 }
19192018 if (!button)
19202019 MSG("Html_input_image: unable to create image submit.\n");
19272026 static void Html_option_finish(DilloHtml *html)
19282027 {
19292028 DilloHtmlInput *input = Html_get_current_input(html);
1930 if (input->type == DILLO_HTML_INPUT_SELECT ||
1931 input->type == DILLO_HTML_INPUT_SEL_LIST) {
1932 DilloHtmlOption *option =
1933 input->select->getCurrentOption ();
1934 option->content = dStrndup(html->Stash->str, html->Stash->len);
1935 }
1936 }
2029 if (input &&
2030 (input->type == DILLO_HTML_INPUT_SELECT ||
2031 input->type == DILLO_HTML_INPUT_SEL_LIST)) {
2032 DilloHtmlOptbase *opt = input->select->getCurrentOpt ();
2033 opt->setContent (html->Stash->str, html->Stash->len);
2034 }
2035 }
5757 void Html_tag_close_select(DilloHtml *html);
5858 void Html_tag_open_option(DilloHtml *html, const char *tag, int tagsize);
5959 void Html_tag_close_option(DilloHtml *html);
60 void Html_tag_open_optgroup(DilloHtml *html, const char *tag, int tagsize);
61 void Html_tag_close_optgroup(DilloHtml *html);
6062 void Html_tag_open_button(DilloHtml *html, const char *tag, int tagsize);
6163 void Html_tag_close_button(DilloHtml *html);
6264
286286 */
287287 static inline size_t Gif_do_generic_ext(const uchar_t *Buf, size_t BSize)
288288 {
289 size_t Size = Buf[0] + 1, DSize;
289
290 size_t Size = Buf[0] + 1, /* (uchar_t + 1) can't overflow size_t */
291 DSize;
290292
291293 /* The Block size (the first byte) is supposed to be a specific size
292294 * for each extension... we don't check.
293295 */
294296
295 if (Buf[0] > BSize)
297 if (Size > BSize)
296298 return 0;
297299 DSize = Gif_data_blocks(Buf + Size, BSize - Size);
298300 if (!DSize)
813815 return 0;
814816 }
815817
818 /** \todo Gamma for GIF? */
816819 a_Dicache_set_parms(gif->url, gif->version, gif->Image,
817 gif->Width, gif->Height, DILLO_IMG_TYPE_INDEXED);
820 gif->Width, gif->Height, DILLO_IMG_TYPE_INDEXED,
821 1 / 2.2);
818822
819823 Flags = buf[8];
820824
287287
288288 if ((align = a_Html_get_attr(html, tag, tagsize, "align"))) {
289289 TextAlignType textAlignType = TEXT_ALIGN_LEFT;
290
291 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
292 BUG_MSG("The align attribute is obsolete in HTML5.\n");
290293
291294 if (dStrAsciiCasecmp (align, "left") == 0)
292295 textAlignType = TEXT_ALIGN_LEFT;
329332 VAlignType valign;
330333
331334 if ((attr = a_Html_get_attr(html, tag, tagsize, "valign"))) {
335 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
336 BUG_MSG("The valign attribute is obsolete in HTML5.\n");
337
332338 if (dStrAsciiCasecmp (attr, "top") == 0)
333339 valign = VALIGN_TOP;
334340 else if (dStrAsciiCasecmp (attr, "bottom") == 0)
353359 {
354360 Textblock *textblock = new Textblock (prefs.limit_text_width);
355361
356 HT2TB(html)->addParbreak (space, html->styleEngine->wordStyle ());
357 HT2TB(html)->addWidget (textblock, html->styleEngine->style ());
358 HT2TB(html)->addParbreak (space, html->styleEngine->wordStyle ());
362 HT2TB(html)->addParbreak (space, html->wordStyle ());
363 HT2TB(html)->addWidget (textblock, html->style ());
364 HT2TB(html)->addParbreak (space, html->wordStyle ());
359365 S_TOP(html)->textblock = html->dw = textblock;
360366 S_TOP(html)->hand_over_break = true;
361367 }
397403 DocType = DT_NONE; /* assume Tag Soup 0.0! :-) */
398404 DocTypeVersion = 0.0f;
399405
400 styleEngine = new StyleEngine (HT2LT (this));
406 styleEngine = new StyleEngine (HT2LT (this), page_url, base_url);
401407
402408 cssUrls = new misc::SimpleVector <DilloUrl*> (1);
403409
541547 const char *p = Start_Buf;
542548
543549 dReturn_val_if_fail(p != NULL, -1);
550 /* Disable line counting for META hack. Buffers differ. */
551 dReturn_val_if((InFlags & IN_META_HACK), -1);
544552
545553 ofs = CurrTagOfs;
546554 line = OldTagLine;
575583
576584 dReturn_if (stop_parser == true);
577585
586 /* flag we've already parsed up to the last byte */
587 InFlags |= IN_EOF;
588
578589 /* force the close of elements left open (TODO: not for XHTML) */
579590 while ((si = stack->size() - 1)) {
580591 if (stack->getRef(si)->tag_idx != -1) {
581592 Html_tag_cleanup_at_close(this, stack->getRef(si)->tag_idx);
582593 }
583594 }
595
596 /* Nothing left to do with the parser. Clear all flags, except EOF. */
597 InFlags = IN_EOF;
598
584599 /* Remove this client from our active list */
585600 a_Bw_close_client(bw, ClientKey);
586601 }
627642 {
628643 dReturn_if (a_Bw_expecting(bw));
629644
630 /* If the user asked for a specific URL, the user (NULL) is the requester,
631 * but if the user just asked for all URLs, use the page URL as the
632 * requester. If the possible patterns become more complex, it might be
633 * good to have the caller supply the requester instead.
645 /* If the user asked for a specific image, the user (NULL) is the requester,
646 * and the domain mechanism will always permit the request. But if the user
647 * just asked for all images (clicking "Load images"), use the page URL as
648 * the requester so that the domain mechanism can act as a filter.
649 * If the possible patterns become more complex, it might be good to have
650 * the caller supply the requester instead.
634651 */
635652 const DilloUrl *requester = pattern ? NULL : this->page_url;
636653
10241041 breakCnt++;
10251042 html->PrevWasCR = (space[i] == '\r');
10261043
1027 HT2TB(html)->addLinebreak (html->styleEngine->wordStyle ());
1044 HT2TB(html)->addLinebreak (html->wordStyle ());
10281045 }
10291046 }
10301047 if (breakCnt == 0) {
1031 HT2TB(html)->addSpace(html->styleEngine->wordStyle ());
1048 HT2TB(html)->addSpace(html->wordStyle ());
10321049 }
10331050 }
10341051
10611078
10621079 if (spaceCnt) {
10631080 spc = dStrnfill(spaceCnt, ' ');
1064 HT2TB(html)->addText (spc, spaceCnt,
1065 html->styleEngine->wordStyle ());
1081 HT2TB(html)->addText (spc, spaceCnt, html->wordStyle ());
10661082 dFree(spc);
10671083 spaceCnt = 0;
10681084 }
1069 HT2TB(html)->addLinebreak (html->styleEngine->wordStyle ());
1085 HT2TB(html)->addLinebreak (html->wordStyle ());
10701086 html->pre_column = 0;
10711087 }
10721088 html->PreFirstChar = false;
10941110
10951111 if (spaceCnt) {
10961112 // add break possibility for the white-space:pre-wrap case
1097 HT2TB(html)->addBreakOption (html->styleEngine->wordStyle ());
1113 HT2TB(html)->addBreakOption (html->wordStyle (), false);
10981114 spc = dStrnfill(spaceCnt, ' ');
1099 HT2TB(html)->addText (spc, spaceCnt, html->styleEngine->wordStyle ());
1115 HT2TB(html)->addText (spc, spaceCnt, html->wordStyle ());
11001116 dFree(spc);
11011117 }
11021118
11031119 } else {
11041120 if (SGML_SPCDEL) {
11051121 /* SGML_SPCDEL ignores white space immediately after an open tag */
1106 } else if (html->styleEngine->wordStyle ()->whiteSpace ==
1107 WHITE_SPACE_PRE_LINE) {
1122 } else if (html->wordStyle ()->whiteSpace == WHITE_SPACE_PRE_LINE) {
11081123 Html_process_space_pre_line(html, space, spacesize);
11091124 } else {
1110 HT2TB(html)->addSpace(html->styleEngine->wordStyle ());
1125 HT2TB(html)->addSpace(html->wordStyle ());
11111126 }
11121127
11131128 if (parse_mode == DILLO_HTML_PARSE_MODE_STASH_AND_BODY)
11601175 Html_process_space(html, Pword + start, i - start);
11611176 } else {
11621177 while (Pword[++i] && !isspace(Pword[i])) ;
1163 HT2TB(html)->addText(Pword + start, i - start,
1164 html->styleEngine->wordStyle ());
1178 HT2TB(html)->addText(Pword + start, i - start, html->wordStyle ());
11651179 html->pre_column += i - start;
11661180 html->PreFirstChar = false;
11671181 }
11991213 Html_process_space(html, word2 + start, i - start);
12001214 } else if (!strncmp(word2+i, utf8_zero_width_space, 3)) {
12011215 i += 3;
1202 HT2TB(html)->addBreakOption(html->styleEngine->wordStyle ());
1216 HT2TB(html)->addBreakOption(html->wordStyle (), false);
12031217 } else if (a_Utf8_ideographic(word2+i, beyond_word2, &len)) {
12041218 i += len;
1205 HT2TB(html)->addText(word2 + start, i - start,
1206 html->styleEngine->wordStyle ());
1207 HT2TB(html)->addBreakOption(html->styleEngine->wordStyle ());
1219 HT2TB(html)->addText(word2 + start, i - start, html->wordStyle ());
1220 HT2TB(html)->addBreakOption(html->wordStyle (), false);
12081221 } else {
12091222 do {
12101223 i += len;
12111224 } while (word2[i] && !isspace(word2[i]) &&
12121225 strncmp(word2+i, utf8_zero_width_space, 3) &&
12131226 (!a_Utf8_ideographic(word2+i, beyond_word2, &len)));
1214 HT2TB(html)->addText(word2 + start, i - start,
1215 html->styleEngine->wordStyle ());
1227 HT2TB(html)->addText(word2 + start, i - start, html->wordStyle ());
12161228 }
12171229 }
12181230 if (Pword == word2)
12461258 {
12471259 if (html->dw != S_TOP(html)->textblock) {
12481260 if (hand_over_break)
1249 HT2TB(html)->handOverBreak (html->styleEngine->style ());
1261 HT2TB(html)->handOverBreak (html->style ());
12501262 HT2TB(html)->flush ();
12511263 html->dw = S_TOP(html)->textblock;
12521264 }
12741286 */
12751287 static void Html_force_push_tag(DilloHtml *html, int tag_idx)
12761288 {
1277 html->styleEngine->startElement (tag_idx);
1289 html->startElement (tag_idx);
12781290 Html_push_tag(html, tag_idx);
12791291 }
12801292
13261338 */
13271339 static void Html_tag_cleanup_at_close(DilloHtml *html, int new_idx)
13281340 {
1341 static int i_BUTTON = a_Html_tag_index("button"),
1342 i_SELECT = a_Html_tag_index("select"),
1343 i_TEXTAREA = a_Html_tag_index("textarea");
13291344 int w3c_mode = !prefs.w3c_plus_heuristics;
13301345 int stack_idx, tag_idx, matched = 0, expected = 0;
13311346 TagInfo new_tag = Tags[new_idx];
13411356 } else if (Tags[tag_idx].EndTag == 'O') {
13421357 /* skip an optional tag */
13431358 continue;
1359 } else if ((new_idx == i_BUTTON && html->InFlags & IN_BUTTON) ||
1360 (new_idx == i_SELECT && html->InFlags & IN_SELECT) ||
1361 (new_idx == i_TEXTAREA && html->InFlags & IN_TEXTAREA)) {
1362 /* let these elements close tags inside them */
1363 continue;
13441364 } else if (w3c_mode || Tags[tag_idx].TagLevel >= new_tag.TagLevel) {
13451365 /* this is the tag that should have been closed */
13461366 expected = 1;
13571377 BUG_MSG("unexpected closing tag: </%s>.\n", new_tag.name);
13581378 }
13591379 }
1380
1381 /*
1382 * Avoid nesting and inter-nesting of BUTTON, SELECT and TEXTAREA,
1383 * by closing them before opening another.
1384 * This is not an HTML SPEC restriction , but it avoids lots of trouble
1385 * inside dillo (concurrent inputs), and makes almost no sense to have.
1386 */
1387 static void Html_tag_cleanup_nested_inputs(DilloHtml *html, int new_idx)
1388 {
1389 static int i_BUTTON = a_Html_tag_index("button"),
1390 i_SELECT = a_Html_tag_index("select"),
1391 i_TEXTAREA = a_Html_tag_index("textarea");
1392 int stack_idx, u_idx, matched = 0;
1393
1394 dReturn_if_fail(html->InFlags & (IN_BUTTON | IN_SELECT | IN_TEXTAREA));
1395 dReturn_if_fail(new_idx == i_BUTTON || new_idx == i_SELECT ||
1396 new_idx == i_TEXTAREA);
1397
1398 /* Get the unclosed tag index */
1399 u_idx = (html->InFlags & IN_BUTTON) ? i_BUTTON :
1400 (html->InFlags & IN_SELECT) ? i_SELECT : i_TEXTAREA;
1401
1402 /* Look for it inside the stack */
1403 stack_idx = html->stack->size();
1404 while (--stack_idx) {
1405 if (html->stack->getRef(stack_idx)->tag_idx == u_idx) {
1406 /* matching tag found */
1407 matched = 1;
1408 break;
1409 }
1410 }
1411
1412 if (matched) {
1413 BUG_MSG("attempt to nest <%s> element inside <%s> -- closing <%s>\n",
1414 Tags[new_idx].name, Tags[u_idx].name, Tags[u_idx].name);
1415 Html_tag_cleanup_to_idx(html, stack_idx);
1416 } else {
1417 MSG_WARN("Inconsistent parser state, flag is SET but no '%s' element"
1418 "was found in the stack\n", Tags[u_idx].name);
1419 }
1420
1421 html->InFlags &= ~(IN_BUTTON | IN_SELECT | IN_TEXTAREA);
1422 }
1423
13601424
13611425 /*
13621426 * Some parsing routines.
14491513 static int
14501514 Html_check_name_val(DilloHtml *html, const char *val, const char *attrname)
14511515 {
1452 int i;
1453
1454 for (i = 0; val[i]; ++i)
1455 if (!isascii(val[i]) || !(isalnum(val[i]) || strchr(":_.-", val[i])))
1456 break;
1457
1458 if (val[i] || !(isascii(val[0]) && isalpha(val[0])))
1459 BUG_MSG("'%s' value \"%s\" is not of the form "
1460 "[A-Za-z][A-Za-z0-9:_.-]*\n", attrname, val);
1461
1462 return !(val[i]);
1516 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f) {
1517 bool valid = *val && !strchr(val, ' ');
1518
1519 if (!valid) {
1520 BUG_MSG("'%s' value must not be empty and must not contain spaces.\n",
1521 attrname);
1522 }
1523 return valid ? 1 : 0;
1524 } else {
1525 int i;
1526
1527 for (i = 0; val[i]; ++i)
1528 if (!isascii(val[i]) || !(isalnum(val[i]) || strchr(":_.-", val[i])))
1529 break;
1530
1531 if (val[i] || !(isascii(val[0]) && isalpha(val[0])))
1532 BUG_MSG("'%s' value \"%s\" is not of the form "
1533 "[A-Za-z][A-Za-z0-9:_.-]*\n", attrname, val);
1534
1535 return !(val[i]);
1536 }
14631537 }
14641538
14651539 /*
14951569 static const char XHTML11 [] = "-//W3C//DTD XHTML 1.1";
14961570 static const char XHTML11_url[] = "http://www.w3.org/TR/xhtml11/DTD/";
14971571
1498 int i, quote;
1572 size_t i;
1573 int quote;
14991574 char *p, *ntag = dStrndup(tag, tagsize);
15001575
15011576 /* Tag sanitization: Collapse whitespace between tokens
15191594
15201595 _MSG("New: {%s}\n", ntag);
15211596
1597 if (html->DocType != DT_NONE)
1598 BUG_MSG("Multiple DOCTYPE declarations.\n");
1599
15221600 /* The default DT_NONE type is TagSoup */
1523 if (!dStrnAsciiCasecmp(ntag, HTML_SGML_sig, strlen(HTML_SGML_sig))) {
1601 if (i > strlen(HTML_SGML_sig) && // avoid out of bounds reads!
1602 !dStrnAsciiCasecmp(ntag, HTML_SGML_sig, strlen(HTML_SGML_sig))) {
15241603 p = ntag + strlen(HTML_SGML_sig) + 1;
15251604 if (!strncmp(p, HTML401, strlen(HTML401)) &&
15261605 dStriAsciiStr(p + strlen(HTML401), HTML401_url)) {
15451624 html->DocTypeVersion = 2.0f;
15461625 }
15471626 } else if (!dStrAsciiCasecmp(ntag, HTML5_sig)) {
1548 BUG_MSG("Document follows HTML5 working draft; treating as HTML4.\n");
15491627 html->DocType = DT_HTML;
15501628 html->DocTypeVersion = 5.0f;
15511629 }
1552
1630 if (html->DocType == DT_NONE) {
1631 html->DocType = DT_UNRECOGNIZED;
1632 BUG_MSG("DOCTYPE not recognized:\n%s.\n", ntag);
1633 }
15531634 dFree(ntag);
15541635 }
15551636
15581639 */
15591640 static void Html_tag_open_html(DilloHtml *html, const char *tag, int tagsize)
15601641 {
1642 /* The IN_HTML flag will be kept set until at IN_EOF condition.
1643 * This allows to handle pages with multiple or uneven HTML tags */
1644
15611645 if (!(html->InFlags & IN_HTML))
15621646 html->InFlags |= IN_HTML;
1563 ++html->Num_HTML;
1647 if (html->Num_HTML < UCHAR_MAX)
1648 ++html->Num_HTML;
15641649
15651650 if (html->Num_HTML > 1) {
15661651 BUG_MSG("HTML element was already open\n");
1652 html->ReqTagClose = true;
15671653 }
15681654 }
15691655
15721658 */
15731659 static void Html_tag_close_html(DilloHtml *html)
15741660 {
1575 /* TODO: may add some checks here */
1576 if (html->Num_HTML == 1) {
1577 /* beware of pages with multiple HTML close tags... :-P */
1578 html->InFlags &= ~IN_HTML;
1579 }
1661 _MSG("Html_tag_close_html: Num_HTML=%d\n", html->Num_HTML);
15801662 }
15811663
15821664 /*
15841666 */
15851667 static void Html_tag_open_head(DilloHtml *html, const char *tag, int tagsize)
15861668 {
1587 if (html->InFlags & IN_BODY || html->Num_BODY > 0) {
1669 if (html->InFlags & IN_BODY) {
15881670 BUG_MSG("HEAD element must go before the BODY section\n");
15891671 html->ReqTagClose = true;
15901672 return;
15911673 }
15921674
1593 if (!(html->InFlags & IN_HEAD))
1675 if (html->Num_HEAD < UCHAR_MAX)
1676 ++html->Num_HEAD;
1677 if (html->InFlags & IN_HEAD) {
1678 BUG_MSG("HEAD element was already open\n");
1679 html->ReqTagClose = true;
1680 } else if (html->Num_HEAD > 1) {
1681 BUG_MSG("HEAD section already finished -- ignoring\n");
1682 html->ReqTagClose = true;
1683 } else {
15941684 html->InFlags |= IN_HEAD;
1595 ++html->Num_HEAD;
1596
1597 if (html->Num_HEAD > 1) {
1598 BUG_MSG("HEAD element was already open\n");
15991685 }
16001686 }
16011687
16021688 /*
16031689 * Handle close HEAD element
1604 * Note: as a side effect of Html_test_section() this function is called
1605 * twice when the head element is closed implicitly.
1606 * Note2: HEAD is parsed once completely got.
1690 * Note: HEAD is parsed once completely got.
16071691 */
16081692 static void Html_tag_close_head(DilloHtml *html)
16091693 {
16101694 if (html->InFlags & IN_HEAD) {
1611 _MSG("Closing HEAD section\n");
1612 if (html->Num_TITLE == 0)
1613 BUG_MSG("HEAD section lacks the TITLE element\n");
1614
1615 html->InFlags &= ~IN_HEAD;
1616
1617 /* charset is already set, load remote stylesheets now */
1618 for (int i = 0; i < html->cssUrls->size(); i++) {
1619 a_Html_load_stylesheet(html, html->cssUrls->get(i));
1620 }
1695 if (html->Num_HEAD == 1) {
1696 /* match for the well formed start of HEAD section */
1697 if (html->Num_TITLE == 0)
1698 BUG_MSG("HEAD section lacks the TITLE element\n");
1699
1700 html->InFlags &= ~IN_HEAD;
1701
1702 /* charset is already set, load remote stylesheets now */
1703 for (int i = 0; i < html->cssUrls->size(); i++) {
1704 a_Html_load_stylesheet(html, html->cssUrls->get(i));
1705 }
1706 } else if (html->Num_HEAD > 1) {
1707 --html->Num_HEAD;
1708 }
1709 } else {
1710 /* not reached, see Html_tag_cleanup_at_close() */
16211711 }
16221712 }
16231713
16271717 */
16281718 static void Html_tag_open_title(DilloHtml *html, const char *tag, int tagsize)
16291719 {
1630 ++html->Num_TITLE;
1720 /* fill the stash buffer so TITLE content can be ignored
1721 * when not valid, redundant or outside HEAD section */
16311722 a_Html_stash_init(html);
1723
1724 if (html->InFlags & IN_HEAD) {
1725 if (html->Num_TITLE < UCHAR_MAX)
1726 ++html->Num_TITLE;
1727 if (html->Num_TITLE > 1)
1728 BUG_MSG("A redundant TITLE element was found\n");
1729 } else {
1730 BUG_MSG("TITLE element must be inside the HEAD section -- ignoring\n");
1731 }
16321732 }
16331733
16341734 /*
16371737 */
16381738 static void Html_tag_close_title(DilloHtml *html)
16391739 {
1640 if (html->InFlags & IN_HEAD) {
1740 if (html->InFlags & IN_HEAD && html->Num_TITLE == 1) {
16411741 /* title is only valid inside HEAD */
16421742 a_UIcmd_set_page_title(html->bw, html->Stash->str);
16431743 a_History_set_title_by_url(html->page_url, html->Stash->str);
1644 } else {
1645 BUG_MSG("TITLE element must be inside the HEAD section\n");
16461744 }
16471745 }
16481746
16761774 html->loadCssFromStash = true;
16771775
16781776 if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "type"))) {
1679 BUG_MSG("type attribute is required for <style>\n");
1777 if (html->DocType != DT_HTML || html->DocTypeVersion <= 4.01f)
1778 BUG_MSG("type attribute is required for <style>\n");
16801779 } else if (dStrAsciiCasecmp(attrbuf, "text/css")) {
16811780 html->loadCssFromStash = false;
16821781 }
17001799 static void Html_tag_close_style(DilloHtml *html)
17011800 {
17021801 if (prefs.parse_embedded_css && html->loadCssFromStash)
1703 html->styleEngine->parse(html, NULL, html->Stash->str, html->Stash->len,
1802 html->styleEngine->parse(html, html->base_url, html->Stash->str, html->Stash->len,
17041803 CSS_ORIGIN_AUTHOR);
17051804 }
17061805
17131812 int32_t color;
17141813 int tag_index_a = a_Html_tag_index ("a");
17151814 style::Color *bgColor;
1716
1815 style::StyleImage *bgImage;
1816 style::BackgroundRepeat bgRepeat;
1817 style::BackgroundAttachment bgAttachment;
1818 style::Length bgPositionX, bgPositionY;
1819
1820 _MSG("Html_tag_open_body Num_BODY=%d\n", html->Num_BODY);
17171821 if (!(html->InFlags & IN_BODY))
17181822 html->InFlags |= IN_BODY;
1719 ++html->Num_BODY;
1823 if (html->Num_BODY < UCHAR_MAX)
1824 ++html->Num_BODY;
17201825
17211826 if (html->Num_BODY > 1) {
17221827 BUG_MSG("BODY element was already open\n");
1828 html->ReqTagClose = true;
17231829 return;
17241830 }
1831
17251832 if (html->InFlags & IN_HEAD) {
17261833 /* if we're here, it's bad XHTML, no need to recover */
17271834 BUG_MSG("unclosed HEAD element\n");
17291836
17301837 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
17311838 color = a_Html_color_parse(html, attrbuf, -1);
1839
1840 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
1841 BUG_MSG("<body> bgcolor attribute is obsolete.\n");
1842
17321843 if (color != -1)
17331844 html->styleEngine->setNonCssHint (CSS_PROPERTY_BACKGROUND_COLOR,
17341845 CSS_TYPE_COLOR, color);
17361847
17371848 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "text"))) {
17381849 color = a_Html_color_parse(html, attrbuf, -1);
1850
1851 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
1852 BUG_MSG("<body> text attribute is obsolete.\n");
1853
17391854 if (color != -1)
17401855 html->styleEngine->setNonCssHint (CSS_PROPERTY_COLOR,
17411856 CSS_TYPE_COLOR, color);
17421857 }
17431858
1744 html->styleEngine->restyle ();
1745
1746 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "link")))
1859 html->restyle ();
1860
1861 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "link"))) {
17471862 html->non_css_link_color = a_Html_color_parse(html, attrbuf, -1);
1748
1749 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "vlink")))
1863 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
1864 BUG_MSG("<body> link attribute is obsolete.\n");
1865 }
1866
1867 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "vlink"))) {
17501868 html->non_css_visited_color = a_Html_color_parse(html, attrbuf, -1);
1751
1752 html->dw->setStyle (html->styleEngine->style ());
1869 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
1870 BUG_MSG("<body> vlink attribute is obsolete.\n");
1871 }
1872
1873 html->dw->setStyle (html->style ());
17531874
17541875 bgColor = html->styleEngine->backgroundColor ();
1755
17561876 if (bgColor)
17571877 HT2LT(html)->setBgColor(bgColor);
1878
1879 bgImage = html->styleEngine->backgroundImage (&bgRepeat, &bgAttachment,
1880 &bgPositionX, &bgPositionY);
1881 if (bgImage)
1882 HT2LT(html)->setBgImage(bgImage, bgRepeat, bgAttachment, bgPositionX,
1883 bgPositionY);
17581884
17591885 /* Determine a color for visited links.
17601886 * This color is computed once per page and used for immediate feedback
17621888 * On reload style including color for visited links is computed properly
17631889 * according to CSS.
17641890 */
1765 html->styleEngine->startElement (tag_index_a);
1891 html->startElement (tag_index_a);
17661892 html->styleEngine->setPseudoVisited ();
17671893 if (html->non_css_visited_color != -1) {
17681894 html->styleEngine->setNonCssHint (CSS_PROPERTY_COLOR, CSS_TYPE_COLOR,
17691895 html->non_css_visited_color);
17701896 }
1771 html->visited_color = html->styleEngine->style ()->color->getColor ();
1897 html->visited_color = html->style ()->color->getColor ();
17721898 html->styleEngine->endElement (tag_index_a);
17731899
17741900 if (prefs.contrast_visited_color) {
17751901 /* get a color that has a "safe distance" from text, link and bg */
17761902 html->visited_color =
17771903 a_Color_vc(html->visited_color,
1778 html->styleEngine->style ()->color->getColor(),
1904 html->style ()->color->getColor(),
17791905 html->non_css_link_color,
1780 html->styleEngine->backgroundStyle()->backgroundColor->getColor());
1906 html->backgroundStyle()->backgroundColor->getColor());
17811907 }
17821908
17831909
17891915 */
17901916 static void Html_tag_close_body(DilloHtml *html)
17911917 {
1792 if (html->Num_BODY == 1) {
1793 /* some tag soup pages use multiple BODY tags... */
1794 html->InFlags &= ~IN_BODY;
1795 }
1918 /* Some tag soup pages use multiple BODY tags...
1919 * Defer clearing the IN_BODY flag until IN_EOF */
17961920 }
17971921
17981922 /*
18511975
18521976 src = dStrdup(attrbuf);
18531977
1854 textblock->addParbreak (5, html->styleEngine->wordStyle ());
1978 textblock->addParbreak (5, html->wordStyle ());
18551979
18561980 bullet = new Bullet();
1857 textblock->addWidget(bullet, html->styleEngine->wordStyle ());
1858 textblock->addSpace(html->styleEngine->wordStyle ());
1981 textblock->addWidget(bullet, html->wordStyle ());
1982 textblock->addSpace(html->wordStyle ());
18591983
18601984 if (D_ASCII_TOLOWER(tag[1]) == 'i') {
18611985 /* IFRAME usually comes with very long advertising/spying URLS,
18621986 * to not break rendering we will force name="IFRAME" */
1863 textblock->addText ("IFRAME", html->styleEngine->wordStyle ());
1987 textblock->addText ("IFRAME", html->wordStyle ());
18641988
18651989 } else {
18661990 /* FRAME:
18671991 * If 'name' tag is present use it, if not use 'src' value */
18681992 if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "name"))) {
1869 textblock->addText (src, html->styleEngine->wordStyle ());
1993 textblock->addText (src, html->wordStyle ());
18701994 } else {
1871 textblock->addText (attrbuf, html->styleEngine->wordStyle ());
1872 }
1873 }
1874
1875 textblock->addParbreak (5, html->styleEngine->wordStyle ());
1995 textblock->addText (attrbuf, html->wordStyle ());
1996 }
1997 }
1998
1999 textblock->addParbreak (5, html->wordStyle ());
18762000
18772001 dFree(src);
18782002 }
18852009 static void Html_tag_content_frameset (DilloHtml *html,
18862010 const char *tag, int tagsize)
18872011 {
1888 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
1889 HT2TB(html)->addText("--FRAME--", html->styleEngine->wordStyle ());
2012 HT2TB(html)->addParbreak (9, html->wordStyle ());
2013 HT2TB(html)->addText("--FRAME--", html->wordStyle ());
18902014 Html_add_textblock(html, 5);
18912015 }
18922016
19072031 */
19082032 static void Html_tag_content_br(DilloHtml *html, const char *tag, int tagsize)
19092033 {
1910 HT2TB(html)->addLinebreak (html->styleEngine->wordStyle ());
2034 HT2TB(html)->addLinebreak (html->wordStyle ());
19112035 }
19122036
19132037 /*
19602084 /*
19612085 * Read image-associated tag attributes and create new image.
19622086 */
1963 void a_Html_image_attrs(DilloHtml *html, const char *tag, int tagsize)
2087 void a_Html_common_image_attrs(DilloHtml *html, const char *tag, int tagsize)
19642088 {
19652089 char *width_ptr, *height_ptr;
19662090 const char *attrbuf;
19672091 CssLength l_w = CSS_CREATE_LENGTH(0.0, CSS_LENGTH_TYPE_AUTO);
19682092 CssLength l_h = CSS_CREATE_LENGTH(0.0, CSS_LENGTH_TYPE_AUTO);
1969 int space, border, w = 0, h = 0;
2093 int w = 0, h = 0;
19702094
19712095 if (prefs.show_tooltip &&
19722096 (attrbuf = a_Html_get_attr(html, tag, tagsize, "title"))) {
20022126 dFree(width_ptr);
20032127 dFree(height_ptr);
20042128 width_ptr = height_ptr = NULL;
2005 MSG("a_Html_image_attrs: suspicious image size request %d x %d\n", w, h);
2129 MSG("a_Html_common_image_attrs: suspicious image size request %d x %d\n",
2130 w, h);
20062131 } else {
20072132 if (CSS_LENGTH_TYPE(l_w) != CSS_LENGTH_TYPE_AUTO)
20082133 html->styleEngine->setNonCssHint (CSS_PROPERTY_WIDTH,
20182143 if ((width_ptr && !height_ptr) || (height_ptr && !width_ptr))
20192144 [...]
20202145 */
2146
2147 /* x_img is an index to a list of {url,image} pairs.
2148 * We know a_Html_image_new() will use size() as its next index */
2149 html->styleEngine->setNonCssHint (PROPERTY_X_IMG, CSS_TYPE_INTEGER,
2150 html->images->size());
2151
2152
2153 dFree(width_ptr);
2154 dFree(height_ptr);
2155 }
2156
2157 DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, int tagsize)
2158 {
2159 bool load_now;
2160 char *alt_ptr;
2161 const char *attrbuf;
2162 DilloUrl *url;
2163 DilloImage *image;
2164
2165 if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "src")) ||
2166 !(url = a_Html_url_new(html, attrbuf, NULL, 0)))
2167 return NULL;
2168
2169 alt_ptr = a_Html_get_attr_wdef(html, tag, tagsize, "alt", NULL);
2170 if ((!alt_ptr || !*alt_ptr) && !prefs.load_images) {
2171 dFree(alt_ptr);
2172 alt_ptr = dStrdup("[IMG]"); // Place holder for img_off mode
2173 }
2174
2175 dw::Image *dw = new dw::Image(alt_ptr);
2176 image =
2177 a_Image_new(html->dw->getLayout(), (void*)(dw::core::ImgRenderer*)dw, 0);
2178
2179 if (HT2TB(html)->getBgColor())
2180 image->bg_color = HT2TB(html)->getBgColor()->getColor();
2181
2182 DilloHtmlImage *hi = dNew(DilloHtmlImage, 1);
2183 hi->url = url;
2184 html->images->increase();
2185 html->images->set(html->images->size() - 1, hi);
2186
2187 load_now = prefs.load_images ||
2188 !dStrAsciiCasecmp(URL_SCHEME(url), "data") ||
2189 (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached);
2190
2191 if (load_now && Html_load_image(html->bw, url, html->page_url, image)) {
2192 // hi->image is NULL if dillo tries to load the image immediately
2193 hi->image = NULL;
2194 } else {
2195 // otherwise a reference is kept in html->images
2196 hi->image = image;
2197 a_Image_ref(image);
2198 }
2199
2200 dFree(alt_ptr);
2201 return image;
2202 }
2203
2204 /*
2205 * Tell cache to retrieve image
2206 */
2207 static bool Html_load_image(BrowserWindow *bw, DilloUrl *url,
2208 const DilloUrl *requester, DilloImage *Image)
2209 {
2210 DilloWeb *Web;
2211 int ClientKey;
2212 /* Fill a Web structure for the cache query */
2213 Web = a_Web_new(bw, url, requester);
2214 Web->Image = Image;
2215 a_Image_ref(Image);
2216 Web->flags |= WEB_Image;
2217 /* Request image data from the cache */
2218 if ((ClientKey = a_Capi_open_url(Web, NULL, NULL)) != 0) {
2219 a_Bw_add_client(bw, ClientKey, 0);
2220 a_Bw_add_url(bw, url);
2221 }
2222 return ClientKey != 0;
2223 }
2224
2225 static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize)
2226 {
2227 int space, border;
2228 const char *attrbuf;
2229
2230 a_Html_common_image_attrs(html, tag, tagsize);
20212231
20222232 /* Spacing to the left and right */
20232233 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "hspace"))) {
20682278 }
20692279 }
20702280
2071 /* x_img is an index to a list of {url,image} pairs.
2072 * We know a_Html_image_new() will use size() as its next index */
2073 html->styleEngine->setNonCssHint (PROPERTY_X_IMG, CSS_TYPE_INTEGER,
2074 html->images->size());
2075
2076
2077 dFree(width_ptr);
2078 dFree(height_ptr);
2079 }
2080
2081 DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, int tagsize)
2082 {
2083 bool load_now;
2084 char *alt_ptr;
2085 const char *attrbuf;
2086 DilloUrl *url;
2087 DilloImage *image;
2088
2089 if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "src")) ||
2090 !(url = a_Html_url_new(html, attrbuf, NULL, 0)))
2091 return NULL;
2092
2093 alt_ptr = a_Html_get_attr_wdef(html, tag, tagsize, "alt", NULL);
2094 if ((!alt_ptr || !*alt_ptr) && !prefs.load_images) {
2095 dFree(alt_ptr);
2096 alt_ptr = dStrdup("[IMG]"); // Place holder for img_off mode
2097 }
2098
2099 image = a_Image_new(alt_ptr, 0);
2100
2101 if (HT2TB(html)->getBgColor())
2102 image->bg_color = HT2TB(html)->getBgColor()->getColor();
2103
2104 DilloHtmlImage *hi = dNew(DilloHtmlImage, 1);
2105 hi->url = url;
2106 html->images->increase();
2107 html->images->set(html->images->size() - 1, hi);
2108
2109 load_now = prefs.load_images ||
2110 !dStrAsciiCasecmp(URL_SCHEME(url), "data") ||
2111 (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached);
2112
2113 if (load_now && Html_load_image(html->bw, url, html->page_url, image)) {
2114 // hi->image is NULL if dillo tries to load the image immediately
2115 hi->image = NULL;
2116 } else {
2117 // otherwise a reference is kept in html->images
2118 hi->image = image;
2119 a_Image_ref(image);
2120 }
2121
2122 dFree(alt_ptr);
2123 return image;
2124 }
2125
2126 /*
2127 * Tell cache to retrieve image
2128 */
2129 static bool Html_load_image(BrowserWindow *bw, DilloUrl *url,
2130 const DilloUrl *requester, DilloImage *Image)
2131 {
2132 DilloWeb *Web;
2133 int ClientKey;
2134 /* Fill a Web structure for the cache query */
2135 Web = a_Web_new(bw, url, requester);
2136 Web->Image = Image;
2137 a_Image_ref(Image);
2138 Web->flags |= WEB_Image;
2139 /* Request image data from the cache */
2140 if ((ClientKey = a_Capi_open_url(Web, NULL, NULL)) != 0) {
2141 a_Bw_add_client(bw, ClientKey, 0);
2142 a_Bw_add_url(bw, url);
2143 }
2144 return ClientKey != 0;
2145 }
2146
2147 static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize)
2148 {
2149 a_Html_image_attrs(html, tag, tagsize);
21502281 }
21512282
21522283 /*
21732304 /* TODO: usemap URLs outside of the document are not used. */
21742305 usemap_url = a_Html_url_new(html, attrbuf, NULL, 0);
21752306
2176 HT2TB(html)->addWidget((Widget*)Image->dw, html->styleEngine->style());
2307 // At this point, we know that Image->ir represents an image
2308 // widget. Notice that the order of the casts matters, because of
2309 // multiple inheritance.
2310 dw::Image *dwi = (dw::Image*)(dw::core::ImgRenderer*)Image->img_rndr;
2311 HT2TB(html)->addWidget(dwi, html->style());
21772312
21782313 /* Image maps */
21792314 if (a_Html_get_attr(html, tag, tagsize, "ismap")) {
2180 ((::dw::Image*)Image->dw)->setIsMap();
2315 dwi->setIsMap();
21812316 _MSG(" Html_tag_open_img: server-side map (ISMAP)\n");
2182 } else if (html->styleEngine->style ()->x_link != -1 &&
2317 } else if (html->style ()->x_link != -1 &&
21832318 usemap_url == NULL) {
21842319 /* For simple links, we have to suppress the "image_pressed" signal.
21852320 * This is overridden for USEMAP images. */
21872322 }
21882323
21892324 if (usemap_url) {
2190 ((::dw::Image*)Image->dw)->setUseMap(&html->maps,
2191 new ::object::String(URL_STR(usemap_url)));
2325 dwi->setUseMap(&html->maps, new ::object::String(URL_STR(usemap_url)));
21922326 a_Url_free (usemap_url);
21932327 }
21942328 }
22312365 for (int i = 0; i < html->images->size(); i++) {
22322366 DilloImage *img = html->images->get(i)->image;
22332367
2234 if (img)
2235 ((dw::Image*) img->dw)->forceMapRedraw();
2368 if (img) {
2369 // At this point, we know that img->ir represents an image
2370 // widget. (Really? Is this assumtion safe?) Notice that the
2371 // order of the casts matters, because of multiple
2372 // inheritance.
2373 dw::Image *dwi = (dw::Image*)(dw::core::ImgRenderer*)img->img_rndr;
2374 dwi->forceMapRedraw();
2375 }
22362376 }
22372377 html->InFlags &= ~IN_MAP;
22382378 }
23742514
23752515 html->styleEngine->setNonCssHint(PROPERTY_X_LINK, CSS_TYPE_INTEGER,
23762516 Html_set_new_link(html, &url));
2377
2378 HT2TB(html)->addText("[OBJECT]", html->styleEngine->wordStyle ());
23792517 }
23802518 a_Url_free(base_url);
2519 }
2520
2521 static void Html_tag_content_object(DilloHtml *html, const char *tag,
2522 int tagsize)
2523 {
2524 if (a_Html_get_attr(html, tag, tagsize, "data"))
2525 HT2TB(html)->addText("[OBJECT]", html->wordStyle ());
2526 }
2527
2528 /*
2529 * <VIDEO>
2530 * Provide a link to the video.
2531 */
2532 static void Html_tag_open_video(DilloHtml *html, const char *tag, int tagsize)
2533 {
2534 DilloUrl *url;
2535 const char *attrbuf;
2536
2537 if (html->InFlags & IN_MEDIA) {
2538 MSG("<video> not handled when already inside a media element.\n");
2539 return;
2540 }
2541 /* TODO: poster attr */
2542
2543 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "src"))) {
2544 url = a_Html_url_new(html, attrbuf, NULL, 0);
2545 dReturn_if_fail ( url != NULL );
2546
2547 if (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached) {
2548 html->styleEngine->setPseudoVisited ();
2549 } else {
2550 html->styleEngine->setPseudoLink ();
2551 }
2552
2553 html->styleEngine->setNonCssHint(PROPERTY_X_LINK, CSS_TYPE_INTEGER,
2554 Html_set_new_link(html, &url));
2555
2556 HT2TB(html)->addText("[VIDEO]", html->wordStyle ());
2557 }
2558 html->InFlags |= IN_MEDIA;
2559 }
2560
2561 /*
2562 * <AUDIO>
2563 * Provide a link to the audio.
2564 */
2565 static void Html_tag_open_audio(DilloHtml *html, const char *tag, int tagsize)
2566 {
2567 DilloUrl *url;
2568 const char *attrbuf;
2569
2570 if (html->InFlags & IN_MEDIA) {
2571 MSG("<audio> not handled when already inside a media element.\n");
2572 return;
2573 }
2574
2575 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "src"))) {
2576 url = a_Html_url_new(html, attrbuf, NULL, 0);
2577 dReturn_if_fail ( url != NULL );
2578
2579 if (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached) {
2580 html->styleEngine->setPseudoVisited ();
2581 } else {
2582 html->styleEngine->setPseudoLink ();
2583 }
2584
2585 html->styleEngine->setNonCssHint(PROPERTY_X_LINK, CSS_TYPE_INTEGER,
2586 Html_set_new_link(html, &url));
2587
2588 HT2TB(html)->addText("[AUDIO]", html->wordStyle ());
2589 }
2590 html->InFlags |= IN_MEDIA;
2591 }
2592
2593 /*
2594 * <SOURCE>
2595 * Media resource; provide a link to its address.
2596 */
2597 static void Html_tag_open_source(DilloHtml *html, const char *tag,
2598 int tagsize)
2599 {
2600 const char *attrbuf;
2601
2602 if (!(html->InFlags & IN_MEDIA)) {
2603 BUG_MSG("<source> element not inside a media element.\n");
2604 return;
2605 }
2606 if (!(attrbuf = a_Html_get_attr(html, tag, tagsize, "src"))) {
2607 BUG_MSG("src attribute is required in <source> element.\n");
2608 return;
2609 } else {
2610 DilloUrl *url = a_Html_url_new(html, attrbuf, NULL, 0);
2611
2612 dReturn_if_fail ( url != NULL );
2613
2614 if (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached) {
2615 html->styleEngine->setPseudoVisited ();
2616 } else {
2617 html->styleEngine->setPseudoLink ();
2618 }
2619 html->styleEngine->setNonCssHint(PROPERTY_X_LINK, CSS_TYPE_INTEGER,
2620 Html_set_new_link(html, &url));
2621 }
2622 }
2623
2624 static void Html_tag_content_source(DilloHtml *html, const char *tag,
2625 int tagsize)
2626 {
2627 if ((html->InFlags & IN_MEDIA) && a_Html_get_attr(html, tag, tagsize,"src"))
2628 HT2TB(html)->addText("[MEDIA SOURCE]", html->wordStyle ());
2629 }
2630
2631 /*
2632 * Media (AUDIO/VIDEO) close function
2633 */
2634 static void Html_tag_close_media(DilloHtml *html)
2635 {
2636 html->InFlags &= ~IN_MEDIA;
2637 }
2638
2639 /*
2640 * <EMBED>
2641 * Provide a link to embedded content.
2642 */
2643 static void Html_tag_open_embed(DilloHtml *html, const char *tag, int tagsize)
2644 {
2645 const char *attrbuf;
2646
2647 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "src"))) {
2648 DilloUrl *url = a_Html_url_new(html, attrbuf, NULL, 0);
2649
2650 dReturn_if_fail ( url != NULL );
2651
2652 if (a_Capi_get_flags_with_redirection(url) & CAPI_IsCached) {
2653 html->styleEngine->setPseudoVisited ();
2654 } else {
2655 html->styleEngine->setPseudoLink ();
2656 }
2657
2658 html->styleEngine->setNonCssHint(PROPERTY_X_LINK, CSS_TYPE_INTEGER,
2659 Html_set_new_link(html, &url));
2660 }
2661 }
2662
2663 static void Html_tag_content_embed(DilloHtml *html,const char *tag,int tagsize)
2664 {
2665 if (a_Html_get_attr(html, tag, tagsize, "src"))
2666 HT2TB(html)->addText("[EMBED]", html->wordStyle ());
23812667 }
23822668
23832669 /*
24092695 static void Html_add_anchor(DilloHtml *html, const char *name)
24102696 {
24112697 _MSG("Registering ANCHOR: %s\n", name);
2412 if (!HT2TB(html)->addAnchor (name, html->styleEngine->style ()))
2698 if (!HT2TB(html)->addAnchor (name, html->style ()))
24132699 BUG_MSG("Anchor names must be unique within the document ('%s')\n",name);
24142700 /*
24152701 * According to Sec. 12.2.1 of the HTML 4.01 spec, "anchor names that
25182804 const char *U201C = "\xe2\x80\x9c";
25192805
25202806 html->styleEngine->inheritBackgroundColor ();
2521 HT2TB(html)->addText (U201C, html->styleEngine->wordStyle ());
2807 HT2TB(html)->addText (U201C, html->wordStyle ());
25222808 }
25232809
25242810 /*
25292815 /* Right Double Quotation Mark */
25302816 const char *U201D = "\xe2\x80\x9d";
25312817
2532 HT2TB(html)->addText (U201D, html->styleEngine->wordStyle ());
2818 HT2TB(html)->addText (U201D, html->wordStyle ());
25332819 }
25342820
25352821 /*
25552841
25562842 html->styleEngine->setNonCssHint (CSS_PROPERTY_LIST_STYLE_TYPE,
25572843 CSS_TYPE_ENUM, list_style_type);
2844 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
2845 BUG_MSG("<ul> type attribute is obsolete.\n");
25582846 }
25592847
25602848 S_TOP(html)->list_type = HTML_LIST_UNORDERED;
25692857 static void Html_tag_open_dir(DilloHtml *html, const char *tag, int tagsize)
25702858 {
25712859 html->styleEngine->inheritBackgroundColor ();
2572 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
2860 HT2TB(html)->addParbreak (9, html->wordStyle ());
25732861
25742862 S_TOP(html)->list_type = HTML_LIST_UNORDERED;
25752863 S_TOP(html)->list_number = 0;
26292917 */
26302918 static void Html_tag_open_li(DilloHtml *html, const char *tag, int tagsize)
26312919 {
2632 Style *style = html->styleEngine->style ();
2920 Style *style = html->style ();
26332921 int *list_number;
26342922 const char *attrbuf;
26352923
26712959
26722960 width_ptr = a_Html_get_attr_wdef(html, tag, tagsize, "width", NULL);
26732961 if (width_ptr) {
2962 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
2963 BUG_MSG("<hr> width attribute is obsolete.\n");
26742964 html->styleEngine->setNonCssHint (CSS_PROPERTY_WIDTH,
26752965 CSS_TYPE_LENGTH_PERCENTAGE,
26762966 a_Html_parse_length (html, width_ptr));
26772967 dFree(width_ptr);
26782968 }
26792969
2680 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "size")))
2970 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "size"))) {
26812971 size = strtol(attrbuf, NULL, 10);
2972 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
2973 BUG_MSG("<hr> size attribute is obsolete.\n");
2974 }
26822975
26832976 a_Html_tag_set_align_attr(html, tag, tagsize);
26842977
26852978 /* TODO: evaluate attribute */
26862979 if (a_Html_get_attr(html, tag, tagsize, "noshade")) {
2980 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
2981 BUG_MSG("<hr> noshade attribute is obsolete.\n");
26872982 html->styleEngine->setNonCssHint (CSS_PROPERTY_BORDER_TOP_STYLE,
26882983 CSS_TYPE_ENUM, BORDER_SOLID);
26892984 html->styleEngine->setNonCssHint (CSS_PROPERTY_BORDER_BOTTOM_STYLE,
27173012 static void Html_tag_content_hr(DilloHtml *html, const char *tag, int tagsize)
27183013 {
27193014 Widget *hruler;
2720 HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ());
3015 HT2TB(html)->addParbreak (5, html->wordStyle ());
27213016
27223017 hruler = new Ruler();
2723 hruler->setStyle (html->styleEngine->style ());
2724 HT2TB(html)->addWidget (hruler, html->styleEngine->style ());
2725 HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ());
3018 hruler->setStyle (html->style ());
3019 HT2TB(html)->addWidget (hruler, html->style ());
3020 HT2TB(html)->addParbreak (5, html->wordStyle ());
27263021 }
27273022
27283023 /*
27323027 {
27333028 /* may want to actually do some stuff here. */
27343029 html->styleEngine->inheritBackgroundColor ();
2735 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
3030 HT2TB(html)->addParbreak (9, html->wordStyle ());
27363031 }
27373032
27383033 /*
27413036 static void Html_tag_open_dt(DilloHtml *html, const char *tag, int tagsize)
27423037 {
27433038 html->styleEngine->inheritBackgroundColor ();
2744 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
3039 HT2TB(html)->addParbreak (9, html->wordStyle ());
27453040 }
27463041
27473042 /*
27583053 static void Html_tag_open_pre(DilloHtml *html, const char *tag, int tagsize)
27593054 {
27603055 html->styleEngine->inheritBackgroundColor ();
2761 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
3056 HT2TB(html)->addParbreak (9, html->wordStyle ());
27623057
27633058 html->InFlags |= IN_PRE;
27643059 }
28533148 } else {
28543149 sprintf(delay_str, ".");
28553150 }
2856 /* Skip to anything after "URL=" */
2857 while (*content && *(content++) != '=') ;
3151 /* Skip to anything after "URL=" or ";" if "URL=" is not found */
3152 if ((p = dStriAsciiStr(content, "url=")))
3153 content = p + strlen("url=");
3154 else if ((p = strstr(content, ";")))
3155 content = p + strlen(";");
28583156 /* Handle the case of a quoted URL */
28593157 if (*content == '"' || *content == '\'') {
28603158 if ((p = strchr(content + 1, *content)))
28643162 } else {
28653163 mr_url = dStrdup(content);
28663164 }
2867 new_url = a_Url_new(mr_url, URL_STR(html->base_url));
3165 new_url = a_Html_url_new(html, mr_url, NULL, 0);
28683166
28693167 if (a_Url_cmp(html->base_url, new_url) == 0) {
28703168 /* redirection loop, or empty url string: ignore */
28803178 * TODO: This is a hairy hack,
28813179 * It'd be much better to build a widget. */
28823180 Dstr *ds_msg = dStr_sized_new(256);
2883 dStr_sprintf(ds_msg, meta_template, mr_url, delay_str);
3181 dStr_sprintf(ds_msg, meta_template, URL_STR(new_url), delay_str);
28843182 {
28853183 int o_InFlags = html->InFlags;
28863184 int o_TagSoup = html->TagSoup;
2887 html->InFlags = IN_BODY;
3185 html->InFlags = IN_BODY + IN_META_HACK;
28883186 html->TagSoup = false;
28893187 Html_write_raw(html, ds_msg->str, ds_msg->len, 0);
28903188 html->TagSoup = o_TagSoup;
29603258 /* Fill a Web structure for the cache query */
29613259 int ClientKey;
29623260 DilloWeb *Web = a_Web_new(html->bw, url, html->page_url);
3261 Web->flags |= WEB_Stylesheet;
29633262 if ((ClientKey = a_Capi_open_url(Web, Html_css_load_callback, NULL))) {
29643263 ++html->bw->NumPendingStyleSheets;
29653264 a_Bw_add_client(html->bw, ClientKey, 0);
30903389 */
30913390 static void Html_tag_close_par(DilloHtml *html)
30923391 {
3093 HT2TB(html)->addParbreak (9, html->styleEngine->wordStyle ());
3392 HT2TB(html)->addParbreak (9, html->wordStyle ());
3393 }
3394
3395 /*
3396 * <WBR> "The wbr element represents a line break opportunity."
3397 */
3398 static void Html_tag_content_wbr(DilloHtml *html, const char *tag, int tagsize)
3399 {
3400 HT2TB(html)->addBreakOption(html->wordStyle (), true);
30943401 }
30953402
30963403
31203427 */
31213428
31223429 const TagInfo Tags[] = {
3123 {"a", B8(010101),'R',2, Html_tag_open_a, NULL, Html_tag_close_a},
3430 {"a", B8(011101),'R',2, Html_tag_open_a, NULL, Html_tag_close_a},
31243431 {"abbr", B8(010101),'R',2, Html_tag_open_abbr, NULL, NULL},
3125 /* acronym 010101 */
3432 /* acronym 010101 -- obsolete in HTML5 */
31263433 {"address", B8(010110),'R',2,Html_tag_open_default, NULL, Html_tag_close_par},
31273434 {"area", B8(010001),'F',0, Html_tag_open_default, Html_tag_content_area,
31283435 NULL},
3436 {"article", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
3437 {"aside", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
3438 {"audio", B8(011101),'R',2, Html_tag_open_audio, NULL, Html_tag_close_media},
31293439 {"b", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
31303440 {"base", B8(100001),'F',0, Html_tag_open_base, NULL, NULL},
3131 /* basefont 010001 */
3441 /* basefont 010001 -- obsolete in HTML5 */
31323442 /* bdo 010101 */
31333443 {"big", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
31343444 {"blockquote", B8(011110),'R',2, Html_tag_open_blockquote, NULL,
31523462 {"dl", B8(011010),'R',2, Html_tag_open_dl, NULL, Html_tag_close_par},
31533463 {"dt", B8(010110),'O',1, Html_tag_open_dt, NULL, Html_tag_close_par},
31543464 {"em", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
3465 {"embed", B8(010001),'F',0, Html_tag_open_embed, Html_tag_content_embed,NULL},
31553466 /* fieldset */
3467 {"figcaption", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
3468 {"figure", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
31563469 {"font", B8(010101),'R',2, Html_tag_open_font, NULL, NULL},
3470 {"footer", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
31573471 {"form", B8(011110),'R',2, Html_tag_open_form, NULL, Html_tag_close_form},
31583472 {"frame", B8(010010),'F',0, Html_tag_open_frame, Html_tag_content_frame,
31593473 NULL},
31663480 {"h5", B8(010110),'R',2, Html_tag_open_h, NULL, NULL},
31673481 {"h6", B8(010110),'R',2, Html_tag_open_h, NULL, NULL},
31683482 {"head", B8(101101),'O',1, Html_tag_open_head, NULL, Html_tag_close_head},
3483 {"header", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
31693484 {"hr", B8(010010),'F',0, Html_tag_open_hr, Html_tag_content_hr,
31703485 NULL},
31713486 {"html", B8(001110),'O',1, Html_tag_open_html, NULL, Html_tag_close_html},
31753490 {"img", B8(010001),'F',0, Html_tag_open_img, Html_tag_content_img,
31763491 NULL},
31773492 {"input", B8(010001),'F',0, Html_tag_open_input, NULL, NULL},
3178 /* ins */
3493 {"ins", B8(011101),'R',2, Html_tag_open_default, NULL, NULL},
31793494 {"isindex", B8(110001),'F',0, Html_tag_open_isindex, NULL, NULL},
31803495 {"kbd", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
31813496 /* label 010101 */
31843499 {"link", B8(100001),'F',0, Html_tag_open_link, NULL, NULL},
31853500 {"map", B8(011001),'R',2, Html_tag_open_default, Html_tag_content_map,
31863501 Html_tag_close_map},
3502 {"mark", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
31873503 /* menu 1010 -- TODO: not exactly 1010, it can contain LI and inline */
31883504 {"menu", B8(011010),'R',2, Html_tag_open_menu, NULL, Html_tag_close_par},
31893505 {"meta", B8(100001),'F',0, Html_tag_open_meta, NULL, NULL},
3190 /* noframes 1011 */
3506 {"nav", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
3507 /* noframes 1011 -- obsolete in HTML5 */
31913508 /* noscript 1011 */
3192 {"object", B8(111101),'R',2, Html_tag_open_object, NULL, NULL},
3509 {"object", B8(111101),'R',2, Html_tag_open_object, Html_tag_content_object,
3510 NULL},
31933511 {"ol", B8(011010),'R',2, Html_tag_open_ol, NULL, NULL},
3194 /* optgroup */
3195 {"option", B8(010001),'O',1, Html_tag_open_option,NULL,Html_tag_close_option},
3512 {"optgroup", B8(010101),'O',1, Html_tag_open_optgroup, NULL,
3513 Html_tag_close_optgroup},
3514 {"option", B8(010001),'O',0, Html_tag_open_option,NULL,Html_tag_close_option},
31963515 {"p", B8(010110),'O',1, Html_tag_open_p, NULL, NULL},
31973516 /* param 010001 'F' */
31983517 {"pre", B8(010110),'R',2, Html_tag_open_pre, NULL, Html_tag_close_pre},
32003519 {"s", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
32013520 {"samp", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
32023521 {"script", B8(111001),'R',2, Html_tag_open_script,NULL,Html_tag_close_script},
3522 {"section", B8(011110),'R',2, Html_tag_open_default, NULL, NULL},
32033523 {"select", B8(010101),'R',2, Html_tag_open_select,NULL,Html_tag_close_select},
32043524 {"small", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
3525 {"source", B8(010001),'F',0, Html_tag_open_source, Html_tag_content_source,
3526 NULL},
32053527 {"span", B8(010101),'R',2, Html_tag_open_span, NULL, NULL},
32063528 {"strike", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
32073529 {"strong", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
32253547 {"tt", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
32263548 {"u", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
32273549 {"ul", B8(011010),'R',2, Html_tag_open_ul, NULL, NULL},
3228 {"var", B8(010101),'R',2, Html_tag_open_default, NULL, NULL}
3229
3550 {"var", B8(010101),'R',2, Html_tag_open_default, NULL, NULL},
3551 {"video", B8(011101),'R',2, Html_tag_open_video, NULL, Html_tag_close_media},
3552 {"wbr", B8(010101),'F',0, Html_tag_open_default, Html_tag_content_wbr, NULL}
32303553 };
32313554 #define NTAGS (sizeof(Tags)/sizeof(Tags[0]))
32323555
33853708 int tag_idx;
33863709
33873710 if (!(html->InFlags & IN_HTML) && html->DocType == DT_NONE)
3388 BUG_MSG("the required DOCTYPE declaration is missing (or invalid)\n");
3711 BUG_MSG("the required DOCTYPE declaration is missing.\n");
33893712
33903713 if (!(html->InFlags & IN_HTML)) {
33913714 tag = "<html>";
34003723
34013724 if (Tags[new_idx].Flags & 32) {
34023725 /* head element */
3403 if (!(html->InFlags & IN_HEAD)) {
3726 if (!(html->InFlags & IN_HEAD) && html->Num_HEAD == 0) {
34043727 tag = "<head>";
34053728 tag_idx = a_Html_tag_index(tag + 1);
34063729 if (tag_idx != new_idx || IsCloseTag) {
34803803 }
34813804 }
34823805
3806 /*
3807 * Warn when encountering elements that are obsolete in HTML5. This list
3808 * was from the "W3C Candidate Recommendation 6 August 2013".
3809 */
3810 static void Html_check_html5_obsolete(DilloHtml *html, int ni)
3811 {
3812 static int indexes[9] = {-1};
3813
3814 if (indexes[0] == -1) {
3815 indexes[0] = a_Html_tag_index("dir");
3816 indexes[1] = a_Html_tag_index("frame");
3817 indexes[2] = a_Html_tag_index("frameset");
3818 indexes[3] = a_Html_tag_index("isindex");
3819 indexes[4] = a_Html_tag_index("strike");
3820 indexes[5] = a_Html_tag_index("big");
3821 indexes[6] = a_Html_tag_index("center");
3822 indexes[7] = a_Html_tag_index("font");
3823 indexes[8] = a_Html_tag_index("tt");
3824 }
3825 for (int i = 0; i < 9; i++) {
3826 if (indexes[i] == ni) {
3827 BUG_MSG("<%s> is obsolete in HTML5.\n", Tags[ni].name);
3828 break;
3829 }
3830 }
3831 }
3832
34833833 static void Html_display_block(DilloHtml *html)
34843834 {
34853835 //HT2TB(html)->addParbreak (5, html->styleEngine->wordStyle ());
34883838
34893839 static void Html_display_listitem(DilloHtml *html)
34903840 {
3491 Style *style = html->styleEngine->style ();
3492 Style *wordStyle = html->styleEngine->wordStyle ();
3841 Style *style = html->style ();
3842 Style *wordStyle = html->wordStyle ();
34933843 Widget **ref_list_item;
34943844 ListItem *list_item;
34953845 int *list_number;
35433893 return;
35443894 }
35453895
3896 if (!IsCloseTag && html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
3897 Html_check_html5_obsolete(html, ni);
3898
35463899 /* Handle HTML, HEAD and BODY. Elements with optional open and close */
35473900 if (!(html->InFlags & IN_BODY) /* && parsing HTML */)
35483901 Html_test_section(html, ni, IsCloseTag);
35633916 if ((html->InFlags & IN_PRE) && Html_tag_pre_excludes(ni))
35643917 BUG_MSG("<pre> is not allowed to contain <%s>\n", Tags[ni].name);
35653918
3919 /* Make sure these elements don't nest each other */
3920 if (html->InFlags & (IN_BUTTON | IN_SELECT | IN_TEXTAREA))
3921 Html_tag_cleanup_nested_inputs(html, ni);
3922
35663923 /* Push the tag into the stack */
35673924 Html_push_tag(html, ni);
35683925
3569 html->styleEngine->startElement (ni);
3926 html->startElement (ni);
35703927 _MSG("Open : %*s%s\n", html->stack->size(), " ", Tags[ni].name);
35713928
35723929 /* Parse attributes that can appear on any tag */
35733930 Html_parse_common_attrs(html, tag, tagsize);
35743931
35753932 /* Call the open function for this tag */
3576 _MSG("Open : %s\n", Tags[ni].name);
3933 _MSG("Html_process_tag Open : %s\n", Tags[ni].name);
35773934 Tags[ni].open (html, tag, tagsize);
35783935
35793936 if (! S_TOP(html)->display_none) {
3580 switch (html->styleEngine->style ()->display) {
3937 switch (html->style ()->display) {
35813938 case DISPLAY_BLOCK:
35823939 Html_display_block(html);
35833940 break;
36013958 if (html->stop_parser)
36023959 break;
36033960
3604 if (S_TOP(html)->parse_mode != DILLO_HTML_PARSE_MODE_PRE &&
3605 (html->styleEngine->style ()->whiteSpace == WHITE_SPACE_PRE ||
3606 html->styleEngine->style ()->whiteSpace == WHITE_SPACE_PRE_WRAP)) {
3961 if (S_TOP(html)->parse_mode == DILLO_HTML_PARSE_MODE_VERBATIM) {
3962 /* don't change anything */
3963 } else if (S_TOP(html)->parse_mode != DILLO_HTML_PARSE_MODE_PRE &&
3964 (html->style ()->whiteSpace == WHITE_SPACE_PRE ||
3965 html->style ()->whiteSpace == WHITE_SPACE_PRE_WRAP)) {
36073966 S_TOP(html)->parse_mode = DILLO_HTML_PARSE_MODE_PRE;
36083967 html->pre_column = 0;
36093968 html->PreFirstChar = true;
36303989 (strchr(" \"'", tag[tagsize-3]) || /* [ "']/> */
36313990 (size_t)tagsize == strlen(Tags[ni].name) + 3))) { /* <x/> */
36323991
3633 _MSG("Close: %s\n", Tags[ni].name);
3992 _MSG("Html_process_tag Close: %s\n", Tags[ni].name);
36343993 Html_tag_cleanup_at_close(html, ni);
36353994 /* This was a close tag */
36363995 html->ReqTagClose = false;
36724031 break;
36734032
36744033 case MATCH_ATTR_NAME:
3675 if ((Found = (!(attrname[attr_pos]) &&
3676 (tag[i] == '=' || isspace(tag[i]) || tag[i] == '>')))) {
4034 if (!attrname[attr_pos] &&
4035 (tag[i] == '=' || isspace(tag[i]) || tag[i] == '>')) {
4036 Found = 1;
36774037 state = SEEK_TOKEN_START;
36784038 --i;
4039 } else if (!tag[i]) {
4040 state = SEEK_ATTR_START; // NULL byte is not allowed
36794041 } else {
36804042 if (D_ASCII_TOLOWER(tag[i]) != D_ASCII_TOLOWER(attrname[attr_pos]))
36814043 state = SEEK_ATTR_START;
4040
4141 typedef enum {
4242 DT_NONE,
43 DT_UNRECOGNIZED,
4344 DT_HTML,
4445 DT_XHTML
4546 } DilloHtmlDocumentType;
7980 IN_FORM = 1 << 3,
8081 IN_SELECT = 1 << 4,
8182 IN_OPTION = 1 << 5,
82 IN_TEXTAREA = 1 << 6,
83 IN_MAP = 1 << 7,
84 IN_PRE = 1 << 8,
85 IN_BUTTON = 1 << 9,
86 IN_LI = 1 << 10,
83 IN_OPTGROUP = 1 << 6,
84 IN_TEXTAREA = 1 << 7,
85 IN_BUTTON = 1 << 8,
86 IN_MAP = 1 << 9,
87 IN_PRE = 1 << 10,
88 IN_LI = 1 << 11,
89 IN_MEDIA = 1 << 12,
90 IN_META_HACK = 1 << 13,
91 IN_EOF = 1 << 14,
8792 } DilloHtmlProcessingState;
8893
8994 /*
176181 bool TagSoup; /* Flag to enable the parser's cleanup functions */
177182 bool loadCssFromStash; /* current stash content should be loaded as CSS */
178183
179 /* element counters: used for validation purposes */
184 /* element counters: used for validation purposes.
185 * ATM they're used as three state flags {0,1,>1} */
180186 uchar_t Num_HTML, Num_HEAD, Num_BODY, Num_TITLE;
181187
182188 Dstr *attr_data; /* Buffer for attribute value */
212218 bool_t unloadedImages();
213219 void loadImages (const DilloUrl *pattern);
214220 void addCssUrl(const DilloUrl *url);
221
222 // useful shortcuts
223 inline void startElement (int tag)
224 { styleEngine->startElement (tag, bw); }
225 inline void startElement (const char *tagname)
226 { styleEngine->startElement (tagname, bw); }
227
228 inline dw::core::style::Style *backgroundStyle ()
229 { return styleEngine->backgroundStyle (bw); }
230 inline dw::core::style::Style *style ()
231 { return styleEngine->style (bw); }
232 inline dw::core::style::Style *wordStyle ()
233 { return styleEngine->wordStyle (bw); }
234
235 inline void restyle () { styleEngine->restyle (bw); }
236
215237 };
216238
217239 /*
235257 const char *url_str, const char *base_url,
236258 int use_base_url);
237259
238 void a_Html_image_attrs(DilloHtml *html, const char *tag, int tagsize);
260 void a_Html_common_image_attrs(DilloHtml *html, const char *tag, int tagsize);
239261 DilloImage *a_Html_image_new(DilloHtml *html, const char *tag, int tagsize);
240262
241263 char *a_Html_parse_entities(DilloHtml *html, const char *token, int toksize);
2222
2323 using namespace dw::core;
2424
25 // Image to Object-Image macro
26 #define I2DW(Image) ((dw::Image*)(Image->dw))
25 // Image to Object-ImgRenderer macro
26 #define I2IR(Image) ((dw::core::ImgRenderer*)(Image->img_rndr))
2727
2828
2929 /*
3030 * Create and initialize a new image structure.
3131 */
32 DilloImage *a_Image_new(const char *alt_text, int32_t bg_color)
32 DilloImage *a_Image_new(void *layout, void *img_rndr, int32_t bg_color)
3333 {
3434 DilloImage *Image;
3535
3636 Image = dNew(DilloImage, 1);
37 Image->dw = (void*) new dw::Image(alt_text);
37 Image->layout = layout;
38 Image->img_rndr = img_rndr;
3839 Image->width = 0;
3940 Image->height = 0;
4041 Image->bg_color = bg_color;
4748 return Image;
4849 }
4950
51 /*
52 * Create and initialize a new image structure with an image widget.
53 */
54 DilloImage *a_Image_new_with_dw(void *layout, const char *alt_text,
55 int32_t bg_color)
56 {
57 dw::Image *dw = new dw::Image(alt_text);
58 return a_Image_new(layout, (void*)(dw::core::ImgRenderer*)dw, bg_color);
59 }
60
61 /*
62 * Return the image renderer as a widget. This is somewhat tricky,
63 * since simple casting leads to wrong (and hard to debug) results,
64 * because of multiple inheritance. This function can be used from C
65 * code, where only access to void* is possible.
66 */
67 void *a_Image_get_dw(DilloImage *Image)
68 {
69 return (dw::Image*)(dw::core::ImgRenderer*)Image->img_rndr;
70 }
5071 /*
5172 * Deallocate an Image structure
5273 */
87108 _MSG("a_Image_set_parms: width=%d height=%d\n", width, height);
88109
89110 bool resize = (Image->width != width || Image->height != height);
90 I2DW(Image)->setBuffer((Imgbuf*)v_imgbuf, resize);
111 I2IR(Image)->setBuffer((Imgbuf*)v_imgbuf, resize);
91112
92113 if (!Image->BitVec)
93114 Image->BitVec = a_Bitvec_new(height);
105126 dReturn_if_fail ( y < Image->height );
106127
107128 /* Update the row in DwImage */
108 I2DW(Image)->drawRow(y);
129 I2IR(Image)->drawRow(y);
109130 a_Bitvec_set_bit(Image->BitVec, y);
110131 Image->State = IMG_Write;
111132 }
116137 void a_Image_close(DilloImage *Image)
117138 {
118139 _MSG("a_Image_close\n");
140 I2IR(Image)->finish();
119141 }
120142
143 /*
144 * Implement the abort method
145 */
146 void a_Image_abort(DilloImage *Image)
147 {
148 _MSG("a_Image_abort\n");
149 I2IR(Image)->fatal();
150 }
151
4343 } ImageState;
4444
4545 struct _DilloImage {
46 void *dw;
46 void *layout, *img_rndr;
4747
4848 /* Parameters as told by image data */
4949 uint_t width;
6161 /*
6262 * Function prototypes
6363 */
64 DilloImage *a_Image_new(const char *alt_text, int32_t bg_color);
64 DilloImage *a_Image_new(void *layout, void *img_rndr, int32_t bg_color);
65 DilloImage *a_Image_new_with_dw(void *layout, const char *alt_text,
66 int32_t bg_color);
67 void *a_Image_get_dw(DilloImage *Image);
6568 void a_Image_ref(DilloImage *Image);
6669 void a_Image_unref(DilloImage *Image);
6770
7073 DilloImgType type);
7174 void a_Image_write(DilloImage *Image, uint_t y);
7275 void a_Image_close(DilloImage *Image);
76 void a_Image_abort(DilloImage *Image);
7377
7478
7579 #ifdef __cplusplus
8989 /*
9090 * Create a new Imgbuf
9191 */
92 void *a_Imgbuf_new(void *v_dw, int img_type, uint_t width, uint_t height)
92 void *a_Imgbuf_new(void *layout, int img_type, uint_t width, uint_t height,
93 double gamma)
9394 {
94 Layout *layout = ((Widget*)v_dw)->getLayout();
9595 if (!layout) {
9696 MSG_ERR("a_Imgbuf_new: layout is NULL.\n");
9797 exit(1);
102102 linebuf = (uchar_t*) dRealloc(linebuf, linebuf_size);
103103 }
104104
105 return (void*)layout->createImgbuf(Imgbuf::RGB, width, height);
105 return (void*)((Layout*)layout)->createImgbuf(Imgbuf::RGB, width, height,
106 gamma);
106107 }
107108
108109 /*
1515 */
1616 void a_Imgbuf_ref(void *v_imgbuf);
1717 void a_Imgbuf_unref(void *v_imgbuf);
18 void *a_Imgbuf_new(void *v_dw, int img_type, uint_t width, uint_t height);
18 void *a_Imgbuf_new(void *v_ir, int img_type, uint_t width, uint_t height,
19 double gamma);
1920 int a_Imgbuf_last_reference(void *v_imgbuf);
2021 void a_Imgbuf_update(void *v_imgbuf, const uchar_t *buf, DilloImgType type,
2122 uchar_t *cmap, uint_t width, uint_t height, uint_t y);
298298 return;
299299 }
300300
301 /** \todo Gamma for JPEG? */
301302 a_Dicache_set_parms(jpeg->url, jpeg->version, jpeg->Image,
302303 (uint_t)jpeg->cinfo.image_width,
303304 (uint_t)jpeg->cinfo.image_height,
304 type);
305 type, 1 / 2.2);
305306
306307 /* decompression step 4 (see libjpeg.doc) */
307308 jpeg->state = DILLO_JPEG_STARTING;
678678 }
679679
680680 /*
681 * Toggle loading of background images.
682 */
683 static void Menu_bgimg_load_toggle_cb(Fl_Widget *wid, void*)
684 {
685 Fl_Menu_Item *item = (Fl_Menu_Item*) wid;
686
687 item->flags ^= FL_MENU_VALUE;
688 prefs.load_background_images = item->flags & FL_MENU_VALUE ? 1 : 0;
689 a_UIcmd_repush(popup_bw);
690 }
691
692 /*
681693 * Tools popup menu (construction & popup)
682694 */
683695 void a_Menu_tools_popup(BrowserWindow *bw, int x, int y)
690702 {"Use embedded CSS", 0, Menu_embedded_css_cb, 0,
691703 FL_MENU_TOGGLE|FL_MENU_DIVIDER,0,0,0,0},
692704 {"Load images", 0, Menu_imgload_toggle_cb, 0,
705 FL_MENU_TOGGLE,0,0,0,0},
706 {"Load background images", 0, Menu_bgimg_load_toggle_cb, 0,
693707 FL_MENU_TOGGLE|FL_MENU_DIVIDER,0,0,0,0},
694708 {"Panel size", 0, Menu_nop_cb, (void*)"Submenu1", FL_SUBMENU,0,0,0,0},
695709 {"tiny", 0,Menu_panel_change_cb,(void*)0,FL_MENU_RADIO,0,0,0,0},
712726 pm[1].set();
713727 if (prefs.load_images)
714728 pm[2].set();
715 pm[4+cur_panelsize].setonly();
716 cur_smallicons ? pm[7].set() : pm[7].clear();
729 if (prefs.load_background_images)
730 pm[3].set();
731 pm[5+cur_panelsize].setonly();
732 cur_smallicons ? pm[8].set() : pm[8].clear();
717733
718734 item = pm->popup(x, y);
719735 if (item) {
114114
115115 typedef enum {
116116 DT_OCTET_STREAM = 0,
117 DT_PLACEHOLDER,
117118 DT_TEXT_HTML,
118119 DT_TEXT_PLAIN,
119120 DT_IMAGE_GIF,
9494 state = ST_SeekingEol;
9595
9696 Layout *layout = (Layout*) bw->render_layout;
97 StyleEngine styleEngine (layout);
98
99 styleEngine.startElement ("body");
100 styleEngine.startElement ("pre");
101 widgetStyle = styleEngine.wordStyle ();
97 // TODO (1x) No URL?
98 StyleEngine styleEngine (layout, NULL, NULL);
99
100 styleEngine.startElement ("body", bw);
101 styleEngine.startElement ("pre", bw);
102 widgetStyle = styleEngine.wordStyle (bw);
102103 widgetStyle->ref ();
103104
104105 /* The context menu */
118118 int bit_depth;
119119 int interlace_type;
120120 uint_t i;
121 double gamma;
121 double file_gamma = 1 / 2.2;
122122
123123 _MSG("Png_datainfo_callback:\n");
124124
162162 /* Get and set gamma information. Beware: gamma correction 2.2 will
163163 only work on PC's. TODO: select screen gamma correction for other
164164 platforms. */
165 if (png_get_gAMA(png_ptr, info_ptr, &gamma))
166 png_set_gamma(png_ptr, 2.2, gamma);
165 if (png_get_gAMA(png_ptr, info_ptr, &file_gamma))
166 png_set_gamma(png_ptr, 2.2, file_gamma);
167167
168168 /* Convert gray scale to RGB */
169169 if (color_type == PNG_COLOR_TYPE_GRAY ||
202202 /* Initialize the dicache-entry here */
203203 a_Dicache_set_parms(png->url, png->version, png->Image,
204204 (uint_t)png->width, (uint_t)png->height,
205 DILLO_IMG_TYPE_RGB);
205 DILLO_IMG_TYPE_RGB, file_gamma);
206206 }
207207
208208 static void
3636 void a_Prefs_init(void)
3737 {
3838 prefs.allow_white_bg = TRUE;
39 prefs.white_bg_replacement = 0xe0e0a3; // 0xdcd1ba;
3940 prefs.bg_color = 0xdcd1ba;
4041 prefs.buffered_drawing = 1;
4142 prefs.contrast_visited_color = TRUE;
6667 prefs.http_user_agent = dStrdup(PREFS_HTTP_USER_AGENT);
6768 prefs.limit_text_width = FALSE;
6869 prefs.load_images=TRUE;
70 prefs.load_background_images=TRUE;
6971 prefs.load_stylesheets=TRUE;
7072 prefs.middle_click_drags_page = TRUE;
7173 prefs.middle_click_opens_new_tab = TRUE;
9193 prefs.show_quit_dialog = TRUE;
9294 prefs.show_reload = TRUE;
9395 prefs.show_save = TRUE;
96 prefs.show_url = TRUE;
9497 prefs.show_search = TRUE;
9598 prefs.show_stop = TRUE;
9699 prefs.show_tools = TRUE;
97100 prefs.show_tooltip = TRUE;
101 prefs.show_ui_tooltip = TRUE;
98102 prefs.small_icons = FALSE;
99103 prefs.start_page = a_Url_new(PREFS_START_PAGE, NULL);
100104 prefs.theme = dStrdup(PREFS_THEME);
114118 prefs.penalty_em_dash_left = 800;
115119 prefs.penalty_em_dash_right = 100;
116120 prefs.penalty_em_dash_right_2 = 800;
121 prefs.stretchability_factor = 100;
117122 }
118123
119124 /*
4747 DilloUrl *start_page;
4848 DilloUrl *home;
4949 bool_t allow_white_bg;
50 int32_t white_bg_replacement;
5051 int32_t bg_color;
5152 int32_t ui_button_highlight_color;
5253 int32_t ui_fg_color;
5960 int32_t ui_text_bg_color;
6061 bool_t contrast_visited_color;
6162 bool_t show_tooltip;
63 bool_t show_ui_tooltip;
6264 char *theme;
6365 int panel_size;
6466 bool_t small_icons;
7880 bool_t show_tools;
7981 bool_t show_filemenu;
8082 bool_t show_clear_url;
83 bool_t show_url;
8184 bool_t show_search;
8285 bool_t show_help;
8386 bool_t show_progress_box;
8487 bool_t show_quit_dialog;
8588 bool_t fullwindow_start;
8689 bool_t load_images;
90 bool_t load_background_images;
8791 bool_t load_stylesheets;
8892 bool_t parse_embedded_css;
8993 int32_t buffered_drawing;
103107 bool_t middle_click_drags_page;
104108 int penalty_hyphen, penalty_hyphen_2;
105109 int penalty_em_dash_left, penalty_em_dash_right, penalty_em_dash_right_2;
110 int stretchability_factor;
106111 } DilloPrefs;
107112
108113 /* Global Data */
5252 /* Symbol array, sorted alphabetically */
5353 const SymNode_t symbols[] = {
5454 { "allow_white_bg", &prefs.allow_white_bg, PREFS_BOOL },
55 { "white_bg_replacement", &prefs.white_bg_replacement, PREFS_COLOR },
5556 { "bg_color", &prefs.bg_color, PREFS_COLOR },
5657 { "buffered_drawing", &prefs.buffered_drawing, PREFS_INT32 },
5758 { "contrast_visited_color", &prefs.contrast_visited_color, PREFS_BOOL },
7778 { "http_user_agent", &prefs.http_user_agent, PREFS_STRING },
7879 { "limit_text_width", &prefs.limit_text_width, PREFS_BOOL },
7980 { "load_images", &prefs.load_images, PREFS_BOOL },
81 { "load_background_images", &prefs.load_background_images, PREFS_BOOL },
8082 { "load_stylesheets", &prefs.load_stylesheets, PREFS_BOOL },
8183 { "middle_click_drags_page", &prefs.middle_click_drags_page,
8284 PREFS_BOOL },
101103 { "show_quit_dialog", &prefs.show_quit_dialog, PREFS_BOOL },
102104 { "show_reload", &prefs.show_reload, PREFS_BOOL },
103105 { "show_save", &prefs.show_save, PREFS_BOOL },
106 { "show_url", &prefs.show_url, PREFS_BOOL },
104107 { "show_search", &prefs.show_search, PREFS_BOOL },
105108 { "show_stop", &prefs.show_stop, PREFS_BOOL },
106109 { "show_tools", &prefs.show_tools, PREFS_BOOL },
107110 { "show_tooltip", &prefs.show_tooltip, PREFS_BOOL },
111 { "show_ui_tooltip", &prefs.show_ui_tooltip, PREFS_BOOL },
108112 { "small_icons", &prefs.small_icons, PREFS_BOOL },
109113 { "start_page", &prefs.start_page, PREFS_URL },
110114 { "theme", &prefs.theme, PREFS_STRING },
126130 { "penalty_em_dash_right", &prefs.penalty_em_dash_right,
127131 PREFS_FRACTION_100 },
128132 { "penalty_em_dash_right_2", &prefs.penalty_em_dash_right_2,
133 PREFS_FRACTION_100 },
134 { "stretchability_factor", &prefs.stretchability_factor,
129135 PREFS_FRACTION_100 }
130136 };
131137
1414 #include "misc.h"
1515 #include "html_common.hh"
1616 #include "styleengine.hh"
17 #include "web.hh"
18 #include "capi.h"
1719
1820 using namespace lout::misc;
1921 using namespace dw::core::style;
2022
21 StyleEngine::StyleEngine (dw::core::Layout *layout) {
23 /**
24 * Signal handler for "delete": This handles the case when an instance
25 * of StyleImage is deleted, possibly when the cache client is still
26 * active.
27 *
28 * \todo Not neccessary for dw::Image? (dw::Image also implements
29 * lout::signal::ObservedObject.)
30 */
31 class StyleImageDeletionReceiver:
32 public lout::signal::ObservedObject::DeletionReceiver
33 {
34 int clientKey;
35
36 public:
37 StyleImageDeletionReceiver (int clientKey);
38 ~StyleImageDeletionReceiver ();
39
40 void deleted (lout::signal::ObservedObject *object);
41 };
42
43 StyleImageDeletionReceiver::StyleImageDeletionReceiver (int clientKey)
44 {
45 this->clientKey = clientKey;
46 }
47
48 StyleImageDeletionReceiver::~StyleImageDeletionReceiver ()
49 {
50 }
51
52 void StyleImageDeletionReceiver::deleted (lout::signal::ObservedObject *object)
53 {
54 a_Capi_stop_client (clientKey, 0);
55 delete this;
56 }
57
58 // ----------------------------------------------------------------------
59
60 StyleEngine::StyleEngine (dw::core::Layout *layout,
61 const DilloUrl *pageUrl, const DilloUrl *baseUrl) {
2262 StyleAttrs style_attrs;
2363 FontAttrs font_attrs;
2464
2565 doctree = new Doctree ();
2666 stack = new lout::misc::SimpleVector <Node> (1);
2767 cssContext = new CssContext ();
28 buildUserAgentStyle ();
2968 buildUserStyle ();
3069 this->layout = layout;
70 this->pageUrl = pageUrl ? a_Url_dup(pageUrl) : NULL;
71 this->baseUrl = baseUrl ? a_Url_dup(baseUrl) : NULL;
3172 importDepth = 0;
3273
3374 stackPush ();
60101 stackPop (); // dummy node on the bottom of the stack
61102 assert (stack->size () == 0);
62103
104 a_Url_free(pageUrl);
105 a_Url_free(baseUrl);
106
63107 delete stack;
64108 delete doctree;
65109 delete cssContext;
91135 /**
92136 * \brief tell the styleEngine that a new html element has started.
93137 */
94 void StyleEngine::startElement (int element) {
95 style (); // ensure that style of current node is computed
138 void StyleEngine::startElement (int element, BrowserWindow *bw) {
139 style (bw); // ensure that style of current node is computed
96140
97141 stackPush ();
98142 Node *n = stack->getLastRef ();
102146 n->doctreeNode = dn;
103147 }
104148
105 void StyleEngine::startElement (const char *tagname) {
106 startElement (a_Html_tag_index (tagname));
149 void StyleEngine::startElement (const char *tagname, BrowserWindow *bw) {
150 startElement (a_Html_tag_index (tagname), bw);
107151 }
108152
109153 void StyleEngine::setId (const char *id) {
151195 n->styleAttrProperties = new CssPropertyList (true);
152196 n->styleAttrPropertiesImportant = new CssPropertyList (true);
153197
154 CssParser::parseDeclarationBlock (styleAttr, strlen (styleAttr),
198 CssParser::parseDeclarationBlock (baseUrl, styleAttr, strlen (styleAttr),
155199 n->styleAttrProperties,
156200 n->styleAttrPropertiesImportant);
157201 }
201245
202246 if (n->style && n->style->backgroundColor)
203247 return n->style->backgroundColor;
248 }
249
250 return NULL;
251 }
252
253 dw::core::style::StyleImage *StyleEngine::backgroundImage
254 (dw::core::style::BackgroundRepeat *bgRepeat,
255 dw::core::style::BackgroundAttachment *bgAttachment,
256 dw::core::style::Length *bgPositionX,
257 dw::core::style::Length *bgPositionY) {
258 for (int i = 1; i < stack->size (); i++) {
259 Node *n = stack->getRef (i);
260
261 if (n->style && n->style->backgroundImage) {
262 *bgRepeat = n->style->backgroundRepeat;
263 *bgAttachment = n->style->backgroundAttachment;
264 *bgPositionX = n->style->backgroundPositionX;
265 *bgPositionY = n->style->backgroundPositionY;
266 return n->style->backgroundImage;
267 }
204268 }
205269
206270 return NULL;
237301 if (stack->getRef (stack->size () - 2)->inheritBackgroundColor) {
238302 attrs->backgroundColor =
239303 stack->getRef (stack->size () - 2)->style->backgroundColor;
304 attrs->backgroundImage =
305 stack->getRef (stack->size () - 2)->style->backgroundImage;
306 attrs->backgroundRepeat =
307 stack->getRef (stack->size () - 2)->style->backgroundRepeat;
308 attrs->backgroundAttachment =
309 stack->getRef (stack->size () - 2)->style->backgroundAttachment;
310 attrs->backgroundPositionX =
311 stack->getRef (stack->size () - 2)->style->backgroundPositionX;
312 attrs->backgroundPositionY =
313 stack->getRef (stack->size () - 2)->style->backgroundPositionY;
240314
241315 attrs->valign = stack->getRef (stack->size () - 2)->style->valign;
242316 }
280354 /**
281355 * \brief Make changes to StyleAttrs attrs according to CssPropertyList props.
282356 */
283 void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props) {
357 void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props,
358 BrowserWindow *bw) {
284359 FontAttrs fontAttrs = *attrs->font;
285360 Font *parentFont = stack->get (i - 1).style->font;
286361 char *c, *fontName;
440515
441516 switch (p->name) {
442517 /* \todo missing cases */
518 case CSS_PROPERTY_BACKGROUND_ATTACHMENT:
519 attrs->backgroundAttachment =
520 (BackgroundAttachment) p->value.intVal;
521 break;
443522 case CSS_PROPERTY_BACKGROUND_COLOR:
444523 if (prefs.allow_white_bg || p->value.intVal != 0xffffff)
445524 attrs->backgroundColor = Color::create(layout, p->value.intVal);
446525 else
447 //attrs->backgroundColor = Color::create(layout, 0xdcd1ba);
448 attrs->backgroundColor = Color::create(layout, 0xe0e0a3);
526 attrs->backgroundColor =
527 Color::create(layout, prefs.white_bg_replacement);
528 break;
529 case CSS_PROPERTY_BACKGROUND_IMAGE:
530 if (prefs.load_background_images)
531 {
532 // p->value.strVal should be absolute, so baseUrl is not needed
533 DilloUrl *imgUrl = a_Url_new (p->value.strVal, NULL);
534
535 attrs->backgroundImage = StyleImage::create();
536 DilloImage *image =
537 a_Image_new(layout,
538 (void*)attrs->backgroundImage
539 ->getMainImgRenderer(),
540 0xffffff);
541
542 // we use the pageUrl as requester to prevent cross
543 // domain requests as specified in domainrc
544 DilloWeb *web = a_Web_new(bw, imgUrl, pageUrl);
545 web->Image = image;
546 a_Image_ref(image);
547 web->flags |= WEB_Image;
548
549 int clientKey;
550 if ((clientKey = a_Capi_open_url(web, NULL, NULL)) != 0) {
551 a_Bw_add_client(bw, clientKey, 0);
552 a_Bw_add_url(bw, imgUrl);
553 attrs->backgroundImage->connectDeletion
554 (new StyleImageDeletionReceiver (clientKey));
555 }
556
557 a_Url_free (imgUrl);
558 }
559 break;
560 case CSS_PROPERTY_BACKGROUND_POSITION:
561 computeLength (&attrs->backgroundPositionX, p->value.posVal->posX,
562 attrs->font);
563 computeLength (&attrs->backgroundPositionY, p->value.posVal->posY,
564 attrs->font);
565 break;
566 case CSS_PROPERTY_BACKGROUND_REPEAT:
567 attrs->backgroundRepeat = (BackgroundRepeat) p->value.intVal;
449568 break;
450569 case CSS_PROPERTY_BORDER_COLLAPSE:
451570 attrs->borderCollapse = (BorderCollapse) p->value.intVal;
705824 * A normal style might have backgroundColor == NULL to indicate a transparent
706825 * background. This method ensures that backgroundColor is set.
707826 */
708 Style * StyleEngine::backgroundStyle () {
827 Style * StyleEngine::backgroundStyle (BrowserWindow *bw) {
709828 if (!stack->getRef (stack->size () - 1)->backgroundStyle) {
710 StyleAttrs attrs = *style ();
829 StyleAttrs attrs = *style (bw);
711830
712831 for (int i = stack->size () - 1; i >= 0 && ! attrs.backgroundColor; i--)
713832 attrs.backgroundColor = stack->getRef (i)->style->backgroundColor;
724843 * HTML elements and the nonCssProperties that have been set.
725844 * This method is private. Call style() to get a current style object.
726845 */
727 Style * StyleEngine::style0 (int i) {
846 Style * StyleEngine::style0 (int i, BrowserWindow *bw) {
728847 CssPropertyList props, *styleAttrProperties, *styleAttrPropertiesImportant;
729848 CssPropertyList *nonCssProperties;
730849 // get previous style from the stack
752871 nonCssProperties);
753872
754873 // apply style
755 apply (i, &attrs, &props);
874 apply (i, &attrs, &props, bw);
756875
757876 postprocessAttrs (&attrs);
758877
761880 return stack->getRef (i)->style;
762881 }
763882
764 Style * StyleEngine::wordStyle0 () {
765 StyleAttrs attrs = *style ();
883 Style * StyleEngine::wordStyle0 (BrowserWindow *bw) {
884 StyleAttrs attrs = *style (bw);
766885 attrs.resetValues ();
767886
768 if (stack->getRef (stack->size() - 1)->inheritBackgroundColor)
769 attrs.backgroundColor = style ()->backgroundColor;
770
771 attrs.valign = style ()->valign;
887 if (stack->getRef (stack->size() - 1)->inheritBackgroundColor) {
888 attrs.backgroundColor = style (bw)->backgroundColor;
889 attrs.backgroundImage = style (bw)->backgroundImage;
890 attrs.backgroundRepeat = style (bw)->backgroundRepeat;
891 attrs.backgroundAttachment = style (bw)->backgroundAttachment;
892 attrs.backgroundPositionX = style (bw)->backgroundPositionX;
893 attrs.backgroundPositionY = style (bw)->backgroundPositionY;
894 }
895
896 attrs.valign = style (bw)->valign;
772897
773898 stack->getRef(stack->size() - 1)->wordStyle = Style::create(&attrs);
774899 return stack->getRef (stack->size () - 1)->wordStyle;
781906 * and thereby after the HTML-element has been opened.
782907 * Note that restyle() does not change any styles in the widget tree.
783908 */
784 void StyleEngine::restyle () {
909 void StyleEngine::restyle (BrowserWindow *bw) {
785910 for (int i = 1; i < stack->size (); i++) {
786911 Node *n = stack->getRef (i);
787912 if (n->style) {
797922 n->backgroundStyle = NULL;
798923 }
799924
800 style0 (i);
925 style0 (i, bw);
801926 }
802927 }
803928
819944 * The user agent style defines how dillo renders HTML in the absence of
820945 * author or user styles.
821946 */
822 void StyleEngine::buildUserAgentStyle () {
947 void StyleEngine::init () {
823948 const char *cssBuf =
824949 "body {margin: 5px}"
825950 "big {font-size: 1.17em}"
829954 ":link {color: blue; text-decoration: underline; cursor: pointer}"
830955 ":visited {color: #800080; text-decoration: underline; cursor: pointer}"
831956 "h1, h2, h3, h4, h5, h6, b, strong {font-weight: bolder}"
832 "address, center, div, h1, h2, h3, h4, h5, h6, ol, p, ul, pre {display: block}"
957 "address, article, aside, center, div, figure, figcaption, footer,"
958 " h1, h2, h3, h4, h5, h6, header, nav, ol, p, pre, section, ul"
959 " {display: block}"
833960 "i, em, cite, address, var {font-style: italic}"
834961 ":link img, :visited img {border: 1px solid}"
835962 "frameset, ul, ol, dir {margin-left: 40px}"
838965 * look better like this.
839966 */
840967 "p {margin: 0.5em 0}"
968 "figure {margin: 1em 40px}"
841969 "h1 {font-size: 2em; margin-top: .67em; margin-bottom: 0}"
842970 "h2 {font-size: 1.5em; margin-top: .75em; margin-bottom: 0}"
843971 "h3 {font-size: 1.17em; margin-top: .83em; margin-bottom: 0}"
852980 "ul ul {list-style-type: circle}"
853981 "ul ul ul {list-style-type: square}"
854982 "ul ul ul ul {list-style-type: disc}"
855 "u {text-decoration: underline}"
983 "ins, u {text-decoration: underline}"
856984 "small, sub, sup {font-size: 0.83em}"
857985 "sub {vertical-align: sub}"
858986 "sup {vertical-align: super}"
859987 "s, strike, del {text-decoration: line-through}"
988 /* HTML5 spec notes that mark styling "is just a suggestion and can be
989 * changed based on implementation feedback"
990 */
991 "mark {background: yellow; color: black;}"
860992 "table {border-spacing: 2px}"
861993 "td, th {padding: 2px}"
862994 "thead, tbody, tfoot {vertical-align: middle}"
8691001 */
8701002 "table, caption {font-size: medium; font-weight: normal}";
8711003
872 CssParser::parse (NULL, NULL, cssContext, cssBuf, strlen (cssBuf),
1004 CssContext context;
1005 CssParser::parse (NULL, NULL, &context, cssBuf, strlen (cssBuf),
8731006 CSS_ORIGIN_USER_AGENT);
8741007 }
8751008
3434 CssContext *cssContext;
3535 Doctree *doctree;
3636 int importDepth;
37 DilloUrl *pageUrl, *baseUrl;
3738
3839 void stackPush ();
3940 void stackPop ();
40 void buildUserAgentStyle ();
4141 void buildUserStyle ();
42 dw::core::style::Style *style0 (int i);
43 dw::core::style::Style *wordStyle0 ();
42 dw::core::style::Style *style0 (int i, BrowserWindow *bw);
43 dw::core::style::Style *wordStyle0 (BrowserWindow *bw);
4444 inline void setNonCssHint(CssPropertyName name, CssValueType type,
4545 CssPropertyValue value) {
4646 Node *n = stack->getRef (stack->size () - 1);
5151 }
5252 void preprocessAttrs (dw::core::style::StyleAttrs *attrs);
5353 void postprocessAttrs (dw::core::style::StyleAttrs *attrs);
54 void apply (int i, dw::core::style::StyleAttrs *attrs, CssPropertyList *props);
54 void apply (int i, dw::core::style::StyleAttrs *attrs,
55 CssPropertyList *props, BrowserWindow *bw);
5556 bool computeValue (int *dest, CssLength value,
5657 dw::core::style::Font *font);
5758 bool computeValue (int *dest, CssLength value,
6263 dw::core::style::Font *font);
6364
6465 public:
65 StyleEngine (dw::core::Layout *layout);
66 static void init ();
67
68 StyleEngine (dw::core::Layout *layout,
69 const DilloUrl *pageUrl, const DilloUrl *baseUrl);
6670 ~StyleEngine ();
6771
6872 void parse (DilloHtml *html, DilloUrl *url, const char *buf, int buflen,
6973 CssOrigin origin);
70 void startElement (int tag);
71 void startElement (const char *tagname);
74 void startElement (int tag, BrowserWindow *bw);
75 void startElement (const char *tagname, BrowserWindow *bw);
7276 void setId (const char *id);
7377 const char * getId () { return doctree->top ()->id; };
7478 void setClass (const char *klass);
9094 }
9195 void inheritNonCssHints ();
9296 void clearNonCssHints ();
93 void restyle ();
97 void restyle (BrowserWindow *bw);
9498 void inheritBackgroundColor (); /* \todo get rid of this somehow */
95 dw::core::style::Style *backgroundStyle ();
99 dw::core::style::Style *backgroundStyle (BrowserWindow *bw);
96100 dw::core::style::Color *backgroundColor ();
101 dw::core::style::StyleImage *backgroundImage
102 (dw::core::style::BackgroundRepeat *bgRepeat,
103 dw::core::style::BackgroundAttachment *bgAttachment,
104 dw::core::style::Length *bgPositionX,
105 dw::core::style::Length *bgPositionY);
97106
98 inline dw::core::style::Style *style () {
107 inline dw::core::style::Style *style (BrowserWindow *bw) {
99108 dw::core::style::Style *s = stack->getRef (stack->size () - 1)->style;
100109 if (s)
101110 return s;
102111 else
103 return style0 (stack->size () - 1);
112 return style0 (stack->size () - 1, bw);
104113 };
105114
106 inline dw::core::style::Style *wordStyle () {
115 inline dw::core::style::Style *wordStyle (BrowserWindow *bw) {
107116 dw::core::style::Style *s = stack->getRef(stack->size()-1)->wordStyle;
108117 if (s)
109118 return s;
110119 else
111 return wordStyle0 ();
120 return wordStyle0 (bw);
112121 };
113122 };
114123
4444
4545 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "border")))
4646 border = isdigit(attrbuf[0]) ? strtol (attrbuf, NULL, 10) : 1;
47 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellspacing")))
47 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellspacing"))) {
4848 cellspacing = strtol (attrbuf, NULL, 10);
49 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellpadding")))
49 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
50 BUG_MSG("<table> cellspacing attribute is obsolete.\n");
51 }
52
53 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "cellpadding"))) {
5054 cellpadding = strtol (attrbuf, NULL, 10);
55 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
56 BUG_MSG("<table> cellpadding attribute is obsolete.\n");
57 }
5158
5259 if (border != -1) {
5360 cssLength = CSS_CREATE_LENGTH (border, CSS_LENGTH_TYPE_PX);
7582 CSS_TYPE_LENGTH_PERCENTAGE, cssLength);
7683 }
7784
78 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "width")))
85 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "width"))) {
7986 html->styleEngine->setNonCssHint (CSS_PROPERTY_WIDTH,
8087 CSS_TYPE_LENGTH_PERCENTAGE,
8188 a_Html_parse_length (html, attrbuf));
89 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
90 BUG_MSG("<table> width attribute is obsolete.\n");
91 }
8292
8393 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "align"))) {
8494 if (dStrAsciiCasecmp (attrbuf, "left") == 0)
90100 else if (dStrAsciiCasecmp (attrbuf, "center") == 0)
91101 html->styleEngine->setNonCssHint (CSS_PROPERTY_TEXT_ALIGN,
92102 CSS_TYPE_ENUM, TEXT_ALIGN_CENTER);
103 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
104 BUG_MSG("<table> align attribute is obsolete.\n");
93105 }
94106
95107 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
97109 if (bgcolor != -1)
98110 html->styleEngine->setNonCssHint (CSS_PROPERTY_BACKGROUND_COLOR,
99111 CSS_TYPE_COLOR, bgcolor);
100 }
101
102 html->styleEngine->style (); // evaluate now, so we can build non-css hints for the cells
112 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
113 BUG_MSG("<table> bgcolor attribute is obsolete.\n");
114 }
115
116 html->style (); // evaluate now, so we can build non-css hints for the cells
103117
104118 /* The style for the cells */
105119 html->styleEngine->clearNonCssHints ();
140154 {
141155 dw::core::Widget *table;
142156
143 HT2TB(html)->addParbreak (0, html->styleEngine->wordStyle ());
157 HT2TB(html)->addParbreak (0, html->wordStyle ());
144158 table = new dw::Table(prefs.limit_text_width);
145 HT2TB(html)->addWidget (table, html->styleEngine->style ());
146 HT2TB(html)->addParbreak (0, html->styleEngine->wordStyle ());
159 HT2TB(html)->addWidget (table, html->style ());
160 HT2TB(html)->addParbreak (0, html->wordStyle ());
147161
148162 S_TOP(html)->table_mode = DILLO_HTML_TABLE_MODE_TOP;
149163 S_TOP(html)->table_border_mode = DILLO_HTML_TABLE_BORDER_SEPARATE;
176190 if (bgcolor != -1)
177191 html->styleEngine->setNonCssHint (CSS_PROPERTY_BACKGROUND_COLOR,
178192 CSS_TYPE_COLOR, bgcolor);
193 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
194 BUG_MSG("<tr> bgcolor attribute is obsolete.\n");
179195 }
180196
181197 if (a_Html_get_attr (html, tag, tagsize, "align")) {
204220 case DILLO_HTML_TABLE_MODE_TOP:
205221 case DILLO_HTML_TABLE_MODE_TR:
206222 case DILLO_HTML_TABLE_MODE_TD:
207 ((dw::Table*)S_TOP(html)->table)->addRow (html->styleEngine->style ());
223 ((dw::Table*)S_TOP(html)->table)->addRow (html->style ());
208224 default:
209225 break;
210226 }
285301 int borderWidth, marginWidth;
286302
287303 tableStyle = ((dw::Table*)S_TOP(html)->table)->getStyle ();
288 borderWidth = html->styleEngine->style ()->borderWidth.top;
304 borderWidth = html->style ()->borderWidth.top;
289305 marginWidth = tableStyle->margin.top;
290306
291 collapseCellAttrs = *(html->styleEngine->style ());
307 collapseCellAttrs = *(html->style ());
292308 collapseCellAttrs.margin.setVal (0);
293309 collapseCellAttrs.borderWidth.left = 0;
294310 collapseCellAttrs.borderWidth.top = 0;
327343 dw::core::style::Style *separateStyle;
328344 dw::core::style::StyleAttrs separateCellAttrs;
329345
330 separateCellAttrs = *(html->styleEngine->style ());
346 separateCellAttrs = *(html->style ());
331347 /* CSS2 17.5: Internal table elements do not have margins */
332348 separateCellAttrs.margin.setVal (0);
333349 separateStyle = Style::create(&separateCellAttrs);
360376 html->styleEngine->setNonCssHint (CSS_PROPERTY_TEXT_ALIGN,
361377 CSS_TYPE_ENUM, text_align);
362378 }
363 if (a_Html_get_attr(html, tag, tagsize, "nowrap"))
379 if (a_Html_get_attr(html, tag, tagsize, "nowrap")) {
380 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
381 BUG_MSG("<t%c> nowrap attribute is obsolete.\n",
382 (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
364383 html->styleEngine->setNonCssHint(CSS_PROPERTY_WHITE_SPACE,
365384 CSS_TYPE_ENUM, WHITE_SPACE_NOWRAP);
385 }
366386
367387 a_Html_tag_set_align_attr (html, tag, tagsize);
368388
370390 html->styleEngine->setNonCssHint (CSS_PROPERTY_WIDTH,
371391 CSS_TYPE_LENGTH_PERCENTAGE,
372392 a_Html_parse_length (html, attrbuf));
393 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
394 BUG_MSG("<t%c> width attribute is obsolete.\n",
395 (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
373396 }
374397
375398 a_Html_tag_set_valign_attr (html, tag, tagsize);
379402 if (bgcolor != -1)
380403 html->styleEngine->setNonCssHint (CSS_PROPERTY_BACKGROUND_COLOR,
381404 CSS_TYPE_COLOR, bgcolor);
405 if (html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)
406 BUG_MSG("<t%c> bgcolor attribute is obsolete.\n",
407 (tagsize >=3 && (D_ASCII_TOLOWER(tag[2]) == 'd')) ? 'd' : 'h');
382408 }
383409
384410 default:
416442 /* TODO: check errors? */
417443 if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "rowspan")))
418444 rowspan = MAX(1, strtol (attrbuf, NULL, 10));
419 if (html->styleEngine->style ()->textAlign
445 if (html->style ()->textAlign
420446 == TEXT_ALIGN_STRING)
421447 col_tb = new dw::TableCell (
422448 ((dw::Table*)S_TOP(html)->table)->getCellRef (),
424450 else
425451 col_tb = new Textblock (prefs.limit_text_width);
426452
427 if (html->styleEngine->style()->borderCollapse == BORDER_MODEL_COLLAPSE){
453 if (html->style()->borderCollapse == BORDER_MODEL_COLLAPSE){
428454 Html_set_collapsing_border_model(html, col_tb);
429455 } else {
430456 Html_set_separate_border_model(html, col_tb);
7070
7171 void TipWin::do_show(void *wid) {
7272 cur_widget = wid; // Keep track of requesting widget
73 if (prefs.show_tooltip) {
73 if (prefs.show_ui_tooltip) {
7474 Fl::add_timeout(recent ? 0.2f : 0.8f, show_timeout);
7575 }
7676 }
173173 TipWinButton(x,y,w,h,l)
174174 {
175175 norm_color = color();
176 light_color = PREFS_UI_BUTTON_HIGHLIGHT_COLOR;
176 light_color = PREFS_UI_BUTTON_HIGHLIGHT_COLOR;
177177 }
178178
179179 int CustButton::handle(int e)
454454 b->set_tooltip("Clear the URL box.\nMiddle-click to paste a URL.");
455455 p_xpos += b->w();
456456
457 CustInput *i = new CustInput(p_xpos,0,ww-p_xpos-32,lh,0);
458 Location = i;
459 i->when(FL_WHEN_ENTER_KEY);
460 i->callback(location_cb, this);
461 i->set_tooltip("Location");
462 p_xpos += i->w();
457 LocationGroup = new Fl_Group(p_xpos,0,ww-p_xpos-32,lh,0);
458 LocationGroup->begin();
459 CustInput *i = new CustInput(p_xpos,0,ww-p_xpos-32,lh,0);
460 Location = i;
461 i->when(FL_WHEN_ENTER_KEY);
462 i->callback(location_cb, this);
463 i->set_tooltip("Location");
464 p_xpos += i->w();
465 LocationGroup->box(FL_THIN_UP_BOX); // or FL_FLAT_BOX
466 LocationGroup->end();
463467
464468 Search = b = new CustButton(p_xpos,0,16,lh,0);
465469 b->image(icons->ImgSearch);
566570 make_toolbar(ww,bh);
567571 make_filemenu_button();
568572 make_location(ww);
569 NavBar->resizable(Location);
573 NavBar->resizable(LocationGroup);
570574 make_progress_bars(0,1);
571575 NavBar->box(FL_THIN_UP_FRAME);
572576 NavBar->end();
580584 p_xpos = 0;
581585 make_filemenu_button();
582586 make_location(ww);
583 LocBar->resizable(Location);
587 LocBar->resizable(LocationGroup);
584588 LocBar->end();
585589 LocBar->rearrange();
586590 TopGroup->insert(*LocBar,0);
944948 Tools->hide();
945949 if ( !prefs.show_clear_url )
946950 Clear->hide();
951 if ( !prefs.show_url )
952 Location->hide();
947953 if ( !prefs.show_search )
948954 Search->hide();
949955 if ( !prefs.show_help )
128128 CustGroupHorizontal *LocBar, *NavBar, *StatusBar;
129129 Fl_Input *Location;
130130 CustProgressBox *PProg, *IProg;
131 Fl_Group *Panel, *Main;
131 Fl_Group *Panel, *Main, *LocationGroup;
132132 Fl_Output *StatusOutput;
133133 Findbar *FindBar;
134134
6969 */
7070 static BrowserWindow *UIcmd_tab_new(CustTabs *tabs, UI *old_ui, int focus);
7171 static void close_tab_btn_cb (Fl_Widget *w, void *cb_data);
72 static char *UIcmd_make_search_str(const char *str);
7273
7374 //----------------------------------------------------------------------------
7475
123124 for (int i = 0; i < num_tabs(); ++i)
124125 btns[i] = (CustTabButton*)Pack->child(i);
125126 qsort(btns, num_tabs(), sizeof(CustTabButton *), btn_cmp);
126 focus_counter = 0;
127 focus_counter = 0;
127128 for (int i = 0; i < num_tabs(); ++i)
128129 btns[i]->focus_num(focus_counter++);
129130 dFree(btns);
496497 // (most likely with modifiers).
497498 return;
498499 }
499
500
500501 if (prefs.show_quit_dialog && ntabs > 1)
501502 choice = a_Dialog_choice("Dillo: Close window?",
502503 "Window contains more than one tab.",
581582 Layout *layout = new Layout (platform);
582583 style::Color *bgColor = style::Color::create (layout, prefs.bg_color);
583584 layout->setBgColor (bgColor);
585 layout->setBgImage (NULL, style::BACKGROUND_REPEAT,
586 style::BACKGROUND_ATTACHMENT_SCROLL,
587 style::createPerLength (0), style::createPerLength (0));
584588
585589 // set_render_layout() sets the proper viewport size
586590 FltkViewport *viewport = new FltkViewport (0, 0, 0, 1);
648652 }
649653
650654 /*
655 * Return a search string of the suffix if str starts with a
656 * prefix of a search engine name and a blank
657 */
658 static char *UIcmd_find_search_str(const char *str)
659 {
660 int p;
661 char *url = NULL;
662 int len = strcspn(str, " ");
663
664 if (len > 0 && str[len] != '\0') {
665 /* we found a ' ' in str, check whether the first part of str
666 * is a prefix of a search_url label
667 */
668 for (p = 0; p < dList_length(prefs.search_urls); p++) {
669 const char *search =
670 (const char *)dList_nth_data(prefs.search_urls, p);
671 if (strncasecmp(str, search, len) == 0) {
672 prefs.search_url_idx = p;
673 url = UIcmd_make_search_str(str + len + 1);
674 break;
675 }
676 }
677 }
678 return url;
679 }
680
681 /*
651682 * Open a new URL in the given browser window.
652683 *
653684 * our custom "file:" URIs are normalized here too.
655686 void a_UIcmd_open_urlstr(void *vbw, const char *urlstr)
656687 {
657688 char *new_urlstr;
689 char *search_urlstr = NULL;
658690 DilloUrl *url;
659691 int ch;
660692 BrowserWindow *bw = (BrowserWindow*)vbw;
661693
694 if ((search_urlstr = UIcmd_find_search_str(urlstr))) {
695 urlstr = search_urlstr;
696 }
662697 if (urlstr && *urlstr) {
663698 /* Filter URL string */
664699 new_urlstr = a_Url_string_strip_delimiters(urlstr);
685720 a_Url_free(url);
686721 }
687722 }
723 dFree(search_urlstr);
688724 }
689725
690726 /*
262262 } else if (BaseUrl->path) { /* relative path */
263263 dStr_append(Path, BaseUrl->path);
264264 for (i = Path->len; --i >= 0 && Path->str[i] != '/'; ) ;
265 if (Path->str[i] == '/')
265 if (i >= 0 && Path->str[i] == '/')
266266 dStr_truncate(Path, ++i);
267267 }
268268 if (RelUrl->path)
687687
688688 if (tld_len > 0) {
689689 /* These TLDs were chosen by examining the current publicsuffix list
690 * in October 2012 and picking out those where it was simplest for
690 * in February 2014 and picking out those where it was simplest for
691691 * them to describe the situation by beginning with a "*.[tld]" rule
692692 * or every rule was "[something].[tld]".
693693 */
694 const char *const tlds[] = {"ar","au","bd","bn","ck","cy","er","et",
695 "fj","fk","gt","gu","il","jm","ke","kh",
696 "kp","kw","lb","lr","mm","mt","mz","ni",
697 "np","nz","om","pg","py","sv","tr","uk",
698 "ve","ye","za","zm","zw"};
694 const char *const tlds[] = {"bd","bn","ck","cy","er","et","fj","fk",
695 "gu","il","jm","ke","kh","kw","mm","mz",
696 "ni","np","nz","pg","tr","uk","ye","za",
697 "zm","zw"};
699698 uint_t i, tld_num = sizeof(tlds) / sizeof(tlds[0]);
700699
701700 for (i = 0; i < tld_num; i++) {
6666 style::Color *bgColor = style::Color::create (layout, prefs.bg_color);
6767 Web->bgColor = bgColor->getColor ();
6868 layout->setBgColor (bgColor);
69 layout->setBgImage (NULL, style::BACKGROUND_REPEAT,
70 style::BACKGROUND_ATTACHMENT_SCROLL,
71 style::createPerLength (0),
72 style::createPerLength (0));
6973
7074 /* Set a style for the widget */
71 StyleEngine styleEngine (layout);
72 styleEngine.startElement ("body");
75 StyleEngine styleEngine (layout, Web->url, Web->url);
76 styleEngine.startElement ("body", Web->bw);
7377
7478 dw = (Widget*) viewer(Type, Web, Call, Data);
7579 if (dw == NULL)
7680 return -1;
7781
78 dw->setStyle (styleEngine.style ());
82 dw->setStyle (styleEngine.style (Web->bw));
7983
8084 /* This method frees the old dw if any */
8185 layout->setWidget(dw);
1414 */
1515 #define WEB_RootUrl 1
1616 #define WEB_Image 2
17 #define WEB_Download 4 /* Half implemented... */
17 #define WEB_Stylesheet 4
18 #define WEB_Download 8 /* Half implemented... */
1819
1920
2021 typedef struct _DilloWeb DilloWeb;
107107 createInternal(xid);
108108 setXembedInfo(1);
109109 Fl::event_dispatch(event_handler);
110 Fl_Window::show();
110111 }
111112
112113 void Xembed::createInternal(uint32_t parent) {
88 dw-find-test \
99 dw-links \
1010 dw-links2 \
11 dw-image-background \
1112 dw-images-simple \
1213 dw-images-scaled \
1314 dw-images-scaled2 \
6667 $(top_builddir)/lout/liblout.a \
6768 @LIBFLTK_LIBS@
6869
70 dw_image_background_SOURCES = dw_image_background.cc
71 dw_image_background_LDADD = \
72 $(top_builddir)/dw/libDw-widgets.a \
73 $(top_builddir)/dw/libDw-fltk.a \
74 $(top_builddir)/dw/libDw-core.a \
75 $(top_builddir)/lout/liblout.a \
76 @LIBFLTK_LIBS@
77
6978 dw_images_simple_SOURCES = dw_images_simple.cc
7079 dw_images_simple_LDADD = \
7180 $(top_builddir)/dw/libDw-widgets.a \
0 # Makefile.in generated by automake 1.11.6 from Makefile.am.
0 # Makefile.in generated by automake 1.14 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
5 # Foundation, Inc.
3 # Copyright (C) 1994-2013 Free Software Foundation, Inc.
4
65 # This Makefile.in is free software; the Free Software Foundation
76 # gives unlimited permission to copy and/or distribute it,
87 # with or without modifications, as long as this notice is preserved.
1514 @SET_MAKE@
1615
1716 VPATH = @srcdir@
18 am__make_dryrun = \
19 { \
20 am__dry=no; \
17 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
18 am__make_running_with_option = \
19 case $${target_option-} in \
20 ?) ;; \
21 *) echo "am__make_running_with_option: internal error: invalid" \
22 "target option '$${target_option-}' specified" >&2; \
23 exit 1;; \
24 esac; \
25 has_opt=no; \
26 sane_makeflags=$$MAKEFLAGS; \
27 if $(am__is_gnu_make); then \
28 sane_makeflags=$$MFLAGS; \
29 else \
2130 case $$MAKEFLAGS in \
2231 *\\[\ \ ]*) \
23 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
24 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
25 *) \
26 for am__flg in $$MAKEFLAGS; do \
27 case $$am__flg in \
28 *=*|--*) ;; \
29 *n*) am__dry=yes; break;; \
30 esac; \
31 done;; \
32 bs=\\; \
33 sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
34 | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
3235 esac; \
33 test $$am__dry = yes; \
34 }
36 fi; \
37 skip_next=no; \
38 strip_trailopt () \
39 { \
40 flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
41 }; \
42 for flg in $$sane_makeflags; do \
43 test $$skip_next = yes && { skip_next=no; continue; }; \
44 case $$flg in \
45 *=*|--*) continue;; \
46 -*I) strip_trailopt 'I'; skip_next=yes;; \
47 -*I?*) strip_trailopt 'I';; \
48 -*O) strip_trailopt 'O'; skip_next=yes;; \
49 -*O?*) strip_trailopt 'O';; \
50 -*l) strip_trailopt 'l'; skip_next=yes;; \
51 -*l?*) strip_trailopt 'l';; \
52 -[dEDm]) skip_next=yes;; \
53 -[JT]) skip_next=yes;; \
54 esac; \
55 case $$flg in \
56 *$$target_option*) has_opt=yes; break;; \
57 esac; \
58 done; \
59 test $$has_opt = yes
60 am__make_dryrun = (target_option=n; $(am__make_running_with_option))
61 am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
3562 pkgdatadir = $(datadir)/@PACKAGE@
3663 pkgincludedir = $(includedir)/@PACKAGE@
3764 pkglibdir = $(libdir)/@PACKAGE@
5380 target_triplet = @target@
5481 noinst_PROGRAMS = dw-anchors-test$(EXEEXT) dw-example$(EXEEXT) \
5582 dw-find-test$(EXEEXT) dw-links$(EXEEXT) dw-links2$(EXEEXT) \
56 dw-images-simple$(EXEEXT) dw-images-scaled$(EXEEXT) \
57 dw-images-scaled2$(EXEEXT) dw-lists$(EXEEXT) \
58 dw-table-aligned$(EXEEXT) dw-table$(EXEEXT) \
83 dw-image-background$(EXEEXT) dw-images-simple$(EXEEXT) \
84 dw-images-scaled$(EXEEXT) dw-images-scaled2$(EXEEXT) \
85 dw-lists$(EXEEXT) dw-table-aligned$(EXEEXT) dw-table$(EXEEXT) \
5986 dw-border-test$(EXEEXT) dw-imgbuf-mem-test$(EXEEXT) \
6087 dw-resource-test$(EXEEXT) dw-ui-test$(EXEEXT) \
6188 containers$(EXEEXT) shapes$(EXEEXT) cookies$(EXEEXT) \
6289 liang$(EXEEXT) trie$(EXEEXT) notsosimplevector$(EXEEXT) \
6390 unicode-test$(EXEEXT)
6491 subdir = test
65 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
92 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
93 $(top_srcdir)/depcomp
6694 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
6795 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
6896 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
99127 dw_find_test_DEPENDENCIES = $(top_builddir)/dw/libDw-widgets.a \
100128 $(top_builddir)/dw/libDw-fltk.a \
101129 $(top_builddir)/dw/libDw-core.a $(top_builddir)/lout/liblout.a
130 am_dw_image_background_OBJECTS = dw_image_background.$(OBJEXT)
131 dw_image_background_OBJECTS = $(am_dw_image_background_OBJECTS)
132 dw_image_background_DEPENDENCIES = $(top_builddir)/dw/libDw-widgets.a \
133 $(top_builddir)/dw/libDw-fltk.a \
134 $(top_builddir)/dw/libDw-core.a $(top_builddir)/lout/liblout.a
102135 am_dw_images_scaled_OBJECTS = dw_images_scaled.$(OBJEXT)
103136 dw_images_scaled_OBJECTS = $(am_dw_images_scaled_OBJECTS)
104137 dw_images_scaled_DEPENDENCIES = $(top_builddir)/dw/libDw-widgets.a \
174207 am_unicode_test_OBJECTS = unicode_test.$(OBJEXT)
175208 unicode_test_OBJECTS = $(am_unicode_test_OBJECTS)
176209 unicode_test_DEPENDENCIES = $(top_builddir)/lout/liblout.a
210 AM_V_P = $(am__v_P_@AM_V@)
211 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
212 am__v_P_0 = false
213 am__v_P_1 = :
214 AM_V_GEN = $(am__v_GEN_@AM_V@)
215 am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
216 am__v_GEN_0 = @echo " GEN " $@;
217 am__v_GEN_1 =
218 AM_V_at = $(am__v_at_@AM_V@)
219 am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
220 am__v_at_0 = @
221 am__v_at_1 =
177222 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
178223 depcomp = $(SHELL) $(top_srcdir)/depcomp
179224 am__depfiles_maybe = depfiles
180225 am__mv = mv -f
181226 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
182227 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
228 AM_V_CC = $(am__v_CC_@AM_V@)
229 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
230 am__v_CC_0 = @echo " CC " $@;
231 am__v_CC_1 =
183232 CCLD = $(CC)
184233 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
234 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
235 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
236 am__v_CCLD_0 = @echo " CCLD " $@;
237 am__v_CCLD_1 =
185238 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
186239 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
240 AM_V_CXX = $(am__v_CXX_@AM_V@)
241 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
242 am__v_CXX_0 = @echo " CXX " $@;
243 am__v_CXX_1 =
187244 CXXLD = $(CXX)
188245 CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
189246 -o $@
247 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
248 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
249 am__v_CXXLD_0 = @echo " CXXLD " $@;
250 am__v_CXXLD_1 =
190251 SOURCES = $(containers_SOURCES) $(cookies_SOURCES) \
191252 $(dw_anchors_test_SOURCES) $(dw_border_test_SOURCES) \
192253 $(dw_example_SOURCES) $(dw_find_test_SOURCES) \
193 $(dw_images_scaled_SOURCES) $(dw_images_scaled2_SOURCES) \
194 $(dw_images_simple_SOURCES) $(dw_imgbuf_mem_test_SOURCES) \
195 $(dw_links_SOURCES) $(dw_links2_SOURCES) $(dw_lists_SOURCES) \
254 $(dw_image_background_SOURCES) $(dw_images_scaled_SOURCES) \
255 $(dw_images_scaled2_SOURCES) $(dw_images_simple_SOURCES) \
256 $(dw_imgbuf_mem_test_SOURCES) $(dw_links_SOURCES) \
257 $(dw_links2_SOURCES) $(dw_lists_SOURCES) \
196258 $(dw_resource_test_SOURCES) $(dw_table_SOURCES) \
197259 $(dw_table_aligned_SOURCES) $(dw_ui_test_SOURCES) \
198260 $(liang_SOURCES) $(notsosimplevector_SOURCES) \
200262 DIST_SOURCES = $(containers_SOURCES) $(cookies_SOURCES) \
201263 $(dw_anchors_test_SOURCES) $(dw_border_test_SOURCES) \
202264 $(dw_example_SOURCES) $(dw_find_test_SOURCES) \
203 $(dw_images_scaled_SOURCES) $(dw_images_scaled2_SOURCES) \
204 $(dw_images_simple_SOURCES) $(dw_imgbuf_mem_test_SOURCES) \
205 $(dw_links_SOURCES) $(dw_links2_SOURCES) $(dw_lists_SOURCES) \
265 $(dw_image_background_SOURCES) $(dw_images_scaled_SOURCES) \
266 $(dw_images_scaled2_SOURCES) $(dw_images_simple_SOURCES) \
267 $(dw_imgbuf_mem_test_SOURCES) $(dw_links_SOURCES) \
268 $(dw_links2_SOURCES) $(dw_lists_SOURCES) \
206269 $(dw_resource_test_SOURCES) $(dw_table_SOURCES) \
207270 $(dw_table_aligned_SOURCES) $(dw_ui_test_SOURCES) \
208271 $(liang_SOURCES) $(notsosimplevector_SOURCES) \
212275 n|no|NO) false;; \
213276 *) (install-info --version) >/dev/null 2>&1;; \
214277 esac
278 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
279 # Read a list of newline-separated strings from the standard input,
280 # and print each of them once, without duplicates. Input order is
281 # *not* preserved.
282 am__uniquify_input = $(AWK) '\
283 BEGIN { nonempty = 0; } \
284 { items[$$0] = 1; nonempty = 1; } \
285 END { if (nonempty) { for (i in items) print i; }; } \
286 '
287 # Make sure the list of sources is unique. This is necessary because,
288 # e.g., the same source file might be shared among _SOURCES variables
289 # for different programs/libraries.
290 am__define_uniq_tagged_files = \
291 list='$(am__tagged_files)'; \
292 unique=`for i in $$list; do \
293 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
294 done | $(am__uniquify_input)`
215295 ETAGS = etags
216296 CTAGS = ctags
217297 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
218298 ACLOCAL = @ACLOCAL@
219299 AMTAR = @AMTAR@
300 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
220301 AUTOCONF = @AUTOCONF@
221302 AUTOHEADER = @AUTOHEADER@
222303 AUTOMAKE = @AUTOMAKE@
258339 LIBPTHREAD_LIBS = @LIBPTHREAD_LIBS@
259340 LIBS = @LIBS@
260341 LIBSSL_LIBS = @LIBSSL_LIBS@
342 LIBX11_LIBS = @LIBX11_LIBS@
261343 LIBZ_LIBS = @LIBZ_LIBS@
262344 LTLIBOBJS = @LTLIBOBJS@
263345 MAKEINFO = @MAKEINFO@
376458 $(top_builddir)/lout/liblout.a \
377459 @LIBFLTK_LIBS@
378460
461 dw_image_background_SOURCES = dw_image_background.cc
462 dw_image_background_LDADD = \
463 $(top_builddir)/dw/libDw-widgets.a \
464 $(top_builddir)/dw/libDw-fltk.a \
465 $(top_builddir)/dw/libDw-core.a \
466 $(top_builddir)/lout/liblout.a \
467 @LIBFLTK_LIBS@
468
379469 dw_images_simple_SOURCES = dw_images_simple.cc
380470 dw_images_simple_LDADD = \
381471 $(top_builddir)/dw/libDw-widgets.a \
532622
533623 clean-noinstPROGRAMS:
534624 -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
625
535626 containers$(EXEEXT): $(containers_OBJECTS) $(containers_DEPENDENCIES) $(EXTRA_containers_DEPENDENCIES)
536627 @rm -f containers$(EXEEXT)
537 $(CXXLINK) $(containers_OBJECTS) $(containers_LDADD) $(LIBS)
628 $(AM_V_CXXLD)$(CXXLINK) $(containers_OBJECTS) $(containers_LDADD) $(LIBS)
629
538630 cookies$(EXEEXT): $(cookies_OBJECTS) $(cookies_DEPENDENCIES) $(EXTRA_cookies_DEPENDENCIES)
539631 @rm -f cookies$(EXEEXT)
540 $(LINK) $(cookies_OBJECTS) $(cookies_LDADD) $(LIBS)
632 $(AM_V_CCLD)$(LINK) $(cookies_OBJECTS) $(cookies_LDADD) $(LIBS)
633
541634 dw-anchors-test$(EXEEXT): $(dw_anchors_test_OBJECTS) $(dw_anchors_test_DEPENDENCIES) $(EXTRA_dw_anchors_test_DEPENDENCIES)
542635 @rm -f dw-anchors-test$(EXEEXT)
543 $(CXXLINK) $(dw_anchors_test_OBJECTS) $(dw_anchors_test_LDADD) $(LIBS)
636 $(AM_V_CXXLD)$(CXXLINK) $(dw_anchors_test_OBJECTS) $(dw_anchors_test_LDADD) $(LIBS)
637
544638 dw-border-test$(EXEEXT): $(dw_border_test_OBJECTS) $(dw_border_test_DEPENDENCIES) $(EXTRA_dw_border_test_DEPENDENCIES)
545639 @rm -f dw-border-test$(EXEEXT)
546 $(CXXLINK) $(dw_border_test_OBJECTS) $(dw_border_test_LDADD) $(LIBS)
640 $(AM_V_CXXLD)$(CXXLINK) $(dw_border_test_OBJECTS) $(dw_border_test_LDADD) $(LIBS)
641
547642 dw-example$(EXEEXT): $(dw_example_OBJECTS) $(dw_example_DEPENDENCIES) $(EXTRA_dw_example_DEPENDENCIES)
548643 @rm -f dw-example$(EXEEXT)
549 $(CXXLINK) $(dw_example_OBJECTS) $(dw_example_LDADD) $(LIBS)
644 $(AM_V_CXXLD)$(CXXLINK) $(dw_example_OBJECTS) $(dw_example_LDADD) $(LIBS)
645
550646 dw-find-test$(EXEEXT): $(dw_find_test_OBJECTS) $(dw_find_test_DEPENDENCIES) $(EXTRA_dw_find_test_DEPENDENCIES)
551647 @rm -f dw-find-test$(EXEEXT)
552 $(CXXLINK) $(dw_find_test_OBJECTS) $(dw_find_test_LDADD) $(LIBS)
648 $(AM_V_CXXLD)$(CXXLINK) $(dw_find_test_OBJECTS) $(dw_find_test_LDADD) $(LIBS)
649
650 dw-image-background$(EXEEXT): $(dw_image_background_OBJECTS) $(dw_image_background_DEPENDENCIES) $(EXTRA_dw_image_background_DEPENDENCIES)
651 @rm -f dw-image-background$(EXEEXT)
652 $(AM_V_CXXLD)$(CXXLINK) $(dw_image_background_OBJECTS) $(dw_image_background_LDADD) $(LIBS)
653
553654 dw-images-scaled$(EXEEXT): $(dw_images_scaled_OBJECTS) $(dw_images_scaled_DEPENDENCIES) $(EXTRA_dw_images_scaled_DEPENDENCIES)
554655 @rm -f dw-images-scaled$(EXEEXT)
555 $(CXXLINK) $(dw_images_scaled_OBJECTS) $(dw_images_scaled_LDADD) $(LIBS)
656 $(AM_V_CXXLD)$(CXXLINK) $(dw_images_scaled_OBJECTS) $(dw_images_scaled_LDADD) $(LIBS)
657
556658 dw-images-scaled2$(EXEEXT): $(dw_images_scaled2_OBJECTS) $(dw_images_scaled2_DEPENDENCIES) $(EXTRA_dw_images_scaled2_DEPENDENCIES)
557659 @rm -f dw-images-scaled2$(EXEEXT)
558 $(CXXLINK) $(dw_images_scaled2_OBJECTS) $(dw_images_scaled2_LDADD) $(LIBS)
660 $(AM_V_CXXLD)$(CXXLINK) $(dw_images_scaled2_OBJECTS) $(dw_images_scaled2_LDADD) $(LIBS)
661
559662 dw-images-simple$(EXEEXT): $(dw_images_simple_OBJECTS) $(dw_images_simple_DEPENDENCIES) $(EXTRA_dw_images_simple_DEPENDENCIES)
560663 @rm -f dw-images-simple$(EXEEXT)
561 $(CXXLINK) $(dw_images_simple_OBJECTS) $(dw_images_simple_LDADD) $(LIBS)
664 $(AM_V_CXXLD)$(CXXLINK) $(dw_images_simple_OBJECTS) $(dw_images_simple_LDADD) $(LIBS)
665
562666 dw-imgbuf-mem-test$(EXEEXT): $(dw_imgbuf_mem_test_OBJECTS) $(dw_imgbuf_mem_test_DEPENDENCIES) $(EXTRA_dw_imgbuf_mem_test_DEPENDENCIES)
563667 @rm -f dw-imgbuf-mem-test$(EXEEXT)
564 $(CXXLINK) $(dw_imgbuf_mem_test_OBJECTS) $(dw_imgbuf_mem_test_LDADD) $(LIBS)
668 $(AM_V_CXXLD)$(CXXLINK) $(dw_imgbuf_mem_test_OBJECTS) $(dw_imgbuf_mem_test_LDADD) $(LIBS)
669
565670 dw-links$(EXEEXT): $(dw_links_OBJECTS) $(dw_links_DEPENDENCIES) $(EXTRA_dw_links_DEPENDENCIES)
566671 @rm -f dw-links$(EXEEXT)
567 $(CXXLINK) $(dw_links_OBJECTS) $(dw_links_LDADD) $(LIBS)
672 $(AM_V_CXXLD)$(CXXLINK) $(dw_links_OBJECTS) $(dw_links_LDADD) $(LIBS)
673
568674 dw-links2$(EXEEXT): $(dw_links2_OBJECTS) $(dw_links2_DEPENDENCIES) $(EXTRA_dw_links2_DEPENDENCIES)
569675 @rm -f dw-links2$(EXEEXT)
570 $(CXXLINK) $(dw_links2_OBJECTS) $(dw_links2_LDADD) $(LIBS)
676 $(AM_V_CXXLD)$(CXXLINK) $(dw_links2_OBJECTS) $(dw_links2_LDADD) $(LIBS)
677
571678 dw-lists$(EXEEXT): $(dw_lists_OBJECTS) $(dw_lists_DEPENDENCIES) $(EXTRA_dw_lists_DEPENDENCIES)
572679 @rm -f dw-lists$(EXEEXT)
573 $(CXXLINK) $(dw_lists_OBJECTS) $(dw_lists_LDADD) $(LIBS)
680 $(AM_V_CXXLD)$(CXXLINK) $(dw_lists_OBJECTS) $(dw_lists_LDADD) $(LIBS)
681
574682 dw-resource-test$(EXEEXT): $(dw_resource_test_OBJECTS) $(dw_resource_test_DEPENDENCIES) $(EXTRA_dw_resource_test_DEPENDENCIES)
575683 @rm -f dw-resource-test$(EXEEXT)
576 $(CXXLINK) $(dw_resource_test_OBJECTS) $(dw_resource_test_LDADD) $(LIBS)
684 $(AM_V_CXXLD)$(CXXLINK) $(dw_resource_test_OBJECTS) $(dw_resource_test_LDADD) $(LIBS)
685
577686 dw-table$(EXEEXT): $(dw_table_OBJECTS) $(dw_table_DEPENDENCIES) $(EXTRA_dw_table_DEPENDENCIES)
578687 @rm -f dw-table$(EXEEXT)
579 $(CXXLINK) $(dw_table_OBJECTS) $(dw_table_LDADD) $(LIBS)
688 $(AM_V_CXXLD)$(CXXLINK) $(dw_table_OBJECTS) $(dw_table_LDADD) $(LIBS)
689
580690 dw-table-aligned$(EXEEXT): $(dw_table_aligned_OBJECTS) $(dw_table_aligned_DEPENDENCIES) $(EXTRA_dw_table_aligned_DEPENDENCIES)
581691 @rm -f dw-table-aligned$(EXEEXT)
582 $(CXXLINK) $(dw_table_aligned_OBJECTS) $(dw_table_aligned_LDADD) $(LIBS)
692 $(AM_V_CXXLD)$(CXXLINK) $(dw_table_aligned_OBJECTS) $(dw_table_aligned_LDADD) $(LIBS)
693
583694 dw-ui-test$(EXEEXT): $(dw_ui_test_OBJECTS) $(dw_ui_test_DEPENDENCIES) $(EXTRA_dw_ui_test_DEPENDENCIES)
584695 @rm -f dw-ui-test$(EXEEXT)
585 $(CXXLINK) $(dw_ui_test_OBJECTS) $(dw_ui_test_LDADD) $(LIBS)
696 $(AM_V_CXXLD)$(CXXLINK) $(dw_ui_test_OBJECTS) $(dw_ui_test_LDADD) $(LIBS)
697
586698 liang$(EXEEXT): $(liang_OBJECTS) $(liang_DEPENDENCIES) $(EXTRA_liang_DEPENDENCIES)
587699 @rm -f liang$(EXEEXT)
588 $(CXXLINK) $(liang_OBJECTS) $(liang_LDADD) $(LIBS)
700 $(AM_V_CXXLD)$(CXXLINK) $(liang_OBJECTS) $(liang_LDADD) $(LIBS)
701
589702 notsosimplevector$(EXEEXT): $(notsosimplevector_OBJECTS) $(notsosimplevector_DEPENDENCIES) $(EXTRA_notsosimplevector_DEPENDENCIES)
590703 @rm -f notsosimplevector$(EXEEXT)
591 $(CXXLINK) $(notsosimplevector_OBJECTS) $(notsosimplevector_LDADD) $(LIBS)
704 $(AM_V_CXXLD)$(CXXLINK) $(notsosimplevector_OBJECTS) $(notsosimplevector_LDADD) $(LIBS)
705
592706 shapes$(EXEEXT): $(shapes_OBJECTS) $(shapes_DEPENDENCIES) $(EXTRA_shapes_DEPENDENCIES)
593707 @rm -f shapes$(EXEEXT)
594 $(CXXLINK) $(shapes_OBJECTS) $(shapes_LDADD) $(LIBS)
708 $(AM_V_CXXLD)$(CXXLINK) $(shapes_OBJECTS) $(shapes_LDADD) $(LIBS)
709
595710 trie$(EXEEXT): $(trie_OBJECTS) $(trie_DEPENDENCIES) $(EXTRA_trie_DEPENDENCIES)
596711 @rm -f trie$(EXEEXT)
597 $(CXXLINK) $(trie_OBJECTS) $(trie_LDADD) $(LIBS)
712 $(AM_V_CXXLD)$(CXXLINK) $(trie_OBJECTS) $(trie_LDADD) $(LIBS)
713
598714 unicode-test$(EXEEXT): $(unicode_test_OBJECTS) $(unicode_test_DEPENDENCIES) $(EXTRA_unicode_test_DEPENDENCIES)
599715 @rm -f unicode-test$(EXEEXT)
600 $(CXXLINK) $(unicode_test_OBJECTS) $(unicode_test_LDADD) $(LIBS)
716 $(AM_V_CXXLD)$(CXXLINK) $(unicode_test_OBJECTS) $(unicode_test_LDADD) $(LIBS)
601717
602718 mostlyclean-compile:
603719 -rm -f *.$(OBJEXT)
611727 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_border_test.Po@am__quote@
612728 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_example.Po@am__quote@
613729 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_find_test.Po@am__quote@
730 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_image_background.Po@am__quote@
614731 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_images_scaled.Po@am__quote@
615732 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_images_scaled2.Po@am__quote@
616733 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dw_images_simple.Po@am__quote@
630747 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode_test.Po@am__quote@
631748
632749 .c.o:
633 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
634 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
635 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
750 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
751 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
752 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
636753 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
637 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
754 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
638755
639756 .c.obj:
640 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
641 @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
642 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
757 @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
758 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
759 @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
643760 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
644 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
761 @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
645762
646763 .cc.o:
647 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
648 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
649 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
764 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
765 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
766 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
650767 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
651 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
768 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
652769
653770 .cc.obj:
654 @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
655 @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
656 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
771 @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
772 @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
773 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
657774 @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
658 @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
659
660 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
661 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
662 unique=`for i in $$list; do \
663 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
664 done | \
665 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
666 END { if (nonempty) { for (i in files) print i; }; }'`; \
667 mkid -fID $$unique
668 tags: TAGS
669
670 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
671 $(TAGS_FILES) $(LISP)
775 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
776
777 ID: $(am__tagged_files)
778 $(am__define_uniq_tagged_files); mkid -fID $$unique
779 tags: tags-am
780 TAGS: tags
781
782 tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
672783 set x; \
673784 here=`pwd`; \
674 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
675 unique=`for i in $$list; do \
676 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
677 done | \
678 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
679 END { if (nonempty) { for (i in files) print i; }; }'`; \
785 $(am__define_uniq_tagged_files); \
680786 shift; \
681787 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
682788 test -n "$$unique" || unique=$$empty_fix; \
688794 $$unique; \
689795 fi; \
690796 fi
691 ctags: CTAGS
692 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
693 $(TAGS_FILES) $(LISP)
694 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
695 unique=`for i in $$list; do \
696 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
697 done | \
698 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
699 END { if (nonempty) { for (i in files) print i; }; }'`; \
797 ctags: ctags-am
798
799 CTAGS: ctags
800 ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
801 $(am__define_uniq_tagged_files); \
700802 test -z "$(CTAGS_ARGS)$$unique" \
701803 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
702804 $$unique
705807 here=`$(am__cd) $(top_builddir) && pwd` \
706808 && $(am__cd) $(top_srcdir) \
707809 && gtags -i $(GTAGS_ARGS) "$$here"
810 cscopelist: cscopelist-am
811
812 cscopelist-am: $(am__tagged_files)
813 list='$(am__tagged_files)'; \
814 case "$(srcdir)" in \
815 [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
816 *) sdir=$(subdir)/$(srcdir) ;; \
817 esac; \
818 for i in $$list; do \
819 if test -f "$$i"; then \
820 echo "$(subdir)/$$i"; \
821 else \
822 echo "$$sdir/$$i"; \
823 fi; \
824 done >> $(top_builddir)/cscope.files
708825
709826 distclean-tags:
710827 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
844961
845962 .MAKE: install-am install-strip
846963
847 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
848 clean-noinstPROGRAMS ctags distclean distclean-compile \
849 distclean-generic distclean-tags distdir dvi dvi-am html \
850 html-am info info-am install install-am install-data \
851 install-data-am install-dvi install-dvi-am install-exec \
852 install-exec-am install-html install-html-am install-info \
853 install-info-am install-man install-pdf install-pdf-am \
854 install-ps install-ps-am install-strip installcheck \
855 installcheck-am installdirs maintainer-clean \
964 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
965 clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
966 distclean-compile distclean-generic distclean-tags distdir dvi \
967 dvi-am html html-am info info-am install install-am \
968 install-data install-data-am install-dvi install-dvi-am \
969 install-exec install-exec-am install-html install-html-am \
970 install-info install-info-am install-man install-pdf \
971 install-pdf-am install-ps install-ps-am install-strip \
972 installcheck installcheck-am installdirs maintainer-clean \
856973 maintainer-clean-generic mostlyclean mostlyclean-compile \
857 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
974 mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
858975 uninstall-am
859976
860977
1212 h.put (new String ("one"));
1313 h.put (new String ("two"));
1414 h.put (new String ("three"));
15
15
1616 puts (h.toString());
1717 }
1818
2525 h.put (new String ("one"), new Integer (1));
2626 h.put (new String ("two"), new Integer (2));
2727 h.put (new String ("three"), new Integer (3));
28
28
2929 puts (h.toString());
3030
3131 h.put (new String ("one"), new Integer (4));
6464
6565 v.insertSorted (new String ("three"));
6666 puts (v.toString());
67
67
6868 v.insertSorted (new String ("five"));
6969 puts (v.toString());
7070
7777 for (int b = 0; b < 2; b++) {
7878 bool mustExist = b;
7979 printf ("mustExist = %s\n", mustExist ? "true" : "false");
80
80
8181 String k ("alpha");
8282 printf (" '%s' -> %d\n", k.chars(), v.bsearch (&k, mustExist));
83
83
8484 for (Iterator<String> it = v.iterator(); it.hasNext(); ) {
8585 String *k1 = it.getNext();
8686 printf (" '%s' -> %d\n", k1->chars(), v.bsearch (k1, mustExist));
87
87
8888 char buf[64];
8989 strcpy (buf, k1->chars());
9090 strcat (buf, "-var");
0 /*
1 * Dillo Widget
2 *
3 * Copyright 2013 Sebastian Geerken <sgeerken@dillo.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include <stdlib.h>
20
21 #include <FL/Fl.H>
22 #include <FL/Fl_Window.H>
23
24 #include "../dw/core.hh"
25 #include "../dw/fltkcore.hh"
26 #include "../dw/fltkviewport.hh"
27 #include "../dw/textblock.hh"
28 #include "../dw/image.hh"
29
30 using namespace lout::signal;
31 using namespace lout::misc;
32 using namespace dw;
33 using namespace dw::core;
34 using namespace dw::core::style;
35 using namespace dw::fltk;
36
37 class ImageStyleDeletionReceiver: public ObservedObject::DeletionReceiver
38 {
39 public:
40 void deleted (ObservedObject *object);
41 };
42
43 static StyleImage *image1 = NULL, *image2 = NULL;
44 static Layout *layout;
45 static int imgRow1 = 0, imgRow2 = 0;
46 static ImageStyleDeletionReceiver isdr;
47
48 void ImageStyleDeletionReceiver::deleted (ObservedObject *object)
49 {
50 if ((StyleImage*)object == image1)
51 image1 = NULL;
52 else if ((StyleImage*)object == image2)
53 image2 = NULL;
54 else
55 assertNotReached ();
56 }
57
58 static void imageInitTimeout (void *data)
59 {
60 if (image1) {
61 Imgbuf *imgbuf1 = layout->createImgbuf (Imgbuf::RGB, 400, 200, 1);
62 image1->getMainImgRenderer()->setBuffer (imgbuf1, false);
63 }
64
65 if (image2) {
66 Imgbuf *imgbuf2 = layout->createImgbuf (Imgbuf::RGB, 100, 100, 1);
67 image2->getMainImgRenderer()->setBuffer (imgbuf2, false);
68 }
69 }
70
71 static void imageDrawTimeout (void *data)
72 {
73 Imgbuf *imgbuf1 = image1 ? image1->getImgbufSrc () : NULL;
74 Imgbuf *imgbuf2 = image2 ? image2->getImgbufSrc () : NULL;
75
76 if (imgbuf1 && imgRow1 < 200) {
77 byte buf[3 * 400];
78 for(int x = 0; x < 400; x++) {
79 buf[3 * x + 0] = 128 + x * 127 / 399;
80 buf[3 * x + 1] = 128 + (399 - x) * 127 / 399;
81 buf[3 * x + 2] = 128 + imgRow1 * 127 / 199;
82 }
83
84 imgbuf1->copyRow (imgRow1, buf);
85 image1->getMainImgRenderer()->drawRow (imgRow1);
86 imgRow1++;
87 }
88
89 if (imgbuf2 && imgRow2 < 100) {
90 byte buf[3 * 100];
91 for(int x = 0; x < 100; x++) {
92 int r = 128 + rand () % 127;
93 buf[3 * x + 0] = buf[3 * x + 1] = buf[3 * x + 2] = r;
94 }
95
96 imgbuf2->copyRow (imgRow2, buf);
97 image2->getMainImgRenderer()->drawRow (imgRow2);
98 imgRow2++;
99 }
100
101 if(imgRow1 < 200 || imgRow2 < 100)
102 Fl::repeat_timeout (0.5, imageDrawTimeout, NULL);
103 }
104
105 int main(int argc, char **argv)
106 {
107 FltkPlatform *platform = new FltkPlatform ();
108 layout = new Layout (platform);
109
110 Fl_Window *window = new Fl_Window(200, 300, "Dw Example");
111 window->box(FL_NO_BOX);
112 window->begin();
113
114 FltkViewport *viewport = new FltkViewport (0, 0, 200, 300);
115 layout->attachView (viewport);
116
117 image1 = StyleImage::create ();
118 image1->connectDeletion (&isdr);
119 layout->setBgImage (image1, BACKGROUND_REPEAT_Y,
120 BACKGROUND_ATTACHMENT_SCROLL, createPerLength (0.5),
121 createAbsLength (30));
122
123 StyleAttrs styleAttrs;
124 styleAttrs.initValues ();
125 styleAttrs.margin.setVal (5);
126 styleAttrs.x_lang[0] = 'e';
127 styleAttrs.x_lang[1] = 'n';
128
129 FontAttrs fontAttrs;
130 fontAttrs.name = "Bitstream Charter";
131 fontAttrs.size = 14;
132 fontAttrs.weight = 400;
133 fontAttrs.style = FONT_STYLE_NORMAL;
134 fontAttrs.letterSpacing = 0;
135 fontAttrs.fontVariant = FONT_VARIANT_NORMAL;
136 styleAttrs.font = style::Font::create (layout, &fontAttrs);
137
138 styleAttrs.color = Color::create (layout, 0x000000);
139 //styleAttrs.backgroundColor = Color::create (layout, 0xffffff);
140
141 Style *widgetStyle = Style::create (&styleAttrs);
142
143 Textblock *textblock = new Textblock (false);
144 textblock->setStyle (widgetStyle);
145 layout->setWidget (textblock);
146
147 widgetStyle->unref();
148
149 styleAttrs.margin.setVal (0);
150 styleAttrs.backgroundColor = NULL;
151 styleAttrs.backgroundImage = NULL;
152
153 Style *wordStyle = Style::create (&styleAttrs);
154
155 image2 = styleAttrs.backgroundImage = StyleImage::create ();
156 image2->connectDeletion (&isdr);
157 styleAttrs.backgroundRepeat = BACKGROUND_REPEAT;
158 styleAttrs.backgroundPositionX = createPerLength (0);
159 styleAttrs.backgroundPositionY = createPerLength (0);
160 Style *wordStyleBg = Style::create (&styleAttrs);
161
162 for(int i = 1; i <= 1; i++) {
163 char buf[4];
164 sprintf(buf, "%d.", i);
165
166 const char *words[] = { "This", "is", "the", buf, "paragraph.",
167 "Here", "comes", "some", "more", "text",
168 "to", "demonstrate", "word", "wrapping.",
169 NULL };
170
171 for(int j = 0; words[j]; j++) {
172 textblock->addText(words[j], j == 11 ? wordStyleBg : wordStyle);
173 textblock->addSpace(wordStyle);
174 }
175
176 textblock->addParbreak(10, wordStyle);
177 }
178
179 wordStyle->unref();
180 wordStyleBg->unref();
181
182 textblock->flush ();
183
184 window->resizable(viewport);
185 window->show();
186
187 Fl::add_timeout (1.0, imageInitTimeout, NULL);
188 Fl::add_timeout (0.1, imageDrawTimeout, NULL);
189
190 int errorCode = Fl::run();
191
192 delete layout;
193
194 return errorCode;
195 }
4040 static void imageInitTimeout (void *data)
4141 {
4242 //imgbuf = layout->createImgbuf (Imgbuf::RGBA, 400, 200);
43 imgbuf = layout->createImgbuf (Imgbuf::RGB, 400, 200);
43 imgbuf = layout->createImgbuf (Imgbuf::RGB, 400, 200, 1);
4444 image->setBuffer (imgbuf);
4545 }
4646
3939
4040 static void imageInitTimeout (void *data)
4141 {
42 imgbuf = layout->createImgbuf (Imgbuf::RGB, 400, 200);
42 imgbuf = layout->createImgbuf (Imgbuf::RGB, 400, 200, 1);
4343 image1->setBuffer (imgbuf);
4444 image2->setBuffer (imgbuf);
4545 }
4141 {
4242 const bool resize = true;
4343 //imgbuf = layout->createImgbuf (Imgbuf::RGBA, 400, 200);
44 imgbuf = layout->createImgbuf (Imgbuf::RGB, 400, 200);
44 imgbuf = layout->createImgbuf (Imgbuf::RGB, 400, 200, 1);
4545 image->setBuffer (imgbuf, resize);
4646 }
4747
2828 FltkPlatform *platform = new FltkPlatform ();
2929 Layout *layout = new Layout (platform);
3030
31 Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100);
31 Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100, 1);
3232 rootbuf->ref (); // Extra reference by the dicache.
3333 printf ("=== Can be deleted? %s.\n",
3434 rootbuf->lastReference () ? "Yes" : "No");
5151 FltkPlatform *platform = new FltkPlatform ();
5252 Layout *layout = new Layout (platform);
5353
54 Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100);
54 Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100, 1);
5555 rootbuf->setDeleteOnUnref (false);
5656 printf ("=== Can be deleted? %s.\n",
5757 !rootbuf->isReferred () ? "Yes" : "No");
8585 FltkPlatform *platform = new FltkPlatform ();
8686 Layout *layout = new Layout (platform);
8787
88 Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100);
88 Imgbuf *rootbuf = layout->createImgbuf (Imgbuf::RGB, 100, 100, 1);
8989 rootbuf->connectDeletion (new RootbufDeletionReceiver ());
9090 Imgbuf *scaledbuf = rootbuf->getScaledBuf (50, 50);
9191 rootbuf->unref ();
120120 const char *radiovalues[] = { "radio1", "radio2", NULL };
121121 form->addRadioButtonResource ("val3", radiores1, radiovalues);
122122 form->addCheckButtonResource ("check", checkres);
123 const char *selvalues[] = { "i1", "g1", "i11", "i12", "i13", "i2", "g2",
124 "i21", "i22", "i23", "i3", NULL };
123 const char *selvalues[] = { "i1", "g1", "i11", "i12", "i13", "(pop)", "i2",
124 "g2", "i21", "i22", "i23", "(pop)", "i3", NULL};
125125 form->addSelectionResource ("val4", selres[0], selvalues);
126126 form->addSelectionResource ("val5", selres[1], selvalues);
127127 form->addButtonResource ("button", buttonres, "Run!");
2424 {
2525 dw::fltk::FltkPlatform p;
2626
27 hyphenateWord (&p, "...");
28 hyphenateWord (&p, "Jahrhundertroman");
29 hyphenateWord (&p, "JAHRHUNDERTROMAN");
30 hyphenateWord (&p, "„Jahrhundertroman“");
31 hyphenateWord (&p, "währenddessen");
32 hyphenateWord (&p, "„währenddessen“");
33 hyphenateWord (&p, "Ückendorf");
34 hyphenateWord (&p, "über");
35 hyphenateWord (&p, "aber");
36 hyphenateWord (&p, "Ackermann");
37 hyphenateWord (&p, "„Ackermann“");
38 hyphenateWord (&p, "entscheidet.");
39 hyphenateWord (&p, "Grundstücksverkehrsgenehmigungszuständigkeits"
40 "übertragungsverordnung");
41 hyphenateWord (&p, "„Grundstücksverkehrsgenehmigungszuständigkeits"
42 "übertragungsverordnung“");
43 hyphenateWord (&p, "Grundstücksverkehrsgenehmigungszuständigkeit");
44 hyphenateWord (&p, "„Grundstücksverkehrsgenehmigungszuständigkeit“");
45 hyphenateWord (&p, "(6R,7R)-7-[2-(2-Amino-4-thiazolyl)-glyoxylamido]-3-"
46 "(2,5-dihydro-6-hydroxy-2-methyl-5-oxo-1,2,4-triazin-3-yl-"
47 "thiomethyl)-8-oxo-5-thia-1-azabicyclo[4.2.0]oct-2-en-2-"
48 "carbonsäure-7²-(Z)-(O-methyloxim)");
49 hyphenateWord (&p, "Abtei-Stadt");
50 hyphenateWord (&p, "Nordrhein-Westfalen");
51 hyphenateWord (&p, "kurz\xc2\xa0und\xc2\xa0knapp");
52 hyphenateWord (&p, "weiß");
53 hyphenateWord (&p, "www.dillo.org");
27 if (argc > 1) {
28 hyphenateWord (&p, argv[1]);
29 } else {
30 hyphenateWord (&p, "...");
31 hyphenateWord (&p, "Jahrhundertroman");
32 hyphenateWord (&p, "JAHRHUNDERTROMAN");
33 hyphenateWord (&p, "„Jahrhundertroman“");
34 hyphenateWord (&p, "währenddessen");
35 hyphenateWord (&p, "„währenddessen“");
36 hyphenateWord (&p, "Ückendorf");
37 hyphenateWord (&p, "über");
38 hyphenateWord (&p, "aber");
39 hyphenateWord (&p, "Ackermann");
40 hyphenateWord (&p, "„Ackermann“");
41 hyphenateWord (&p, "entscheidet.");
42 hyphenateWord (&p, "Grundstücksverkehrsgenehmigungszuständigkeits"
43 "übertragungsverordnung");
44 hyphenateWord (&p, "„Grundstücksverkehrsgenehmigungszuständigkeits"
45 "übertragungsverordnung“");
46 hyphenateWord (&p, "Grundstücksverkehrsgenehmigungszuständigkeit");
47 hyphenateWord (&p, "„Grundstücksverkehrsgenehmigungszuständigkeit“");
48 hyphenateWord (&p, "(6R,7R)-7-[2-(2-Amino-4-thiazolyl)-glyoxylamido]-3-"
49 "(2,5-dihydro-6-hydroxy-2-methyl-5-oxo-1,2,4-triazin-3-yl-"
50 "thiomethyl)-8-oxo-5-thia-1-azabicyclo[4.2.0]oct-2-en-2-"
51 "carbonsäure-7²-(Z)-(O-methyloxim)");
52 hyphenateWord (&p, "Abtei-Stadt");
53 hyphenateWord (&p, "Nordrhein-Westfalen");
54 hyphenateWord (&p, "kurz\xc2\xa0und\xc2\xa0knapp");
55 hyphenateWord (&p, "weiß");
56 hyphenateWord (&p, "www.dillo.org");
57 }
5458
5559 return 0;
5660 }
3333 s - t2 < t2len && (s = fl_utf8fwd (s + 1, t2, t2 + t2len)))
3434 printf ("%3d -> U+%04x\n", (int)(s - t2),
3535 decodeUtf8(s, t2len - (s - t2)));
36
36
3737 return 0;
3838 }